summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/MC/ARM/arm_fixups.s6
-rw-r--r--test/MC/ARM/complex-operands.s8
-rw-r--r--test/MC/ARM/diagnostics.s8
-rw-r--r--test/MC/ARM/thumb2-diagnostics.s11
4 files changed, 26 insertions, 7 deletions
diff --git a/test/MC/ARM/arm_fixups.s b/test/MC/ARM/arm_fixups.s
index bd6906bae7..1f56e12852 100644
--- a/test/MC/ARM/arm_fixups.s
+++ b/test/MC/ARM/arm_fixups.s
@@ -26,9 +26,9 @@
@ CHECK-BE: movt r9, :upper16:_foo @ encoding: [0xe3,0b0100AAAA,0x90'A',A]
@ CHECK-BE: @ fixup A - offset: 0, value: _foo, kind: fixup_arm_movt_hi16
- mov r2, fred
+ mov r2, :lower16:fred
-@ CHECK: movw r2, fred @ encoding: [A,0x20'A',0b0000AAAA,0xe3]
+@ CHECK: movw r2, :lower16:fred @ encoding: [A,0x20'A',0b0000AAAA,0xe3]
@ CHECK: @ fixup A - offset: 0, value: fred, kind: fixup_arm_movw_lo16
-@ CHECK-BE: movw r2, fred @ encoding: [0xe3,0b0000AAAA,0x20'A',A]
+@ CHECK-BE: movw r2, :lower16:fred @ encoding: [0xe3,0b0000AAAA,0x20'A',A]
@ CHECK-BE: @ fixup A - offset: 0, value: fred, kind: fixup_arm_movw_lo16
diff --git a/test/MC/ARM/complex-operands.s b/test/MC/ARM/complex-operands.s
index 2a721c4e10..72f8f88d2a 100644
--- a/test/MC/ARM/complex-operands.s
+++ b/test/MC/ARM/complex-operands.s
@@ -21,20 +21,20 @@ return:
.global arm_function
.type arm_function,%function
arm_function:
- mov r0, #(.L_table_end - .L_table_begin) >> 2
+ mov r0, #:lower16:((.L_table_end - .L_table_begin) >> 2)
blx return
@ CHECK-LABEL: arm_function
-@ CHECK: movw r0, #(.L_table_end-.L_table_begin)>>2
+@ CHECK: movw r0, :lower16:((.L_table_end-.L_table_begin)>>2)
@ CHECK: blx return
.global thumb_function
.type thumb_function,%function
thumb_function:
- mov r0, #(.L_table_end - .L_table_begin) >> 2
+ mov r0, #:lower16:((.L_table_end - .L_table_begin) >> 2)
blx return
@ CHECK-LABEL: thumb_function
-@ CHECK: movw r0, #(.L_table_end-.L_table_begin)>>2
+@ CHECK: movw r0, :lower16:((.L_table_end-.L_table_begin)>>2)
@ CHECK: blx return
diff --git a/test/MC/ARM/diagnostics.s b/test/MC/ARM/diagnostics.s
index 3c26f6d645..62d7daea28 100644
--- a/test/MC/ARM/diagnostics.s
+++ b/test/MC/ARM/diagnostics.s
@@ -465,3 +465,11 @@
ldm sp!, {r0}^
@ CHECK-ERRORS: error: system STM cannot have writeback register
@ CHECK-ERRORS: error: writeback register only allowed on system LDM if PC in register-list
+
+foo2:
+ mov r0, foo2
+ movw r0, foo2
+@ CHECK-ERRORS: error: immediate expression for mov requires :lower16: or :upper16
+@ CHECK-ERRORS: ^
+@ CHECK-ERRORS: error: immediate expression for mov requires :lower16: or :upper16
+@ CHECK-ERRORS: ^
diff --git a/test/MC/ARM/thumb2-diagnostics.s b/test/MC/ARM/thumb2-diagnostics.s
index 6ac2db02cc..bb96db05b9 100644
--- a/test/MC/ARM/thumb2-diagnostics.s
+++ b/test/MC/ARM/thumb2-diagnostics.s
@@ -70,3 +70,14 @@
@ CHECK-ERRORS: error: branch target out of range
@ CHECK-ERRORS: error: branch target out of range
@ CHECK-ERRORS: error: branch target out of range
+
+foo2:
+ mov r0, foo2
+ movw r0, foo2
+ movt r0, foo2
+@ CHECK-ERRORS: error: immediate expression for mov requires :lower16: or :upper16
+@ CHECK-ERRORS: ^
+@ CHECK-ERRORS: error: immediate expression for mov requires :lower16: or :upper16
+@ CHECK-ERRORS: ^
+@ CHECK-ERRORS: error: immediate expression for mov requires :lower16: or :upper16
+@ CHECK-ERRORS: ^