summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-07-13 19:17:36 +0000
committerJim Grosbach <grosbach@apple.com>2011-07-13 19:17:36 +0000
commitc845e55374891eef70dc1ef40926d090262117c7 (patch)
treefbd2c4610649e08a47992da5b5d9a7e18f59ff71
parent43b45e27907d1af9f3ac702efdaed5785cd348f2 (diff)
downloadbcm5719-llvm-c845e55374891eef70dc1ef40926d090262117c7.tar.gz
bcm5719-llvm-c845e55374891eef70dc1ef40926d090262117c7.zip
Add tests for ARM parsing of 'BKPT' instruction.
llvm-svn: 135063
-rw-r--r--llvm/lib/Target/ARM/ARMInstrInfo.td3
-rw-r--r--llvm/test/MC/ARM/basic-arm-instructions.s9
2 files changed, 10 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMInstrInfo.td b/llvm/lib/Target/ARM/ARMInstrInfo.td
index d87b526739e..4760459e1eb 100644
--- a/llvm/lib/Target/ARM/ARMInstrInfo.td
+++ b/llvm/lib/Target/ARM/ARMInstrInfo.td
@@ -1175,8 +1175,7 @@ def SEV : AI<(outs), (ins), MiscFrm, NoItinerary, "sev", "",
// The i32imm operand $val can be used by a debugger to store more information
// about the breakpoint.
def BKPT : AI<(outs), (ins i32imm:$val), MiscFrm, NoItinerary, "bkpt", "\t$val",
- [/* For disassembly only; pattern left blank */]>,
- Requires<[IsARM]> {
+ []>, Requires<[IsARM]> {
bits<16> val;
let Inst{3-0} = val{3-0};
let Inst{19-8} = val{15-4};
diff --git a/llvm/test/MC/ARM/basic-arm-instructions.s b/llvm/test/MC/ARM/basic-arm-instructions.s
index dd17092372f..62339f7e597 100644
--- a/llvm/test/MC/ARM/basic-arm-instructions.s
+++ b/llvm/test/MC/ARM/basic-arm-instructions.s
@@ -310,3 +310,12 @@ _func:
@ CHECK: bic r6, r6, r7, ror r2 @ encoding: [0x77,0x62,0xc6,0xe1]
@ CHECK: bic r10, r10, r1, rrx @ encoding: [0x61,0xa0,0xca,0xe1]
+@------------------------------------------------------------------------------
+@ BKPT
+@------------------------------------------------------------------------------
+ bkpt #10
+ bkpt #65535
+
+@ CHECK: bkpt #10 @ encoding: [0x7a,0x00,0x20,0xe1]
+@ CHECK: bkpt #65535 @ encoding: [0x7f,0xff,0x2f,0xe1]
+
OpenPOWER on IntegriCloud