diff options
author | comex | 2015-01-13 01:13:19 -0500 |
---|---|---|
committer | comex | 2015-01-13 01:16:42 -0500 |
commit | 6e12e61377daad6e9444da718b72a2612fcd2876 (patch) | |
tree | c82b1db95b1a1a55ddf468a5364480e1697198aa /test | |
parent | small thumb fixes for Rdn and stuff (diff) | |
download | substitute-6e12e61377daad6e9444da718b72a2612fcd2876.tar.gz |
add a test assembly file, not used yet
Diffstat (limited to 'test')
-rw-r--r-- | test/arm-insns.S | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/test/arm-insns.S b/test/arm-insns.S new file mode 100644 index 0000000..62b4b48 --- /dev/null +++ b/test/arm-insns.S @@ -0,0 +1,48 @@ +#ifdef THUMB2 +.thumb +.thumb_func +.syntax unified +#endif +.global foo +foo: +strex r0, r1, [pc] +mov r0, pc +#ifndef THUMB2 +add r0, pc, r1 +add r0, r1, pc +str pc, [r0], #5 +str pc, [r0], r3 +#endif +add r0, pc, #123 +mcr p15,0,pc,c14,c3,0 +str r3, [pc, #5] +str pc, [pc, #5] +#ifdef THUMB2 // it shouldn't be, though +strht r0, [r3] +#endif +ldr r0, [pc] +ldr r0, [pc, #5] +ldr pc, [r0], #5 +ldr pc, [pc] +#ifndef THUMB2 +ldr pc, [r2], r7 +adr pc, 1f +#endif +adr r3, 1f + +ldrb r1, [pc] +ldrsb r1, [pc] +ldrh r1, [pc] +ldrsh r1, [pc] +ldr r1, [pc] +ldrd r1, r2, [pc] +str r1, [pc] +strd r1, r2, [pc] + +push {r0-r3, pc} +push {r0-r3, lr} +pop {r0-r3, pc} + +1: +.long 0xdeadbeef +.long 0xdeadbeef |