From 892fc6d7b64364b230261daa967518a71748c01b Mon Sep 17 00:00:00 2001 From: Bruno Cardoso Lopes Date: Tue, 18 Jan 2011 21:17:09 +0000 Subject: [PATCH] Fix the encoding of t2ISB by using the right class and also parse it correctly git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123776 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMInstrThumb2.td | 2 +- lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 2 +- test/MC/ARM/arm_instructions.s | 3 +++ test/MC/ARM/thumb2.s | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/Target/ARM/ARMInstrThumb2.td b/lib/Target/ARM/ARMInstrThumb2.td index 1bd853005e1..98e587a3d07 100644 --- a/lib/Target/ARM/ARMInstrThumb2.td +++ b/lib/Target/ARM/ARMInstrThumb2.td @@ -2808,7 +2808,7 @@ def t2DSB : AInoP<(outs), (ins memb_opt:$opt), ThumbFrm, NoItinerary, } // ISB has only full system option -- for disassembly only -def t2ISB : T2I<(outs), (ins), NoItinerary, "isb", "", +def t2ISB : AInoP<(outs), (ins), ThumbFrm, NoItinerary, "isb", "", [/* For disassembly only; pattern left blank */]>, Requires<[IsThumb2, HasV7]> { let Inst{31-4} = 0xf3bf8f6; diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 4948ad5e625..6a8b6582157 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -1193,7 +1193,7 @@ GetMnemonicAcceptInfo(StringRef Mnemonic, bool &CanAcceptCarrySet, Mnemonic == "cps" || Mnemonic == "mcr2" || Mnemonic == "it" || Mnemonic == "mcrr2" || Mnemonic == "cbz" || Mnemonic == "cdp2" || Mnemonic == "trap" || Mnemonic == "mrc2" || Mnemonic == "mrrc2" || - Mnemonic == "dsb" || Mnemonic == "movs" || + Mnemonic == "dsb" || Mnemonic == "movs" || Mnemonic == "isb" || (isThumb && Mnemonic == "bkpt")) { CanAcceptPredicationCode = false; } else { diff --git a/test/MC/ARM/arm_instructions.s b/test/MC/ARM/arm_instructions.s index cbcb09f13bd..6820f027506 100644 --- a/test/MC/ARM/arm_instructions.s +++ b/test/MC/ARM/arm_instructions.s @@ -130,3 +130,6 @@ @ CHECK: bkpt #10 @ encoding: [0x7a,0x00,0x20,0xe1] bkpt #10 + +@ CHECK: isb @ encoding: [0x6f,0xf0,0x7f,0xf5] + isb diff --git a/test/MC/ARM/thumb2.s b/test/MC/ARM/thumb2.s index ceaf0a424f9..e68105e07f0 100644 --- a/test/MC/ARM/thumb2.s +++ b/test/MC/ARM/thumb2.s @@ -164,4 +164,6 @@ ldrsh.w r0, [r0] @ CHECK: bfi r0, r0, #5, #7 @ encoding: [0x60,0xf3,0x4b,0x10] bfi r0, r0, #5, #7 +@ CHECK: isb @ encoding: [0xbf,0xf3,0x6f,0x8f] + isb