diff options
Diffstat (limited to 'gas')
-rw-r--r-- | gas/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/.Sanitize | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/arch4t.s | 21 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/arm.exp | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/immed.s | 11 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/thumb.s | 185 |
6 files changed, 233 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 0329022..a89ea89 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +Thu Aug 15 16:06:02 1996 James G. Smith <jsmith@cygnus.co.uk> + + * gas/arm/thumb.s: Added. + * gas/arm/immed.s: Added. + * gas/arm/arch4t.s: Added. + * gas/arm/arm.exp: Updated to run the new tests. + Tue Aug 6 11:06:29 1996 Jeffrey A Law (law@cygnus.com) * gas/h8300/misch.s: Reenable "eepmov.w" test. diff --git a/gas/testsuite/gas/arm/.Sanitize b/gas/testsuite/gas/arm/.Sanitize index 2041d3a..d1e6d36 100644 --- a/gas/testsuite/gas/arm/.Sanitize +++ b/gas/testsuite/gas/arm/.Sanitize @@ -25,6 +25,7 @@ Do-first: Things-to-keep: +arch4t.s arm.exp arm3.s arm6.s @@ -33,9 +34,11 @@ arm7t.d arm7t.s copro.s float.s +immed.s inst.s le-fpconst.s le-fpconst.d +thumb.s Things-to-lose: diff --git a/gas/testsuite/gas/arm/arch4t.s b/gas/testsuite/gas/arm/arch4t.s new file mode 100644 index 0000000..8d28f7f --- /dev/null +++ b/gas/testsuite/gas/arm/arch4t.s @@ -0,0 +1,21 @@ +.text +.align 0 + + bx r0 + bxeq r1 + +foo: + ldrh r3, foo + ldrsh r4, [r5] + ldrsb r4, [r1, r3] + ldrsh r1, [r4, r4]! + ldreqsb r1, [r5, -r3] + ldrneh r2, [r6], r7 + ldrccsh r2, [r7], +r8 + ldrsb r2, [r3, #255] + ldrsh r1, [r4, #-250] + ldrsb r1, [r5, #+240] + + strh r2, bar + strneh r3, [r3] +bar: diff --git a/gas/testsuite/gas/arm/arm.exp b/gas/testsuite/gas/arm/arm.exp index 91b698f..c171bba 100644 --- a/gas/testsuite/gas/arm/arm.exp +++ b/gas/testsuite/gas/arm/arm.exp @@ -12,8 +12,14 @@ if [istarget arm-*-*] then { run_dump_test "arm7t" + gas_test "thumb.s" "" $stdoptlist "Thumb instructions" + + gas_test "arch4t.s" "" $stdoptlist "Arm architecture 4t instructions" + gas_test "copro.s" "" $stdoptlist "Co processor instructions" + gas_test "immed.s" "" $stdoptlist "immediate expressions" + gas_test "float.s" "" $stdoptlist "Core floating point instructions" } diff --git a/gas/testsuite/gas/arm/immed.s b/gas/testsuite/gas/arm/immed.s new file mode 100644 index 0000000..5d2092b --- /dev/null +++ b/gas/testsuite/gas/arm/immed.s @@ -0,0 +1,11 @@ +@ Tests for complex immediate expressions - none of these need +@ relocations + .text +bar: + mov r0, #0 + mov r0, #(. - bar - 8) + ldr r0, bar + ldr r0, [pc, # (bar - . -8)] + .space 4096 + mov r0, #(. - bar - 8) & 0xff + ldr r0, [pc, # (bar - . -8) & 0xff] diff --git a/gas/testsuite/gas/arm/thumb.s b/gas/testsuite/gas/arm/thumb.s new file mode 100644 index 0000000..095befb --- /dev/null +++ b/gas/testsuite/gas/arm/thumb.s @@ -0,0 +1,185 @@ + .text + .code 16 +foo: + lsl r2, r1, #3 + lsr r3, r4, #31 +wibble/data: + asr r7, r0, #5 + + lsl r1, r2, #0 + lsr r3, r4, #0 + asr r4, r5, #0 + + lsr r6, r7, #32 + asr r0, r1, #32 + + add r1, r2, r3 + add r2, r4, #2 + sub r3, r5, r7 + sub r2, r4, #7 + + mov r4, #255 + cmp r3, #250 + add r6, #123 + sub r5, #128 + + and r3, r5 + eor r4, r6 + lsl r1, r0 + lsr r2, r3 + asr r4, r6 + adc r5, r7 + sbc r0, r4 + ror r1, r4 + tst r2, r5 + neg r1, r1 + cmp r2, r3 + cmn r1, r4 + orr r0, r3 + mul r4, r5 + bic r5, r7 + mvn r5, r5 + + add r1, r13 + add r12, r2 + add r9, r9 + cmp r1, r14 + cmp r8, r0 + cmp r12, r14 + mov r0, r9 + mov r9, r4 + mov r8, r8 + bx r7 + bx r8 + .align 0 + bx pc + + ldr r3, [pc, #128] + ldr r4, bar + + str r0, [r1, r2] + strb r1, [r2, r4] + ldr r5, [r6, r7] + ldrb r2, [r4, r5] + + .align 0 +bar: + strh r1, [r2, r3] + ldrh r3, [r4, r0] + ldsb r1, [r6, r7] + ldsh r2, [r0, r5] + + str r3, [r3, #124] + ldr r1, [r4, #124] + ldr r5, [r5] + strb r1, [r5, #31] + strb r1, [r4, #5] + strb r2, [r6] + + strh r4, [r5, #62] + ldrh r5, [r0, #4] + ldrh r3, [r2] + + str r3, [r13, #1020] + ldr r1, [r13, #44] + ldr r2, [r13] + + add r7, r15, #1020 + add r4, r13, #512 + + add r13, #268 + add r13, #-104 + sub r13, #268 + sub r13, #-108 + + push {r0, r1, r2, r4} + push {r0, r3-r7, lr} + pop {r3, r4, r7} + pop {r0-r7, r15} + + stmia r3!, {r0, r1, r4-r7} + ldmia r0!, {r1-r7} + + beq bar + bne bar + bcs bar + bcc bar + bmi bar + bpl bar + bvs bar + bvc bar + bhi bar + bls bar + bge bar + bgt bar + blt bar + bgt bar + ble bar + bhi bar + blo bar + bul bar + +close: + lsl r4, r5, #near - close +near: + add r2, r3, #near - close + + add sp, sp, #127 << 2 + sub sp, sp, #127 << 2 + add r0, sp, #255 << 2 + add r0, pc, #255 << 2 + + add sp, sp, #bar - foo + sub sp, sp, #bar - foo + add r0, sp, #bar - foo + add r0, pc, #bar - foo + + add r1, #bar - foo + mov r6, #bar - foo + cmp r7, #bar - foo + + nop + nop + + .arm +localbar: + b localbar + b wombat + bl localbar + bl wombat + + bx r0 + swi 0x123456 + + .thumb + + adr r0, forwardonly + + b foo + b wombat + bl foo + bl wombat + + bx r0 + + swi 0xff + .align 0 +forwardonly: + beq wombat + bne wombat + bcs wombat + bcc wombat + bmi wombat + bpl wombat + bvs wombat + bvc wombat + bhi wombat + bls wombat + bge wombat + bgt wombat + blt wombat + bgt wombat + ble wombat + bhi wombat + blo wombat + bul wombat |