diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-01-05 22:09:57 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-01-15 19:18:34 -0500 |
commit | 1368b914e93a3af332f787d3d41c106d11bb90da (patch) | |
tree | 9893ccae5d2d8cbf2ce855e09d6b8f30b56a21bc /sim/testsuite/arm/movw-movt.ms | |
parent | e403a898b5893337baea73bcb001ece74042f351 (diff) | |
download | gdb-1368b914e93a3af332f787d3d41c106d11bb90da.zip gdb-1368b914e93a3af332f787d3d41c106d11bb90da.tar.gz gdb-1368b914e93a3af332f787d3d41c106d11bb90da.tar.bz2 |
sim: testsuite: flatten tree
Now that all port tests live under testsuite/sim/*/, and none live
in testsuite/ directly, flatten the structure by moving all of the
dirs under testsuite/sim/ to testsuite/ directly.
We need to stop passing --tool to dejagnu so that it searches all
dirs and not just ones that start with "sim". Since we have no
other dirs in this tree, and no plans to add any, should be fine.
Diffstat (limited to 'sim/testsuite/arm/movw-movt.ms')
-rw-r--r-- | sim/testsuite/arm/movw-movt.ms | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/sim/testsuite/arm/movw-movt.ms b/sim/testsuite/arm/movw-movt.ms new file mode 100644 index 0000000..1be815d --- /dev/null +++ b/sim/testsuite/arm/movw-movt.ms @@ -0,0 +1,53 @@ +# 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 +# This is stc which isn't recognized yet. + stc 0,cr0,[r0] + .endm + + .global _start +_start: +# Run some simple insns to confirm the engine is at least working. + nop + +# Skip over output text. + + bl skip_output + +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 + mov r0,#3 + mov r1,r4 + swi #0x123456 + +# Load next character, see if done. + add r4,r4,#1 + sub r3,r3,r3 + ldrb r5,[r4,r3] + teq r5,#0 + bne output_next + +done: + mov r0,#0x18 + ldr r1,exit_code + swi #0x123456 + +# If that fails, try to die with an invalid insn. + invalid + +exit_code: + .word 0x20026 |