aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/MC/ARM/basic-arm-instructions.s18
-rw-r--r--test/MC/ARM/diagnostics.s11
2 files changed, 29 insertions, 0 deletions
diff --git a/test/MC/ARM/basic-arm-instructions.s b/test/MC/ARM/basic-arm-instructions.s
index 02ccb9d..c08bb83 100644
--- a/test/MC/ARM/basic-arm-instructions.s
+++ b/test/MC/ARM/basic-arm-instructions.s
@@ -1309,6 +1309,16 @@ _func:
@------------------------------------------------------------------------------
+@ SBFX
+@------------------------------------------------------------------------------
+ sbfx r4, r5, #16, #1
+ sbfxgt r4, r5, #16, #16
+
+@ CHECK: sbfx r4, r5, #16, #1 @ encoding: [0x55,0x48,0xa0,0xe7]
+@ CHECK: sbfxgt r4, r5, #16, #16 @ encoding: [0x55,0x48,0xaf,0xc7]
+
+
+@------------------------------------------------------------------------------
@ SEL
@------------------------------------------------------------------------------
sel r9, r2, r1
@@ -2001,3 +2011,11 @@ _func:
@ CHECK: uasxeq r9, r12, r0 @ encoding: [0x30,0x9f,0x5c,0x06]
+@------------------------------------------------------------------------------
+@ UBFX
+@------------------------------------------------------------------------------
+ ubfx r4, r5, #16, #1
+ ubfxgt r4, r5, #16, #16
+
+@ CHECK: ubfx r4, r5, #16, #1 @ encoding: [0x55,0x48,0xe0,0xe7]
+@ CHECK: ubfxgt r4, r5, #16, #16 @ encoding: [0x55,0x48,0xef,0xc7]
diff --git a/test/MC/ARM/diagnostics.s b/test/MC/ARM/diagnostics.s
index e086128..cc24416 100644
--- a/test/MC/ARM/diagnostics.s
+++ b/test/MC/ARM/diagnostics.s
@@ -272,3 +272,14 @@
@ CHECK-ERRORS: error: rotate operator 'ror' expected
@ CHECK-ERRORS: sxtb16ge r2, r3, lsr #24
@ CHECK-ERRORS: ^
+
+ @ Out of range width for SBFX/UBFX
+ sbfx r4, r5, #31, #2
+ ubfxgt r4, r5, #16, #17
+
+@ CHECK-ERRORS: error: bitfield width must be in range [1,32-lsb]
+@ CHECK-ERRORS: sbfx r4, r5, #31, #2
+@ CHECK-ERRORS: ^
+@ CHECK-ERRORS: error: bitfield width must be in range [1,32-lsb]
+@ CHECK-ERRORS: ubfxgt r4, r5, #16, #17
+@ CHECK-ERRORS: ^