Index: sim/testsuite/sim/arm/movw-movt.ms |
diff --git a/sim/testsuite/sim/arm/misaligned2.ms b/sim/testsuite/sim/arm/movw-movt.ms |
similarity index 67% |
copy from sim/testsuite/sim/arm/misaligned2.ms |
copy to sim/testsuite/sim/arm/movw-movt.ms |
index 3a03326cc20bf9c6dd863b0e3e9e9d7496795d3c..1be815dc45feefeefa2bc5a9406e7f95ceb79668 100644 |
--- a/sim/testsuite/sim/arm/misaligned2.ms |
+++ b/sim/testsuite/sim/arm/movw-movt.ms |
@@ -1,6 +1,9 @@ |
-# Test LDR instructions with offsets misaligned by 2 bytes. |
+# output(): Hello, world.\n |
# mach(): all |
+# This is a test for movw & movt instructions. |
+# It emits hello world if movw & movt works appropriately. |
+ |
.macro invalid |
# This is "undefined" but it's not properly decoded yet. |
.word 0x07ffffff |
@@ -14,26 +17,19 @@ _start: |
nop |
# Skip over output text. |
- bl do_test |
-pass: |
- .asciz "pass\n" |
- .p2align 2 |
+ bl skip_output |
-do_test: |
- mov r4, r14 |
- bl continue |
-word1: |
- .word 0x5555 |
-continue: |
- ldr r6, [r14, #2] |
- ldr r7, word2 |
- cmp r6, r7 |
- # Failed. |
- bne done |
+hello_text: |
+ .asciz "Hello, world.\n" |
+ |
+ .p2align 2 |
+skip_output: |
+ movw r4, #:lower16:hello_text |
+ movt r4, #:upper16:hello_text |
output_next: |
-# Output a character (in arm mode). |
+# Output a character |
mov r0,#3 |
mov r1,r4 |
swi #0x123456 |
@@ -55,6 +51,3 @@ done: |
exit_code: |
.word 0x20026 |
- |
-word2: |
- .word 0x55550000 |