aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-09-06 22:53:27 +0000
committerJim Grosbach <grosbach@apple.com>2011-09-06 22:53:27 +0000
commitaa833e53dc74db6cb6789ef7f05c620d28980983 (patch)
treeb325b7ab2c71229ce1e6459e4ea5188e2a2f0a65
parent8f6d8104fc20550da00c3a4a0bc66de64117826d (diff)
downloadexternal_llvm-aa833e53dc74db6cb6789ef7f05c620d28980983.zip
external_llvm-aa833e53dc74db6cb6789ef7f05c620d28980983.tar.gz
external_llvm-aa833e53dc74db6cb6789ef7f05c620d28980983.tar.bz2
Thumb2 parsing and encoding for ISB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139200 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/ARMInstrThumb2.td15
-rw-r--r--test/MC/ARM/basic-thumb2-instructions.s10
2 files changed, 17 insertions, 8 deletions
diff --git a/lib/Target/ARM/ARMInstrThumb2.td b/lib/Target/ARM/ARMInstrThumb2.td
index 7fcb4b0..fbaea3a 100644
--- a/lib/Target/ARM/ARMInstrThumb2.td
+++ b/lib/Target/ARM/ARMInstrThumb2.td
@@ -2794,20 +2794,19 @@ def t2DMB : AInoP<(outs), (ins memb_opt:$opt), ThumbFrm, NoItinerary,
}
def t2DSB : AInoP<(outs), (ins memb_opt:$opt), ThumbFrm, NoItinerary,
- "dsb", "\t$opt",
- [/* For disassembly only; pattern left blank */]>,
+ "dsb", "\t$opt", []>,
Requires<[IsThumb, HasDB]> {
bits<4> opt;
let Inst{31-4} = 0xf3bf8f4;
let Inst{3-0} = opt;
}
-// ISB has only full system option -- for disassembly only
-def t2ISB : AInoP<(outs), (ins), ThumbFrm, NoItinerary, "isb", "",
- [/* For disassembly only; pattern left blank */]>,
- Requires<[IsThumb2, HasV7]> {
+def t2ISB : AInoP<(outs), (ins memb_opt:$opt), ThumbFrm, NoItinerary,
+ "isb", "\t$opt",
+ []>, Requires<[IsThumb2, HasV7]> {
+ bits<4> opt;
let Inst{31-4} = 0xf3bf8f6;
- let Inst{3-0} = 0b1111;
+ let Inst{3-0} = opt;
}
class T2I_ldrex<bits<2> opcod, dag oops, dag iops, AddrMode am, int sz,
@@ -3591,4 +3590,4 @@ def : t2InstAlias<"tst${p} $Rn, $Rm",
// Memory barriers
def : InstAlias<"dmb", (t2DMB 0xf)>, Requires<[IsThumb2, HasDB]>;
def : InstAlias<"dsb", (t2DSB 0xf)>, Requires<[IsThumb2, HasDB]>;
-//def : InstAlias<"isb", (t2ISB 0xf)>, Requires<[IsThumb2, HasDB]>;
+def : InstAlias<"isb", (t2ISB 0xf)>, Requires<[IsThumb2, HasDB]>;
diff --git a/test/MC/ARM/basic-thumb2-instructions.s b/test/MC/ARM/basic-thumb2-instructions.s
index becba5b..55ec150 100644
--- a/test/MC/ARM/basic-thumb2-instructions.s
+++ b/test/MC/ARM/basic-thumb2-instructions.s
@@ -453,6 +453,16 @@ _func:
@------------------------------------------------------------------------------
+@ ISB
+@------------------------------------------------------------------------------
+ isb sy
+ isb
+
+@ CHECK: isb sy @ encoding: [0xbf,0xf3,0x6f,0x8f]
+@ CHECK: isb sy @ encoding: [0xbf,0xf3,0x6f,0x8f]
+
+
+@------------------------------------------------------------------------------
@ IT
@------------------------------------------------------------------------------
@ Test encodings of a few full IT blocks, not just the IT instruction