[llvm] r343229 - [AArch64][v8.5A] Add speculation barriers SSBB and PSSBB
Oliver Stannard via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 27 09:09:05 PDT 2018
Author: olista01
Date: Thu Sep 27 09:09:05 2018
New Revision: 343229
URL: http://llvm.org/viewvc/llvm-project?rev=343229&view=rev
Log:
[AArch64][v8.5A] Add speculation barriers SSBB and PSSBB
This adds two new barrier instructions which can be used to restrict
speculative execution of load instructions.
Patch by Pablo Barrio!
Differential revision: https://reviews.llvm.org/D52483
Added:
llvm/trunk/test/MC/AArch64/speculation-barriers.s
llvm/trunk/test/MC/Disassembler/AArch64/speculation-barriers.txt
Removed:
llvm/trunk/test/MC/AArch64/csdb.s
llvm/trunk/test/MC/Disassembler/AArch64/csdb.txt
Modified:
llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.td
llvm/trunk/test/MC/AArch64/basic-a64-instructions.s
llvm/trunk/test/MC/Disassembler/AArch64/basic-a64-instructions.txt
Modified: llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.td?rev=343229&r1=343228&r2=343229&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.td (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.td Thu Sep 27 09:09:05 2018
@@ -650,6 +650,8 @@ def SB : SimpleSystemI<0, (ins), "sb", "
def : InstAlias<"clrex", (CLREX 0xf)>;
def : InstAlias<"isb", (ISB 0xf)>;
+def : InstAlias<"ssbb", (DSB 0)>;
+def : InstAlias<"pssbb", (DSB 4)>;
def MRS : MRSI;
def MSR : MSRI;
Modified: llvm/trunk/test/MC/AArch64/basic-a64-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/basic-a64-instructions.s?rev=343229&r1=343228&r2=343229&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/basic-a64-instructions.s (original)
+++ llvm/trunk/test/MC/AArch64/basic-a64-instructions.s Thu Sep 27 09:09:05 2018
@@ -3482,6 +3482,7 @@ _func:
// CHECK: clrex // encoding: [0x5f,0x3f,0x03,0xd5]
dsb #0
+ dsb #4
dsb #12
dsb #15
dsb oshld
@@ -3496,7 +3497,8 @@ _func:
dsb ld
dsb st
dsb sy
-// CHECK: dsb #0 // encoding: [0x9f,0x30,0x03,0xd5]
+// CHECK: ssbb // encoding: [0x9f,0x30,0x03,0xd5]
+// CHECK: pssbb // encoding: [0x9f,0x34,0x03,0xd5]
// CHECK: dsb #12 // encoding: [0x9f,0x3c,0x03,0xd5]
// CHECK: dsb sy // encoding: [0x9f,0x3f,0x03,0xd5]
// CHECK: dsb oshld // encoding: [0x9f,0x31,0x03,0xd5]
Removed: llvm/trunk/test/MC/AArch64/csdb.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/csdb.s?rev=343228&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/csdb.s (original)
+++ llvm/trunk/test/MC/AArch64/csdb.s (removed)
@@ -1,4 +0,0 @@
-// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding < %s | FileCheck %s
-
- csdb
-// CHECK: csdb // encoding: [0x9f,0x22,0x03,0xd5]
Added: llvm/trunk/test/MC/AArch64/speculation-barriers.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/speculation-barriers.s?rev=343229&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/speculation-barriers.s (added)
+++ llvm/trunk/test/MC/AArch64/speculation-barriers.s Thu Sep 27 09:09:05 2018
@@ -0,0 +1,9 @@
+// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding < %s | FileCheck %s
+
+csdb
+ssbb
+pssbb
+
+// CHECK: csdb // encoding: [0x9f,0x22,0x03,0xd5]
+// CHECK: ssbb // encoding: [0x9f,0x30,0x03,0xd5]
+// CHECK: pssbb // encoding: [0x9f,0x34,0x03,0xd5]
Modified: llvm/trunk/test/MC/Disassembler/AArch64/basic-a64-instructions.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/AArch64/basic-a64-instructions.txt?rev=343229&r1=343228&r2=343229&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/AArch64/basic-a64-instructions.txt (original)
+++ llvm/trunk/test/MC/Disassembler/AArch64/basic-a64-instructions.txt Thu Sep 27 09:09:05 2018
@@ -3048,7 +3048,6 @@
0x5f 0x37 0x3 0xd5
0x5f 0x3f 0x3 0xd5
-# CHECK: dsb #0
# CHECK: dsb #12
# CHECK: dsb sy
# CHECK: dsb oshld
@@ -3063,7 +3062,6 @@
# CHECK: dsb ld
# CHECK: dsb st
# CHECK: dsb sy
-0x9f 0x30 0x3 0xd5
0x9f 0x3c 0x3 0xd5
0x9f 0x3f 0x3 0xd5
0x9f 0x31 0x3 0xd5
Removed: llvm/trunk/test/MC/Disassembler/AArch64/csdb.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/AArch64/csdb.txt?rev=343228&view=auto
==============================================================================
--- llvm/trunk/test/MC/Disassembler/AArch64/csdb.txt (original)
+++ llvm/trunk/test/MC/Disassembler/AArch64/csdb.txt (removed)
@@ -1,4 +0,0 @@
-# RUN: llvm-mc -triple aarch64-none-linux-gnu --disassemble < %s | FileCheck %s
-
-[0x9f,0x22,0x03,0xd5]
-# CHECK: csdb
Added: llvm/trunk/test/MC/Disassembler/AArch64/speculation-barriers.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/AArch64/speculation-barriers.txt?rev=343229&view=auto
==============================================================================
--- llvm/trunk/test/MC/Disassembler/AArch64/speculation-barriers.txt (added)
+++ llvm/trunk/test/MC/Disassembler/AArch64/speculation-barriers.txt Thu Sep 27 09:09:05 2018
@@ -0,0 +1,9 @@
+# RUN: llvm-mc -triple aarch64-none-linux-gnu --disassemble < %s | FileCheck %s
+
+[0x9f,0x22,0x03,0xd5]
+[0x9f,0x30,0x03,0xd5]
+[0x9f,0x34,0x03,0xd5]
+
+# CHECK: csdb
+# CHECK-NEXT: ssbb
+# CHECK-NEXT: pssbb
More information about the llvm-commits
mailing list