From 93c6c0152b36ea7c3ae33b588e67c8ea0089b7eb Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Tue, 5 Oct 1999 01:27:35 +0000 Subject: * gas/m32r/error.exp: New testcase driver. * gas/m32r/m32rx.exp: New testcase driver. * gas/m32r/fslotx.[sd]: New testcase. * gas/m32r/m32rx.[sd]: New testcase. * gas/m32r/relax-s.[sd]: New testcase. * gas/m32r/interfere.s: New testcase. * gas/m32r/wrongsize.s: New testcase. --- gas/testsuite/ChangeLog | 10 + gas/testsuite/gas/m32r/error.exp | 15 + gas/testsuite/gas/m32r/fslotx.d | 23 ++ gas/testsuite/gas/m32r/fslotx.s | 19 ++ gas/testsuite/gas/m32r/interfere.s | 14 + gas/testsuite/gas/m32r/m32rx.d | 337 +++++++++++++++++++++ gas/testsuite/gas/m32r/m32rx.exp | 7 + gas/testsuite/gas/m32r/m32rx.s | 590 +++++++++++++++++++++++++++++++++++++ gas/testsuite/gas/m32r/relax-2.d | 18 ++ gas/testsuite/gas/m32r/relax-2.s | 11 + gas/testsuite/gas/m32r/wrongsize.s | 10 + 11 files changed, 1054 insertions(+) create mode 100644 gas/testsuite/gas/m32r/error.exp create mode 100644 gas/testsuite/gas/m32r/fslotx.d create mode 100644 gas/testsuite/gas/m32r/fslotx.s create mode 100644 gas/testsuite/gas/m32r/interfere.s create mode 100644 gas/testsuite/gas/m32r/m32rx.d create mode 100644 gas/testsuite/gas/m32r/m32rx.exp create mode 100644 gas/testsuite/gas/m32r/m32rx.s create mode 100644 gas/testsuite/gas/m32r/relax-2.d create mode 100644 gas/testsuite/gas/m32r/relax-2.s create mode 100644 gas/testsuite/gas/m32r/wrongsize.s diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index c400d61..b47a215 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,13 @@ +Mon Oct 4 18:25:49 1999 Doug Evans + + * gas/m32r/error.exp: New testcase driver. + * gas/m32r/m32rx.exp: New testcase driver. + * gas/m32r/fslotx.[sd]: New testcase. + * gas/m32r/m32rx.[sd]: New testcase. + * gas/m32r/relax-s.[sd]: New testcase. + * gas/m32r/interfere.s: New testcase. + * gas/m32r/wrongsize.s: New testcase. + 1999-09-17 Alan Modra * gas/i386/i386.exp: Enable reloc and white tests for COFF. diff --git a/gas/testsuite/gas/m32r/error.exp b/gas/testsuite/gas/m32r/error.exp new file mode 100644 index 0000000..a188719 --- /dev/null +++ b/gas/testsuite/gas/m32r/error.exp @@ -0,0 +1,15 @@ +# Test assembler warnings and errors. + +if [istarget m32r-*-*] { + + load_lib gas-dg.exp + + dg-init + + dg-runtest "$srcdir/$subdir/wrongsize.s" "" "" + dg-runtest "$srcdir/$subdir/interfere.s" "" "" + dg-runtest "$srcdir/$subdir/outofrange.s" "" "" + + dg-finish + +} diff --git a/gas/testsuite/gas/m32r/fslotx.d b/gas/testsuite/gas/m32r/fslotx.d new file mode 100644 index 0000000..d3e2d1a --- /dev/null +++ b/gas/testsuite/gas/m32r/fslotx.d @@ -0,0 +1,23 @@ +#as: -m32rx +#objdump: -dr +#name: fslotx + +.*: +file format .* + +Disassembly of section .text: + +0+0 : + *0: 78 00 f0 00 bcl 0 \|\| nop + *4: 60 08 f0 00 ldi r0,[#]*8 \|\| nop + +0+8 : + *8: 78 00 f0 00 bcl 8 \|\| nop + *c: 60 08 f0 00 ldi r0,[#]*8 \|\| nop + +0+10 : + 10: 79 00 f0 00 bncl 10 \|\| nop + 14: 60 08 f0 00 ldi r0,[#]*8 \|\| nop + +0+18 : + 18: 79 00 f0 00 bncl 18 \|\| nop + 1c: 60 08 f0 00 ldi r0,[#]*8 \|\| nop diff --git a/gas/testsuite/gas/m32r/fslotx.s b/gas/testsuite/gas/m32r/fslotx.s new file mode 100644 index 0000000..9cfb231 --- /dev/null +++ b/gas/testsuite/gas/m32r/fslotx.s @@ -0,0 +1,19 @@ +# Test the FILL-SLOT attribute. +# The FILL-SLOT attribute ensures the next insn begins on a 32 byte boundary. +# This is needed for example with bl because the subroutine will return +# to a 32 bit boundary. + + .text +bcl: + bcl bcl + ldi r0,#8 +bcl_s: + bcl.s bcl_s + ldi r0,#8 + +bncl: + bncl bncl + ldi r0,#8 +bncl_s: + bncl.s bncl_s + ldi r0,#8 diff --git a/gas/testsuite/gas/m32r/interfere.s b/gas/testsuite/gas/m32r/interfere.s new file mode 100644 index 0000000..775ecde --- /dev/null +++ b/gas/testsuite/gas/m32r/interfere.s @@ -0,0 +1,14 @@ +; Test error messages in instances where output operands interfere. + +; { dg-do assemble { target m32r-*-* } } +; { dg-options -m32rx } + +interfere: + trap #1 || cmp r3, r4 ; { dg-error "write to the same" } + ; { dg-warning "same" "out->in" { target *-*-* } { 7 } } + rte || addx r3, r4 ; { dg-error "write to the same" } + ; { dg-warning "same" "out->in" { target *-*-* } { 9 } } + cmp r1, r2 || addx r3, r4 ; { dg-error "write to the same" } + ; { dg-warning "same" "out->in" { target *-*-* } { 11 } } + mvtc r0, psw || addx r1, r4 ; { dg-error "write to the same" } + ; { dg-warning "same" "out->in" { target *-*-* } { 13 } } diff --git a/gas/testsuite/gas/m32r/m32rx.d b/gas/testsuite/gas/m32r/m32rx.d new file mode 100644 index 0000000..6713dd2 --- /dev/null +++ b/gas/testsuite/gas/m32r/m32rx.d @@ -0,0 +1,337 @@ +#as: -m32rx --no-warn-explicit-parallel-conflicts --hidden -O +#objdump: -dr +#name: m32rx + +.*: +file format .* + +Disassembly of section .text: + +0+0000 : + 0: 78 00 f0 00 bcl 0 \|\| nop + +0+0004 : + 4: 79 ff f0 00 bncl 0 \|\| nop + +0+0008 : + 8: 00 7d f0 00 cmpz fp \|\| nop + +0+000c : + c: 0d 6d f0 00 cmpeq fp,fp \|\| nop + +0+0010 : + 10: 5d cd f0 00 maclh1 fp,fp \|\| nop + +0+0014 : + 14: 5d dd f0 00 msblo fp,fp \|\| nop + +0+0018 : + 18: 5d ad f0 00 mulwu1 fp,fp \|\| nop + +0+001c : + 1c: 5d bd f0 00 macwu1 fp,fp \|\| nop + +0+0020 : + 20: 50 e4 f0 00 sadd \|\| nop + +0+0024 : + 24: 8d 6d 03 00 satb fp,fp + +0+0028 : + 28: 3d 8d f0 00 mulhi fp,fp,a1 \|\| nop + +0+002c : + 2c: 3d 1d f0 00 mullo fp,fp \|\| nop + +0+0030 : + 30: 9d 0d 00 10 divh fp,fp + +0+0034 : + 34: 3d cd f0 00 machi fp,fp,a1 \|\| nop + +0+0038 : + 38: 3d 5d f0 00 maclo fp,fp \|\| nop + +0+003c : + 3c: 5d f4 f0 00 mvfachi fp,a1 \|\| nop + +0+0040 : + 40: 5d f6 f0 00 mvfacmi fp,a1 \|\| nop + +0+0044 : + 44: 5d f5 f0 00 mvfaclo fp,a1 \|\| nop + +0+0048 : + 48: 5d 74 f0 00 mvtachi fp,a1 \|\| nop + +0+004c : + 4c: 5d 71 f0 00 mvtaclo fp \|\| nop + +0+0050 : + 50: 54 90 f0 00 rac a1 \|\| nop + +0+0054 : + 54: 54 90 f0 00 rac a1 \|\| nop + +0+0058 : + 58: 50 94 f0 00 rac a0,a1 \|\| nop + +0+005c : + 5c: 54 80 f0 00 rach a1 \|\| nop + +0+0060 : + 60: 50 84 f0 00 rach a0,a1 \|\| nop + +0+0064 : + 64: 54 81 f0 00 rach a1,a0,#0x2 \|\| nop + +0+0068 : + 68: 7c e6 8d ad bc 0 \|\| add fp,fp + 6c: 7c e5 0d ad bc 0 -> add fp,fp + +0+0070 : + 70: 78 e4 cd 4d bcl 0 \|\| addi fp,#77 + 74: 78 e3 cd 4d bcl 0 \|\| addi fp,#77 + +0+0078 : + 78: 7e e2 8d 8d bl 0 \|\| addv fp,fp + 7c: 7e e1 8d 8d bl 0 \|\| addv fp,fp + +0+0080 : + 80: 7d e0 8d 9d bnc 0 \|\| addx fp,fp + 84: 7d df 0d 9d bnc 0 -> addx fp,fp + +0+0088 : + 88: 79 de 8d cd bncl 0 \|\| and fp,fp + 8c: 0d cd 79 dd and fp,fp -> bncl 0 + +0+0090 : + 90: 7f dc 8d 4d bra 0 \|\| cmp fp,fp + 94: 7f db 8d 4d bra 0 \|\| cmp fp,fp + +0+0098 : + 98: 1e cd 8d 6d jl fp \|\| cmpeq fp,fp + 9c: 1e cd 8d 6d jl fp \|\| cmpeq fp,fp + +0+00a0 : + a0: 1f cd 8d 5d jmp fp \|\| cmpu fp,fp + a4: 1f cd 8d 5d jmp fp \|\| cmpu fp,fp + +0+00a8 : + a8: 2d cd 80 71 ld fp,@fp \|\| cmpz r1 + ac: 2d cd 80 71 ld fp,@fp \|\| cmpz r1 + +0+00b0 : + b0: 2d e1 e2 4d ld fp,@r1\+ \|\| ldi r2,#77 + b4: 2d e1 e2 4d ld fp,@r1\+ \|\| ldi r2,#77 + +0+00b8 : + b8: 2d 8d 92 8d ldb fp,@fp \|\| mv r2,fp + bc: 2d 8d 12 8d ldb fp,@fp -> mv r2,fp + +0+00c0 : + c0: 2d ad 82 3d ldh fp,@fp \|\| neg r2,fp + c4: 2d ad 02 3d ldh fp,@fp -> neg r2,fp + +0+00c8 : + c8: 2d 9d f0 00 ldub fp,@fp \|\| nop + cc: 2d 9d f0 00 ldub fp,@fp \|\| nop + +0+00d0 : + d0: 2d bd 82 bd lduh fp,@fp \|\| not r2,fp + d4: 2d bd 02 bd lduh fp,@fp -> not r2,fp + +0+00d8 : + d8: 2d dd 82 ed lock fp,@fp \|\| or r2,fp + dc: 2d dd 02 ed lock fp,@fp -> or r2,fp + +0+00e0 : + e0: 1d 91 82 2d mvfc fp,cbr \|\| sub r2,fp + e4: 1d 91 02 2d mvfc fp,cbr -> sub r2,fp + +0+00e8 : + e8: 12 ad 82 0d mvtc fp,spi \|\| subv r2,fp + ec: 12 ad 82 0d mvtc fp,spi \|\| subv r2,fp + +0+00f0 : + f0: 10 d6 82 2d rte \|\| sub r2,fp + f4: 10 d6 02 1d rte -> subx r2,fp + +0+00f8 : + f8: 1d 41 82 dd sll fp,r1 \|\| xor r2,fp + fc: 1d 41 02 dd sll fp,r1 -> xor r2,fp + +0+0100 : + 100: 5d 56 b2 4d slli fp,#0x16 \|\| machi r2,fp + 104: 5d 56 32 4d slli fp,#0x16 -> machi r2,fp + +0+0108 : + 108: 1d 2d d2 cd sra fp,fp \|\| maclh1 r2,fp + 10c: 1d 2d 52 cd sra fp,fp -> maclh1 r2,fp + +0+0110 : + 110: 5d 36 b2 5d srai fp,#0x16 \|\| maclo r2,fp + 114: 5d 36 32 5d srai fp,#0x16 -> maclo r2,fp + +0+0118 : + 118: 1d 0d b2 6d srl fp,fp \|\| macwhi r2,fp + 11c: 1d 0d 32 6d srl fp,fp -> macwhi r2,fp + +0+0120 : + 120: 5d 16 b2 7d srli fp,#0x16 \|\| macwlo r2,fp + 124: 5d 16 32 7d srli fp,#0x16 -> macwlo r2,fp + +0+0128 : + 128: 2d 4d d2 bd st fp,@fp \|\| macwu1 r2,fp + 12c: 2d 4d d2 bd st fp,@fp \|\| macwu1 r2,fp + +0+0130 : + 130: 2d 6d d2 dd st fp,@\+fp \|\| msblo r2,fp + 134: 2d 6d 52 dd st fp,@\+fp -> msblo r2,fp + +0+0138 : + 138: 2d 7d 92 6d st fp,@-fp \|\| mul r2,fp + 13c: 2d 7d 12 6d st fp,@-fp -> mul r2,fp + +0+0140 : + 140: 2d 0d b2 0d stb fp,@fp \|\| mulhi r2,fp + 144: 2d 0d b2 0d stb fp,@fp \|\| mulhi r2,fp + +0+0148 : + 148: 2d 2d b2 1d sth fp,@fp \|\| mullo r2,fp + 14c: 2d 2d b2 1d sth fp,@fp \|\| mullo r2,fp + +0+0150 : + 150: 10 f2 b2 2d trap #0x2 \|\| mulwhi r2,fp + 154: 10 f2 f0 00 trap #0x2 \|\| nop + 158: 32 2d f0 00 mulwhi r2,fp \|\| nop + +0+015c : + 15c: 2d 5d b2 3d unlock fp,@fp \|\| mulwlo r2,fp + 160: 2d 5d b2 3d unlock fp,@fp \|\| mulwlo r2,fp + +0+0164 : + 164: 0d ad d2 ad add fp,fp \|\| mulwu1 r2,fp + 168: 0d ad 52 ad add fp,fp -> mulwu1 r2,fp + +0+016c : + 16c: 4d 4d d2 f0 addi fp,#77 \|\| mvfachi r2 + 170: 4d 4d d2 f0 addi fp,#77 \|\| mvfachi r2 + +0+0174 : + 174: 0d 8d d2 f5 addv fp,fp \|\| mvfaclo r2,a1 + 178: 0d 8d d2 f5 addv fp,fp \|\| mvfaclo r2,a1 + +0+017c : + 17c: 0d 9d d2 f2 addx fp,fp \|\| mvfacmi r2 + 180: 0d 9d d2 f2 addx fp,fp \|\| mvfacmi r2 + +0+0184 : + 184: 0d cd d2 70 and fp,fp \|\| mvtachi r2 + 188: 0d cd d2 70 and fp,fp \|\| mvtachi r2 + +0+018c : + 18c: 0d 4d d2 71 cmp fp,fp \|\| mvtaclo r2 + 190: 0d 4d d2 71 cmp fp,fp \|\| mvtaclo r2 + +0+0194 : + 194: 0d 6d d4 90 cmpeq fp,fp \|\| rac a1 + 198: 0d 6d d4 90 cmpeq fp,fp \|\| rac a1 + +0+019c : + 19c: 0d 5d d0 84 cmpu fp,fp \|\| rach a0,a1 + 1a0: 0d 5d d4 84 cmpu fp,fp \|\| rach a1,a1 + +0+01a4 : + 1a4: 00 7d d0 e4 cmpz fp \|\| sadd + 1a8: 00 7d d0 e4 cmpz fp \|\| sadd + +0+01ac : + 1ac: 74 01 d0 e4 sc \|\| sadd + +0+01b0 : + 1b0: 75 01 d0 e4 snc \|\| sadd + +0+01b4 : + 1b4: 1c cd f0 00 jc fp \|\| nop + +0+01b8 : + 1b8: 1d cd f0 00 jnc fp \|\| nop + +0+01bc : + 1bc: 03 7d f0 00 pcmpbz fp \|\| nop + +0+01c0 : + 1c0: 8d 6d 00 00 sat fp,fp + +0+01c4 : + 1c4: 8d 6d 02 00 sath fp,fp + +0+01c8 : + 1c8: 1c cd 83 7d jc fp \|\| pcmpbz fp + 1cc: 1c cd 03 7d jc fp -> pcmpbz fp + +0+01d0 : + 1d0: 1d cd ed 4d jnc fp \|\| ldi fp,#77 + 1d4: 1d cd 6d 4d jnc fp -> ldi fp,#77 + +0+01d8 : + 1d8: 74 01 9d 82 sc \|\| mv fp,r2 + 1dc: 74 01 9d 82 sc \|\| mv fp,r2 + +0+01e0 : + 1e0: 75 01 8d 32 snc \|\| neg fp,r2 + 1e4: 75 01 8d 32 snc \|\| neg fp,r2 + +0+01e8 : + 1e8: 70 00 d0 e4 nop \|\| sadd + +0+01ec : + 1ec: 70 00 d0 e4 nop \|\| sadd + +0+01f0 : + 1f0: 70 00 d0 e4 nop \|\| sadd + +0+01f4 : + 1f4: 00 a1 83 b5 add r0,r1 \|\| not r3,r5 + +0+01f8 : + 1f8: 03 a4 03 b5 add r3,r4 -> not r3,r5 + +0+01fc : + 1fc: 03 a4 05 b3 add r3,r4 -> not r5,r3 + +0+0200 : + 200: 03 a4 84 b5 add r3,r4 \|\| not r4,r5 + +0+0204 : + 204: 13 24 91 62 sra r3,r4 \|\| mul r1,r2 + +0+0208 : + 208: 13 24 91 63 sra r3,r4 \|\| mul r1,r3 + +0+020c : + 20c: 7c 04 01 a2 bc 21c