diff options
author | Nick Clifton <nickc@redhat.com> | 2012-05-03 13:12:08 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2012-05-03 13:12:08 +0000 |
commit | f6c1a2d592af15d02c7fc93390af3c803e74c4d9 (patch) | |
tree | 760746b562a8f05f3ea3b8f163304c59ba7b96db /gas/testsuite | |
parent | a8acc5fb18af9d4b0da318218680534414325e13 (diff) | |
download | ppe42-binutils-f6c1a2d592af15d02c7fc93390af3c803e74c4d9.tar.gz ppe42-binutils-f6c1a2d592af15d02c7fc93390af3c803e74c4d9.zip |
Add support for Motorola XGATE embedded CPU
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 15 | ||||
-rw-r--r-- | gas/testsuite/gas/all/gas.exp | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/xgate/abi-xgate-16-32.d | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/xgate/abi-xgate-16-64.d | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/xgate/abi-xgate-32-32.d | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/xgate/abi-xgate-32-64.d | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/xgate/abi.s | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/xgate/all_insns.d | 130 | ||||
-rw-r--r-- | gas/testsuite/gas/xgate/all_insns.s | 111 | ||||
-rw-r--r-- | gas/testsuite/gas/xgate/insns-dwarf2.d | 84 | ||||
-rw-r--r-- | gas/testsuite/gas/xgate/insns.d | 45 | ||||
-rw-r--r-- | gas/testsuite/gas/xgate/insns.s | 43 | ||||
-rw-r--r-- | gas/testsuite/gas/xgate/xgate.exp | 19 |
13 files changed, 482 insertions, 2 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 76f3dc1ee0..9d394a3da1 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,18 @@ +2012-05-03 Sean Keys <skeys@ipdatasys.com> + + * gas/all/gas.exp: Added xgate tex entry. + * gas/xgate/abi-xgate-16-32.d: Simple ABI flag test. + * gas/xgate/abi-xgate-16-64.d: Ditto + * gas/xgate/abi-xgate-32-32.d: Ditto + * gas/xgate/abi-xgate-32-64.d: Ditto + * gas/xgate/abi.s: Source file for ABI tests. + * gas/xgate/all_insns.d: Dump file for all instructions test. + * gas/xgate/all_insns.s: Source file for all instructions test. + * gas/xgate/insns-dwarf2.d: Dump file for dwarf2 test. + * gas/xgate/insns.d: Dump file for instructions test. + * gas/xgate/insns.s: Source file for instructions test. + * gas/xgate/xgate.exp: XGATE tests file. + 2012-04-27 David S. Miller <davem@davemloft.net> * gas/sparc/sparc.exp: Run cfr test. diff --git a/gas/testsuite/gas/all/gas.exp b/gas/testsuite/gas/all/gas.exp index 7026811e84..2cef5ddd59 100644 --- a/gas/testsuite/gas/all/gas.exp +++ b/gas/testsuite/gas/all/gas.exp @@ -133,10 +133,10 @@ case $target_triplet in { # These targets fail redef2 because they disallow redefined # symbols on relocs. setup_xfail "m68hc1*-*-*" "m6811-*-*" "m6812-*-*" - setup_xfail "rx-*-*" "vax*-*-*" "z8k-*-*" + setup_xfail "rx-*-*" "vax*-*-*" "xgate*-*-*" "z8k-*-*" run_dump_test redef2 setup_xfail "m68hc1*-*-*" "m6811-*-*" "m6812-*-*" - setup_xfail "rx-*-*" "vax*-*-*" "z8k-*-*" + setup_xfail "rx-*-*" "vax*-*-*" "xgate*-*-*" "z8k-*-*" # rs6000-aix disallows redefinition via .comm. setup_xfail "*-*-aix*" # SOM uses a different syntax for .comm diff --git a/gas/testsuite/gas/xgate/abi-xgate-16-32.d b/gas/testsuite/gas/xgate/abi-xgate-16-32.d new file mode 100644 index 0000000000..a2368d8704 --- /dev/null +++ b/gas/testsuite/gas/xgate/abi-xgate-16-32.d @@ -0,0 +1,8 @@ +#objdump: -p +#as: -mshort-double +#name: Elf flags XGATE 16-bit int, 32-bit double +#source: abi.s + +.*: +file format elf32\-xgate +private flags = 80:\[abi=16-bit int, 32-bit double, cpu=XGATE\] + diff --git a/gas/testsuite/gas/xgate/abi-xgate-16-64.d b/gas/testsuite/gas/xgate/abi-xgate-16-64.d new file mode 100644 index 0000000000..185cb6b472 --- /dev/null +++ b/gas/testsuite/gas/xgate/abi-xgate-16-64.d @@ -0,0 +1,7 @@ +#objdump: -p +#as: +#name: Elf flags XGATE 16-bit int, 64-bit double +#source: abi.s + +.*: +file format elf32\-xgate +private flags = 82:\[abi=16-bit int, 64-bit double, cpu=XGATE\] diff --git a/gas/testsuite/gas/xgate/abi-xgate-32-32.d b/gas/testsuite/gas/xgate/abi-xgate-32-32.d new file mode 100644 index 0000000000..5ba4b650d9 --- /dev/null +++ b/gas/testsuite/gas/xgate/abi-xgate-32-32.d @@ -0,0 +1,7 @@ +#objdump: -p +#as: -mlong -mshort-double +#name: Elf flags XGATE 32-bit int, 32-bit double +#source: abi.s + +.*: +file format elf32\-xgate +private flags = 81:\[abi=32-bit int, 32-bit double, cpu=XGATE\] diff --git a/gas/testsuite/gas/xgate/abi-xgate-32-64.d b/gas/testsuite/gas/xgate/abi-xgate-32-64.d new file mode 100644 index 0000000000..e454c219e3 --- /dev/null +++ b/gas/testsuite/gas/xgate/abi-xgate-32-64.d @@ -0,0 +1,7 @@ +#objdump: -p +#as: -mlong +#name: Elf flags XGATE 32-bit int, 64-bit double +#source: abi.s + +.*: +file format elf32\-xgate +private flags = 83:\[abi=32-bit int, 64-bit double, cpu=XGATE\] diff --git a/gas/testsuite/gas/xgate/abi.s b/gas/testsuite/gas/xgate/abi.s new file mode 100644 index 0000000000..a5016ebe63 --- /dev/null +++ b/gas/testsuite/gas/xgate/abi.s @@ -0,0 +1,4 @@ + .sect .text + .globl L1 +L1: + rts diff --git a/gas/testsuite/gas/xgate/all_insns.d b/gas/testsuite/gas/xgate/all_insns.d new file mode 100644 index 0000000000..94690de93b --- /dev/null +++ b/gas/testsuite/gas/xgate/all_insns.d @@ -0,0 +1,130 @@ +#objdump: -d --prefix-addresses --reloc +#as: +#name: all_insns + +# Test handling of basic instructions. + +.*: +file format elf32\-xgate + +Disassembly of section .text: +0+0000 <L0> adc R1, R2, R3 +0+0002 <L1> bcc \*228 Abs\* 0x000000e6 <END_CODE> +0+0004 <L2> add R4, R5, R6 +0+0006 <L3> addl R7, #0xe1 +0+0008 <L3\+0x2> addh R7, #0x00 Abs\* 0x000000e1 <L103\+0x1> +0+000a <L4> addh R1, #0xff +0+000c <L5> addl R2, #0xff Abs\* 0x0000ffff <END_CODE\+0xff19> +0+000e <L6> addl R4, #0x44 +0+0010 <L6\+0x2> addh R4, #0x1f Abs\* 0x00001f44 <END_CODE\+0x1e5e> +0+0012 <L7> and R3, R4, R5 +0+0014 <L8> andl R1, #0x04 +0+0016 <L8\+0x2> andh R1, #0x80 Abs\* 0x00008004 <END_CODE\+0x7f1e> +0+0018 <L9> addl R5, #0xe6 + 18: R_XGATE_IMM8_LO .text +0+001a <L9\+0x2> addh R5, #0x00 Abs\* 0x000000e6 <END_CODE> + 1a: R_XGATE_IMM8_HI .text +0+001c <L10> andl R7, #0xe6 + 1c: R_XGATE_IMM8_LO .text +0+001e <L10\+0x2> andh R7, #0x00 Abs\* 0x000000e6 <END_CODE> + 1e: R_XGATE_IMM8_HI .text +0+0020 <L11> andl R4, #0x01 +0+0022 <L11\+0x2> andh R4, #0xff Abs\* 0x0000ff01 <END_CODE\+0xfe1b> +0+0024 <L12> andl R3, #0x01 +0+0026 <L13> andh R6, #0xff Abs\* 0x0000ff01 <END_CODE\+0xfe1b> +0+0028 <L14> asr R0, #0x03 +0+002a <L15> asr R1, R2 +0+002c <L16> bcc \*186 Abs\* 0x000000e6 <END_CODE> +0+002e <L17> bcs \*184 Abs\* 0x000000e6 <END_CODE> +0+0030 <L18> beq \*182 Abs\* 0x000000e6 <END_CODE> +0+0032 <L19> bfext R3, R4, R5 +0+0034 <L20> bffo R6, R7 +0+0036 <L21> bfins R0, R1, R2 +0+0038 <L22> bfinsi R3, R4, R5 +0+003a <L23> bfinsx R6, R7, R0 +0+003c <L24> bge \*170 Abs\* 0x000000e6 <END_CODE> +0+003e <L25> bgt \*168 Abs\* 0x000000e6 <END_CODE> +0+0040 <L26> bhi \*166 Abs\* 0x000000e6 <END_CODE> +0+0042 <L27> bcc \*164 Abs\* 0x000000e6 <END_CODE> +0+0044 <L28> bith R1, #0x20 +0+0046 <L29> bitl R2, #0x00 +0+0048 <L30> ble \*158 Abs\* 0x000000e6 <END_CODE> +0+004a <L31> bcs \*156 Abs\* 0x000000e6 <END_CODE> +0+004c <L32> bls \*154 Abs\* 0x000000e6 <END_CODE> +0+004e <L33> blt \*152 Abs\* 0x000000e6 <END_CODE> +0+0050 <L34> bmi \*150 Abs\* 0x000000e6 <END_CODE> +0+0052 <L35> bne \*148 Abs\* 0x000000e6 <END_CODE> +0+0054 <L36> bpl \*146 Abs\* 0x000000e6 <END_CODE> +0+0056 <L37> bra \*144 Abs\* 0x000000e6 <END_CODE> + ... +0+005a <L39> bvc \*140 Abs\* 0x000000e6 <END_CODE> +0+005c <L40> bvs \*138 Abs\* 0x000000e6 <END_CODE> +0+005e <L41> sub R0, R1, R2 +0+0060 <L42> cmpl R3, #0xff +0+0062 <L43> xnor R4, R0, R5 +0+0064 <L44> sbc R0, R6, R7 +0+0066 <L45> cmpl R1, #0xff Abs\* 0x0000ffdd <END_CODE\+0xfef7> +0+0068 <L45\+0x2> cpch R1, #0xff +0+006a <L46> cpch R2, #0xff Abs\* 0x0000ffff <END_CODE\+0xff19> +0+006c <L47> csem #0x4 +0+006e <L48> csem R5 +0+0070 <L49> csl R6, #0x0b +0+0072 <L50> csl R7, R0 +0+0074 <L51> csr R1, #0x02 +0+0076 <L52> csr R2, R3 +0+0078 <L53> jal R4 +0+007a <L54> ldb R5, \(R6, #0x14\) +0+007c <L55> ldb R7, \(R0, R1\+\) +0+007e <L56> ldb R7, \(R0, \-R1\) +0+0080 <L57> ldb R0, \(R0, R0\) +0+0082 <L58> ldh R1, #0xff +0+0084 <L59> ldl R2, #0xff Abs\* 0x0000ffff <END_CODE\+0xff19> +0+0086 <L60> ldl R3, #0xe6 + 86: R_XGATE_IMM8_LO .text +0+0088 <L60\+0x2> ldh R3, #0x00 Abs\* 0x000000e6 <END_CODE> + 88: R_XGATE_IMM8_HI .text +0+008a <L61> ldw R4, \(R5, #0x14\) +0+008c <L62> ldw R5, \(R6, R7\+\) +0+008e <L63> ldw R5, \(R6, \-R7\) +0+0090 <L64> ldw R1, \(R2, R4\) +0+0092 <L65> lsl R1, #0x04 +0+0094 <L66> lsl R2, R3 +0+0096 <L67> lsr R4, #0x05 +0+0098 <L68> lsr R5, R6 +0+009a <L69> or R6, R0, R7 +0+009c <L70> sub R1, R0, R2 +0+009e <L71> nop +0+00a0 <L72> or R1, R2, R3 +0+00a2 <L73> orh R4, #0xff +0+00a4 <L74> orl R5, #0xff +0+00a6 <L75> par R6 +0+00a8 <L76> rol R7, #0x06 +0+00aa <L77> rol R1, R2 +0+00ac <L78> ror R3, #0x05 +0+00ae <L79> ror R4, R5 +0+00b0 <L80> rts +0+00b2 <L81> sbc R1, R2, R3 +0+00b4 <L82> ssem #0x4 +0+00b6 <L83> ssem R1 +0+00b8 <L84> sex R2 +0+00ba <L85> sif +0+00bc <L86> sif R4 +0+00be <L87> stb R5, \(R6, #0x5\) +0+00c0 <L88> stb R0, \(R0, R0\+\) +0+00c2 <L89> stb R0, \(R0, \-R0\) +0+00c4 <L90> stb R2, \(R0, R0\) +0+00c6 <L91> stw R1, \(R2, #0x10\) +0+00c8 <L92> stw R1, \(R2, R3\+\) +0+00ca <L93> stw R1, \(R2, \-R3\) +0+00cc <L94> stw R2, \(R3, R4\) +0+00ce <L95> sub R3, R4, R6 +0+00d0 <L96> subl R4, #0xff +0+00d2 <L96\+0x2> subh R4, #0xff Abs\* 0x0000ffff <END_CODE\+0xff19> +0+00d4 <L97> subh R5, #0xff +0+00d6 <L98> subl R6, #0xff Abs\* 0x0000ffff <END_CODE\+0xff19> +0+00d8 <L99> tfr R7, PC +0+00da <L100> tfr R7, CCR +0+00dc <L101> tfr CCR, R7 +0+00de <L102> sub R0, R1, R0 +0+00e0 <L103> xnor R1, R2, R3 +0+00e2 <L104> xnorh R4, #0xff +0+00e4 <L105> xnorl R5, #0xff diff --git a/gas/testsuite/gas/xgate/all_insns.s b/gas/testsuite/gas/xgate/all_insns.s new file mode 100644 index 0000000000..20283e939b --- /dev/null +++ b/gas/testsuite/gas/xgate/all_insns.s @@ -0,0 +1,111 @@ +# Example of XGATE instructions + .sect .text +_start: +L0: adc r1, r2, r3 +L1: bcc END_CODE +L2: add r4, r5, r6 +L3: add r7 , #225 +L4: addh r1, 255 +L5: addl r2, #255 +L6: add r4, 8004 +L7: and r3, r4, r5 +L8: and r1, #0x8004 +L9: add r5, END_CODE +L10: and r7, END_CODE +L11: and r4, #65281 +L12: andl r3, #01 +L13: andh r6, #255 +L14: asr r0, #3 +L15: asr r1, r2 +L16: bcc END_CODE +L17: bcs END_CODE +L18: beq END_CODE +L19: bfext r3, r4, r5 +L20: bffo r6, r7 +L21: bfins r0, r1, r2 +L22: bfinsi r3, r4, r5 +L23: bfinsx r6, r7, r0 +L24: bge END_CODE +L25: bgt END_CODE +L26: bhi END_CODE +L27: bhs END_CODE +L28: bith r1, #32 +L29: bitl r2, #0 +L30: ble END_CODE +L31: blo END_CODE +L32: bls END_CODE +L33: blt END_CODE +L34: bmi END_CODE +L35: bne END_CODE +L36: bpl END_CODE +L37: bra END_CODE +L38: brk +L39: bvc END_CODE +L40: bvs END_CODE +L41: cmp r1, r2 +L42: cmpl r3, #255 +L43: com r4, r5 +L44: cpc r6, r7 +L45: cmp r1, #65535 +L46: cpch r2, #255 +L47: csem #4 +L48: csem r5 +L49: csl r6, #11 +L50: csl r7, r0 +L51: csr r1, #2 +L52: csr r2, r3 +L53: jal r4 +L54: ldb r5, (r6, #20) +L55: ldb r7, (r0, r1+) +L56: ldb r7, (r0, -r1) +L57: ldb r0, (r0, r0) +L58: ldh r1, #255 +L59: ldl r2, #255 +L60: ldd r3, END_CODE +L61: ldw r4, (r5, #20) +L62: ldw r5, (r6, r7+) +L63: ldw r5, (r6, -r7) +L64: ldw r1, (r2, r4) +L65: lsl r1, #4 +L66: lsl r2, r3 +L67: lsr r4, #5 +L68: lsr r5, r6 +L69: mov r6, r7 +L70: neg r1, r2 +L71: nop +L72: or r1, r2, r3 +L73: orh r4, #255 +L74: orl r5, #255 +L75: par r6 +L76: rol r7, #6 +L77: rol r1, r2 +L78: ror r3, #5 +L79: ror r4, r5 +L80: rts +L81: sbc r1, r2, r3 +L82: ssem #4 +L83: ssem r1 +L84: sex r2 +L85: sif +L86: sif r4 +L87: stb r5, (r6, #5) +L88: stb r0, (r0, r0+) +L89: stb r0, (r0, -r0) +L90: stb r2, (r0, r0) +L91: stw r1, (r2, #16) +L92: stw r1, (r2, r3+) +L93: stw r1, (r2, -r3) +L94: stw r2, (r3 ,r4) +L95: sub r3, r4, r6 +L96: sub r4, #65535 +L97: subh r5, #255 +L98: subl r6, #255 +L99: tfr r7, pc +L100: tfr r7,ccr +L101: tfr ccr, r7 +L102: tst r1 +L103: xnor r1, r2, r3 +L104: xnorh r4, #255 +L105: xnorl r5, #255 +END_CODE: + diff --git a/gas/testsuite/gas/xgate/insns-dwarf2.d b/gas/testsuite/gas/xgate/insns-dwarf2.d new file mode 100644 index 0000000000..3a8e6992aa --- /dev/null +++ b/gas/testsuite/gas/xgate/insns-dwarf2.d @@ -0,0 +1,84 @@ +#objdump: -S +#as: -gdwarf2 +#name: Dwarf2 test on insns.s +#source: insns.s + +# Test handling of basic instructions. + +.*: +file format elf32\-xgate + +Disassembly of section .text: + +0+0000 <_start>: + + .globl _start + .sect .text + +_start: + ldw R2, #block\+1024 + 0: f2 00 ldl R2, #0x00 + 2: fa 04 ldh R2, #0x04 Abs\* 0x400 <block_end> + ldw R3, #block + 4: f3 00 ldl R3, #0x00 + 6: fb 00 ldh R3, #0x00 Abs\* 0x0 <_start> + ldw R1, #1 + 8: f1 01 ldl R1, #0x01 + a: f9 00 ldh R1, #0x00 Abs\* 0x1 <_start\+0x1> + +0+000c <Loop>: +Loop: + bra test + c: 3c 04 bra \*10 Abs\* 0x16 <test> + nop + e: 01 00 nop + bne Loop + 10: 25 fd bne \*-4 Abs\* 0xc <Loop> + +0+0012 <Stop>: + 12: cd 03 subh R5, #0x03 +Stop: + + .byte 0xcd + .byte 3 + bra _start + 14: 3f f5 bra \*-20 Abs\* 0x0 <_start> + +0+0016 <test>: + +test: + ldw R5, #2 + 16: f5 02 ldl R5, #0x02 + 18: fd 00 ldh R5, #0x00 Abs\* 0x2 <_start\+0x2> + bra test2 + 1a: 3c 01 bra \*4 Abs\* 0x1e <test2> + rts + 1c: 02 00 rts + +0+001e <test2>: + +value = 23 + + .globl test2 +test2: + ldw R3, #value + 1e: f3 17 ldl R3, #0x17 + 20: fb 00 ldh R3, #0x00 Abs\* 0x17 <test\+0x1> + stw R4, \(R3, #0\) + 22: 5c 60 stw R4, \(R3, #0x0\) + ldw R4, #24\+_start\-44 + 24: f4 ec ldl R4, #0xec + 26: fc ff ldh R4, #0xff Abs\* 0xffec <block_end\+0xfbec> + bra Stop + 28: 3f f4 bra \*-22 Abs\* 0x12 <Stop> + +0+002a <L1>: +L1: + ldw R1, test2 + 2a: f1 1e ldl R1, #0x1e + 2c: f9 00 ldh R1, #0x00 Abs\* 0x1e <test2> + ldw R2, test2 + 2e: f2 1e ldl R2, #0x1e + 30: fa 00 ldh R2, #0x00 Abs\* 0x1e <test2> + rts + 32: 02 00 rts + diff --git a/gas/testsuite/gas/xgate/insns.d b/gas/testsuite/gas/xgate/insns.d new file mode 100644 index 0000000000..a7d4d58ba1 --- /dev/null +++ b/gas/testsuite/gas/xgate/insns.d @@ -0,0 +1,45 @@ +#objdump: -d --prefix-addresses --reloc +#as: +#name: insns + +# Test handling of basic instructions. + +.*: +file format elf32\-xgate + +Disassembly of section .text: +0+0000 <\_start> ldl R2, #0x00 + 0: R_XGATE_IMM8_LO .bss +0+0002 <\_start\+0x2> ldh R2, #0x04 Abs\* 0x00000400 <block_end> + 2: R_XGATE_IMM8_HI .bss +0+0004 <\_start\+0x4> ldl R3, #0x00 + 4: R_XGATE_IMM8_LO .bss +0+0006 <\_start\+0x6> ldh R3, #0x00 Abs\* 0x00000000 <\_start> + 6: R_XGATE_IMM8_HI .bss +0+0008 <\_start\+0x8> ldl R1, #0x01 +0+000a <\_start\+0xa> ldh R1, #0x00 Abs\* 0x00000001 <\_start\+0x1> +0+000c <Loop> bra \*10 Abs\* 0x00000016 <test> +0+000e <Loop\+0x2> nop +0+0010 <Loop\+0x4> bne \*\-4 Abs\* 0x0000000c <Loop> +0+0012 <Stop> subh R5, #0x03 +0+0014 <Stop\+0x2> bra \*\-20 Abs\* 0x00000000 <\_start> +0+0016 <test> ldl R5, #0x02 +0+0018 <test\+0x2> ldh R5, #0x00 Abs\* 0x00000002 <\_start\+0x2> +0+001a <test\+0x4> bra \*4 Abs\* 0x0000001e <test2> +0+001c <test\+0x6> rts +0+001e <test2> ldl R3, #0x17 +0+0020 <test2\+0x2> ldh R3, #0x00 Abs\* 0x00000017 <test\+0x1> +0+0022 <test2\+0x4> stw R4, \(R3, #0x0\) +0+0024 <test2\+0x6> ldl R4, #0xec + 24: R_XGATE_IMM8_LO .text +0+0026 <test2\+0x8> ldh R4, #0xff Abs\* 0x0000ffec <block_end\+0xfbec> + 26: R_XGATE_IMM8_HI .text +0+0028 <test2\+0xa> bra \*\-22 Abs\* 0x00000012 <Stop> +0+002a <L1> ldl R1, #0x1e + 2a: R_XGATE_IMM8_LO .text +0+002c <L1\+0x2> ldh R1, #0x00 Abs\* 0x0000001e <test2> + 2c: R_XGATE_IMM8_HI .text +0+002e <L1\+0x4> ldl R2, #0x1e + 2e: R_XGATE_IMM8_LO .text +0+0030 <L1\+0x6> ldh R2, #0x00 Abs\* 0x0000001e <test2> + 30: R_XGATE_IMM8_HI .text +0+0032 <L1\+0x8> rts diff --git a/gas/testsuite/gas/xgate/insns.s b/gas/testsuite/gas/xgate/insns.s new file mode 100644 index 0000000000..e359e683fb --- /dev/null +++ b/gas/testsuite/gas/xgate/insns.s @@ -0,0 +1,43 @@ +# Test for correct generation of XGATE insns. + + .globl _start + .sect .text + +_start: + ldw R2, #block+1024 + ldw R3, #block + ldw R1, #1 +Loop: + bra test + nop + bne Loop +Stop: + + .byte 0xcd + .byte 3 + bra _start + +test: + ldw R5, #2 + bra test2 + rts + +value = 23 + + .globl test2 +test2: + ldw R3, #value + stw R4, (R3, #0) + ldw R4, #24+_start-44 + bra Stop +L1: + ldw R1, test2 + ldw R2, test2 + rts + + .sect .data + + .sect .bss +block: + .space 1024 +block_end: diff --git a/gas/testsuite/gas/xgate/xgate.exp b/gas/testsuite/gas/xgate/xgate.exp new file mode 100644 index 0000000000..1af5e76224 --- /dev/null +++ b/gas/testsuite/gas/xgate/xgate.exp @@ -0,0 +1,19 @@ +# +# Some generic XGATE tests +# + +if ![istarget "xgate-*-*"] then { + return +} + +# ABI tests +run_dump_test abi-xgate-16-64 +run_dump_test abi-xgate-16-32 +run_dump_test abi-xgate-32-64 +run_dump_test abi-xgate-32-32 + +# Some XGATE tests +run_dump_test insns-dwarf2 +run_dump_test all_insns +run_dump_test insns + |