From 1b43828958403f7eca575cd91fb01233b5cfe327 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Wed, 17 Aug 2011 23:11:13 +0000 Subject: [PATCH] ARM assembly parsing and encoding test for BKPT. llvm-svn: 137898 --- llvm/test/MC/ARM/basic-thumb-instructions.s | 10 ++++++++++ llvm/test/MC/ARM/thumb-diagnostics.s | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/llvm/test/MC/ARM/basic-thumb-instructions.s b/llvm/test/MC/ARM/basic-thumb-instructions.s index b5a1f31fdabf..1fe42f8978b0 100644 --- a/llvm/test/MC/ARM/basic-thumb-instructions.s +++ b/llvm/test/MC/ARM/basic-thumb-instructions.s @@ -96,3 +96,13 @@ _func: bics r1, r6 @ CHECK: bics r1, r6 @ encoding: [0xb1,0x43] + + +@------------------------------------------------------------------------------ +@ BKPT +@------------------------------------------------------------------------------ + bkpt #0 + bkpt #255 + +@ CHECK: bkpt #0 @ encoding: [0x00,0xbe] +@ CHECK: bkpt #255 @ encoding: [0xff,0xbe] diff --git a/llvm/test/MC/ARM/thumb-diagnostics.s b/llvm/test/MC/ARM/thumb-diagnostics.s index 8d8edcbfedfe..99d85fedfafe 100644 --- a/llvm/test/MC/ARM/thumb-diagnostics.s +++ b/llvm/test/MC/ARM/thumb-diagnostics.s @@ -29,3 +29,13 @@ @ CHECK-ERRORS: error: invalid operand for instruction @ CHECK-ERRORS: asrs r2, r3, #0 @ CHECK-ERRORS: ^ + +@ Out of range immediates for BKPT instruction. + bkpt #256 + bkpt #-1 +error: invalid operand for instruction + bkpt #256 + ^ +error: invalid operand for instruction + bkpt #-1 + ^