From 77951908b76c00315f1a74d09fb45530029638ec Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Tue, 6 Sep 2011 22:06:40 +0000 Subject: [PATCH] Thumb2 parsing and encoding for DBG. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139191 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMInstrThumb2.td | 10 ++++------ test/MC/ARM/basic-thumb2-instructions.s | 12 ++++++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/lib/Target/ARM/ARMInstrThumb2.td b/lib/Target/ARM/ARMInstrThumb2.td index 7aaadef93ab..8a1bcc2d64a 100644 --- a/lib/Target/ARM/ARMInstrThumb2.td +++ b/lib/Target/ARM/ARMInstrThumb2.td @@ -3173,13 +3173,11 @@ def t2WFI : T2I_hint<0b00000011, "wfi", ".w">; def t2SEV : T2I_hint<0b00000100, "sev", ".w">; def t2DBG : T2I<(outs), (ins imm0_15:$opt), NoItinerary, "dbg", "\t$opt", []> { - let Inst{31-20} = 0xf3a; - let Inst{15-14} = 0b10; - let Inst{12} = 0; - let Inst{10-8} = 0b000; - let Inst{7-4} = 0b1111; - bits<4> opt; + let Inst{31-20} = 0b111100111010; + let Inst{19-16} = 0b1111; + let Inst{15-8} = 0b10000000; + let Inst{7-4} = 0b1111; let Inst{3-0} = opt; } diff --git a/test/MC/ARM/basic-thumb2-instructions.s b/test/MC/ARM/basic-thumb2-instructions.s index c9a9a112174..3039f2442f2 100644 --- a/test/MC/ARM/basic-thumb2-instructions.s +++ b/test/MC/ARM/basic-thumb2-instructions.s @@ -356,6 +356,18 @@ _func: @ CHECK: cmp.w r1, r4, ror #15 @ encoding: [0xb1,0xeb,0xf4,0x3f] +@------------------------------------------------------------------------------ +@ DBG +@------------------------------------------------------------------------------ + dbg #5 + dbg #0 + dbg #15 + +@ CHECK: dbg #5 @ encoding: [0xaf,0xf3,0xf5,0x80] +@ CHECK: dbg #0 @ encoding: [0xaf,0xf3,0xf0,0x80] +@ CHECK: dbg #15 @ encoding: [0xaf,0xf3,0xff,0x80] + + @------------------------------------------------------------------------------ @ IT @------------------------------------------------------------------------------