Contribute sh64-elf.

2002-02-01  Alexandre Oliva  <aoliva@redhat.com>
* gas/sh/sh64/syntax-1.s: Remove `-4' from @(expr-4,pc).
2002-01-28  Alexandre Oliva  <aoliva@redhat.com>
* gas/sh/sh64/crange1-1.d: Formatting changes to match the current
output of objdump.
* gas/sh/sh64/crange1-2.d: Likewise.
* gas/sh/sh64/crange2-2.d: Likewise.
* gas/sh/sh64/crange3-1.d: Likewise.
* gas/sh/sh64/crange4-1.d: Likewise.
* gas/sh/sh64/datal-2.d: Likewise.
* gas/sh/sh64/datal32-1.d: Likewise.
* gas/sh/sh64/datal32-3.d: Likewise.
* gas/sh/sh64/localcom-1.d: Likewise.
* gas/sh/sh64/mix-1.d: Likewise.
* gas/sh/sh64/pt32-1.d: Likewise.
* gas/sh/sh64/rel32-1.d: Likewise.
* gas/sh/sh64/rel32-2.d: Likewise.
* gas/sh/sh64/rel32-3.d: Likewise.
* gas/sh/sh64/rel32-4.d: Likewise.
* gas/sh/sh64/rel32-5.d: Likewise.
* gas/sh/sh64/ua32-1.d: Likewise.
2001-03-14  DJ Delorie	<dj@redhat.com>
* gas/sh/sh64/endian-1.d: New test - Little Endianness.
* gas/sh/sh64/endian-1.s: New test - Little Endianness.
* gas/sh/sh64/endian-2.d: New test - Big Endianness.
* gas/sh/sh64/endian-2.s: New test - Big Endianness.
2001-03-12  DJ Delorie	<dj@redhat.com>
* gas/sh/sh64/syntax-1.d: New test - basic syntax.
* gas/sh/sh64/syntax-1.s: New test - basic syntax.
* gas/sh/sh64/syntax-2.d: New test - basic syntax, pseudos.
* gas/sh/sh64/syntax-2.s: New test - basic syntax, pseudos.
2001-03-06  DJ Delorie	<dj@redhat.com>
* gas/sh/sh64/lineno.d: New, test dwarf2 line numbers vs macros.
* gas/sh/sh64/lineno.s: Ditto.
2001-01-14  Hans-Peter Nilsson	<hpn@cygnus.com>
* gas/sh/sh64/err-dsp.s: New test.
2001-01-13  Hans-Peter Nilsson	<hpn@cygnus.com>
* gas/sh/sh64/err-abi-64.s, gas/sh/sh64/err-abi-32.s,
gas/sh/sh64/abi-64.s, gas/sh/sh64/abi-64.d, gas/sh/sh64/abi-32.s,
gas/sh/sh64/abi-32.d, gas/sh/sh64/crange3.s,
gas/sh/sh64/crange3-1.d, gas/sh/sh64/crange4.s,
gas/sh/sh64/crange4-1.d, gas/sh/sh64/crange5.s,
gas/sh/sh64/crange5-1.d: New tests.
2001-01-07  Hans-Peter Nilsson	<hpn@cygnus.com>
* gas/sh/sh64/relax-1.s, gas/sh/sh64/relax-1.d: New test.
* gas/sh/sh64/err-pt-1.s: New test.
* gas/sh/sh64/relax-2.s, gas/sh/sh64/relax-2.d: New test.
* gas/sh/sh64/localcom-1.s, gas/sh/sh64/localcom-1.d: New test.
* gas/sh/sh64/movi-3.s, gas/sh/sh64/movi-3.d: New test.
* gas/sh/sh64/relax-3.s, gas/sh/sh64/relax-3.d: New test.
2001-01-05  Hans-Peter Nilsson	<hpn@cygnus.com>
* gas/sh/sh64/case-noexp-1.d: Adjust to changed GAS output for
check-PTA/PTB / perhaps-change-to-PTB bit in target field.
* gas/sh/sh64/case-noexp-1.d: Ditto.
* gas/sh/sh64/mix-noexp-1.d: Ditto.
* gas/sh/sh64/pt32-noexp-2.d: Ditto.
* gas/sh/sh64/pt64-noexp-2.d: Ditto.
* gas/sh/sh64/ptc32-noexp-1.d: Ditto.
* gas/sh/sh64/ptc64-noexp-1.d: Ditto.
* gas/sh/sh64/ptext32-noexp-1.d: Ditto.
* gas/sh/sh64/ptext64-noexp-1.d: Ditto.
2000-12-31  Hans-Peter Nilsson	<hpn@cygnus.com>
* gas/sh/sh64/shift64-3.d: Fix typo.
* gas/sh/sh64/shift64-noexp-3.d, gas/sh/sh64/shift32-noexp-3.d,
gas/sh/sh64/ptext64-noexp-1.d, gas/sh/sh64/ptext64-32-1.d,
gas/sh/sh64/ptext32-noexp-1.d, gas/sh/sh64/ptc64-noexp-1.d,
gas/sh/sh64/ptc64-32-1.d, gas/sh/sh64/ptc32-noexp-1.d,
gas/sh/sh64/pt64-noexp-2.d, gas/sh/sh64/pt64-32-2.d,
gas/sh/sh64/pt64-32-1.d, gas/sh/sh64/pt32-noexp-2.d,
gas/sh/sh64/pt-noexp-1.d, gas/sh/sh64/movi64-noexp-2.d,
gas/sh/sh64/movi32-noexp-2.d, gas/sh/sh64/mix-noexp-1.d,
gas/sh/sh64/err-ptb-2.s, gas/sh/sh64/err-ptb-1.s,
gas/sh/sh64/err-pt32-cmd3.s, gas/sh/sh64/err-pt32-cmd2.s,
gas/sh/sh64/err-pt32-cmd1.s, gas/sh/sh64/err-noexp-cmd1.s,
gas/sh/sh64/err-movi-noexp-1.s, gas/sh/sh64/crange2.s,
gas/sh/sh64/crange2-noexp-1.d, gas/sh/sh64/crange2-2.d,
gas/sh/sh64/crange2-1.d, gas/sh/sh64/case-noexp-1.d: New tests.
2000-12-18  Hans-Peter Nilsson	<hpn@cygnus.com>
* gas/sh/sh64/err-4.s: Use option -no-mix to see errors.  Adjust
for errors not being emitted at the .mode directives anymore.
* gas/sh/sh64/crange1.s, gas/sh/sh64/crange1-2.d,
gas/sh/sh64/crange1-1.d: New tests for .cranges section.
2000-12-12  Hans-Peter Nilsson	<hpn@cygnus.com>
* gas/sh/sh64/err-3.s: New test.
* gas/sh/sh64/immexpr1.s, gas/sh/sh64/immexpr32-1.d,
gas/sh/sh64/immexpr64-1.d: New tests.
* gas/sh/sh64/immexpr2.s, gas/sh/sh64/immexpr32-2.d,
gas/sh/sh64/immexpr64-2.d: New tests.
2000-12-11  Hans-Peter Nilsson	<hpn@cygnus.com>
* gas/sh/sh64/rel-1.s, gas/sh/sh64/rel-2.s, gas/sh/sh64/rel-3.s,
gas/sh/sh64/rel-4.s, gas/sh/sh64/rel-5.s, gas/sh/sh64/rel32-1.d,
gas/sh/sh64/rel32-2.d, gas/sh/sh64/rel32-3.d,
gas/sh/sh64/rel32-4.d, gas/sh/sh64/rel32-5.d,
gas/sh/sh64/rel64-1.d, gas/sh/sh64/rel64-2.d,
gas/sh/sh64/rel64-3.d, gas/sh/sh64/rel64-4.d,
gas/sh/sh64/rel64-5.d: New tests.
2000-12-07  Hans-Peter Nilsson	<hpn@cygnus.com>
* gas/sh/sh64/case-1.d, gas/sh/sh64/mix-1.d, gas/sh/sh64/pt32-1.d,
gas/sh/sh64/pt64-1.d, gas/sh/sh64/ptc32-1.d,
gas/sh/sh64/ptc64-1.d, gas/sh/sh64/ptext32-1.d,
gas/sh/sh64/ptext64-1.d: Correct offsets in PT/PTA/PTB expansion.
2000-12-05  Hans-Peter Nilsson	<hpn@cygnus.com>
* gas/sh/sh64/datal-3.s, gas/sh/sh64/datal32-3.d,
gas/sh/sh64/datal64-3.d: New tests.
2000-11-27  Hans-Peter Nilsson	<hpn@cygnus.com>
* gas/sh/sh64/datal-1.s: Remove whitespace at end of line.
* gas/sh/sh64/datal32-1.d, gas/sh/sh64/datal64-1.d,
gas/sh/sh64/movi32-1.d, gas/sh/sh64/movi32-2.d,
gas/sh/sh64/movi64-1.d, gas/sh/sh64/movi64-3.d: Correct register.
* gas/sh/sh64/mix-1.s, gas/sh/sh64/mix-1.d, gas/sh/sh64/err-4.s:
New tests.
2000-11-26  Hans-Peter Nilsson	<hpn@cygnus.com>
* gas/macros/macros.exp: Import xfail sh*-*-* from net binutils.
* gas/sh/sh64/case-1.d: Correct offsets in PT/PTA/PTB expansion.
gas/sh/sh64/pt32-1.d, gas/sh/sh64/pt64-1.d: Ditto.
gas/sh/sh64/ptc32-1.d, gas/sh/sh64/ptc64-1.d: Ditto.
gas/sh/sh64/ptext32-1.d, gas/sh/sh64/ptext64-1.d: Ditto.
2000-11-25  Hans-Peter Nilsson	<hpn@cygnus.com>
* gas/sh/sh64/ptc32-1.d, gas/sh/sh64/ptc64-1.d: Correct.
* gas/sh/sh64/datal-1.s, gas/sh/sh64/datal32-1.d,
gas/sh/sh64/datal64-1.d: New test.
* gas/sh/sh64/datal-2.s, gas/sh/sh64/datal-2.d: New test.
* gas/sh/sh64/creg-1.d, gas/sh/sh64/creg-1.s: New test.
* gas/sh/sh64/creg-2.d, gas/sh/sh64/creg-2.s: New test.
2000-11-24  Hans-Peter Nilsson	<hpn@cygnus.com>
* gas/sh/sh64: New testsuite.
This commit is contained in:
Alexandre Oliva 2002-02-08 06:46:14 +00:00
parent 2d92cb7d27
commit 3c74c164ab
141 changed files with 6170 additions and 0 deletions

View File

@ -1,3 +1,133 @@
2002-02-08 Alexandre Oliva <aoliva@redhat.com>
Contribute sh64-elf.
2002-02-01 Alexandre Oliva <aoliva@redhat.com>
* gas/sh/sh64/syntax-1.s: Remove `-4' from @(expr-4,pc).
2002-01-28 Alexandre Oliva <aoliva@redhat.com>
* gas/sh/sh64/crange1-1.d: Formatting changes to match the current
output of objdump.
* gas/sh/sh64/crange1-2.d: Likewise.
* gas/sh/sh64/crange2-2.d: Likewise.
* gas/sh/sh64/crange3-1.d: Likewise.
* gas/sh/sh64/crange4-1.d: Likewise.
* gas/sh/sh64/datal-2.d: Likewise.
* gas/sh/sh64/datal32-1.d: Likewise.
* gas/sh/sh64/datal32-3.d: Likewise.
* gas/sh/sh64/localcom-1.d: Likewise.
* gas/sh/sh64/mix-1.d: Likewise.
* gas/sh/sh64/pt32-1.d: Likewise.
* gas/sh/sh64/rel32-1.d: Likewise.
* gas/sh/sh64/rel32-2.d: Likewise.
* gas/sh/sh64/rel32-3.d: Likewise.
* gas/sh/sh64/rel32-4.d: Likewise.
* gas/sh/sh64/rel32-5.d: Likewise.
* gas/sh/sh64/ua32-1.d: Likewise.
2001-03-14 DJ Delorie <dj@redhat.com>
* gas/sh/sh64/endian-1.d: New test - Little Endianness.
* gas/sh/sh64/endian-1.s: New test - Little Endianness.
* gas/sh/sh64/endian-2.d: New test - Big Endianness.
* gas/sh/sh64/endian-2.s: New test - Big Endianness.
2001-03-12 DJ Delorie <dj@redhat.com>
* gas/sh/sh64/syntax-1.d: New test - basic syntax.
* gas/sh/sh64/syntax-1.s: New test - basic syntax.
* gas/sh/sh64/syntax-2.d: New test - basic syntax, pseudos.
* gas/sh/sh64/syntax-2.s: New test - basic syntax, pseudos.
2001-03-06 DJ Delorie <dj@redhat.com>
* gas/sh/sh64/lineno.d: New, test dwarf2 line numbers vs macros.
* gas/sh/sh64/lineno.s: Ditto.
2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
* gas/sh/sh64/err-dsp.s: New test.
2001-01-13 Hans-Peter Nilsson <hpn@cygnus.com>
* gas/sh/sh64/err-abi-64.s, gas/sh/sh64/err-abi-32.s,
gas/sh/sh64/abi-64.s, gas/sh/sh64/abi-64.d, gas/sh/sh64/abi-32.s,
gas/sh/sh64/abi-32.d, gas/sh/sh64/crange3.s,
gas/sh/sh64/crange3-1.d, gas/sh/sh64/crange4.s,
gas/sh/sh64/crange4-1.d, gas/sh/sh64/crange5.s,
gas/sh/sh64/crange5-1.d: New tests.
2001-01-07 Hans-Peter Nilsson <hpn@cygnus.com>
* gas/sh/sh64/relax-1.s, gas/sh/sh64/relax-1.d: New test.
* gas/sh/sh64/err-pt-1.s: New test.
* gas/sh/sh64/relax-2.s, gas/sh/sh64/relax-2.d: New test.
* gas/sh/sh64/localcom-1.s, gas/sh/sh64/localcom-1.d: New test.
* gas/sh/sh64/movi-3.s, gas/sh/sh64/movi-3.d: New test.
* gas/sh/sh64/relax-3.s, gas/sh/sh64/relax-3.d: New test.
2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
* gas/sh/sh64/case-noexp-1.d: Adjust to changed GAS output for
check-PTA/PTB / perhaps-change-to-PTB bit in target field.
* gas/sh/sh64/case-noexp-1.d: Ditto.
* gas/sh/sh64/mix-noexp-1.d: Ditto.
* gas/sh/sh64/pt32-noexp-2.d: Ditto.
* gas/sh/sh64/pt64-noexp-2.d: Ditto.
* gas/sh/sh64/ptc32-noexp-1.d: Ditto.
* gas/sh/sh64/ptc64-noexp-1.d: Ditto.
* gas/sh/sh64/ptext32-noexp-1.d: Ditto.
* gas/sh/sh64/ptext64-noexp-1.d: Ditto.
2000-12-31 Hans-Peter Nilsson <hpn@cygnus.com>
* gas/sh/sh64/shift64-3.d: Fix typo.
* gas/sh/sh64/shift64-noexp-3.d, gas/sh/sh64/shift32-noexp-3.d,
gas/sh/sh64/ptext64-noexp-1.d, gas/sh/sh64/ptext64-32-1.d,
gas/sh/sh64/ptext32-noexp-1.d, gas/sh/sh64/ptc64-noexp-1.d,
gas/sh/sh64/ptc64-32-1.d, gas/sh/sh64/ptc32-noexp-1.d,
gas/sh/sh64/pt64-noexp-2.d, gas/sh/sh64/pt64-32-2.d,
gas/sh/sh64/pt64-32-1.d, gas/sh/sh64/pt32-noexp-2.d,
gas/sh/sh64/pt-noexp-1.d, gas/sh/sh64/movi64-noexp-2.d,
gas/sh/sh64/movi32-noexp-2.d, gas/sh/sh64/mix-noexp-1.d,
gas/sh/sh64/err-ptb-2.s, gas/sh/sh64/err-ptb-1.s,
gas/sh/sh64/err-pt32-cmd3.s, gas/sh/sh64/err-pt32-cmd2.s,
gas/sh/sh64/err-pt32-cmd1.s, gas/sh/sh64/err-noexp-cmd1.s,
gas/sh/sh64/err-movi-noexp-1.s, gas/sh/sh64/crange2.s,
gas/sh/sh64/crange2-noexp-1.d, gas/sh/sh64/crange2-2.d,
gas/sh/sh64/crange2-1.d, gas/sh/sh64/case-noexp-1.d: New tests.
2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
* gas/sh/sh64/err-4.s: Use option -no-mix to see errors. Adjust
for errors not being emitted at the .mode directives anymore.
* gas/sh/sh64/crange1.s, gas/sh/sh64/crange1-2.d,
gas/sh/sh64/crange1-1.d: New tests for .cranges section.
2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
* gas/sh/sh64/err-3.s: New test.
* gas/sh/sh64/immexpr1.s, gas/sh/sh64/immexpr32-1.d,
gas/sh/sh64/immexpr64-1.d: New tests.
* gas/sh/sh64/immexpr2.s, gas/sh/sh64/immexpr32-2.d,
gas/sh/sh64/immexpr64-2.d: New tests.
2000-12-11 Hans-Peter Nilsson <hpn@cygnus.com>
* gas/sh/sh64/rel-1.s, gas/sh/sh64/rel-2.s, gas/sh/sh64/rel-3.s,
gas/sh/sh64/rel-4.s, gas/sh/sh64/rel-5.s, gas/sh/sh64/rel32-1.d,
gas/sh/sh64/rel32-2.d, gas/sh/sh64/rel32-3.d,
gas/sh/sh64/rel32-4.d, gas/sh/sh64/rel32-5.d,
gas/sh/sh64/rel64-1.d, gas/sh/sh64/rel64-2.d,
gas/sh/sh64/rel64-3.d, gas/sh/sh64/rel64-4.d,
gas/sh/sh64/rel64-5.d: New tests.
2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
* gas/sh/sh64/case-1.d, gas/sh/sh64/mix-1.d, gas/sh/sh64/pt32-1.d,
gas/sh/sh64/pt64-1.d, gas/sh/sh64/ptc32-1.d,
gas/sh/sh64/ptc64-1.d, gas/sh/sh64/ptext32-1.d,
gas/sh/sh64/ptext64-1.d: Correct offsets in PT/PTA/PTB expansion.
2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
* gas/sh/sh64/datal-3.s, gas/sh/sh64/datal32-3.d,
gas/sh/sh64/datal64-3.d: New tests.
2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
* gas/sh/sh64/datal-1.s: Remove whitespace at end of line.
* gas/sh/sh64/datal32-1.d, gas/sh/sh64/datal64-1.d,
gas/sh/sh64/movi32-1.d, gas/sh/sh64/movi32-2.d,
gas/sh/sh64/movi64-1.d, gas/sh/sh64/movi64-3.d: Correct register.
* gas/sh/sh64/mix-1.s, gas/sh/sh64/mix-1.d, gas/sh/sh64/err-4.s:
New tests.
2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
* gas/macros/macros.exp: Import xfail sh*-*-* from net binutils.
* gas/sh/sh64/case-1.d: Correct offsets in PT/PTA/PTB expansion.
gas/sh/sh64/pt32-1.d, gas/sh/sh64/pt64-1.d: Ditto.
gas/sh/sh64/ptc32-1.d, gas/sh/sh64/ptc64-1.d: Ditto.
gas/sh/sh64/ptext32-1.d, gas/sh/sh64/ptext64-1.d: Ditto.
2000-11-25 Hans-Peter Nilsson <hpn@cygnus.com>
* gas/sh/sh64/ptc32-1.d, gas/sh/sh64/ptc64-1.d: Correct.
* gas/sh/sh64/datal-1.s, gas/sh/sh64/datal32-1.d,
gas/sh/sh64/datal64-1.d: New test.
* gas/sh/sh64/datal-2.s, gas/sh/sh64/datal-2.d: New test.
* gas/sh/sh64/creg-1.d, gas/sh/sh64/creg-1.s: New test.
* gas/sh/sh64/creg-2.d, gas/sh/sh64/creg-2.s: New test.
2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
* gas/sh/sh64: New testsuite.
2002-02-06 Alexandre Oliva <aoliva@redhat.com>
* gas/sh/pic.d, gas/sh/pic.s: New test.

View File

@ -0,0 +1,10 @@
#as: --abi=32
#objdump: -dr
#name: Assertion .abi 32.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+6ff0fff0[ ]+nop

View File

@ -0,0 +1,7 @@
! Check successful .abi assertion for 32-bit ABI.
.text
.abi 32
.mode SHmedia
start:
nop

View File

@ -0,0 +1,9 @@
#as: --abi=64
#objdump: -dr
#name: Assertion .abi 64.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+6ff0fff0[ ]+nop

View File

@ -0,0 +1,7 @@
! Check successful .abi assertion for 64-bit ABI.
.text
.abi 64
start:
nop

View File

@ -0,0 +1,234 @@
#as: --isa=shmedia
#objdump: -dr
#name: Basic SHmedia instructions.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+003966b0[ ]+add r3,r25,r43
[ ]+4:[ ]+00d80be0[ ]+add\.l r13,r2,r62
[ ]+8:[ ]+d2c7d210[ ]+addi r44,500,r33
[ ]+c:[ ]+d55832b0[ ]+addi\.l r21,-500,r43
[ ]+10:[ ]+033ca9e0[ ]+addz\.l r51,r42,r30
[ ]+14:[ ]+e1347bf0[ ]+alloco r19,960
[ ]+18:[ ]+048be4c0[ ]+and r8,r57,r12
[ ]+1c:[ ]+070f8d20[ ]+andc r48,r35,r18
[ ]+20:[ ]+d987f660[ ]+andi r24,509,r38
[ ]+24:[ ]+65719620[ ]+beq/l r23,r37,tr2
[ ]+28:[ ]+65716e40[ ]+beq/l r23,r27,tr4
[ ]+2c:[ ]+6431bc60[ ]+beq/u r3,r47,tr6
[ ]+30:[ ]+e4417a50[ ]+beqi/l r4,30,tr5
[ ]+34:[ ]+e4418600[ ]+beqi/l r4,-31,tr0
[ ]+38:[ ]+e761a420[ ]+beqi/u r54,-23,tr2
[ ]+3c:[ ]+6403fe70[ ]+bge/l r0,r63,tr7
[ ]+40:[ ]+64a31a40[ ]+bge/l r10,r6,tr4
[ ]+44:[ ]+64b39010[ ]+bge/u r11,r36,tr1
[ ]+48:[ ]+65ebae30[ ]+bgeu/l r30,r43,tr3
[ ]+4c:[ ]+64ab6a50[ ]+bgeu/l r10,r26,tr5
[ ]+50:[ ]+673b9020[ ]+bgeu/u r51,r36,tr2
[ ]+54:[ ]+6617b270[ ]+bgt/l r33,r44,tr7
[ ]+58:[ ]+6517fa40[ ]+bgt/l r17,r62,tr4
[ ]+5c:[ ]+64f71810[ ]+bgt/u r15,r6,tr1
[ ]+60:[ ]+662f6e60[ ]+bgtu/l r34,r27,tr6
[ ]+64:[ ]+65cffa00[ ]+bgtu/l r28,r62,tr0
[ ]+68:[ ]+652f6450[ ]+bgtu/u r18,r25,tr5
[ ]+6c:[ ]+4411fe60[ ]+blink tr1,r38
[ ]+70:[ ]+67e5be00[ ]+bne/l r62,r47,tr0
[ ]+74:[ ]+65d55a10[ ]+bne/l r29,r22,tr1
[ ]+78:[ ]+6675bc60[ ]+bne/u r39,r47,tr6
[ ]+7c:[ ]+e4e5ce70[ ]+bnei/l r14,-13,tr7
[ ]+80:[ ]+e5857e30[ ]+bnei/l r24,31,tr3
[ ]+84:[ ]+e765a820[ ]+bnei/u r54,-22,tr2
[ ]+88:[ ]+6ff5fff0[ ]+brk
[ ]+8c:[ ]+015ffcc0[ ]+byterev r21,r12
[ ]+90:[ ]+00a12d50[ ]+cmpeq r10,r11,r21
[ ]+94:[ ]+01e37f30[ ]+cmpgt r30,r31,r51
[ ]+98:[ ]+017786d0[ ]+cmpgtu r23,r33,r45
[ ]+9c:[ ]+22010ec0[ ]+cmveq r32,r3,r44
[ ]+a0:[ ]+20d5f040[ ]+cmvne r13,r60,r4
[ ]+a4:[ ]+19615be0[ ]+fabs\.d dr22,dr62
[ ]+a8:[ ]+1bb0ed90[ ]+fabs\.s fr59,fr25
[ ]+ac:[ ]+3681f140[ ]+fadd\.d dr40,dr60,dr20
[ ]+b0:[ ]+3690ed30[ ]+fadd\.s fr41,fr59,fr19
[ ]+b4:[ ]+3049cb90[ ]+fcmpeq\.d dr4,dr50,r57
[ ]+b8:[ ]+32f87910[ ]+fcmpeq\.s fr47,fr30,r17
[ ]+bc:[ ]+32cfd140[ ]+fcmpge\.d dr44,dr52,r20
[ ]+c0:[ ]+325e5e00[ ]+fcmpge\.s fr37,fr23,r32
[ ]+c4:[ ]+314d7330[ ]+fcmpgt\.d dr20,dr28,r51
[ ]+c8:[ ]+32fc5560[ ]+fcmpgt\.s fr47,fr21,r22
[ ]+cc:[ ]+320beaf0[ ]+fcmpun\.d dr32,dr58,r47
[ ]+d0:[ ]+315aa8c0[ ]+fcmpun\.s fr21,fr42,r12
[ ]+d4:[ ]+3a87a150[ ]+fcnv\.ds dr40,fr21
[ ]+d8:[ ]+3ab6ae00[ ]+fcnv\.sd fr43,dr32
[ ]+dc:[ ]+3625e140[ ]+fdiv\.d dr34,dr56,dr20
[ ]+e0:[ ]+34d46930[ ]+fdiv\.s fr13,fr26,fr19
[ ]+e4:[ ]+1ff2fe70[ ]+fgetscr fr39
[ ]+e8:[ ]+14062270[ ]+fipr\.s fv0,fv8,fr39
[ ]+ec:[ ]+9df3eb00[ ]+fld\.d r31,2000,dr48
[ ]+f0:[ ]+9b5a2660[ ]+fld\.p r53,-3000,fp38
[ ]+f4:[ ]+9757f750[ ]+fld\.s r53,2036,fr53
[ ]+f8:[ ]+1d79a820[ ]+fldx\.d r23,r42,dr2
[ ]+fc:[ ]+1c2d5a00[ ]+fldx\.p r2,r22,fp32
[ ]+100:[ ]+1db8e8c0[ ]+fldx\.s r27,r58,fr12
[ ]+104:[ ]+385e15c0[ ]+float\.ld fr5,dr28
[ ]+108:[ ]+3b7cde40[ ]+float\.ls fr55,fr36
[ ]+10c:[ ]+3acdb100[ ]+float\.qd dr44,dr16
[ ]+110:[ ]+39ef78b0[ ]+float\.qs dr30,fr11
[ ]+114:[ ]+368e9440[ ]+fmac\.s fr40,fr37,fr4
[ ]+118:[ ]+38812280[ ]+fmov\.d dr8,dr40
[ ]+11c:[ ]+33a1ea20[ ]+fmov\.dq dr58,r34
[ ]+120:[ ]+1d90ff40[ ]+fmov\.ls r25,fr52
[ ]+124:[ ]+1ed1ff20[ ]+fmov\.qd r45,dr50
[ ]+128:[ ]+38401370[ ]+fmov\.s fr4,fr55
[ ]+12c:[ ]+30e038f0[ ]+fmov\.sl fr14,r15
[ ]+130:[ ]+3587eaa0[ ]+fmul\.d dr24,dr58,dr42
[ ]+134:[ ]+35b68220[ ]+fmul\.s fr27,fr32,fr34
[ ]+138:[ ]+18230800[ ]+fneg\.d dr2,dr0
[ ]+13c:[ ]+18020210[ ]+fneg\.s fr0,fr33
[ ]+140:[ ]+32c2b3f0[ ]+fputscr fr44
[ ]+144:[ ]+39e57ac0[ ]+fsqrt\.d dr30,dr44
[ ]+148:[ ]+38340d70[ ]+fsqrt\.s fr3,fr23
[ ]+14c:[ ]+bc37d020[ ]+fst\.d r3,4000,dr2
[ ]+150:[ ]+bb682cc0[ ]+fst\.p r54,-4008,fp12
[ ]+154:[ ]+b5282570[ ]+fst\.s r18,-2012,fr23
[ ]+158:[ ]+3d29b8c0[ ]+fstx\.d r18,r46,dr12
[ ]+15c:[ ]+3e6d6b40[ ]+fstx\.p r38,r26,fp52
[ ]+160:[ ]+3c785da0[ ]+fstx\.s r7,r23,fr26
[ ]+164:[ ]+3403b200[ ]+fsub\.d dr0,dr44,dr32
[ ]+168:[ ]+3432f830[ ]+fsub\.s fr3,fr62,fr3
[ ]+16c:[ ]+3a6b9b50[ ]+ftrc\.dl dr38,fr53
[ ]+170:[ ]+3ba8eb10[ ]+ftrc\.sl fr58,fr49
[ ]+174:[ ]+38e939a0[ ]+ftrc\.dq dr14,dr26
[ ]+178:[ ]+3bcaf160[ ]+ftrc\.sq fr60,dr22
[ ]+17c:[ ]+150e81c0[ ]+ftrv\.s mtrx16,fv32,fv28
[ ]+180:[ ]+c05fd7e0[ ]+getcfg r5,-11,r62
[ ]+184:[ ]+274ffd00[ ]+getcon cr52,r16
[ ]+188:[ ]+4465fda0[ ]+gettr tr6,r26
[ ]+18c:[ ]+e3058bf0[ ]+icbi r48,-960
[ ]+190:[ ]+83200fe0[ ]+ld\.b r50,3,r62
[ ]+194:[ ]+885da560[ ]+ld\.l r5,-604,r22
[ ]+198:[ ]+8e3cdea0[ ]+ld\.q r35,-1608,r42
[ ]+19c:[ ]+935cdc20[ ]+ld\.ub r53,-201,r2
[ ]+1a0:[ ]+b17cdea0[ ]+ld\.uw r23,-402,r42
[ ]+1a4:[ ]+86e25cb0[ ]+ld\.w r46,302,r11
[ ]+1a8:[ ]+c0668a90[ ]+ldhi\.l r6,-30,r41
[ ]+1ac:[ ]+c2477df0[ ]+ldhi\.q r36,31,r31
[ ]+1b0:[ ]+c1325300[ ]+ldlo\.l r19,20,r48
[ ]+1b4:[ ]+c09381d0[ ]+ldlo\.q r9,-32,r29
[ ]+1b8:[ ]+40500ef0[ ]+ldx\.b r5,r3,r47
[ ]+1bc:[ ]+4192ace0[ ]+ldx\.l r25,r43,r14
[ ]+1c0:[ ]+40c3f290[ ]+ldx\.q r12,r60,r41
[ ]+1c4:[ ]+40d40010[ ]+ldx\.ub r13,r0,r1
[ ]+1c8:[ ]+40d50910[ ]+ldx\.uw r13,r2,r17
[ ]+1cc:[ ]+40a15bc0[ ]+ldx\.w r10,r22,r60
[ ]+1d0:[ ]+287afe10[ ]+mabs\.l r7,r33
[ ]+1d4:[ ]+2a59fe20[ ]+mabs\.w r37,r34
[ ]+1d8:[ ]+0a228070[ ]+madd\.l r34,r32,r7
[ ]+1dc:[ ]+0971d510[ ]+madd\.w r23,r53,r17
[ ]+1e0:[ ]+09865c90[ ]+madds\.l r24,r23,r9
[ ]+1e4:[ ]+0a245f10[ ]+madds\.ub r34,r23,r49
[ ]+1e8:[ ]+08450bb0[ ]+madds\.w r4,r2,r59
[ ]+1ec:[ ]+2960e1f0[ ]+mcmpeq\.b r22,r56,r31
[ ]+1f0:[ ]+2952b7d0[ ]+mcmpeq\.l r21,r45,r61
[ ]+1f4:[ ]+2a01d810[ ]+mcmpeq\.w r32,r54,r1
[ ]+1f8:[ ]+28361130[ ]+mcmpgt\.l r3,r4,r19
[ ]+1fc:[ ]+2a24d8d0[ ]+mcmpgt\.ub r34,r54,r13
[ ]+200:[ ]+29751430[ ]+mcmpgt\.w r23,r5,r3
[ ]+204:[ ]+4be3c9e0[ ]+mcmv r62,r50,r30
[ ]+208:[ ]+4c2d1400[ ]+mcnvs\.lw r2,r5,r0
[ ]+20c:[ ]+4d581ca0[ ]+mcnvs\.wb r21,r7,r10
[ ]+210:[ ]+4d7cbcd0[ ]+mcnvs\.wub r23,r47,r13
[ ]+214:[ ]+2847a470[ ]+mextr1 r4,r41,r7
[ ]+218:[ ]+2a0b12f0[ ]+mextr2 r32,r4,r47
[ ]+21c:[ ]+299fb9b0[ ]+mextr3 r25,r46,r27
[ ]+220:[ ]+2f431820[ ]+mextr4 r52,r6,r2
[ ]+224:[ ]+2d574150[ ]+mextr5 r21,r16,r21
[ ]+228:[ ]+2d8bfaa0[ ]+mextr6 r24,r62,r42
[ ]+22c:[ ]+2f9fb970[ ]+mextr7 r57,r46,r23
[ ]+230:[ ]+48511020[ ]+mmacfx\.wl r5,r4,r2
[ ]+234:[ ]+48b5b160[ ]+mmacnfx\.wl r11,r44,r22
[ ]+238:[ ]+4d6286c0[ ]+mmul\.l r22,r33,r44
[ ]+23c:[ ]+4cc18ef0[ ]+mmul\.w r12,r35,r47
[ ]+240:[ ]+4fd69700[ ]+mmulfx\.l r61,r37,r48
[ ]+244:[ ]+4c151c50[ ]+mmulfx\.w r1,r7,r5
[ ]+248:[ ]+4ca99720[ ]+mmulfxrp\.w r10,r37,r50
[ ]+24c:[ ]+4c0e1f70[ ]+mmulhi\.wl r0,r7,r55
[ ]+250:[ ]+4caa6e30[ ]+mmullo\.wl r10,r27,r35
[ ]+254:[ ]+4a998250[ ]+mmulsum\.wq r41,r32,r37
[ ]+258:[ ]+cffe16b0[ ]+movi -123,r43
[ ]+25c:[ ]+2b9d8040[ ]+mperm\.w r57,r32,r4
[ ]+260:[ ]+48505d40[ ]+msad\.ubq r5,r23,r20
[ ]+264:[ ]+0e363140[ ]+mshalds\.l r35,r12,r20
[ ]+268:[ ]+0eb5d1e0[ ]+mshalds\.w r43,r52,r30
[ ]+26c:[ ]+0c4a5e80[ ]+mshard\.l r4,r23,r40
[ ]+270:[ ]+0d89f8a0[ ]+mshard\.w r24,r62,r10
[ ]+274:[ ]+0c2b4320[ ]+mshards\.q r2,r16,r50
[ ]+278:[ ]+2ea41bc0[ ]+mshfhi\.b r42,r6,r60
[ ]+27c:[ ]+2f464bb0[ ]+mshfhi\.l r52,r18,r59
[ ]+280:[ ]+2c857ee0[ ]+mshfhi\.w r8,r31,r46
[ ]+284:[ ]+2dc09e90[ ]+mshflo\.b r28,r39,r41
[ ]+288:[ ]+2dd29ab0[ ]+mshflo\.l r29,r38,r43
[ ]+28c:[ ]+2de196c0[ ]+mshflo\.w r30,r37,r44
[ ]+290:[ ]+0df292e0[ ]+mshlld\.l r31,r36,r46
[ ]+294:[ ]+0e018ef0[ ]+mshlld\.w r32,r35,r47
[ ]+298:[ ]+0e1e8b10[ ]+mshlrd\.l r33,r34,r49
[ ]+29c:[ ]+0e2d8720[ ]+mshlrd\.w r34,r33,r50
[ ]+2a0:[ ]+0a3a8340[ ]+msub\.l r35,r32,r52
[ ]+2a4:[ ]+0a497f50[ ]+msub\.w r36,r31,r53
[ ]+2a8:[ ]+0a5e7b70[ ]+msubs\.l r37,r30,r55
[ ]+2ac:[ ]+0a6c7780[ ]+msubs\.ub r38,r29,r56
[ ]+2b0:[ ]+0a7d73a0[ ]+msubs\.w r39,r28,r58
[ ]+2b4:[ ]+03dea5a0[ ]+mulu\.l r61,r41,r26
[ ]+2b8:[ ]+6ff0fff0[ ]+nop
[ ]+2bc:[ ]+03cdfea0[ ]+nsb r60,r42
[ ]+2c0:[ ]+e2b987f0[ ]+ocbi r43,-992
[ ]+2c4:[ ]+e28883f0[ ]+ocbp r40,-1024
[ ]+2c8:[ ]+e2cc7ff0[ ]+ocbwb r44,992
[ ]+2cc:[ ]+07b90e80[ ]+or r59,r3,r40
[ ]+2d0:[ ]+dfa4e680[ ]+ori r58,313,r40
[ ]+2d4:[ ]+e391fff0[ ]+prefi r57,-32
[ ]+2d8:[ ]+6bf1e260[ ]+ptabs/l r56,tr6
[ ]+2dc:[ ]+6bf1fe60[ ]+ptabs/l r63,tr6
[ ]+2e0:[ ]+6bf1f060[ ]+ptabs/u r60,tr6
[ ]+2e4:[ ]+6bf5de30[ ]+ptrel/l r55,tr3
[ ]+2e8:[ ]+6bf53e30[ ]+ptrel/l r15,tr3
[ ]+2ec:[ ]+6bf5fc30[ ]+ptrel/u r63,tr3
[ ]+2f0:[ ]+e29fd7e0[ ]+putcfg r41,-11,r62
[ ]+2f4:[ ]+6e8ffde0[ ]+putcon r40,cr30
[ ]+2f8:[ ]+6ff3fff0[ ]+rte
[ ]+2fc:[ ]+0727a930[ ]+shard r50,r42,r19
[ ]+300:[ ]+0746a540[ ]+shard\.l r52,r41,r20
[ ]+304:[ ]+c757a150[ ]+shari r53,40,r21
[ ]+308:[ ]+c7769d60[ ]+shari\.l r55,39,r22
[ ]+30c:[ ]+07819970[ ]+shlld r56,r38,r23
[ ]+310:[ ]+07909580[ ]+shlld\.l r57,r37,r24
[ ]+314:[ ]+c7c19190[ ]+shlli r60,36,r25
[ ]+318:[ ]+c7d07da0[ ]+shlli\.l r61,31,r26
[ ]+31c:[ ]+07f389b0[ ]+shlrd r63,r34,r27
[ ]+320:[ ]+040285c0[ ]+shlrd\.l r0,r33,r28
[ ]+324:[ ]+c42381d0[ ]+shlri r2,32,r29
[ ]+328:[ ]+c4327de0[ ]+shlri\.l r3,31,r30
[ ]+32c:[ ]+cbff70d0[ ]+shori 65500,r13
[ ]+330:[ ]+6ff7fff0[ ]+sleep
[ ]+334:[ ]+a057d5d0[ ]+st\.b r5,501,r29
[ ]+338:[ ]+a867cdf0[ ]+st\.l r6,1996,r31
[ ]+33c:[ ]+ac77d600[ ]+st\.q r7,4008,r32
[ ]+340:[ ]+a497d610[ ]+st\.w r9,1002,r33
[ ]+344:[ ]+e0a6b2b0[ ]+sthi\.l r10,-20,r43
[ ]+348:[ ]+e0c75ec0[ ]+sthi\.q r12,23,r44
[ ]+34c:[ ]+e0d296d0[ ]+stlo\.l r13,-27,r45
[ ]+350:[ ]+e0f356e0[ ]+stlo\.q r15,21,r46
[ ]+354:[ ]+610076f0[ ]+stx\.b r16,r29,r47
[ ]+358:[ ]+6112cb00[ ]+stx\.l r17,r50,r48
[ ]+35c:[ ]+6133c710[ ]+stx\.q r19,r49,r49
[ ]+360:[ ]+61413f20[ ]+stx\.w r20,r15,r50
[ ]+364:[ ]+016b7730[ ]+sub r22,r29,r51
[ ]+368:[ ]+017a7340[ ]+sub\.l r23,r28,r52
[ ]+36c:[ ]+21936f50[ ]+swap\.q r25,r27,r53
[ ]+370:[ ]+6ff2fff0[ ]+synci
[ ]+374:[ ]+6ff6fff0[ ]+synco
[ ]+378:[ ]+6da1fff0[ ]+trapa r26
[ ]+37c:[ ]+05cd6b60[ ]+xor r28,r26,r54
[ ]+380:[ ]+c5dd7f70[ ]+xori r29,31,r55
[ ]+384:[ ]+047ed510[ ]+muls\.l r7,r53,r17

View File

@ -0,0 +1,233 @@
! Various straightforward insn tests, one per insns basic insn format.
! No insns with strange relocs. The insns are from the alphabetical list
! in SH-5/ST50-023-04.
.text
start:
add r3,r25,r43
add.l r13,r2,r62
addi r44,500,r33
addi.l r21,-500,r43
addz.l r51,r42,r30
alloco r19,960
and r8,r57,r12
andc r48,r35,r18
andi r24,509,r38
beq r23,r37,tr2
beq/l r23,r27,tr4
beq/u r3,r47,tr6
beqi r4,30,tr5
beqi/l r4,-31,tr0
beqi/u r54,-23,tr2
bge r0,r63,tr7
bge/l r10,r6,tr4
bge/u r11,r36,tr1
bgeu r30,r43,tr3
bgeu/l r10,r26,tr5
bgeu/u r51,r36,tr2
bgt r33,r44,tr7
bgt/l r17,r62,tr4
bgt/u r15,r6,tr1
bgtu r34,r27,tr6
bgtu/l r28,r62,tr0
bgtu/u r18,r25,tr5
blink tr1,r38
bne r62,r47,tr0
bne/l r29,r22,tr1
bne/u r39,r47,tr6
bnei r14,-13,tr7
bnei/l r24,31,tr3
bnei/u r54,-22,tr2
brk
byterev r21,r12
cmpeq r10,r11,r21
cmpgt r30,r31,r51
cmpgtu r23,r33,r45
cmveq r32,r3,r44
cmvne r13,r60,r4
fabs.d dr22,dr62
fabs.s fr59,fr25
fadd.d dr40,dr60,dr20
fadd.s fr41,fr59,fr19
fcmpeq.d dr4,dr50,r57
fcmpeq.s fr47,fr30,r17
fcmpge.d dr44,dr52,r20
fcmpge.s fr37,fr23,r32
fcmpgt.d dr20,dr28,r51
fcmpgt.s fr47,fr21,r22
fcmpun.d dr32,dr58,r47
fcmpun.s fr21,fr42,r12
fcnv.ds dr40,fr21
fcnv.sd fr43,dr32
fdiv.d dr34,dr56,dr20
fdiv.s fr13,fr26,fr19
fgetscr fr39
fipr.s fv0,fv8,fr39
fld.d r31,2000,dr48
fld.p r53,-3000,fp38
fld.s r53,2036,fr53
fldx.d r23,r42,dr2
fldx.p r2,r22,fp32
fldx.s r27,r58,fr12
float.ld fr5,dr28
float.ls fr55,fr36
float.qd dr44,dr16
float.qs dr30,fr11
fmac.s fr40,fr37,fr4
fmov.d dr8,dr40
fmov.dq dr58,r34
fmov.ls r25,fr52
fmov.qd r45,dr50
fmov.s fr4,fr55
fmov.sl fr14,r15
fmul.d dr24,dr58,dr42
fmul.s fr27,fr32,fr34
fneg.d dr2,dr0
fneg.s fr0,fr33
fputscr fr44
fsqrt.d dr30,dr44
fsqrt.s fr3,fr23
fst.d r3,4000,dr2
fst.p r54,-4008,fp12
fst.s r18,-2012,fr23
fstx.d r18,r46,dr12
fstx.p r38,r26,fp52
fstx.s r7,r23,fr26
fsub.d dr0,dr44,dr32
fsub.s fr3,fr62,fr3
ftrc.dl dr38,fr53
ftrc.sl fr58,fr49
ftrc.dq dr14,dr26
ftrc.sq fr60,dr22
ftrv.s mtrx16,fv32,fv28
getcfg r5,-11,r62
getcon cr52,r16
gettr tr6,r26
icbi r48,-960
ld.b r50,3,r62
ld.l r5,-604,r22
ld.q r35,-1608,r42
ld.ub r53,-201,r2
ld.uw r23,-402,r42
ld.w r46,302,r11
ldhi.l r6,-30,r41
ldhi.q r36,31,r31
ldlo.l r19,20,r48
ldlo.q r9,-32,r29
ldx.b r5,r3,r47
ldx.l r25,r43,r14
ldx.q r12,r60,r41
ldx.ub r13,r0,r1
ldx.uw r13,r2,r17
ldx.w r10,r22,r60
mabs.l r7,r33
mabs.w r37,r34
madd.l r34,r32,r7
madd.w r23,r53,r17
madds.l r24,r23,r9
madds.ub r34,r23,r49
madds.w r4,r2,r59
mcmpeq.b r22,r56,r31
mcmpeq.l r21,r45,r61
mcmpeq.w r32,r54,r1
mcmpgt.l r3,r4,r19
mcmpgt.ub r34,r54,r13
mcmpgt.w r23,r5,r3
mcmv r62,r50,r30
mcnvs.lw r2,r5,r0
mcnvs.wb r21,r7,r10
mcnvs.wub r23,r47,r13
mextr1 r4,r41,r7
mextr2 r32,r4,r47
mextr3 r25,r46,r27
mextr4 r52,r6,r2
mextr5 r21,r16,r21
mextr6 r24,r62,r42
mextr7 r57,r46,r23
mmacfx.wl r5,r4,r2
mmacnfx.wl r11,r44,r22
mmul.l r22,r33,r44
mmul.w r12,r35,r47
mmulfx.l r61,r37,r48
mmulfx.w r1,r7,r5
mmulfxrp.w r10,r37,r50
mmulhi.wl r0,r7,r55
mmullo.wl r10,r27,r35
mmulsum.wq r41,r32,r37
movi -123,r43
mperm.w r57,r32,r4
msad.ubq r5,r23,r20
mshalds.l r35,r12,r20
mshalds.w r43,r52,r30
mshard.l r4,r23,r40
mshard.w r24,r62,r10
mshards.q r2,r16,r50
mshfhi.b r42,r6,r60
mshfhi.l r52,r18,r59
mshfhi.w r8,r31,r46
mshflo.b r28,r39,r41
mshflo.l r29,r38,r43
mshflo.w r30,r37,r44
mshlld.l r31,r36,r46
mshlld.w r32,r35,r47
mshlrd.l r33,r34,r49
mshlrd.w r34,r33,r50
msub.l r35,r32,r52
msub.w r36,r31,r53
msubs.l r37,r30,r55
msubs.ub r38,r29,r56
msubs.w r39,r28,r58
mulu.l r61,r41,r26
nop
nsb r60,r42
ocbi r43,-992
ocbp r40,-1024
ocbwb r44,992
or r59,r3,r40
ori r58,313,r40
prefi r57,-32
! Note: pta, ptb are not here.
ptabs r56,tr6
ptabs/l r63,tr6
ptabs/u r60,tr6
ptrel r55,tr3
ptrel/l r15,tr3
ptrel/u r63,tr3
putcfg r41,-11,r62
putcon r40,cr30
rte
shard r50,r42,r19
shard.l r52,r41,r20
shari r53,40,r21
shari.l r55,39,r22
shlld r56,r38,r23
shlld.l r57,r37,r24
shlli r60,36,r25
shlli.l r61,31,r26
shlrd r63,r34,r27
shlrd.l r0,r33,r28
shlri r2,32,r29
shlri.l r3,31,r30
shori 65500,r13
sleep
st.b r5,501,r29
st.l r6,1996,r31
st.q r7,4008,r32
st.w r9,1002,r33
sthi.l r10,-20,r43
sthi.q r12,23,r44
stlo.l r13,-27,r45
stlo.q r15,21,r46
stx.b r16,r29,r47
stx.l r17,r50,r48
stx.q r19,r49,r49
stx.w r20,r15,r50
sub r22,r29,r51
sub.l r23,r28,r52
swap.q r25,r27,r53
synci
synco
trapa r26
xor r28,r26,r54
xori r29,31,r55
muls.l r7,r53,r17

View File

@ -0,0 +1,23 @@
#as: --abi=32
#objdump: -dr
#name: Case-insensitive registers and opcodes.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+6ff0fff0[ ]+nop
[ ]+4:[ ]+6ff0fff0[ ]+nop
[ ]+8:[ ]+cc000190[ ]+movi 0,r25
[ ]+8:[ ]+R_SH_IMM_MEDLOW16_PCREL foo\+0xf*ff8
[ ]+c:[ ]+c8000190[ ]+shori 0,r25
[ ]+c:[ ]+R_SH_IMM_LOW16_PCREL foo\+0xf*ffc
[ ]+10:[ ]+6bf56440[ ]+ptrel/u r25,tr4
[ ]+14:[ ]+cc000190[ ]+movi 0,r25
[ ]+14:[ ]+R_SH_IMM_MEDLOW16_PCREL bar\+0xf*ff8
[ ]+18:[ ]+c8000190[ ]+shori 0,r25
[ ]+18:[ ]+R_SH_IMM_LOW16_PCREL bar\+0xf*ffc
[ ]+1c:[ ]+6bf56630[ ]+ptrel/l r25,tr3
[ ]+20:[ ]+cc00a820[ ]+movi 42,r2
[ ]+24:[ ]+ebffde20[ ]+pta/l 0 <start>,tr2

View File

@ -0,0 +1,12 @@
! Tests that opcodes and common registers are recognized case-insensitive,
! and also that the option --isa=shmedia is optional.
.mode SHmedia
.text
start:
nOp
NOP
pt/U foo,tr4
PTA/l bar,Tr3
MOVI 42,R2
PTA/L start,TR2

View File

@ -0,0 +1,18 @@
#as: --abi=32 -no-expand
#objdump: -dr
#source: case-1.s
#name: Case-insensitive registers and opcodes with -no-expand.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+6ff0fff0[ ]+nop
[ ]+4:[ ]+6ff0fff0[ ]+nop
[ ]+8:[ ]+e8000040[ ]+pta/u 8 <start\+0x8>,tr4
[ ]+8:[ ]+R_SH_PT_16 foo
[ ]+c:[ ]+e8000630[ ]+pta/l 10 <start\+0x10>,tr3
[ ]+c:[ ]+R_SH_PT_16 bar
[ ]+10:[ ]+cc00a820[ ]+movi 42,r2
[ ]+14:[ ]+ebffee20[ ]+pta/l 0 <start>,tr2

View File

@ -0,0 +1,105 @@
#as: --abi=32
#objdump: -sr
#source: crange1.s
#name: .cranges descriptors.
.*: file format .*-sh64
RELOCATION RECORDS FOR \[\.cranges\]:
OFFSET *TYPE *VALUE
0+00 R_SH_DIR32 \.text\.shmediaanddata
0+0a R_SH_DIR32 \.text\.codemix
0+14 R_SH_DIR32 \.text\.codemixconst
0+1e R_SH_DIR32 \.text\.codemixconst
0+28 R_SH_DIR32 \.text\.codemixconst2
0+32 R_SH_DIR32 \.text\.codemixconst2
0+3c R_SH_DIR32 \.text\.codemixconst2
0+46 R_SH_DIR32 \.text\.codemixconst2
0+50 R_SH_DIR32 \.text\.codemixconst2
0+5a R_SH_DIR32 \.text\.shmediaanddata
0+64 R_SH_DIR32 \.text\.codemix
0+6e R_SH_DIR32 \.text\.codemixconst
0+78 R_SH_DIR32 \.text\.codemixconst2
Contents of section \.text:
0000 6ff0fff0 cc00aad0 cc0022e0 6ff0fff0 .*
Contents of section \.data:
Contents of section \.text\.compact:
0000 0009e02a 89000009 0009 .*
Contents of section \.text\.shmediaanddata:
0000 cc00aad0 cc0022e0 6ff0fff0 00000014 .*
0010 00000032 .*
Contents of section \.cranges:
0000 00000000 00000008 00030000 00000000 .*
0010 00180003 00000000 0000001c 00030000 .*
0020 001c0000 00200001 00000000 00000024 .*
0030 00030000 00240000 00280001 0000004c .*
0040 000000e8 00020000 01340000 002c0003 .*
0050 00000160 0000001a 00010000 00080000 .*
0060 000c0001 00000018 0000000e 00020000 .*
0070 003c0000 007e0002 0000017a 00000156 .*
0080 0002 .*
Contents of section \.text\.codemix:
0000 cc00aad0 6ff0fff0 6ff0fff0 cc0062e0 .*
0010 6ff0fff0 6ff0fff0 0009e028 00090009 .*
0020 89000009 0009 .*
Contents of section \.text\.codemixconst:
0000 6ff0fff0 cc00aad0 6ff0fff0 6ff0fff0 .*
0010 cc00e2e0 6ff0fff0 6ff0fff0 6ff0fff0 .*
0020 6ff0fff0 6ff00000 0000fff0 6ff0fff0 .*
0030 6ff0fff0 00000000 000000b1 0009e02b .*
0040 00090009 89020009 00090009 00090000 .*
0050 00000000 00000000 00000000 00000000 .*
0060 00000000 00000000 00000000 00000000 .*
0070 00000000 00000000 00000000 00000000 .*
0080 00000000 00000000 00000000 00000000 .*
0090 00000000 00000000 00000000 00000000 .*
00a0 00000000 00000000 00000000 00000000 .*
00b0 00000000 00000000 007c .*
Contents of section \.text\.codemixconst2:
0000 6ff0fff0 cc00aad0 6ff0fff0 6ff0fff0 .*
0010 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
0020 cc0122e0 6ff0fff0 00000000 00000000 .*
0030 00000000 00000000 00000000 00000000 .*
0040 00000000 00000000 00000044 0009e02c .*
0050 00090009 89040009 00090009 00090009 .*
0060 00090009 09000000 00000000 00000000 .*
0070 00000000 00000000 00000000 00000000 .*
0080 00000000 00000000 00000000 00000000 .*
0090 00000000 00000000 00000000 00000000 .*
00a0 00000000 00000000 00000000 00000000 .*
00b0 00000000 00000000 00000000 00000000 .*
00c0 00000000 00000000 00000000 00000000 .*
00d0 00000000 00000000 00000000 00000000 .*
00e0 00000000 00000000 00000000 00000000 .*
00f0 00000000 00000000 00000000 00000000 .*
0100 00000000 00000000 00000000 00000000 .*
0110 00000000 00000000 00000000 00000000 .*
0120 00000000 00000000 00000000 00000000 .*
0130 000000e6 6ff0fff0 cc00aed0 6ff0fff0 .*
0140 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
0150 6ff0fff0 6ff0fff0 6ff0fff0 cc010ae0 .*
0160 6ff0fff0 00000000 00000000 00000000 .*
0170 00000000 00000000 00420009 e00e0009 .*
0180 0009890a 00090009 00090009 00090009 .*
0190 00090009 00090009 00090009 00000000 .*
01a0 00000000 00000000 00000000 00000000 .*
01b0 00000000 00000000 00000000 00000000 .*
01c0 00000000 00000000 00000000 00000000 .*
01d0 00000000 00000000 00000000 00000000 .*
01e0 00000000 00000000 00000000 00000000 .*
01f0 00000000 00000000 00000000 00000000 .*
0200 00000000 00000000 00000000 00000000 .*
0210 00000000 00000000 00000000 00000000 .*
0220 00000000 00000000 00000000 00000000 .*
0230 00000000 00000000 00000000 00000000 .*
0240 00000000 00000000 00000000 00000000 .*
0250 00000000 00000000 00000000 00000000 .*
0260 00000000 00000000 00000000 00000000 .*
0270 00000000 00000000 00000000 00000000 .*
0280 00000000 00000000 00000000 00000000 .*
0290 00000000 00000000 00000000 00000000 .*
02a0 00000000 00000000 00000000 00000000 .*
02b0 00000000 00000000 00000000 00000000 .*
02c0 00000000 00000000 00000000 00000154 .*

View File

@ -0,0 +1,109 @@
#as: --abi=32 -shcompact-const-crange
#objdump: -sr
#source: crange1.s
#name: .cranges descriptors including SHcompact constant pool
.*: file format .*-sh64
RELOCATION RECORDS FOR \[\.cranges\]:
OFFSET *TYPE *VALUE
0+00 R_SH_DIR32 \.text\.shmediaanddata
0+0a R_SH_DIR32 \.text\.codemix
0+14 R_SH_DIR32 \.text\.codemixconst
0+1e R_SH_DIR32 \.text\.codemixconst
0+28 R_SH_DIR32 \.text\.codemixconst
0+32 R_SH_DIR32 \.text\.codemixconst2
0+3c R_SH_DIR32 \.text\.codemixconst2
0+46 R_SH_DIR32 \.text\.codemixconst2
0+50 R_SH_DIR32 \.text\.codemixconst2
0+5a R_SH_DIR32 \.text\.codemixconst2
0+64 R_SH_DIR32 \.text\.codemixconst2
0+6e R_SH_DIR32 \.text\.codemixconst2
0+78 R_SH_DIR32 \.text\.shmediaanddata
0+82 R_SH_DIR32 \.text\.codemix
0+8c R_SH_DIR32 \.text\.codemixconst
0+96 R_SH_DIR32 \.text\.codemixconst2
Contents of section \.text:
0000 6ff0fff0 cc00aad0 cc0022e0 6ff0fff0 .*
Contents of section \.data:
Contents of section \.text\.compact:
0000 0009e02a 89000009 0009 .*
Contents of section \.text\.shmediaanddata:
0000 cc00aad0 cc0022e0 6ff0fff0 00000014 .*
0010 00000032 .*
Contents of section \.cranges:
0000 00000000 00000008 00030000 00000000 .*
0010 00180003 00000000 0000001c 00030000 .*
0020 001c0000 00200001 0000003c 00000012 .*
0030 00020000 00000000 00240003 00000024 .*
0040 00000028 00010000 004c0000 00160002 .*
0050 00000062 000000d2 00010000 01340000 .*
0060 002c0003 00000160 0000001a 00010000 .*
0070 017a0000 00220002 00000008 0000000c .*
0080 00010000 00180000 000e0002 0000004e .*
0090 0000006c 00010000 019c0000 01340001 .*
Contents of section \.text\.codemix:
0000 cc00aad0 6ff0fff0 6ff0fff0 cc0062e0 .*
0010 6ff0fff0 6ff0fff0 0009e028 00090009 .*
0020 89000009 0009 .*
Contents of section \.text\.codemixconst:
0000 6ff0fff0 cc00aad0 6ff0fff0 6ff0fff0 .*
0010 cc00e2e0 6ff0fff0 6ff0fff0 6ff0fff0 .*
0020 6ff0fff0 6ff00000 0000fff0 6ff0fff0 .*
0030 6ff0fff0 00000000 000000b1 0009e02b .*
0040 00090009 89020009 00090009 00090000 .*
0050 00000000 00000000 00000000 00000000 .*
0060 00000000 00000000 00000000 00000000 .*
0070 00000000 00000000 00000000 00000000 .*
0080 00000000 00000000 00000000 00000000 .*
0090 00000000 00000000 00000000 00000000 .*
00a0 00000000 00000000 00000000 00000000 .*
00b0 00000000 00000000 007c .*
Contents of section \.text\.codemixconst2:
0000 6ff0fff0 cc00aad0 6ff0fff0 6ff0fff0 .*
0010 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
0020 cc0122e0 6ff0fff0 00000000 00000000 .*
0030 00000000 00000000 00000000 00000000 .*
0040 00000000 00000000 00000044 0009e02c .*
0050 00090009 89040009 00090009 00090009 .*
0060 00090009 09000000 00000000 00000000 .*
0070 00000000 00000000 00000000 00000000 .*
0080 00000000 00000000 00000000 00000000 .*
0090 00000000 00000000 00000000 00000000 .*
00a0 00000000 00000000 00000000 00000000 .*
00b0 00000000 00000000 00000000 00000000 .*
00c0 00000000 00000000 00000000 00000000 .*
00d0 00000000 00000000 00000000 00000000 .*
00e0 00000000 00000000 00000000 00000000 .*
00f0 00000000 00000000 00000000 00000000 .*
0100 00000000 00000000 00000000 00000000 .*
0110 00000000 00000000 00000000 00000000 .*
0120 00000000 00000000 00000000 00000000 .*
0130 000000e6 6ff0fff0 cc00aed0 6ff0fff0 .*
0140 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
0150 6ff0fff0 6ff0fff0 6ff0fff0 cc010ae0 .*
0160 6ff0fff0 00000000 00000000 00000000 .*
0170 00000000 00000000 00420009 e00e0009 .*
0180 0009890a 00090009 00090009 00090009 .*
0190 00090009 00090009 00090009 00000000 .*
01a0 00000000 00000000 00000000 00000000 .*
01b0 00000000 00000000 00000000 00000000 .*
01c0 00000000 00000000 00000000 00000000 .*
01d0 00000000 00000000 00000000 00000000 .*
01e0 00000000 00000000 00000000 00000000 .*
01f0 00000000 00000000 00000000 00000000 .*
0200 00000000 00000000 00000000 00000000 .*
0210 00000000 00000000 00000000 00000000 .*
0220 00000000 00000000 00000000 00000000 .*
0230 00000000 00000000 00000000 00000000 .*
0240 00000000 00000000 00000000 00000000 .*
0250 00000000 00000000 00000000 00000000 .*
0260 00000000 00000000 00000000 00000000 .*
0270 00000000 00000000 00000000 00000000 .*
0280 00000000 00000000 00000000 00000000 .*
0290 00000000 00000000 00000000 00000000 .*
02a0 00000000 00000000 00000000 00000000 .*
02b0 00000000 00000000 00000000 00000000 .*
02c0 00000000 00000000 00000000 00000154 .*

View File

@ -0,0 +1,210 @@
! Test that .cranges are emitted:
! 1) Not for sections with single contents.
! 2) For data (through pseudo-ops) in SHmedia.
! 3) For mixed SHcompact and SHmedia sections.
! 4) For a mix of 2 and 3
! 5) For 4, repeated.
!
! Use section contents that need relaxing to strengthen the check that the
! .cranges implementation handles this correctly. Use different sizes for
! each contents part.
!
! The .text section has only SHmedia contents, and should not get a
! .cranges descriptor.
.mode SHmedia
.text
nop
shmedia:
movi 42,r45
movi shmediaend-shmedia,r46
shmediaend:
nop
! Likewise the SHcompact section.
.mode SHcompact
.section .text.compact,"ax"
nop
shcompact:
mov #42,r0
bt shcompactend
nop
shcompactend:
nop
! This section has SHmedia code followed by data. There should be two
! .cranges descriptors. Note that we put the .mode directive *after* the
! section change. It should not matter.
.section .text.shmediaanddata,"ax"
.mode SHmedia
shmedia_data_code:
movi 42,r45
movi shmedia_data_code_end-shmedia_data_code,r46
shmedia_data_code_end:
.long 0x6ff0fff0
.long shmedia_dataend-shmedia_data_code
.long 50
shmedia_dataend:
! This section mixes SHcompact and SHmedia code. There should be two
! .cranges descriptors.
.section .text.codemix,"ax"
shmedia_compact_code:
movi 42,r45
nop
nop
movi shmedia_compact_code_end-shmedia_compact_code,r46
nop
nop
shmedia_compact_code_end:
.mode SHcompact
compact_code:
nop
compact:
mov #40,r0
nop
nop
bt compactend
nop
compactend:
nop
! This section mixes SHcompact and SHmedia code, and has a constant
! section after the SHmedia code and one after the SHcompact code. There
! should be three or four .cranges descriptors, depending on whether one
! is emitted for the SHcompact constant pool: there's normally one such
! after each SHcompact function.
.mode SHmedia
.section .text.codemixconst,"ax"
nop
shmedia_compact_code2:
movi 42,r45
nop
nop
movi shmedia_compact_code_end2-shmedia_compact_code2,r46
nop
nop
.long 0x6ff0fff0
.long 0x6ff0fff0
.long 0x6ff00000
.long 0xfff0
.long 0x6ff0fff0
.long 0x6ff0fff0
.long 0
mediapoollabel:
.long mediapoollabel2-shmedia_compact_code2
mediapoolend:
shmedia_compact_code_end2:
.mode SHcompact
compact_code2:
nop
compact2:
mov #43,r0
nop
nop
bt compactend2
nop
nop
nop
compactend2:
nop
.space 100,0
.long 0
mediapoollabel2:
.long mediapoolend2-compact2
mediapoolend2:
! This section is like the previous, but repeated twice and adjusted to
! keep different sizes of each part.
.mode SHmedia
.section .text.codemixconst2,"ax"
nop
shmedia_compact_code3:
movi 42,r45
nop
nop
nop
nop
nop
nop
movi shmedia_compact_code_end3-shmedia_compact_code3,r46
.long 0x6ff0fff0
.long 0
.long 0
.long 0
.long 0
.long 0
.long 0
.long 0
.long 0
mediapoollabel3a:
.long mediapoollabel3a-shmedia_compact_code3
mediapoolend3a:
shmedia_compact_code_end3:
.mode SHcompact
compact_code3:
nop
compact3:
mov #44,r0
nop
nop
bt compactend3
nop
nop
nop
nop
nop
compactend3:
nop
.word 9
.word 0x900
.space 198,0
.long 0
mediapoollabel3:
.long mediapoolend3-compact3
mediapoolend3:
.mode SHmedia
nop
shmedia_compact_code4:
movi 43,r45
nop
nop
nop
nop
nop
nop
nop
nop
movi shmedia_compact_code_end4-shmedia_compact_code4,r46
.long 0x6ff0fff0
.space 18,0
mediapoollabel4a:
.long mediapoolend4a-shmedia_compact_code4
mediapoolend4a:
shmedia_compact_code_end4:
.mode SHcompact
compact_code4:
nop
compact4:
mov #14,r0
nop
nop
bt compactend4
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
compactend4:
nop
.space 300,0
.long 0
mediapoollabel4:
.long mediapoolend4-compact4
mediapoolend4:

View File

@ -0,0 +1,43 @@
#as: --abi=32
#objdump: -dr
#source: crange2.s
#name: PT to SHcompact
.*: file format .*-sh64
Disassembly of section \.text:
0+ <shmedia>:
[ ]+0:[ ]+e8000a30[ ]+pta/l 8 <shmedia1>,tr3
[ ]+4:[ ]+ec001240[ ]+ptb/l 14 <shcompact1>,tr4
0+8 <shmedia1>:
[ ]+8:[ ]+ec001250[ ]+ptb/l 18 <shcompact2>,tr5
0+c <shmedia2>:
[ ]+c:[ ]+6ff0fff0[ ]+nop
0+10[ ]+<shcompact>:
[ ]+10:[ ]+00[ ]+09[ ]+nop
[ ]+12:[ ]+00[ ]+09[ ]+nop
0+14 <shcompact1>:
[ ]+14:[ ]+00[ ]+09[ ]+nop
[ ]+16:[ ]+00[ ]+09[ ]+nop
0+18 <shcompact2>:
[ ]+18:[ ]+00[ ]+09[ ]+nop
[ ]+1a:[ ]+00[ ]+09[ ]+nop
0+1c <shcompact3>:
[ ]+1c:[ ]+00[ ]+09[ ]+nop
[ ]+1e:[ ]+00[ ]+09[ ]+nop
0+20[ ]+<shcompact4>:
[ ]+20:[ ]+00[ ]+09[ ]+nop
[ ]+22:[ ]+00[ ]+09[ ]+nop
0+24 <shmedia3>:
[ ]+24:[ ]+effffa60[ ]+ptb/l 1c <shcompact3>,tr6
[ ]+28:[ ]+effffa70[ ]+ptb/l 20[ ]+<shcompact4>,tr7
[ ]+2c:[ ]+ebffe200[ ]+pta/l c <shmedia2>,tr0

View File

@ -0,0 +1,23 @@
#as: --abi=32
#objdump: -sr
#source: crange2.s
#name: .cranges descriptors for SHcompact and SHmedia in .text.
.*: file format .*-sh64
RELOCATION RECORDS FOR \[\.cranges\]:
OFFSET *TYPE *VALUE
0+0 R_SH_DIR32 \.text
0+a R_SH_DIR32 \.text
0+14 R_SH_DIR32 \.text
Contents of section \.text:
0000 e8000a30 ec001240 ec001250 6ff0fff0 .*
0010 00090009 00090009 00090009 00090009 .*
0020 00090009 effffa60 effffa70 ebffe200 .*
Contents of section .data:
Contents of section .cranges:
0000 00000000 00000010 00030000 00100000 .*
0010 00140002 00000024 0000000c 0003 .*

View File

@ -0,0 +1,43 @@
#as: --abi=32 -no-expand
#objdump: -dr
#source: crange2.s
#name: PT to SHcompact with -no-expand.
.*: file format .*-sh64
Disassembly of section \.text:
0+ <shmedia>:
[ ]+0:[ ]+e8000a30[ ]+pta/l 8 <shmedia1>,tr3
[ ]+4:[ ]+ec001240[ ]+ptb/l 14 <shcompact1>,tr4
0+8 <shmedia1>:
[ ]+8:[ ]+ec001250[ ]+ptb/l 18 <shcompact2>,tr5
0+c <shmedia2>:
[ ]+c:[ ]+6ff0fff0[ ]+nop
0+10[ ]+<shcompact>:
[ ]+10:[ ]+00[ ]+09[ ]+nop
[ ]+12:[ ]+00[ ]+09[ ]+nop
0+14 <shcompact1>:
[ ]+14:[ ]+00[ ]+09[ ]+nop
[ ]+16:[ ]+00[ ]+09[ ]+nop
0+18 <shcompact2>:
[ ]+18:[ ]+00[ ]+09[ ]+nop
[ ]+1a:[ ]+00[ ]+09[ ]+nop
0+1c <shcompact3>:
[ ]+1c:[ ]+00[ ]+09[ ]+nop
[ ]+1e:[ ]+00[ ]+09[ ]+nop
0+20[ ]+<shcompact4>:
[ ]+20:[ ]+00[ ]+09[ ]+nop
[ ]+22:[ ]+00[ ]+09[ ]+nop
0+24 <shmedia3>:
[ ]+24:[ ]+effffa60[ ]+ptb/l 1c <shcompact3>,tr6
[ ]+28:[ ]+effffa70[ ]+ptb/l 20[ ]+<shcompact4>,tr7
[ ]+2c:[ ]+ebffe200[ ]+pta/l c <shmedia2>,tr0

View File

@ -0,0 +1,34 @@
! Check PT to SHcompact within same section as SHmedia, and that PT to
! nearby SHmedia still gets the right offset.
.text
.mode SHmedia
shmedia:
pt shmedia1,tr3
pt shcompact1,tr4
shmedia1:
ptb shcompact2,tr5
shmedia2:
nop
.mode SHcompact
shcompact: ! Have a label, so disassembling unrelocated code works.
nop
nop
shcompact1:
nop
nop
shcompact2:
nop
nop
shcompact3:
nop
nop
shcompact4:
nop
nop
.mode SHmedia
shmedia3:
pt shcompact3,tr6
ptb shcompact4,tr7
pt shmedia2,tr0

View File

@ -0,0 +1,25 @@
#as: --abi=32
#objdump: -sr
#source: crange3.s
#name: .cranges descriptors, constant mix.
.*: file format .*-sh64
RELOCATION RECORDS FOR \[\.cranges\]:
OFFSET *TYPE *VALUE
0+00 R_SH_DIR32 \.text
0+0a R_SH_DIR32 \.text
0+14 R_SH_DIR32 \.text
Contents of section \.text:
0000 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
0010 01235678 12345678 12345678 1234fede .*
0020 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
0030 6ff0fff0 .*
Contents of section \.data:
Contents of section \.rodata:
0000 abcdef01 12345678 .*
Contents of section \.cranges:
0000 00000000 00000010 00030000 00100000 .*
0010 00100001 00000020 00000014 0003 .*

View File

@ -0,0 +1,34 @@
! There was a bug in which a .cranges data hunk could include a hunk of
! code in front of it. The following illustrates a function (start)
! followed by constants output into .rodata, followed by a function
! (continue), with a case-table (.L173) in it. The bug included code from
! the start of the function (continue) into the case-table range descriptor.
.text
.mode SHmedia
start:
nop
.section .rodata
.long 0xabcdef01
.long 0x12345678
.text
continue:
nop
nop
nop
.align 2
.align 2
.L173:
.word 0x0123
.word 0x5678
.word 0x1234
.word 0x5678
.word 0x1234
.word 0x5678
.word 0x1234
.word 0xfede
nop
nop
nop
nop
nop

View File

@ -0,0 +1,20 @@
#as: --abi=32
#objdump: -sr
#source: crange4.s
#name: .cranges descriptors with final variant.
.*: file format .*-sh64
RELOCATION RECORDS FOR \[\.cranges\]:
OFFSET *TYPE *VALUE
0+ R_SH_DIR32 \.text
0+a R_SH_DIR32 \.text
Contents of section \.text:
0000 6ff0fff0 00000000 00000000 00000000 .*
0010 00000000 00000000 .*
Contents of section \.data:
Contents of section \.cranges:
0000 00000000 00000004 00030000 00040000 .*
0010 00140001 .*

View File

@ -0,0 +1,8 @@
! This will be two .cranges. Original problem was that the second one was
! lost because .space just emitted a frag, without calling emit_expr as
! most other data-generating pseudos.
.mode SHmedia
start:
nop
.space 20,0

View File

@ -0,0 +1,13 @@
#as: --abi=32 --isa=SHmedia
#objdump: -sr
#source: crange5.s
#name: Avoid zero length .cranges range descriptor at .align in code.
.*: file format .*-sh64
Contents of section \.text:
0000 e8003a00 d4ff80f0 4455fc00 acf000e0 .*
0010 acf00c00 acf009c0 acf00520 00f8fce0 .*
0020 0029fc10 e4110200 ebffda50 d81201c0 .*
0030 e8000a00 cc000420 6ff0fff0 .*
Contents of section .data:

View File

@ -0,0 +1,26 @@
! Zero-sized range descriptors are handled well, but GAS should not emit
! them unnecessarily. This can happen if .align handling and insn
! assembling does not cater to this specifically and completely.
! Test-case shortened from gcc.c-torture/execute/20000205-1.c.
.text
_f:
pt .L2, tr0
addi.l r15, -32, r15
gettr tr5, r0
st.q r15, 0, r14
st.q r15, 24, r0
st.q r15, 16, r28
st.q r15, 8, r18
add.l r15, r63, r14
add r2, r63, r1
beqi r1, 0, tr0
pt _f, tr5
andi r1, 128, r28
.align 2
.L8:
pt .L2, tr0
movi 1, r2
.L2:
nop

View File

@ -0,0 +1,77 @@
#as: --abi=32
#objdump: -dr
#name: Predefined control register names.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+240ffd50[ ]+getcon sr,r21
[ ]+4:[ ]+241ffdf0[ ]+getcon ssr,r31
[ ]+8:[ ]+242ffd60[ ]+getcon pssr,r22
[ ]+c:[ ]+244ffd50[ ]+getcon intevt,r21
[ ]+10:[ ]+245ffd50[ ]+getcon expevt,r21
[ ]+14:[ ]+246ffd50[ ]+getcon pexpevt,r21
[ ]+18:[ ]+247ffcc0[ ]+getcon tra,r12
[ ]+1c:[ ]+248ffd50[ ]+getcon spc,r21
[ ]+20:[ ]+249ffe90[ ]+getcon pspc,r41
[ ]+24:[ ]+24affd50[ ]+getcon resvec,r21
[ ]+28:[ ]+24bffd30[ ]+getcon vbr,r19
[ ]+2c:[ ]+24dffd50[ ]+getcon tea,r21
[ ]+30:[ ]+250ffe30[ ]+getcon dcr,r35
[ ]+34:[ ]+251ffd50[ ]+getcon kcr0,r21
[ ]+38:[ ]+252ffd50[ ]+getcon kcr1,r21
[ ]+3c:[ ]+27effd60[ ]+getcon ctc,r22
[ ]+40:[ ]+27fffd50[ ]+getcon usr,r21
[ ]+44:[ ]+240ffc20[ ]+getcon sr,r2
[ ]+48:[ ]+241ffd50[ ]+getcon ssr,r21
[ ]+4c:[ ]+242ffd50[ ]+getcon pssr,r21
[ ]+50:[ ]+244ffd50[ ]+getcon intevt,r21
[ ]+54:[ ]+245ffe60[ ]+getcon expevt,r38
[ ]+58:[ ]+246ffd50[ ]+getcon pexpevt,r21
[ ]+5c:[ ]+247ffd50[ ]+getcon tra,r21
[ ]+60:[ ]+248ffc10[ ]+getcon spc,r1
[ ]+64:[ ]+249ffd50[ ]+getcon pspc,r21
[ ]+68:[ ]+24affd50[ ]+getcon resvec,r21
[ ]+6c:[ ]+24bffef0[ ]+getcon vbr,r47
[ ]+70:[ ]+24dffd50[ ]+getcon tea,r21
[ ]+74:[ ]+250ffd50[ ]+getcon dcr,r21
[ ]+78:[ ]+251ffe30[ ]+getcon kcr0,r35
[ ]+7c:[ ]+252ffd50[ ]+getcon kcr1,r21
[ ]+80:[ ]+27effd50[ ]+getcon ctc,r21
[ ]+84:[ ]+27fffd50[ ]+getcon usr,r21
[ ]+88:[ ]+6d5ffc00[ ]+putcon r21,sr
[ ]+8c:[ ]+6dfffc10[ ]+putcon r31,ssr
[ ]+90:[ ]+6d6ffc20[ ]+putcon r22,pssr
[ ]+94:[ ]+6d5ffc40[ ]+putcon r21,intevt
[ ]+98:[ ]+6d5ffc50[ ]+putcon r21,expevt
[ ]+9c:[ ]+6d5ffc60[ ]+putcon r21,pexpevt
[ ]+a0:[ ]+6ccffc70[ ]+putcon r12,tra
[ ]+a4:[ ]+6d5ffc80[ ]+putcon r21,spc
[ ]+a8:[ ]+6e9ffc90[ ]+putcon r41,pspc
[ ]+ac:[ ]+6d5ffca0[ ]+putcon r21,resvec
[ ]+b0:[ ]+6d3ffcb0[ ]+putcon r19,vbr
[ ]+b4:[ ]+6d5ffcd0[ ]+putcon r21,tea
[ ]+b8:[ ]+6e3ffd00[ ]+putcon r35,dcr
[ ]+bc:[ ]+6d5ffd10[ ]+putcon r21,kcr0
[ ]+c0:[ ]+6d5ffd20[ ]+putcon r21,kcr1
[ ]+c4:[ ]+6d6fffe0[ ]+putcon r22,ctc
[ ]+c8:[ ]+6d5ffff0[ ]+putcon r21,usr
[ ]+cc:[ ]+6c2ffc00[ ]+putcon r2,sr
[ ]+d0:[ ]+6d5ffc10[ ]+putcon r21,ssr
[ ]+d4:[ ]+6d5ffc20[ ]+putcon r21,pssr
[ ]+d8:[ ]+6d5ffc40[ ]+putcon r21,intevt
[ ]+dc:[ ]+6e6ffc50[ ]+putcon r38,expevt
[ ]+e0:[ ]+6d5ffc60[ ]+putcon r21,pexpevt
[ ]+e4:[ ]+6d5ffc70[ ]+putcon r21,tra
[ ]+e8:[ ]+6c1ffc80[ ]+putcon r1,spc
[ ]+ec:[ ]+6d5ffc90[ ]+putcon r21,pspc
[ ]+f0:[ ]+6d5ffca0[ ]+putcon r21,resvec
[ ]+f4:[ ]+6efffcb0[ ]+putcon r47,vbr
[ ]+f8:[ ]+6d5ffcd0[ ]+putcon r21,tea
[ ]+fc:[ ]+6d5ffd00[ ]+putcon r21,dcr
[ ]+100:[ ]+6e3ffd10[ ]+putcon r35,kcr0
[ ]+104:[ ]+6d5ffd20[ ]+putcon r21,kcr1
[ ]+108:[ ]+6d5fffe0[ ]+putcon r21,ctc
[ ]+10c:[ ]+6d5ffff0[ ]+putcon r21,usr

View File

@ -0,0 +1,79 @@
! Test recognition of predefined control register names, lower and upper
! case; getcon and putcon. Exhaustive test in those domain is small and
! simple enough. Note that basic-1.s has already tested non-predefined
! register names.
.mode SHmedia
.text
start:
getcon sr,r21
getcon ssr,r31
getcon pssr,r22
getcon intevt,r21
getcon expevt,r21
getcon pexpevt,r21
getcon tra,r12
getcon spc,r21
getcon pspc,r41
getcon resvec,r21
getcon vbr,r19
getcon tea,r21
getcon dcr,r35
getcon kcr0,r21
getcon kcr1,r21
getcon ctc,r22
getcon usr,r21
getcon SR,r2
getcon SSR,r21
getcon PSSR,r21
getcon INTEVT,r21
getcon EXPEVT,r38
getcon PEXPEVT,r21
getcon TRA,r21
getcon SPC,r1
getcon PSPC,r21
getcon RESVEC,r21
getcon VBR,r47
getcon TEA,r21
getcon DCR,r21
getcon KCR0,r35
getcon KCR1,r21
getcon CTC,r21
getcon USR,r21
putcon r21,sr
putcon r31,ssr
putcon r22,pssr
putcon r21,intevt
putcon r21,expevt
putcon r21,pexpevt
putcon r12,tra
putcon r21,spc
putcon r41,pspc
putcon r21,resvec
putcon r19,vbr
putcon r21,tea
putcon r35,dcr
putcon r21,kcr0
putcon r21,kcr1
putcon r22,ctc
putcon r21,usr
putcon r2,SR
putcon r21,SSR
putcon r21,PSSR
putcon r21,INTEVT
putcon r38,EXPEVT
putcon r21,PEXPEVT
putcon r21,TRA
putcon r1,SPC
putcon r21,PSPC
putcon r21,RESVEC
putcon r47,VBR
putcon r21,TEA
putcon r21,DCR
putcon r35,KCR0
putcon r21,KCR1
putcon r21,CTC
putcon r21,USR

View File

@ -0,0 +1,17 @@
#as: --abi=32
#objdump: -dr
#name: Predefined control register names specified in crN syntax.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+240ffd50[ ]+getcon sr,r21
[ ]+4:[ ]+24dffd50[ ]+getcon tea,r21
[ ]+8:[ ]+27effd60[ ]+getcon ctc,r22
[ ]+c:[ ]+248ffd50[ ]+getcon spc,r21
[ ]+10:[ ]+244ffd50[ ]+getcon intevt,r21
[ ]+14:[ ]+6d3ffcb0[ ]+putcon r19,vbr
[ ]+18:[ ]+6e6ffc50[ ]+putcon r38,expevt
[ ]+1c:[ ]+6d5ffc10[ ]+putcon r21,ssr

View File

@ -0,0 +1,14 @@
! Test recognition of predefined control register names specified as crN
! syntax, lower and upper case.
.mode SHmedia
.text
start:
getcon cr0,r21
getcon cr13,r21
getcon CR62,r22
getcon cr8,r21
getcon CR4,r21
putcon r19,cr11
putcon r38,CR5
putcon r21,CR1

View File

@ -0,0 +1,41 @@
! Check "datalabel" qualifier.
! This is the most simple use; references to local symbols where it is
! completely redundant. Code tests are for SHmedia mode.
.mode SHmedia
.text
start:
movi datalabel foo,r3
movi DataLabel foo2 + 42,r3
movi (datalabel (foo3 + 46) >> 16) & 65535,r3
movi datalabel myrodata3 & 65535, r45
movi datalabel myrodata4 & 65535, r45
movi DATALABEL (myrodata2 + 50) & 65535, r45
.section .rodata
.long datalabel foo4
myrodata1:
.long DATALABEL foo5 + 56
myrodata2:
.long datalabel $
.global myrodata3
myrodata3:
.long datalabel $+20
myrodata4:
.long datalabel myrodata1+0x100
.data
.long datalabel myrodata1
foo:
.long DATALABEL myrodata2+30
foo2:
.long DataLabel foo
foo3:
.long datalabel $
foo4:
.long datalabel $+40
foo5:
.long datalabel myrodata3
.global foo6
foo6:
.long datalabel foo6 + 42

View File

@ -0,0 +1,44 @@
#as: --abi=32
#objdump: -sr
#source: datal-2.s
#name: DataLabel redundant local use, SHcompact
.*: file format .*-sh64
RELOCATION RECORDS FOR \[\.text\]:
OFFSET *TYPE *VALUE
0+08 R_SH_DIR32 \.rodata
0+0c R_SH_DIR32 myrodata2
0+10 R_SH_DIR32 \.text
0+14 R_SH_DIR32 \.text
0+18 R_SH_DIR32 \.text
0+1c R_SH_DIR32 \.text
RELOCATION RECORDS FOR \[\.data\]:
OFFSET *TYPE *VALUE
0+00 R_SH_DIR32 myrodata2
0+04 R_SH_DIR32 \.data
0+08 R_SH_DIR32 \.data
0+0c R_SH_DIR32 foo2
0+10 R_SH_DIR32 foo3
0+14 R_SH_DIR32 \.text
0+18 R_SH_DIR32 \.text
RELOCATION RECORDS FOR \[\.rodata\]:
OFFSET *TYPE *VALUE
0+00 R_SH_DIR32 \.data
0+04 R_SH_DIR32 \.data
0+08 R_SH_DIR32 \.rodata
0+0c R_SH_DIR32 \.rodata
Contents of section \.text:
0000 c701c70d 00090009 00000004 00000014 .*
0010 00000002 0000002e 00000018 00000030 .*
Contents of section \.data:
0000 00000000 00000004 0000001c 00000000 .*
0010 00000014 00000002 00000018 .*
Contents of section \.rodata:
0000 00000010 0000004c 00000008 00000020 .*

View File

@ -0,0 +1,46 @@
! Check "datalabel" qualifier.
! This is the most simple use; references to local symbols where it is
! completely redundant. Code tests are for SHcompact mode.
.mode SHcompact
.text
start:
mova datalabel litpool1,r0
start1:
mova datalabel litpool2 + 44,r0
start2:
nop
nop
litpool1:
.long datalabel myrodata1
litpool2:
.long datalabel myrodata2 + 20
.long DATALABEL start1
.long datalabel start2+42
.long DataLabel $
.long datalabel $+20
.section .rodata
.long datalabel foo4
myrodata1:
.long DataLabel foo5 + 56
.global myrodata2
myrodata2:
.long datalabel $
.long datalabel $+20
.data
.long DATALABEL myrodata2
foo:
.long datalabel $
.global foo2
foo2:
.long datalabel $+20
.global foo3
foo3:
.long DataLabel foo2
foo4:
.long datalabel foo3+20
foo5:
.long DATALABEL start1
.long datalabel start2+20

View File

@ -0,0 +1,48 @@
! Check "datalabel" qualifier.
! This is the next most simple use; references symbols defined in this file.
! Code tests are for SHmedia mode.
.mode SHmedia
.text
start:
movi datalabel foo,r3
movi DataLabel foo2 + 42,r3
movi ((datalabel foo3 + 46) >> 16) & 65535,r3
.section .rodata
.long datalabel foo4
myrodata1:
.long DATALABEL foo5 + 56
myrodata2:
.long datalabel $
.global myrodata3
myrodata3:
.long datalabel $+20
.text
movi datalabel foo7 + 42,r30
movi datalabel foo8,r30
movi ((datalabel foo9 + 64) >> 16) & 65535,r3
movi datalabel myrodata1,r56
foo:
movi DATALABEL myrodata2+30,r21
foo2:
movi DataLabel foo,r10
foo3:
movi datalabel $,r33
foo4:
movi datalabel $+40,r8
foo5:
movi datalabel myrodata3,r44
.global foo6
foo6:
movi datalabel foo6 + 42,r30
.global foo7
foo7:
nop
.global foo8
foo8:
nop
.global foo9
foo9:
nop

View File

@ -0,0 +1,45 @@
#as: --abi=32
#objdump: -sr
#source: datal-1.s
#name: DataLabel redundant local use, SHmedia 32-bit ABI
.*: file format .*-sh64
RELOCATION RECORDS FOR \[\.text\]:
OFFSET *TYPE *VALUE
0+10 R_SH_IMM_MEDLOW16 \.data\+0x0+3a
0+14 R_SH_IMM_LOW16 myrodata3
0+18 R_SH_IMM_LOW16 \.rodata\+0x0+10
0+1c R_SH_IMM_LOW16 \.rodata\+0x0+3a
0+00 R_SH_IMM_MEDLOW16 \.data\+0x0+4
0+04 R_SH_IMM_LOW16 \.data\+0x0+4
0+08 R_SH_IMM_MEDLOW16 \.data\+0x0+32
0+0c R_SH_IMM_LOW16 \.data\+0x0+32
RELOCATION RECORDS FOR \[\.data\]:
OFFSET *TYPE *VALUE
0+00 R_SH_DIR32 \.rodata
0+04 R_SH_DIR32 \.rodata
0+08 R_SH_DIR32 \.data
0+0c R_SH_DIR32 \.data
0+10 R_SH_DIR32 \.data
0+14 R_SH_DIR32 myrodata3
0+18 R_SH_DIR32 foo6
RELOCATION RECORDS FOR \[\.rodata\]:
OFFSET *TYPE *VALUE
0+00 R_SH_DIR32 \.data
0+04 R_SH_DIR32 \.data
0+08 R_SH_DIR32 \.rodata
0+0c R_SH_DIR32 \.rodata
0+10 R_SH_DIR32 \.rodata
Contents of section \.text:
0000 cc000030 c8000030 cc000030 c8000030 .*
0010 cc000030 cc0002d0 cc0002d0 cc0002d0 .*
Contents of section \.data:
0000 00000004 00000026 00000004 0000000c .*
0010 00000038 00000000 0000002a .*
Contents of section \.rodata:
0000 00000010 0000004c 00000008 00000020 .*
0010 00000104 .*

View File

@ -0,0 +1,95 @@
#as: --abi=32
#objdump: -xsr
#source: datal-3.s
#name: DataLabel local def/use, SHmedia 32-bit ABI
# We should have the st_type field of each symbol displayed too, so we can
# check that STT_DATALABEL is set, but objdump doesn't do that at present,
# and readelf isn't supported as a run_dump_test tool.
.*: file format .*-sh64
.*
architecture: sh5, flags 0x0+11:
HAS_RELOC, HAS_SYMS
start address 0x0+
Sections:
Idx Name Size VMA LMA File off Algn
0 \.text 0+6c 0+ 0+ 0+34 2\*\*0
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
1 \.data 0+ 0+ 0+ 0+a0 2\*\*0
CONTENTS, ALLOC, LOAD, DATA
2 \.bss 0+ 0+ 0+ 0+a0 2\*\*0
ALLOC
3 \.rodata 0+10 0+ 0+ 0+a0 2\*\*0
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
SYMBOL TABLE:
0+ l d \.text 0+
0+ l d \.data 0+
0+ l d \.bss 0+
0+ l \.text 0+ 0x04 start
0+30 l \.text 0+ 0x04 foo
0+38 l \.text 0+ 0x04 foo2
0+40 l \.text 0+ 0x04 foo3
0+ l d \.rodata 0+
0+48 l \.text 0+ 0x04 foo4
0+4 l \.rodata 0+ myrodata1
0+50 l \.text 0+ 0x04 foo5
0+8 l \.rodata 0+ myrodata2
0+c g \.rodata 0+ myrodata3
0+60 g \.text 0+ 0x04 foo7
0+60 \*UND\* 0+ foo7
0+64 g \.text 0+ 0x04 foo8
0+64 \*UND\* 0+ foo8
0+68 g \.text 0+ 0x04 foo9
0+68 \*UND\* 0+ foo9
0+58 g \.text 0+ 0x04 foo6
0+58 \*UND\* 0+ foo6
RELOCATION RECORDS FOR \[\.text\]:
OFFSET *TYPE *VALUE
0+10 R_SH_IMM_MEDLOW16 \.text\+0x0+6e
0+24 R_SH_IMM_MEDLOW16 foo9\+0x0+40
0+00 R_SH_IMM_MEDLOW16 \.text\+0x0+30
0+04 R_SH_IMM_LOW16 \.text\+0x0+30
0+08 R_SH_IMM_MEDLOW16 \.text\+0x0+62
0+0c R_SH_IMM_LOW16 \.text\+0x0+62
0+14 R_SH_IMM_MEDLOW16 foo7\+0x0+2a
0+18 R_SH_IMM_LOW16 foo7\+0x0+2a
0+1c R_SH_IMM_MEDLOW16 foo8
0+20 R_SH_IMM_LOW16 foo8
0+28 R_SH_IMM_MEDLOW16 \.rodata\+0x0+4
0+2c R_SH_IMM_LOW16 \.rodata\+0x0+4
0+30 R_SH_IMM_MEDLOW16 \.rodata\+0x0+26
0+34 R_SH_IMM_LOW16 \.rodata\+0x0+26
0+38 R_SH_IMM_MEDLOW16 \.text\+0x0+30
0+3c R_SH_IMM_LOW16 \.text\+0x0+30
0+40 R_SH_IMM_MEDLOW16 \.text\+0x0+40
0+44 R_SH_IMM_LOW16 \.text\+0x0+40
0+48 R_SH_IMM_MEDLOW16 \.text\+0x0+70
0+4c R_SH_IMM_LOW16 \.text\+0x0+70
0+50 R_SH_IMM_MEDLOW16 myrodata3
0+54 R_SH_IMM_LOW16 myrodata3
0+58 R_SH_IMM_MEDLOW16 foo6\+0x0+2a
0+5c R_SH_IMM_LOW16 foo6\+0x0+2a
RELOCATION RECORDS FOR \[\.rodata\]:
OFFSET *TYPE *VALUE
0+ R_SH_DIR32 \.text
0+4 R_SH_DIR32 \.text
0+8 R_SH_DIR32 \.rodata
0+c R_SH_DIR32 \.rodata
Contents of section \.text:
0000 cc000030 c8000030 cc000030 c8000030 .*
0010 cc000030 cc0001e0 c80001e0 cc0001e0 .*
0020 c80001e0 cc000030 cc000380 c8000380 .*
0030 cc000150 c8000150 cc0000a0 c80000a0 .*
0040 cc000210 c8000210 cc000080 c8000080 .*
0050 cc0002c0 c80002c0 cc0001e0 c80001e0 .*
0060 6ff0fff0 6ff0fff0 6ff0fff0 .*
Contents of section \.data:
Contents of section \.rodata:
0000 00000048 00000088 00000008 00000020 .*

View File

@ -0,0 +1,50 @@
#as: --abi=64
#objdump: -sr
#source: datal-1.s
#name: DataLabel redundant local use, SHmedia 64-bit ABI
.*: file format .*-sh64
RELOCATION RECORDS FOR \[\.text\]:
OFFSET TYPE VALUE
0+20 R_SH_IMM_MEDLOW16 \.data\+0x0+3a
0+24 R_SH_IMM_LOW16 myrodata3
0+28 R_SH_IMM_LOW16 \.rodata\+0x0+10
0+2c R_SH_IMM_LOW16 \.rodata\+0x0+3a
0+00 R_SH_IMM_HI16 \.data\+0x0+4
0+04 R_SH_IMM_MEDHI16 \.data\+0x0+4
0+08 R_SH_IMM_MEDLOW16 \.data\+0x0+4
0+0c R_SH_IMM_LOW16 \.data\+0x0+4
0+10 R_SH_IMM_HI16 \.data\+0x0+32
0+14 R_SH_IMM_MEDHI16 \.data\+0x0+32
0+18 R_SH_IMM_MEDLOW16 \.data\+0x0+32
0+1c R_SH_IMM_LOW16 \.data\+0x0+32
RELOCATION RECORDS FOR \[\.data\]:
OFFSET TYPE VALUE
0+00 R_SH_DIR32 \.rodata
0+04 R_SH_DIR32 \.rodata
0+08 R_SH_DIR32 \.data
0+0c R_SH_DIR32 \.data
0+10 R_SH_DIR32 \.data
0+14 R_SH_DIR32 myrodata3
0+18 R_SH_DIR32 foo6
RELOCATION RECORDS FOR \[\.rodata\]:
OFFSET TYPE VALUE
0+00 R_SH_DIR32 \.data
0+04 R_SH_DIR32 \.data
0+08 R_SH_DIR32 \.rodata
0+0c R_SH_DIR32 \.rodata
0+10 R_SH_DIR32 \.rodata
Contents of section \.text:
0000 cc000030 c8000030 c8000030 c8000030 .*
0010 cc000030 c8000030 c8000030 c8000030 .*
0020 cc000030 cc0002d0 cc0002d0 cc0002d0 .*
Contents of section \.data:
0000 00000004 00000026 00000004 0000000c .*
0010 00000038 00000000 0000002a .*
Contents of section \.rodata:
0000 00000010 0000004c 00000008 00000020 .*
0010 00000104 .*

View File

@ -0,0 +1,124 @@
#as: --abi=64
#objdump: -xsr
#source: datal-3.s
#name: DataLabel local def/use, SHmedia 64-bit ABI
# We should have the st_type field of each symbol displayed too, so we can
# check that STT_DATALABEL is set, but objdump doesn't do that at present,
# and readelf isn't supported as a run_dump_test tool.
.*: file format .*-sh64
.*
architecture: sh5, flags 0x0+11:
HAS_RELOC, HAS_SYMS
start address 0x0+
Sections:
Idx Name Size VMA LMA File off Algn
0 \.text 0+c4 0+ 0+ 0+40 2\*\*0
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
1 \.data 0+ 0+ 0+ 0+104 2\*\*0
CONTENTS, ALLOC, LOAD, DATA
2 \.bss 0+ 0+ 0+ 0+104 2\*\*0
ALLOC
3 \.rodata 0+10 0+ 0+ 0+104 2\*\*0
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
SYMBOL TABLE:
0+ l d \.text 0+
0+ l d \.data 0+
0+ l d \.bss 0+
0+ l \.text 0+ 0x04 start
0+58 l \.text 0+ 0x04 foo
0+68 l \.text 0+ 0x04 foo2
0+78 l \.text 0+ 0x04 foo3
0+ l d \.rodata 0+
0+88 l \.text 0+ 0x04 foo4
0+4 l \.rodata 0+ myrodata1
0+98 l \.text 0+ 0x04 foo5
0+8 l \.rodata 0+ myrodata2
0+c g \.rodata 0+ myrodata3
0+b8 g \.text 0+ 0x04 foo7
0+b8 \*UND\* 0+ foo7
0+bc g \.text 0+ 0x04 foo8
0+bc \*UND\* 0+ foo8
0+c0 g \.text 0+ 0x04 foo9
0+c0 \*UND\* 0+ foo9
0+a8 g \.text 0+ 0x04 foo6
0+a8 \*UND\* 0+ foo6
RELOCATION RECORDS FOR \[\.text\]:
OFFSET TYPE VALUE
0+20 R_SH_IMM_MEDLOW16 \.text\+0x0+a6
0+44 R_SH_IMM_MEDLOW16 foo9\+0x0+40
0+ R_SH_IMM_HI16 \.text\+0x0+58
0+4 R_SH_IMM_MEDHI16 \.text\+0x0+58
0+8 R_SH_IMM_MEDLOW16 \.text\+0x0+58
0+c R_SH_IMM_LOW16 \.text\+0x0+58
0+10 R_SH_IMM_HI16 \.text\+0x0+92
0+14 R_SH_IMM_MEDHI16 \.text\+0x0+92
0+18 R_SH_IMM_MEDLOW16 \.text\+0x0+92
0+1c R_SH_IMM_LOW16 \.text\+0x0+92
0+24 R_SH_IMM_HI16 foo7\+0x0+2a
0+28 R_SH_IMM_MEDHI16 foo7\+0x0+2a
0+2c R_SH_IMM_MEDLOW16 foo7\+0x0+2a
0+30 R_SH_IMM_LOW16 foo7\+0x0+2a
0+34 R_SH_IMM_HI16 foo8
0+38 R_SH_IMM_MEDHI16 foo8
0+3c R_SH_IMM_MEDLOW16 foo8
0+40 R_SH_IMM_LOW16 foo8
0+48 R_SH_IMM_HI16 \.rodata\+0x0+4
0+4c R_SH_IMM_MEDHI16 \.rodata\+0x0+4
0+50 R_SH_IMM_MEDLOW16 \.rodata\+0x0+4
0+54 R_SH_IMM_LOW16 \.rodata\+0x0+4
0+58 R_SH_IMM_HI16 \.rodata\+0x0+26
0+5c R_SH_IMM_MEDHI16 \.rodata\+0x0+26
0+60 R_SH_IMM_MEDLOW16 \.rodata\+0x0+26
0+64 R_SH_IMM_LOW16 \.rodata\+0x0+26
0+68 R_SH_IMM_HI16 \.text\+0x0+58
0+6c R_SH_IMM_MEDHI16 \.text\+0x0+58
0+70 R_SH_IMM_MEDLOW16 \.text\+0x0+58
0+74 R_SH_IMM_LOW16 \.text\+0x0+58
0+78 R_SH_IMM_HI16 \.text\+0x0+78
0+7c R_SH_IMM_MEDHI16 \.text\+0x0+78
0+80 R_SH_IMM_MEDLOW16 \.text\+0x0+78
0+84 R_SH_IMM_LOW16 \.text\+0x0+78
0+88 R_SH_IMM_HI16 \.text\+0x0+b0
0+8c R_SH_IMM_MEDHI16 \.text\+0x0+b0
0+90 R_SH_IMM_MEDLOW16 \.text\+0x0+b0
0+94 R_SH_IMM_LOW16 \.text\+0x0+b0
0+98 R_SH_IMM_HI16 myrodata3
0+9c R_SH_IMM_MEDHI16 myrodata3
0+a0 R_SH_IMM_MEDLOW16 myrodata3
0+a4 R_SH_IMM_LOW16 myrodata3
0+a8 R_SH_IMM_HI16 foo6\+0x0+2a
0+ac R_SH_IMM_MEDHI16 foo6\+0x0+2a
0+b0 R_SH_IMM_MEDLOW16 foo6\+0x0+2a
0+b4 R_SH_IMM_LOW16 foo6\+0x0+2a
RELOCATION RECORDS FOR \[\.rodata\]:
OFFSET TYPE VALUE
0+ R_SH_DIR32 \.text
0+4 R_SH_DIR32 \.text
0+8 R_SH_DIR32 \.rodata
0+c R_SH_DIR32 \.rodata
Contents of section \.text:
0000 cc000030 c8000030 c8000030 c8000030 .*
0010 cc000030 c8000030 c8000030 c8000030 .*
0020 cc000030 cc0001e0 c80001e0 c80001e0 .*
0030 c80001e0 cc0001e0 c80001e0 c80001e0 .*
0040 c80001e0 cc000030 cc000380 c8000380 .*
0050 c8000380 c8000380 cc000150 c8000150 .*
0060 c8000150 c8000150 cc0000a0 c80000a0 .*
0070 c80000a0 c80000a0 cc000210 c8000210 .*
0080 c8000210 c8000210 cc000080 c8000080 .*
0090 c8000080 c8000080 cc0002c0 c80002c0 .*
00a0 c80002c0 c80002c0 cc0001e0 c80001e0 .*
00b0 c80001e0 c80001e0 6ff0fff0 6ff0fff0 .*
00c0 6ff0fff0 .*
Contents of section \.data:
Contents of section \.rodata:
0000 00000088 000000d0 00000008 00000020 .*

View File

@ -0,0 +1,9 @@
#as: --isa=shmedia --no-exp -little
#objdump: -s
#name: SH64 Little Endian
.*: file format elf64-sh64l
Contents of section .text:
0000 00d048cc 78563412 34120000.*
Contents of section .data:

View File

@ -0,0 +1,7 @@
.text
.mode shmedia
start:
movi 0x1234,r0
.long 0x12345678
.word 0x1234, 0

View File

@ -0,0 +1,10 @@
#as: --isa=shmedia --no-exp
#objdump: -s
#name: SH64 Big Endian
.*: file format elf64-sh64
Contents of section .text:
0000 cc48d000 12345678 12340000.*
Contents of section .data:

View File

@ -0,0 +1,7 @@
.text
.mode shmedia
start:
movi 0x1234,r0
.long 0x12345678
.word 0x1234, 0

View File

@ -0,0 +1,47 @@
! { dg-do assemble }
! Various operand errors experienced during the creation of basic-1.s;
! some are redundant.
!
addz.l r51,-42,r30 ! { dg-error "invalid operand" }
beqi r4,-33,tr5 ! { dg-error "not a 6-bit signed value" }
fadd.s dr41,dr59,dr19 ! { dg-error "invalid operand" }
fdiv.s fr13,dr26,fr19 ! { dg-error "invalid operand" }
fld.p r53,-3000,fp39 ! { dg-error "invalid operand" }
fld.s r53,1010,fr53 ! { dg-error "not a multiple of 4" }
float.qd dr45,dr16 ! { dg-error "invalid operand" }
float.qs dr31,fr11 ! { dg-error "invalid operand" }
fmov.d dr8,dr43 ! { dg-error "invalid operand" }
fmov.qd r45,dr5 ! { dg-error "invalid operand" }
fmul.d dr7,dr57,dr42 ! { dg-error "invalid operand" }
fneg.s fr0,dr33 ! { dg-error "invalid operand" }
fsqrt.d dr31,dr43 ! { dg-error "invalid operand" }
fst.p r54,-4008,fp11 ! { dg-error "invalid operand" }
fstx.p r38,r26,dr52 ! { dg-error "invalid operand" }
ftrc.dq dr15,dr29 ! { dg-error "invalid operand" }
ftrv.s mtrx16,fv32,fv7 ! { dg-error "invalid operand" }
icbi r48,12000 ! { dg-error "not a 11-bit signed value" }
ld.w r46,301,r11 ! { dg-error "not an even value" }
ldhi.l r6,302,r41 ! { dg-error "not a 6-bit signed value" }
ldlo.l r19,334,r48 ! { dg-error "not a 6-bit signed value" }
ldlo.q r9,311,r29 ! { dg-error "not a 6-bit signed value" }
ocbi r43,11008 ! { dg-error "not a 11-bit signed value" }
ocbp r40,-11008 ! { dg-error "not a 11-bit signed value" }
ocbwb r44,-10016 ! { dg-error "not a 11-bit signed value" }
prefi r57,16000 ! { dg-error "not a 11-bit signed value" }
putcfg r41,-511,r62 ! { dg-error "not a 6-bit signed value" }
shlld r56,38,r23 ! { dg-error "invalid operand" }
shlli.l r61,r35,r26 ! { dg-error "invalid operand" }
shlli r60,r36,r25 ! { dg-error "invalid operand" }
shlri r2,r32,r29 ! { dg-error "invalid operand" }
shlri.l r3,r31,r30 ! { dg-error "invalid operand" }
st.w r9,2002,r33 ! { dg-error "not a 11-bit signed value" }
sthi.l r10,-201,r43 ! { dg-error "not a 6-bit signed value" }
sthi.q r12,203,r44 ! { dg-error "not a 6-bit signed value" }
stlo.l r13,-207,r45 ! { dg-error "not a 6-bit signed value" }
stlo.q r15,217,r46 ! { dg-error "not a 6-bit signed value" }
stx.b r16,219,r47 ! { dg-error "invalid operand" }
stx.l r17,-500,r48 ! { dg-error "invalid operand" }
stx.q r19,-50,r49 ! { dg-error "invalid operand" }
stx.w r20,-150,r50 ! { dg-error "invalid operand" }
xori r29,-51,r55 ! { dg-error "not a 6-bit signed value" }

View File

@ -0,0 +1,16 @@
! { dg-do assemble }
! { dg-options "--abi=32 --isa=shmedia" }
!
! This is a mainly a copy of movi64-2.s, but we check that out-of-range
! errors are emitted for the 32-bit ABI.
.text
start:
movi 65536 << 16,r3 ! { dg-error "not a 32-bit signed value" }
movi -32769 << 16,r3 ! { dg-error "not a 32-bit signed value" }
movi 32768 << 16,r3
movi -32768 << 16,r3
movi 32767 << 48,r3 ! { dg-error "not a 32-bit signed value" }
movi 32768 << 48,r3 ! { dg-error "not a 32-bit signed value" }
movi -32768 << 48,r3 ! { dg-error "not a 32-bit signed value" }

View File

@ -0,0 +1,36 @@
! { dg-do assemble }
! { dg-options "--abi=32" }
! Check that we get errors for immediate operands with expressions with
! resolvable differences between local symbols, but not in range for the
! operands, and no errors for nearby valid values.
.text
.mode SHmedia
start:
addi r50,.Lab500 - .Lab1,r40
addi r50,.Lab1000 - .Lab1,r40 ! { dg-error "not a 10-bit signed value" }
addi r50,.Lab500 - .Lab1 + 1,r40
addi r50,.Lab500 - .Lab1 + 2,r40
ld.uw r30,.Lab1000 - .Lab1,r40
ld.uw r30,.Lab500 - .Lab1 + 1,r40 ! { dg-error "not an even value" }
ld.uw r30,.Lab500 - .Lab1 + 2,r40
ld.uw r50,.Lab2000 - .Lab1,r20 ! { dg-error "not a 11-bit signed value" }
ld.l r50,.Lab2000 - .Lab1,r20
ld.l r50,.Lab2000 - .Lab1 + 1,r20 ! { dg-error "not a multiple of 4" }
ld.l r50,.Lab2000 - .Lab1 + 2,r20 ! { dg-error "not a multiple of 4" }
ld.l r50,.Lab4000 - .Lab1,r20 ! { dg-error "not a 12-bit signed value" }
nop
.data
.long 0
.Lab1:
.zero 500,0
.Lab500:
.zero 500,0
.Lab1000:
.zero 1000,0
.Lab2000:
.zero 2000,0
.Lab4000:
.long 0

View File

@ -0,0 +1,27 @@
! { dg-do assemble }
! { dg-options "--abi=32 -no-mix" }
! Check that we can't have different ISA:s in the same section if disallowed.
.text
.mode SHmedia
start:
nop
.mode SHcompact
nop ! { dg-error "not allowed in same section" }
.section .text.other,"ax"
.mode SHmedia
nop
.mode SHcompact
nop ! { dg-error "not allowed in same section" }
.section .text.more,"ax"
.mode SHmedia
nop
.section .text.yetmore,"ax"
.mode SHcompact
nop

View File

@ -0,0 +1,10 @@
! Check .abi pseudo assertion.
! { dg-do assemble }
! { dg-options "-abi=64" }
.text
.abi 32 ! { dg-error "options do not specify 32-bit ABI" }
start:
nop

View File

@ -0,0 +1,10 @@
! Check .abi pseudo assertion.
! { dg-do assemble }
! { dg-options "-abi=32" }
.text
.abi 64 ! { dg-error "options do not specify 64-bit ABI" }
start:
nop

View File

@ -0,0 +1,15 @@
! Check that we get errors when assembling DSP instructions.
! { dg-do assemble }
! { dg-options "-isa=SHcompact" }
! Regarding the opcode table, all insns are marked arch_sh_dsp_up; there are
! no insns marked arch_sh3_dsp_up. We check a few marked arch_sh_dsp_up:
! two have operands only recognized with -dsp; the other has an opcode not
! recognized without -dsp.
.text
start:
ldc r3,mod ! { dg-error "invalid operands" }
ldre @(16,pc) ! { dg-error "unknown opcode" }
lds r4,a0 ! { dg-error "invalid operands" }

View File

@ -0,0 +1,24 @@
! Check that we get errors for MOVI operands out-of-range with -no-expand.
! { dg-do assemble }
! { dg-options "--abi=32 --isa=shmedia -no-expand" }
.text
start:
movi externalsym + 123,r3
movi 65535,r3 ! { dg-error "not a 16-bit signed value" }
movi 65536,r3 ! { dg-error "not a 16-bit signed value" }
movi 65535 << 16,r3 ! { dg-error "not a 16-bit signed value" }
movi 32767,r3
movi 32768,r3 ! { dg-error "not a 16-bit signed value" }
movi 32767 << 16,r3 ! { dg-error "not a 16-bit signed value" }
movi -32768,r3
movi -32769,r3 ! { dg-error "not a 16-bit signed value" }
movi -32768 << 16,r3 ! { dg-error "not a 16-bit signed value" }
movi localsym + 73,r4
movi forwardsym - 42,r4
.set forwardsym,47
.data
localsym:
.long 1

View File

@ -0,0 +1,10 @@
! Check command-line error checking. The option -no-expand is not valid
! unless SHcompact/SHmedia is specified.
! { dg-do assemble }
! { dg-options "-no-expand" }
! { dg-error ".* only valid with SHcompact or SHmedia" "" { target sh64-*-* } 0 }
.text
start:
nop

View File

@ -0,0 +1,18 @@
! Check that we get errors for a PT operand out of range with -no-relax.
! { dg-do assemble }
! { dg-options "--abi=32 --no-expand" }
.mode SHmedia
start:
nop
start2:
pt x0,tr3 ! { dg-error "operand out of range" }
x1:
pt x0,tr4
.space 32767*4-4,0
x0:
pt x1,tr5
pt x1,tr6
pt x1,tr6 ! { dg-error "operand out of range" }
pt x1,tr7 ! { dg-error "operand out of range" }

View File

@ -0,0 +1,10 @@
! Check command-line error checking. The option -expand-pt32 is only valid
! with -abi=64
! { dg-do assemble }
! { dg-options "-expand-pt32" }
! { dg-error ".* only valid with -abi=64" "" { target sh64-*-* } 0 }
.text
start:
nop

View File

@ -0,0 +1,10 @@
! Check command-line error checking. The option -expand-pt32 is invalid with
! -no-expand.
! { dg-do assemble }
! { dg-options "-abi=64 -expand-pt32 -no-expand" }
! { dg-error ".* invalid together with -no-expand" "" { target sh64-*-* } 0 }
.text
start:
nop

View File

@ -0,0 +1,10 @@
! Check command-line error checking. The option -expand-pt32 is invalid with
! -abi=32 just as it is invalid with no SHmedia/SHcompact options.
! { dg-do assemble }
! { dg-options "-abi=32 -expand-pt32" }
! { dg-error ".* only valid with -abi=64" "" { target sh64-*-* } 0 }
.text
start:
nop

View File

@ -0,0 +1,34 @@
! Check that PTB to a assembly-time-resolvable SHcompact operand
! gets an error. Likewise PTA.
! { dg-do assemble }
! { dg-options "--abi=32" }
.text
.mode SHmedia
start:
ptb shmediasymbol1,tr1 ! { dg-error "PTB operand is a SHmedia symbol" }
shmediasymbol3:
ptb shcompactsymbol1,tr1
pta shcompactsymbol2,tr3 ! { dg-error "PTA operand is a SHcompact symbol" }
shmediasymbol1:
ptb shmediasymbol2,tr2 ! { dg-error "PTB operand is a SHmedia symbol" }
.mode SHcompact
shcompact:
nop
nop
shcompactsymbol2:
nop
nop
shcompactsymbol1:
nop
nop
.mode SHmedia
shmedia:
nop
shmediasymbol2:
nop
ptb shmediasymbol3,tr3 ! { dg-error "PTB operand is a SHmedia symbol" }
nop

View File

@ -0,0 +1,34 @@
! Check that PTB to a assembly-time-resolvable SHcompact operand gets an
! error. Mostly like err-ptb-1.s, except we also specify --no-expand.
! { dg-do assemble }
! { dg-options "--abi=32 --no-expand" }
.text
.mode SHmedia
start:
ptb shmediasymbol1,tr1 ! { dg-error "PTB operand is a SHmedia symbol" }
shmediasymbol3:
ptb shcompactsymbol1,tr1
pta shcompactsymbol2,tr3 ! { dg-error "PTA operand is a SHcompact symbol" }
shmediasymbol1:
ptb shmediasymbol2,tr2 ! { dg-error "PTB operand is a SHmedia symbol" }
.mode SHcompact
shcompact:
nop
nop
shcompactsymbol2:
nop
nop
shcompactsymbol1:
nop
nop
.mode SHmedia
shmedia:
nop
shmediasymbol2:
nop
ptb shmediasymbol3,tr3 ! { dg-error "PTB operand is a SHmedia symbol" }
nop

View File

@ -0,0 +1,9 @@
load_lib gas-dg.exp
dg-init
if [istarget sh64-*-*] then {
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/warn-*.s]] "" "--isa=SHmedia"
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/err-*.s]] "" "--isa=SHmedia"
}
dg-finish

View File

@ -0,0 +1,85 @@
! Check that immediate operands with expressions with differences between
! local symbols work for other than 16-bit operands.
.text
.mode SHmedia
start:
addi r50,.Lab500 - .Lab1,r40
addi r50,-(.Lab500 - .Lab1),r40
addi r50,(.Lab1000 - .Lab1)/2,r40
addi r50,(.Lab4000 - .Lab1)/8,r40
addi r50,-(.Lab1000 - .Lab1)/2,r40
addi r50,-(.Lab4000 - .Lab1)/8,r40
addi r50,.Lab500 - .Lab1 + 1,r40
addi r50,.Lab500 - .Lab1 + 2,r40
addi r50,-(.Lab500 - .Lab1 + 1),r40
addi r50,-(.Lab500 - .Lab1 + 2),r40
ld.uw r30,.Lab1000 - .Lab1,r40
ld.uw r30,.Lab500 - .Lab1 - 2,r40
ld.uw r30,.Lab500 - .Lab1 + 2,r40
ld.uw r50,(.Lab2000 - .Lab1)/2,r20
ld.uw r30,-(.Lab1000 - .Lab1),r40
ld.uw r30,-(.Lab500 - .Lab1 - 2),r40
ld.uw r30,-(.Lab500 - .Lab1 + 2),r40
ld.uw r50,-(.Lab2000 - .Lab1)/2,r20
ld.l r50,.Lab2000 - .Lab1,r20
ld.l r50,.Lab2000 - .Lab1 + 4,r20
ld.l r50,.Lab2000 - .Lab1 - 4,r20
ld.l r50,(.Lab4000 - .Lab1)/2,r20
ld.l r50,(.Lab4000 - .Lab1)/2 + 4,r20
ld.l r50,(.Lab4000 - .Lab1)/2 - 4,r20
ld.l r50,-(.Lab2000 - .Lab1),r20
ld.l r50,-(.Lab2000 - .Lab1 + 4),r20
ld.l r50,-(.Lab2000 - .Lab1 - 4),r20
ld.l r50,-(.Lab4000 - .Lab1)/2,r20
ld.l r50,-(.Lab4000 - .Lab1)/2 + 4,r20
ld.l r50,-(.Lab4000 - .Lab1)/2 - 4,r20
nop
addi r50,.Lab500t - .Lab1t,r40
addi r50,(.Lab1000t - .Lab1t)/2,r40
addi r50,(.Lab4000t - .Lab1t)/8,r40
addi r50,.Lab500t - .Lab1t + 1,r40
addi r50,.Lab500t - .Lab1t + 2,r40
ld.uw r30,.Lab1000t - .Lab1t,r40
ld.uw r30,.Lab500t - .Lab1t - 2,r40
ld.uw r30,.Lab500t - .Lab1t + 2,r40
ld.uw r50,(.Lab2000t - .Lab1t)/2,r20
ld.l r50,.Lab2000t - .Lab1t,r20
ld.l r50,.Lab2000t - .Lab1t + 4,r20
ld.l r50,.Lab2000t - .Lab1t - 4,r20
addi r50,.Lab500t - .Lab1t,r40
addi r50,-((.Lab1000t - .Lab1t)/2),r40
addi r50,-((.Lab4000t - .Lab1t)/8),r40
addi r50,-(.Lab500t - .Lab1t + 1),r40
addi r50,-(.Lab500t - .Lab1t + 2),r40
ld.uw r30,-(.Lab1000t - .Lab1t),r40
ld.uw r30,-(.Lab500t - .Lab1t - 2),r40
ld.uw r30,-(.Lab500t - .Lab1t + 2),r40
ld.uw r50,-((.Lab2000t - .Lab1t)/2),r20
ld.l r50,-(.Lab2000t - .Lab1t),r20
ld.l r50,-(.Lab2000t - .Lab1t + 4),r20
ld.l r50,-(.Lab2000t - .Lab1t - 4),r20
nop
.long 0
.Lab1t:
.zero 500,0
.Lab500t:
.zero 500,0
.Lab1000t:
.zero 1000,0
.Lab2000t:
.zero 2000,0
.Lab4000t:
.data
.long 0
.Lab1:
.zero 500,0
.Lab500:
.zero 500,0
.Lab1000:
.zero 1000,0
.Lab2000:
.zero 2000,0
.Lab4000:
.long 0

View File

@ -0,0 +1,16 @@
! This expression and the associated resolved-expression case is new for SH64.
.data
.uaquad end-start
.uaquad .Lend-.Lstart
.text
.mode SHmedia
start:
nop
end:
.Lstart:
nop
nop
.Lend:

View File

@ -0,0 +1,67 @@
#as: --abi=32
#objdump: -dr
#source: immexpr1.s
#name: Immediate resolved operands, 32-bit ABI.
.*: file format .*-sh64
Disassembly of section \.text:
0+ <start>:
[ ]+0:[ ]+d327d280[ ]+addi r50,500,r40
[ ]+4:[ ]+d3283280[ ]+addi r50,-500,r40
[ ]+8:[ ]+d327d280[ ]+addi r50,500,r40
[ ]+c:[ ]+d327d280[ ]+addi r50,500,r40
[ ]+10:[ ]+d3283280[ ]+addi r50,-500,r40
[ ]+14:[ ]+d3283280[ ]+addi r50,-500,r40
[ ]+18:[ ]+d327d680[ ]+addi r50,501,r40
[ ]+1c:[ ]+d327da80[ ]+addi r50,502,r40
[ ]+20:[ ]+d3282e80[ ]+addi r50,-501,r40
[ ]+24:[ ]+d3282a80[ ]+addi r50,-502,r40
[ ]+28:[ ]+b1e7d280[ ]+ld\.uw r30,1000,r40
[ ]+2c:[ ]+b1e3e680[ ]+ld\.uw r30,498,r40
[ ]+30:[ ]+b1e3ee80[ ]+ld\.uw r30,502,r40
[ ]+34:[ ]+b327d140[ ]+ld\.uw r50,1000,r20
[ ]+38:[ ]+b1e83280[ ]+ld\.uw r30,-1000,r40
[ ]+3c:[ ]+b1ec1e80[ ]+ld\.uw r30,-498,r40
[ ]+40:[ ]+b1ec1680[ ]+ld\.uw r30,-502,r40
[ ]+44:[ ]+b3283140[ ]+ld\.uw r50,-1000,r20
[ ]+48:[ ]+8b27d140[ ]+ld\.l r50,2000,r20
[ ]+4c:[ ]+8b27d540[ ]+ld\.l r50,2004,r20
[ ]+50:[ ]+8b27cd40[ ]+ld\.l r50,1996,r20
[ ]+54:[ ]+8b27d140[ ]+ld\.l r50,2000,r20
[ ]+58:[ ]+8b27d540[ ]+ld\.l r50,2004,r20
[ ]+5c:[ ]+8b27cd40[ ]+ld\.l r50,1996,r20
[ ]+60:[ ]+8b283140[ ]+ld\.l r50,-2000,r20
[ ]+64:[ ]+8b282d40[ ]+ld\.l r50,-2004,r20
[ ]+68:[ ]+8b283540[ ]+ld\.l r50,-1996,r20
[ ]+6c:[ ]+8b283140[ ]+ld\.l r50,-2000,r20
[ ]+70:[ ]+8b283540[ ]+ld\.l r50,-1996,r20
[ ]+74:[ ]+8b282d40[ ]+ld\.l r50,-2004,r20
[ ]+78:[ ]+6ff0fff0[ ]+nop
[ ]+7c:[ ]+d327d280[ ]+addi r50,500,r40
[ ]+80:[ ]+d327d280[ ]+addi r50,500,r40
[ ]+84:[ ]+d327d280[ ]+addi r50,500,r40
[ ]+88:[ ]+d327d680[ ]+addi r50,501,r40
[ ]+8c:[ ]+d327da80[ ]+addi r50,502,r40
[ ]+90:[ ]+b1e7d280[ ]+ld\.uw r30,1000,r40
[ ]+94:[ ]+b1e3e680[ ]+ld\.uw r30,498,r40
[ ]+98:[ ]+b1e3ee80[ ]+ld\.uw r30,502,r40
[ ]+9c:[ ]+b327d140[ ]+ld\.uw r50,1000,r20
[ ]+a0:[ ]+8b27d140[ ]+ld\.l r50,2000,r20
[ ]+a4:[ ]+8b27d540[ ]+ld\.l r50,2004,r20
[ ]+a8:[ ]+8b27cd40[ ]+ld\.l r50,1996,r20
[ ]+ac:[ ]+d327d280[ ]+addi r50,500,r40
[ ]+b0:[ ]+d3283280[ ]+addi r50,-500,r40
[ ]+b4:[ ]+d3283280[ ]+addi r50,-500,r40
[ ]+b8:[ ]+d3282e80[ ]+addi r50,-501,r40
[ ]+bc:[ ]+d3282a80[ ]+addi r50,-502,r40
[ ]+c0:[ ]+b1e83280[ ]+ld\.uw r30,-1000,r40
[ ]+c4:[ ]+b1ec1e80[ ]+ld\.uw r30,-498,r40
[ ]+c8:[ ]+b1ec1680[ ]+ld\.uw r30,-502,r40
[ ]+cc:[ ]+b3283140[ ]+ld\.uw r50,-1000,r20
[ ]+d0:[ ]+8b283140[ ]+ld\.l r50,-2000,r20
[ ]+d4:[ ]+8b282d40[ ]+ld\.l r50,-2004,r20
[ ]+d8:[ ]+8b283540[ ]+ld\.l r50,-1996,r20
[ ]+dc:[ ]+6ff0fff0[ ]+nop
[ ]\.\.\.

View File

@ -0,0 +1,11 @@
#as: --abi=32
#objdump: -sr
#source: immexpr2.s
#name: Resolved 64-bit operand, 32-bit ABI.
.*: file format .*-sh64
Contents of section \.text:
0000 6ff0fff0 6ff0fff0 6ff0fff0 .*
Contents of section .data:
0000 00000000 00000004 00000000 00000008 .*

View File

@ -0,0 +1,68 @@
#as: --abi=64
#objdump: -dr
#source: immexpr1.s
#name: Immediate resolved operands, 64-bit ABI.
.*: file format .*-sh64
Disassembly of section \.text:
0+ <start>:
[ ]+0:[ ]+d327d280[ ]+addi r50,500,r40
[ ]+4:[ ]+d3283280[ ]+addi r50,-500,r40
[ ]+8:[ ]+d327d280[ ]+addi r50,500,r40
[ ]+c:[ ]+d327d280[ ]+addi r50,500,r40
[ ]+10:[ ]+d3283280[ ]+addi r50,-500,r40
[ ]+14:[ ]+d3283280[ ]+addi r50,-500,r40
[ ]+18:[ ]+d327d680[ ]+addi r50,501,r40
[ ]+1c:[ ]+d327da80[ ]+addi r50,502,r40
[ ]+20:[ ]+d3282e80[ ]+addi r50,-501,r40
[ ]+24:[ ]+d3282a80[ ]+addi r50,-502,r40
[ ]+28:[ ]+b1e7d280[ ]+ld\.uw r30,1000,r40
[ ]+2c:[ ]+b1e3e680[ ]+ld\.uw r30,498,r40
[ ]+30:[ ]+b1e3ee80[ ]+ld\.uw r30,502,r40
[ ]+34:[ ]+b327d140[ ]+ld\.uw r50,1000,r20
[ ]+38:[ ]+b1e83280[ ]+ld\.uw r30,-1000,r40
[ ]+3c:[ ]+b1ec1e80[ ]+ld\.uw r30,-498,r40
[ ]+40:[ ]+b1ec1680[ ]+ld\.uw r30,-502,r40
[ ]+44:[ ]+b3283140[ ]+ld\.uw r50,-1000,r20
[ ]+48:[ ]+8b27d140[ ]+ld\.l r50,2000,r20
[ ]+4c:[ ]+8b27d540[ ]+ld\.l r50,2004,r20
[ ]+50:[ ]+8b27cd40[ ]+ld\.l r50,1996,r20
[ ]+54:[ ]+8b27d140[ ]+ld\.l r50,2000,r20
[ ]+58:[ ]+8b27d540[ ]+ld\.l r50,2004,r20
[ ]+5c:[ ]+8b27cd40[ ]+ld\.l r50,1996,r20
[ ]+60:[ ]+8b283140[ ]+ld\.l r50,-2000,r20
[ ]+64:[ ]+8b282d40[ ]+ld\.l r50,-2004,r20
[ ]+68:[ ]+8b283540[ ]+ld\.l r50,-1996,r20
[ ]+6c:[ ]+8b283140[ ]+ld\.l r50,-2000,r20
[ ]+70:[ ]+8b283540[ ]+ld\.l r50,-1996,r20
[ ]+74:[ ]+8b282d40[ ]+ld\.l r50,-2004,r20
[ ]+78:[ ]+6ff0fff0[ ]+nop
[ ]+7c:[ ]+d327d280[ ]+addi r50,500,r40
[ ]+80:[ ]+d327d280[ ]+addi r50,500,r40
[ ]+84:[ ]+d327d280[ ]+addi r50,500,r40
[ ]+88:[ ]+d327d680[ ]+addi r50,501,r40
[ ]+8c:[ ]+d327da80[ ]+addi r50,502,r40
[ ]+90:[ ]+b1e7d280[ ]+ld\.uw r30,1000,r40
[ ]+94:[ ]+b1e3e680[ ]+ld\.uw r30,498,r40
[ ]+98:[ ]+b1e3ee80[ ]+ld\.uw r30,502,r40
[ ]+9c:[ ]+b327d140[ ]+ld\.uw r50,1000,r20
[ ]+a0:[ ]+8b27d140[ ]+ld\.l r50,2000,r20
[ ]+a4:[ ]+8b27d540[ ]+ld\.l r50,2004,r20
[ ]+a8:[ ]+8b27cd40[ ]+ld\.l r50,1996,r20
[ ]+ac:[ ]+d327d280[ ]+addi r50,500,r40
[ ]+b0:[ ]+d3283280[ ]+addi r50,-500,r40
[ ]+b4:[ ]+d3283280[ ]+addi r50,-500,r40
[ ]+b8:[ ]+d3282e80[ ]+addi r50,-501,r40
[ ]+bc:[ ]+d3282a80[ ]+addi r50,-502,r40
[ ]+c0:[ ]+b1e83280[ ]+ld\.uw r30,-1000,r40
[ ]+c4:[ ]+b1ec1e80[ ]+ld\.uw r30,-498,r40
[ ]+c8:[ ]+b1ec1680[ ]+ld\.uw r30,-502,r40
[ ]+cc:[ ]+b3283140[ ]+ld\.uw r50,-1000,r20
[ ]+d0:[ ]+8b283140[ ]+ld\.l r50,-2000,r20
[ ]+d4:[ ]+8b282d40[ ]+ld\.l r50,-2004,r20
[ ]+d8:[ ]+8b283540[ ]+ld\.l r50,-1996,r20
[ ]+dc:[ ]+6ff0fff0[ ]+nop
[ ]\.\.\.

View File

@ -0,0 +1,11 @@
#as: --abi=64
#objdump: -sr
#source: immexpr2.s
#name: Resolved 64-bit operand, 64-bit ABI.
.*: file format .*-sh64
Contents of section \.text:
0000 6ff0fff0 6ff0fff0 6ff0fff0 .*
Contents of section .data:
0000 00000000 00000004 00000000 00000008 .*

View File

@ -0,0 +1,19 @@
#as: --abi=32 --isa=shmedia -gdwarf2
#objdump: -dl
#source: lineno.s
#name: Dwarf2 line numbers vs macro opcodes
.*: file format .*-sh64
Disassembly of section .text:
[0]+ <start>:
start.*:
[ ]+0:[ ]+cc000410[ ]+movi[ ]+1,r1
.*:4
[ ]+4:[ ]+cc000410[ ]+movi[ ]+1,r1
.*:5
[ ]+8:[ ]+ca1a8010[ ]+shori[ ]+34464,r1
[ ]+c:[ ]+6ff0fff0[ ]+nop[ ]*
.*:6
[ ]+10:[ ]+6ff0fff0[ ]+nop[ ]*

View File

@ -0,0 +1,7 @@
.text
start:
movi 1,r1
movi 100000,r1
nop
nop

View File

@ -0,0 +1,30 @@
#as: --abi=32
#objdump: -srt
#source: localcom-1.s
#name: Datalabel on local comm symbol and equated local comm symbol
.*: file format .*-sh64
SYMBOL TABLE:
0+0 l d \.text 0+
0+0 l d \.data 0+
0+0 l d \.bss 0+
0+0 l \.text 0+ start
0+c l O \.bss 0+4 dd
0+c l O \.bss 0+4 d
0+4 l O \.bss 0+4 b
0+0 l O \.bss 0+4 a
0+8 l O \.bss 0+4 c
RELOCATION RECORDS FOR \[\.text\]:
OFFSET *TYPE *VALUE
0+10 R_SH_DIR32 \.bss
0+14 R_SH_DIR32 \.bss
0+18 R_SH_DIR32 \.bss
Contents of section \.text:
0000 00090009 00090009 00090009 00090009 .*
0010 00000004 00000004 0000000c 1234 .*
Contents of section \.data:

View File

@ -0,0 +1,26 @@
! The implicit equation from a datalabel to the main symbol was incorrect
! at one time. This is reasonably close to the original testcase.
.mode SHcompact
start:
nop
nop
nop
nop
nop
nop
nop
nop
.set dd,d
.long b
.long datalabel b
.long datalabel dd
.word 0x1234
.local a
.comm a,4,4
.local b
.comm b,4,4
.local c
.comm c,4,4
.local d
.comm d,4,4

View File

@ -0,0 +1,42 @@
#as: --abi=32
#objdump: -dr
#name: Mixed-ISA objects.
.*: file format .*-sh64
Disassembly of section \.text:
0+ <start>:
[ ]+0:[ ]+89 01 bt 6 <forw>
[ ]+2:[ ]+c7 00[ ]+mova 4 <start2>,r0
0+4 <start2>:
[ ]+4:[ ]+00[ ]+09 nop
0+6 <forw>:
[ ]+6:[ ]+00[ ]+09 nop
Disassembly of section \.text\.media:
0+ <mediacode>:
[ ]+0:[ ]+cc000190[ ]+movi 0,r25
[ ]+0:[ ]+R_SH_IMM_MEDLOW16_PCREL \.text\+0xf*fffffffe
[ ]+4:[ ]+c8000190[ ]+shori 0,r25
[ ]+4:[ ]+R_SH_IMM_LOW16_PCREL \.text\+0x2
[ ]+8:[ ]+6bf56640[ ]+ptrel/l r25,tr4
[ ]+c:[ ]+cc000190[ ]+movi 0,r25
[ ]+c:[ ]+R_SH_IMM_MEDLOW16_PCREL \.text\+0xf*fffffffc
[ ]+10:[ ]+c8000190[ ]+shori 0,r25
[ ]+10:[ ]+R_SH_IMM_LOW16_PCREL \.text
[ ]+14:[ ]+6bf56650[ ]+ptrel/l r25,tr5
0+18 <mediacode2>:
[ ]+18:[ ]+cc000360[ ]+movi 0,r54
[ ]+18:[ ]+R_SH_IMM_MEDLOW16 \.text\+0x4
[ ]+1c:[ ]+c8000360[ ]+shori 0,r54
[ ]+1c:[ ]+R_SH_IMM_LOW16 \.text\+0x4
[ ]+20:[ ]+cc0002d0[ ]+movi 0,r45
[ ]+20:[ ]+R_SH_IMM_MEDLOW16 \.text\.media\+0x19
[ ]+24:[ ]+c80002d0[ ]+shori 0,r45
[ ]+24:[ ]+R_SH_IMM_LOW16 \.text\.media\+0x19
[ ]+28:[ ]+ebfff270[ ]+pta/l 18 <mediacode2>,tr7
[ ]+2c:[ ]+6ff0fff0[ ]+nop

View File

@ -0,0 +1,21 @@
! Check mixed-mode objects; different sections holding different ISA:s.
.mode SHcompact
.text
start:
bt forw
mova start2,r0
start2:
nop
forw:
nop
.section .text.media,"ax"
.mode SHmedia
mediacode:
ptb forw,tr4
pt start2,tr5
mediacode2:
movi start2,r54
movi mediacode2,r45
pta mediacode2,tr7
nop

View File

@ -0,0 +1,33 @@
#as: --abi=32 -no-expand
#objdump: -dr
#source: mix-1.s
#name: Mixed-ISA objects with -no-expand.
.*: file format .*-sh64
Disassembly of section \.text:
0+ <start>:
[ ]+0:[ ]+89 01 bt 6 <forw>
[ ]+2:[ ]+c7 00[ ]+mova 4 <start2>,r0
0+4 <start2>:
[ ]+4:[ ]+00[ ]+09 nop
0+6 <forw>:
[ ]+6:[ ]+00[ ]+09 nop
Disassembly of section \.text\.media:
0+ <mediacode>:
[ ]+0:[ ]+ec000640[ ]+ptb/l 4 <mediacode\+0x4>,tr4
[ ]+0:[ ]+R_SH_PT_16[ ]+\.text\+0x6
[ ]+4:[ ]+e8000250[ ]+pta/l 4 <mediacode\+0x4>,tr5
[ ]+4:[ ]+R_SH_PT_16[ ]+\.text\+0x4
0+8 <mediacode2>:
[ ]+8:[ ]+cc000360[ ]+movi 0,r54
[ ]+8:[ ]+R_SH_IMMS16[ ]+\.text\+0x4
[ ]+c:[ ]+cc0002d0[ ]+movi 0,r45
[ ]+c:[ ]+R_SH_IMMS16[ ]+\.text\.media\+0x9
[ ]+10:[ ]+ebfffa70[ ]+pta/l 8 <mediacode2>,tr7
[ ]+14:[ ]+6ff0fff0[ ]+nop

View File

@ -0,0 +1,20 @@
! Check MOVI expansion. This one for the 32-bit subset.
.text
start:
movi externalsym + 123,r3
movi 65535,r3
movi 65536,r3
movi 65535 << 16,r3
movi 32767,r3
movi 32768,r3
movi 32767 << 16,r3
movi -32768,r3
movi -32769,r3
movi -32768 << 16,r3
movi localsym + 73,r4
movi forwardsym - 42,r4
.set forwardsym,47
.data
localsym:
.long 1

View File

@ -0,0 +1,28 @@
! Check MOVI expansion of local symbols that should get segment-relative
! relocations.
.text
start:
movi forw + 32,r33
movi forwdata + 40,r54
movi forwothertext + 44,r15
forw:
movi forwotherdata + 48,r25
.data
.long 0 ! To get a non-zero segment offset for "forwdata".
forwdata:
.long 0
.section .text.other,"ax"
forwdummylabel: ! Needed to hang a marker that this section is SHmedia.
nop
nop
forwothertext:
nop
.section .data.other,"aw"
.long 0
.long 0
forwotherdata:
.long 0

View File

@ -0,0 +1,18 @@
#as: --abi=64
#objdump: -dr
#source: movi-3.s
#name: Assembler PC-rel resolved negative MOVI.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+cef68040[ ]+movi -16992,r4
[ ]+4:[ ]+cfffc050[ ]+movi -16,r5
[ ]+8:[ ]+cffffc60[ ]+movi -1,r6
[ ]+c:[ ]+cffffc70[ ]+movi -1,r7
[ ]+10:[ ]+cffffc80[ ]+movi -1,r8
[ ]+14:[ ]+cbfffc80[ ]+shori 65535,r8
[ ]+18:[ ]+cbffc080[ ]+shori 65520,r8
[ ]+1c:[ ]+caf68080[ ]+shori 48544,r8

View File

@ -0,0 +1,10 @@
! There was a bug with negative pc-relative numbers.
.mode SHmedia
.text
start:
movi (start - 1000000 - end) & 65535,r4
movi ((start - 1000000 - end) >> 16) & 65535,r5
movi ((start - 1000000 - end) >> 32) & 65535,r6
movi ((start - 1000000 - end) >> 48) & 65535,r7
movi (start - 1000000 - end),r8
end:

View File

@ -0,0 +1,35 @@
#as: --isa=shmedia --abi=32
#objdump: -dr
#source: movi-1.s
#name: MOVI expansion, 32-bit ABI.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+cc000030[ ]+movi 0,r3
[ ]+0:[ ]+R_SH_IMM_MEDLOW16 externalsym\+0x7b
[ ]+4:[ ]+c8000030[ ]+shori 0,r3
[ ]+4:[ ]+R_SH_IMM_LOW16 externalsym\+0x7b
[ ]+8:[ ]+cc000030[ ]+movi 0,r3
[ ]+c:[ ]+cbfffc30[ ]+shori 65535,r3
[ ]+10:[ ]+cc000430[ ]+movi 1,r3
[ ]+14:[ ]+c8000030[ ]+shori 0,r3
[ ]+18:[ ]+cffffc30[ ]+movi -1,r3
[ ]+1c:[ ]+c8000030[ ]+shori 0,r3
[ ]+20:[ ]+cdfffc30[ ]+movi 32767,r3
[ ]+24:[ ]+cc000030[ ]+movi 0,r3
[ ]+28:[ ]+ca000030[ ]+shori 32768,r3
[ ]+2c:[ ]+cdfffc30[ ]+movi 32767,r3
[ ]+30:[ ]+c8000030[ ]+shori 0,r3
[ ]+34:[ ]+ce000030[ ]+movi -32768,r3
[ ]+38:[ ]+cffffc30[ ]+movi -1,r3
[ ]+3c:[ ]+c9fffc30[ ]+shori 32767,r3
[ ]+40:[ ]+ce000030[ ]+movi -32768,r3
[ ]+44:[ ]+c8000030[ ]+shori 0,r3
[ ]+48:[ ]+cc000040[ ]+movi 0,r4
[ ]+48:[ ]+R_SH_IMM_MEDLOW16 \.data\+0x49
[ ]+4c:[ ]+c8000040[ ]+shori 0,r4
[ ]+4c:[ ]+R_SH_IMM_LOW16 \.data\+0x49
[ ]+50:[ ]+cc001440[ ]+movi 5,r4

View File

@ -0,0 +1,36 @@
#as: --isa=shmedia --abi=32
#objdump: -dr
#source: movi-2.s
#name: MOVI expansion of local symbols with relocs, 32-bit ABI.
.*: file format .*-sh64
Disassembly of section \.text:
0+ <start>:
[ ]+0:[ ]+cc000210[ ]+movi 0,r33
[ ]+0:[ ]+R_SH_IMM_MEDLOW16 \.text\+0x39
[ ]+4:[ ]+c8000210[ ]+shori 0,r33
[ ]+4:[ ]+R_SH_IMM_LOW16 \.text\+0x39
[ ]+8:[ ]+cc000360[ ]+movi 0,r54
[ ]+8:[ ]+R_SH_IMM_MEDLOW16 \.data\+0x2c
[ ]+c:[ ]+c8000360[ ]+shori 0,r54
[ ]+c:[ ]+R_SH_IMM_LOW16 \.data\+0x2c
[ ]+10:[ ]+cc0000f0[ ]+movi 0,r15
[ ]+10:[ ]+R_SH_IMM_MEDLOW16 \.text\.other\+0x35
[ ]+14:[ ]+c80000f0[ ]+shori 0,r15
[ ]+14:[ ]+R_SH_IMM_LOW16 \.text\.other\+0x35
0+18 <forw>:
[ ]+18:[ ]+cc000190[ ]+movi 0,r25
[ ]+18:[ ]+R_SH_IMM_MEDLOW16 \.data\.other\+0x38
[ ]+1c:[ ]+c8000190[ ]+shori 0,r25
[ ]+1c:[ ]+R_SH_IMM_LOW16 \.data\.other\+0x38
Disassembly of section \.text\.other:
0+ <forwdummylabel>:
[ ]+0:[ ]+6ff0fff0[ ]+nop
[ ]+4:[ ]+6ff0fff0[ ]+nop
0+8 <forwothertext>:
[ ]+8:[ ]+6ff0fff0[ ]+nop

View File

@ -0,0 +1,28 @@
#as: --isa=shmedia --abi=32 -no-expand
#objdump: -dr
#source: movi-2.s
#name: MOVI non-expansion of local symbols with relocs, 32-bit ABI.
.*: file format .*-sh64
Disassembly of section \.text:
0+ <start>:
[ ]+0:[ ]+cc000210[ ]+movi 0,r33
[ ]+0:[ ]+R_SH_IMMS16 \.text\+0x2d
[ ]+4:[ ]+cc000360[ ]+movi 0,r54
[ ]+4:[ ]+R_SH_IMMS16 \.data\+0x2c
[ ]+8:[ ]+cc0000f0[ ]+movi 0,r15
[ ]+8:[ ]+R_SH_IMMS16 \.text\.other\+0x35
0+c <forw>:
[ ]+c:[ ]+cc000190[ ]+movi 0,r25
[ ]+c:[ ]+R_SH_IMMS16 \.data\.other\+0x38
Disassembly of section \.text\.other:
0+ <forwdummylabel>:
[ ]+0:[ ]+6ff0fff0[ ]+nop
[ ]+4:[ ]+6ff0fff0[ ]+nop
0+8 <forwothertext>:
[ ]+8:[ ]+6ff0fff0[ ]+nop

View File

@ -0,0 +1,44 @@
#as: --isa=shmedia --abi=64
#objdump: -dr
#source: movi-1.s
#name: MOVI expansion, 64-bit ABI, 32-bit subset.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+cc000030[ ]+movi 0,r3
[ ]+0:[ ]+R_SH_IMM_HI16 externalsym\+0x7b
[ ]+4:[ ]+c8000030[ ]+shori 0,r3
[ ]+4:[ ]+R_SH_IMM_MEDHI16 externalsym\+0x7b
[ ]+8:[ ]+c8000030[ ]+shori 0,r3
[ ]+8:[ ]+R_SH_IMM_MEDLOW16 externalsym\+0x7b
[ ]+c:[ ]+c8000030[ ]+shori 0,r3
[ ]+c:[ ]+R_SH_IMM_LOW16 externalsym\+0x7b
[ ]+10:[ ]+cc000030[ ]+movi 0,r3
[ ]+14:[ ]+cbfffc30[ ]+shori 65535,r3
[ ]+18:[ ]+cc000430[ ]+movi 1,r3
[ ]+1c:[ ]+c8000030[ ]+shori 0,r3
[ ]+20:[ ]+cc000030[ ]+movi 0,r3
[ ]+24:[ ]+cbfffc30[ ]+shori 65535,r3
[ ]+28:[ ]+c8000030[ ]+shori 0,r3
[ ]+2c:[ ]+cdfffc30[ ]+movi 32767,r3
[ ]+30:[ ]+cc000030[ ]+movi 0,r3
[ ]+34:[ ]+ca000030[ ]+shori 32768,r3
[ ]+38:[ ]+cdfffc30[ ]+movi 32767,r3
[ ]+3c:[ ]+c8000030[ ]+shori 0,r3
[ ]+40:[ ]+ce000030[ ]+movi -32768,r3
[ ]+44:[ ]+cffffc30[ ]+movi -1,r3
[ ]+48:[ ]+c9fffc30[ ]+shori 32767,r3
[ ]+4c:[ ]+ce000030[ ]+movi -32768,r3
[ ]+50:[ ]+c8000030[ ]+shori 0,r3
[ ]+54:[ ]+cc000040[ ]+movi 0,r4
[ ]+54:[ ]+R_SH_IMM_HI16 \.data\+0x49
[ ]+58:[ ]+c8000040[ ]+shori 0,r4
[ ]+58:[ ]+R_SH_IMM_MEDHI16 \.data\+0x49
[ ]+5c:[ ]+c8000040[ ]+shori 0,r4
[ ]+5c:[ ]+R_SH_IMM_MEDLOW16 \.data\+0x49
[ ]+60:[ ]+c8000040[ ]+shori 0,r4
[ ]+60:[ ]+R_SH_IMM_LOW16 \.data\+0x49
[ ]+64:[ ]+cc001440[ ]+movi 5,r4

View File

@ -0,0 +1,30 @@
#as: --isa=shmedia --abi=64
#objdump: -dr
#name: MOVI expansion, 64-bit ABI, 64-bit subset.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+cc000430[ ]+movi 1,r3
[ ]+4:[ ]+c8000030[ ]+shori 0,r3
[ ]+8:[ ]+c8000030[ ]+shori 0,r3
[ ]+c:[ ]+cffffc30[ ]+movi -1,r3
[ ]+10:[ ]+c9fffc30[ ]+shori 32767,r3
[ ]+14:[ ]+c8000030[ ]+shori 0,r3
[ ]+18:[ ]+cc000030[ ]+movi 0,r3
[ ]+1c:[ ]+ca000030[ ]+shori 32768,r3
[ ]+20:[ ]+c8000030[ ]+shori 0,r3
[ ]+24:[ ]+cdfffc30[ ]+movi 32767,r3
[ ]+28:[ ]+c8000030[ ]+shori 0,r3
[ ]+2c:[ ]+c8000030[ ]+shori 0,r3
[ ]+30:[ ]+c8000030[ ]+shori 0,r3
[ ]+34:[ ]+ce000030[ ]+movi -32768,r3
[ ]+38:[ ]+c8000030[ ]+shori 0,r3
[ ]+3c:[ ]+c8000030[ ]+shori 0,r3
[ ]+40:[ ]+c8000030[ ]+shori 0,r3
[ ]+44:[ ]+ce000030[ ]+movi -32768,r3
[ ]+48:[ ]+c8000030[ ]+shori 0,r3
[ ]+4c:[ ]+c8000030[ ]+shori 0,r3
[ ]+50:[ ]+c8000030[ ]+shori 0,r3

View File

@ -0,0 +1,10 @@
! Check MOVI expansion. This one for the 64-bit ABI only.
.text
start:
movi 65536 << 16,r3
movi -32769 << 16,r3
movi 32768 << 16,r3
movi 32767 << 48,r3
movi 32768 << 48,r3 ! Perhaps a warning on this or the next,
movi -32768 << 48,r3 ! for being out of range?

View File

@ -0,0 +1,52 @@
#as: --isa=shmedia --abi=64
#objdump: -dr
#source: movi-2.s
#name: MOVI expansion of local symbols with relocs, 64-bit ABI.
.*: file format .*-sh64
Disassembly of section \.text:
0+ <start>:
[ ]+0:[ ]+cc000210[ ]+movi 0,r33
[ ]+0:[ ]+R_SH_IMM_HI16 \.text\+0x51
[ ]+4:[ ]+c8000210[ ]+shori 0,r33
[ ]+4:[ ]+R_SH_IMM_MEDHI16 \.text\+0x51
[ ]+8:[ ]+c8000210[ ]+shori 0,r33
[ ]+8:[ ]+R_SH_IMM_MEDLOW16 \.text\+0x51
[ ]+c:[ ]+c8000210[ ]+shori 0,r33
[ ]+c:[ ]+R_SH_IMM_LOW16 \.text\+0x51
[ ]+10:[ ]+cc000360[ ]+movi 0,r54
[ ]+10:[ ]+R_SH_IMM_HI16 \.data\+0x2c
[ ]+14:[ ]+c8000360[ ]+shori 0,r54
[ ]+14:[ ]+R_SH_IMM_MEDHI16 \.data\+0x2c
[ ]+18:[ ]+c8000360[ ]+shori 0,r54
[ ]+18:[ ]+R_SH_IMM_MEDLOW16 \.data\+0x2c
[ ]+1c:[ ]+c8000360[ ]+shori 0,r54
[ ]+1c:[ ]+R_SH_IMM_LOW16 \.data\+0x2c
[ ]+20:[ ]+cc0000f0[ ]+movi 0,r15
[ ]+20:[ ]+R_SH_IMM_HI16 \.text\.other\+0x35
[ ]+24:[ ]+c80000f0[ ]+shori 0,r15
[ ]+24:[ ]+R_SH_IMM_MEDHI16 \.text\.other\+0x35
[ ]+28:[ ]+c80000f0[ ]+shori 0,r15
[ ]+28:[ ]+R_SH_IMM_MEDLOW16 \.text\.other\+0x35
[ ]+2c:[ ]+c80000f0[ ]+shori 0,r15
[ ]+2c:[ ]+R_SH_IMM_LOW16 \.text\.other\+0x35
0+30 <forw>:
[ ]+30:[ ]+cc000190[ ]+movi 0,r25
[ ]+30:[ ]+R_SH_IMM_HI16 \.data\.other\+0x38
[ ]+34:[ ]+c8000190[ ]+shori 0,r25
[ ]+34:[ ]+R_SH_IMM_MEDHI16 \.data\.other\+0x38
[ ]+38:[ ]+c8000190[ ]+shori 0,r25
[ ]+38:[ ]+R_SH_IMM_MEDLOW16 \.data\.other\+0x38
[ ]+3c:[ ]+c8000190[ ]+shori 0,r25
[ ]+3c:[ ]+R_SH_IMM_LOW16 \.data\.other\+0x38
Disassembly of section \.text\.other:
0+ <forwdummylabel>:
[ ]+0:[ ]+6ff0fff0[ ]+nop
[ ]+4:[ ]+6ff0fff0[ ]+nop
0+8 <forwothertext>:
[ ]+8:[ ]+6ff0fff0[ ]+nop

View File

@ -0,0 +1,28 @@
#as: --isa=shmedia --abi=64 -no-expand
#objdump: -dr
#source: movi-2.s
#name: MOVI non-expansion of local symbols with relocs, 64-bit ABI.
.*: file format .*-sh64
Disassembly of section \.text:
0+ <start>:
[ ]+0:[ ]+cc000210[ ]+movi 0,r33
[ ]+0:[ ]+R_SH_IMMS16 \.text\+0x2d
[ ]+4:[ ]+cc000360[ ]+movi 0,r54
[ ]+4:[ ]+R_SH_IMMS16 \.data\+0x2c
[ ]+8:[ ]+cc0000f0[ ]+movi 0,r15
[ ]+8:[ ]+R_SH_IMMS16 \.text\.other\+0x35
0+c <forw>:
[ ]+c:[ ]+cc000190[ ]+movi 0,r25
[ ]+c:[ ]+R_SH_IMMS16 \.data\.other\+0x38
Disassembly of section \.text\.other:
0+ <forwdummylabel>:
[ ]+0:[ ]+6ff0fff0[ ]+nop
[ ]+4:[ ]+6ff0fff0[ ]+nop
0+8 <forwothertext>:
[ ]+8:[ ]+6ff0fff0[ ]+nop

View File

@ -0,0 +1,26 @@
#as: --isa=shmedia
#objdump: -dr
#name: Basic SHmedia PT and PTA instructions.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+6ff0fff0[ ]+nop
[0]+4 <start1>:
[ ]+4:[ ]+6ff0fff0[ ]+nop
[0]+8 <start4>:
[ ]+8:[ ]+ebfffe50[ ]+pta/l 4 <start1>,tr5
[ ]+c:[ ]+6ff0fff0[ ]+nop
[ ]+10:[ ]+e8000a70[ ]+pta/l 18 <start2>,tr7
[ ]+14:[ ]+6ff0fff0[ ]+nop
[0]+18 <start2>:
[ ]+18:[ ]+e8000a40[ ]+pta/l 20 <start3>,tr4
[ ]+1c:[ ]+6ff0fff0[ ]+nop
[0]+20 <start3>:
[ ]+20:[ ]+ebffea30[ ]+pta/l 8 <start4>,tr3
[ ]+24:[ ]+6ff0fff0[ ]+nop

View File

@ -0,0 +1,17 @@
! Check simple use of PT/PTA.
.text
start:
nop
start1:
nop
start4:
pt start1,tr5
nop
pt start2,tr7
nop
start2:
pta start3,tr4
nop
start3:
pta start4,tr3
nop

View File

@ -0,0 +1,22 @@
! Check inter-segment pt and pta
.text
start:
nop
start1:
nop
start4:
pt start1,tr5
nop
pt start2,tr7
nop
.section .text.other,"ax"
dummylabel: ! Needed to hang a marker that this is SHmedia.
nop
start2:
pta start3,tr4
nop
start3:
pta start4,tr3
nop

View File

@ -0,0 +1,27 @@
#as: --isa=shmedia -no-expand
#objdump: -dr
#source: pt-1.s
#name: Basic SHmedia PT and PTA instructions with -no-expand.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+6ff0fff0[ ]+nop
[0]+4 <start1>:
[ ]+4:[ ]+6ff0fff0[ ]+nop
[0]+8 <start4>:
[ ]+8:[ ]+ebfffe50[ ]+pta/l 4 <start1>,tr5
[ ]+c:[ ]+6ff0fff0[ ]+nop
[ ]+10:[ ]+e8000a70[ ]+pta/l 18 <start2>,tr7
[ ]+14:[ ]+6ff0fff0[ ]+nop
[0]+18 <start2>:
[ ]+18:[ ]+e8000a40[ ]+pta/l 20 <start3>,tr4
[ ]+1c:[ ]+6ff0fff0[ ]+nop
[0]+20 <start3>:
[ ]+20:[ ]+ebffea30[ ]+pta/l 8 <start4>,tr3
[ ]+24:[ ]+6ff0fff0[ ]+nop

View File

@ -0,0 +1,39 @@
#as: --isa=shmedia -abi=32
#objdump: -dr
#source: pt-2.s
#name: Inter-segment PT, 32-bit.
.*: file format .*-sh64
Disassembly of section \.text:
0+ <start>:
[ ]+0:[ ]+6ff0fff0[ ]+nop
0+4 <start1>:
[ ]+4:[ ]+6ff0fff0[ ]+nop
0+8 <start4>:
[ ]+8:[ ]+ebfffe50[ ]+pta/l 4 <start1>,tr5
[ ]+c:[ ]+6ff0fff0[ ]+nop
[ ]+10:[ ]+cc000190[ ]+movi 0,r25
[ ]+10:[ ]+R_SH_IMM_MEDLOW16_PCREL \.text\.other\+0xf*fffffffd
[ ]+14:[ ]+c8000190[ ]+shori 0,r25
[ ]+14:[ ]+R_SH_IMM_LOW16_PCREL \.text\.other\+0x1
[ ]+18:[ ]+6bf56670[ ]+ptrel/l r25,tr7
[ ]+1c:[ ]+6ff0fff0[ ]+nop
Disassembly of section \.text\.other:
0+ <dummylabel>:
[ ]+0:[ ]+6ff0fff0[ ]+nop
0+4 <start2>:
[ ]+4:[ ]+e8000a40[ ]+pta/l c <start3>,tr4
[ ]+8:[ ]+6ff0fff0[ ]+nop
0+c <start3>:
[ ]+c:[ ]+cc000190[ ]+movi 0,r25
[ ]+c:[ ]+R_SH_IMM_MEDLOW16_PCREL \.text\+0x1
[ ]+10:[ ]+c8000190[ ]+shori 0,r25
[ ]+10:[ ]+R_SH_IMM_LOW16_PCREL \.text\+0x5
[ ]+14:[ ]+6bf56630[ ]+ptrel/l r25,tr3
[ ]+18:[ ]+6ff0fff0[ ]+nop

View File

@ -0,0 +1,34 @@
#as: --isa=shmedia -abi=32 -no-expand
#objdump: -dr
#source: pt-2.s
#name: Inter-segment PT, 32-bit with -no-expand.
.*: file format .*-sh64
Disassembly of section \.text:
0+ <start>:
[ ]+0:[ ]+6ff0fff0[ ]+nop
0+4 <start1>:
[ ]+4:[ ]+6ff0fff0[ ]+nop
0+8 <start4>:
[ ]+8:[ ]+ebfffe50[ ]+pta/l 4 <start1>,tr5
[ ]+c:[ ]+6ff0fff0[ ]+nop
[ ]+10:[ ]+e8000270[ ]+pta/l 10 <start4\+0x8>,tr7
[ ]+10:[ ]+R_SH_PT_16 \.text\.other\+0x5
[ ]+14:[ ]+6ff0fff0[ ]+nop
Disassembly of section \.text\.other:
0+ <dummylabel>:
[ ]+0:[ ]+6ff0fff0[ ]+nop
0+4 <start2>:
[ ]+4:[ ]+e8000a40[ ]+pta/l c <start3>,tr4
[ ]+8:[ ]+6ff0fff0[ ]+nop
0+c <start3>:
[ ]+c:[ ]+e8000630[ ]+pta/l 10 <start3\+0x4>,tr3
[ ]+c:[ ]R_SH_PT_16 \.text\+0x9
[ ]+10:[ ]+6ff0fff0[ ]+nop

View File

@ -0,0 +1,47 @@
#as: --isa=shmedia -abi=64
#objdump: -dr
#source: pt-2.s
#name: Inter-segment PT, 64-bit.
.*: file format .*-sh64
Disassembly of section \.text:
0+ <start>:
[ ]+0:[ ]+6ff0fff0[ ]+nop
0+4 <start1>:
[ ]+4:[ ]+6ff0fff0[ ]+nop
0+8 <start4>:
[ ]+8:[ ]+ebfffe50[ ]+pta/l 4 <start1>,tr5
[ ]+c:[ ]+6ff0fff0[ ]+nop
[ ]+10:[ ]+cc000190[ ]+movi 0,r25
[ ]+10:[ ]+R_SH_IMM_HI16_PCREL \.text\.other\+0xfffffffffffffff5
[ ]+14:[ ]+c8000190[ ]+shori 0,r25
[ ]+14:[ ]+R_SH_IMM_MEDHI16_PCREL \.text\.other\+0xfffffffffffffff9
[ ]+18:[ ]+c8000190[ ]+shori 0,r25
[ ]+18:[ ]+R_SH_IMM_MEDLOW16_PCREL \.text\.other\+0xfffffffffffffffd
[ ]+1c:[ ]+c8000190[ ]+shori 0,r25
[ ]+1c:[ ]+R_SH_IMM_LOW16_PCREL \.text\.other\+0x1
[ ]+20:[ ]+6bf56670[ ]+ptrel/l r25,tr7
[ ]+24:[ ]+6ff0fff0[ ]+nop
Disassembly of section \.text\.other:
0+ <dummylabel>:
[ ]+0:[ ]+6ff0fff0[ ]+nop
0+4 <start2>:
[ ]+4:[ ]+e8000a40[ ]+pta/l c <start3>,tr4
[ ]+8:[ ]+6ff0fff0[ ]+nop
0+c <start3>:
[ ]+c:[ ]+cc000190[ ]+movi 0,r25
[ ]+c:[ ]+R_SH_IMM_HI16_PCREL \.text\+0xfffffffffffffff9
[ ]+10:[ ]+c8000190[ ]+shori 0,r25
[ ]+10:[ ]+R_SH_IMM_MEDHI16_PCREL \.text\+0xfffffffffffffffd
[ ]+14:[ ]+c8000190[ ]+shori 0,r25
[ ]+14:[ ]+R_SH_IMM_MEDLOW16_PCREL \.text\+0x1
[ ]+18:[ ]+c8000190[ ]+shori 0,r25
[ ]+18:[ ]+R_SH_IMM_LOW16_PCREL \.text\+0x5
[ ]+1c:[ ]+6bf56630[ ]+ptrel/l r25,tr3
[ ]+20:[ ]+6ff0fff0[ ]+nop

View File

@ -0,0 +1,27 @@
#as: --isa=shmedia -expand-pt32
#objdump: -dr
#source: pt-1.s
#name: Basic SHmedia PT and PTA instructions with -expand-pt32.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+6ff0fff0[ ]+nop
[0]+4 <start1>:
[ ]+4:[ ]+6ff0fff0[ ]+nop
[0]+8 <start4>:
[ ]+8:[ ]+ebfffe50[ ]+pta/l 4 <start1>,tr5
[ ]+c:[ ]+6ff0fff0[ ]+nop
[ ]+10:[ ]+e8000a70[ ]+pta/l 18 <start2>,tr7
[ ]+14:[ ]+6ff0fff0[ ]+nop
[0]+18 <start2>:
[ ]+18:[ ]+e8000a40[ ]+pta/l 20 <start3>,tr4
[ ]+1c:[ ]+6ff0fff0[ ]+nop
[0]+20 <start3>:
[ ]+20:[ ]+ebffea30[ ]+pta/l 8 <start4>,tr3
[ ]+24:[ ]+6ff0fff0[ ]+nop

View File

@ -0,0 +1,39 @@
#as: --isa=shmedia -abi=64 -expand-pt32
#objdump: -dr
#source: pt-2.s
#name: Inter-segment PT, 64-bit with -expand-pt32.
.*: file format .*-sh64
Disassembly of section \.text:
0+ <start>:
[ ]+0:[ ]+6ff0fff0[ ]+nop
0+4 <start1>:
[ ]+4:[ ]+6ff0fff0[ ]+nop
0+8 <start4>:
[ ]+8:[ ]+ebfffe50[ ]+pta/l 4 <start1>,tr5
[ ]+c:[ ]+6ff0fff0[ ]+nop
[ ]+10:[ ]+cc000190[ ]+movi 0,r25
[ ]+10:[ ]+R_SH_IMM_MEDLOW16_PCREL \.text\.other\+0xfffffffffffffffd
[ ]+14:[ ]+c8000190[ ]+shori 0,r25
[ ]+14:[ ]+R_SH_IMM_LOW16_PCREL \.text\.other\+0x1
[ ]+18:[ ]+6bf56670[ ]+ptrel/l r25,tr7
[ ]+1c:[ ]+6ff0fff0[ ]+nop
Disassembly of section \.text\.other:
0+ <dummylabel>:
[ ]+0:[ ]+6ff0fff0[ ]+nop
0+4 <start2>:
[ ]+4:[ ]+e8000a40[ ]+pta/l c <start3>,tr4
[ ]+8:[ ]+6ff0fff0[ ]+nop
0+c <start3>:
[ ]+c:[ ]+cc000190[ ]+movi 0,r25
[ ]+c:[ ]+R_SH_IMM_MEDLOW16_PCREL \.text\+0x1
[ ]+10:[ ]+c8000190[ ]+shori 0,r25
[ ]+10:[ ]+R_SH_IMM_LOW16_PCREL \.text\+0x5
[ ]+14:[ ]+6bf56630[ ]+ptrel/l r25,tr3
[ ]+18:[ ]+6ff0fff0[ ]+nop

View File

@ -0,0 +1,34 @@
#as: --isa=shmedia -abi=64 -no-expand
#objdump: -dr
#source: pt-2.s
#name: Inter-segment PT, 64-bit with -no-expand.
.*: file format .*-sh64
Disassembly of section \.text:
0+ <start>:
[ ]+0:[ ]+6ff0fff0[ ]+nop
0+4 <start1>:
[ ]+4:[ ]+6ff0fff0[ ]+nop
0+8 <start4>:
[ ]+8:[ ]+ebfffe50[ ]+pta/l 4 <start1>,tr5
[ ]+c:[ ]+6ff0fff0[ ]+nop
[ ]+10:[ ]+e8000270[ ]+pta/l 10 <start4\+0x8>,tr7
[ ]+10:[ ]+R_SH_PT_16 \.text\.other\+0x5
[ ]+14:[ ]+6ff0fff0[ ]+nop
Disassembly of section \.text\.other:
0+ <dummylabel>:
[ ]+0:[ ]+6ff0fff0[ ]+nop
0+4 <start2>:
[ ]+4:[ ]+e8000a40[ ]+pta/l c <start3>,tr4
[ ]+8:[ ]+6ff0fff0[ ]+nop
0+c <start3>:
[ ]+c:[ ]+e8000630[ ]+pta/l 10 <start3\+0x4>,tr3
[ ]+c:[ ]R_SH_PT_16 \.text\+0x9
[ ]+10:[ ]+6ff0fff0[ ]+nop

View File

@ -0,0 +1,5 @@
! Check that simple constants get expected results.
.mode SHmedia
.text
start:
pta 0x100, tr1

View File

@ -0,0 +1,15 @@
#as: --abi=32
#objdump: -dr
#source: ptc-1.s
#name: PT constant, 32-bit ABI.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+cc000190[ ]+movi 0,r25
[ ]+0:[ ]+R_SH_IMM_MEDLOW16_PCREL \*ABS\*\+0xf8
[ ]+4:[ ]+c8000190[ ]+shori 0,r25
[ ]+4:[ ]+R_SH_IMM_LOW16_PCREL \*ABS\*\+0xfc
[ ]+8:[ ]+6bf56610[ ]+ptrel/l r25,tr1

View File

@ -0,0 +1,12 @@
#as: --abi=32 -no-expand
#objdump: -dr
#source: ptc-1.s
#name: PT constant, 32-bit ABI with -no-expand.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+e8000610[ ]+pta/l 4 <\*ABS\*\+0x4>,tr1
[ ]+0:[ ]+R_SH_PT_16 \*ABS\*\+0x100

View File

@ -0,0 +1,19 @@
#as: --abi=64
#objdump: -dr
#source: ptc-1.s
#name: PT constant, 64-bit ABI.
.*: file format .*-sh64
Disassembly of section \.text:
0+ <start>:
[ ]+0:[ ]+cc000190[ ]+movi 0,r25
[ ]+0:[ ]+R_SH_IMM_HI16_PCREL \*ABS\*\+0xf0
[ ]+4:[ ]+c8000190[ ]+shori 0,r25
[ ]+4:[ ]+R_SH_IMM_MEDHI16_PCREL \*ABS\*\+0xf4
[ ]+8:[ ]+c8000190[ ]+shori 0,r25
[ ]+8:[ ]+R_SH_IMM_MEDLOW16_PCREL \*ABS\*\+0xf8
[ ]+c:[ ]+c8000190[ ]+shori 0,r25
[ ]+c:[ ]+R_SH_IMM_LOW16_PCREL \*ABS\*\+0xfc
[ ]+10:[ ]+6bf56610[ ]+ptrel/l r25,tr1

View File

@ -0,0 +1,15 @@
#as: --abi=64 -expand-pt32
#objdump: -dr
#source: ptc-1.s
#name: PT constant, 64-bit ABI with -expand-pt32.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+cc000190[ ]+movi 0,r25
[ ]+0:[ ]+R_SH_IMM_MEDLOW16_PCREL \*ABS\*\+0xf8
[ ]+4:[ ]+c8000190[ ]+shori 0,r25
[ ]+4:[ ]+R_SH_IMM_LOW16_PCREL \*ABS\*\+0xfc
[ ]+8:[ ]+6bf56610[ ]+ptrel/l r25,tr1

View File

@ -0,0 +1,13 @@
#as: --abi=64 -no-expand
#objdump: -dr
#source: ptc-1.s
#name: PT constant, 64-bit ABI with -no-expand.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+e8000610[ ]+pta/l 4 <\*ABS\*\+0x4>,tr1
[ ]+0:[ ]+R_SH_PT_16 \*ABS\*\+0x100

View File

@ -0,0 +1,8 @@
! PT, PTA, PTB expansion for external symbols.
start:
pt externalsym1 + 40,tr5
pta externalsym2 + 44,tr4
ptb externalsym3 + 48,tr3
pt/u externalsym4 + 52,tr5
pta/u externalsym5 + 56,tr4
ptb/u externalsym6 + 60,tr3

View File

@ -0,0 +1,40 @@
#as: --isa=shmedia --abi=32
#source: ptext-1.s
#objdump: -dr
#name: PT, PTA, PTB expansion for external symbols, 32-bit ABI.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+cc000190[ ]+movi 0,r25
[ ]+0:[ ]+R_SH_IMM_MEDLOW16_PCREL externalsym1\+0x20
[ ]+4:[ ]+c8000190[ ]+shori 0,r25
[ ]+4:[ ]+R_SH_IMM_LOW16_PCREL externalsym1\+0x24
[ ]+8:[ ]+6bf56650[ ]+ptrel/l r25,tr5
[ ]+c:[ ]+cc000190[ ]+movi 0,r25
[ ]+c:[ ]+R_SH_IMM_MEDLOW16_PCREL externalsym2\+0x24
[ ]+10:[ ]+c8000190[ ]+shori 0,r25
[ ]+10:[ ]+R_SH_IMM_LOW16_PCREL externalsym2\+0x28
[ ]+14:[ ]+6bf56640[ ]+ptrel/l r25,tr4
[ ]+18:[ ]+cc000190[ ]+movi 0,r25
[ ]+18:[ ]+R_SH_IMM_MEDLOW16_PCREL externalsym3\+0x28
[ ]+1c:[ ]+c8000190[ ]+shori 0,r25
[ ]+1c:[ ]+R_SH_IMM_LOW16_PCREL externalsym3\+0x2c
[ ]+20:[ ]+6bf56630[ ]+ptrel/l r25,tr3
[ ]+24:[ ]+cc000190[ ]+movi 0,r25
[ ]+24:[ ]+R_SH_IMM_MEDLOW16_PCREL externalsym4\+0x2c
[ ]+28:[ ]+c8000190[ ]+shori 0,r25
[ ]+28:[ ]+R_SH_IMM_LOW16_PCREL externalsym4\+0x30
[ ]+2c:[ ]+6bf56450[ ]+ptrel/u r25,tr5
[ ]+30:[ ]+cc000190[ ]+movi 0,r25
[ ]+30:[ ]+R_SH_IMM_MEDLOW16_PCREL externalsym5\+0x30
[ ]+34:[ ]+c8000190[ ]+shori 0,r25
[ ]+34:[ ]+R_SH_IMM_LOW16_PCREL externalsym5\+0x34
[ ]+38:[ ]+6bf56440[ ]+ptrel/u r25,tr4
[ ]+3c:[ ]+cc000190[ ]+movi 0,r25
[ ]+3c:[ ]+R_SH_IMM_MEDLOW16_PCREL externalsym6\+0x34
[ ]+40:[ ]+c8000190[ ]+shori 0,r25
[ ]+40:[ ]+R_SH_IMM_LOW16_PCREL externalsym6\+0x38
[ ]+44:[ ]+6bf56430[ ]+ptrel/u r25,tr3

View File

@ -0,0 +1,22 @@
#as: --isa=shmedia --abi=32 -no-expand
#source: ptext-1.s
#objdump: -dr
#name: PT, PTA, PTB non-expansion for external symbols, 32-bit ABI.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+e8000250[ ]+pta/l 0 <start>,tr5
[ ]+0:[ ]+R_SH_PT_16 externalsym1\+0x28
[ ]+4:[ ]+e8000640[ ]+pta/l 8 <start\+0x8>,tr4
[ ]+4:[ ]+R_SH_PT_16 externalsym2\+0x2c
[ ]+8:[ ]+ec000630[ ]+ptb/l c <start\+0xc>,tr3
[ ]+8:[ ]+R_SH_PT_16 externalsym3\+0x30
[ ]+c:[ ]+e8000050[ ]+pta/u c <start\+0xc>,tr5
[ ]+c:[ ]+R_SH_PT_16 externalsym4\+0x34
[ ]+10:[ ]+e8000440[ ]+pta/u 14 <start\+0x14>,tr4
[ ]+10:[ ]+R_SH_PT_16 externalsym5\+0x38
[ ]+14:[ ]+ec000430[ ]+ptb/u 18 <start\+0x18>,tr3
[ ]+14:[ ]+R_SH_PT_16 externalsym6\+0x3c

View File

@ -0,0 +1,64 @@
#as: --isa=shmedia --abi=64
#source: ptext-1.s
#objdump: -dr
#name: PT, PTA, PTB expansion for external symbols, 64-bit ABI.
.*: file format .*-sh64
Disassembly of section \.text:
[0]+ <start>:
[ ]+0:[ ]+cc000190[ ]+movi 0,r25
[ ]+0:[ ]+R_SH_IMM_HI16_PCREL externalsym1\+0x18
[ ]+4:[ ]+c8000190[ ]+shori 0,r25
[ ]+4:[ ]+R_SH_IMM_MEDHI16_PCREL externalsym1\+0x1c
[ ]+8:[ ]+c8000190[ ]+shori 0,r25
[ ]+8:[ ]+R_SH_IMM_MEDLOW16_PCREL externalsym1\+0x20
[ ]+c:[ ]+c8000190[ ]+shori 0,r25
[ ]+c:[ ]+R_SH_IMM_LOW16_PCREL externalsym1\+0x24
[ ]+10:[ ]+6bf56650[ ]+ptrel/l r25,tr5
[ ]+14:[ ]+cc000190[ ]+movi 0,r25
[ ]+14:[ ]+R_SH_IMM_HI16_PCREL externalsym2\+0x1c
[ ]+18:[ ]+c8000190[ ]+shori 0,r25
[ ]+18:[ ]+R_SH_IMM_MEDHI16_PCREL externalsym2\+0x20
[ ]+1c:[ ]+c8000190[ ]+shori 0,r25
[ ]+1c:[ ]+R_SH_IMM_MEDLOW16_PCREL externalsym2\+0x24
[ ]+20:[ ]+c8000190[ ]+shori 0,r25
[ ]+20:[ ]+R_SH_IMM_LOW16_PCREL externalsym2\+0x28
[ ]+24:[ ]+6bf56640[ ]+ptrel/l r25,tr4
[ ]+28:[ ]+cc000190[ ]+movi 0,r25
[ ]+28:[ ]+R_SH_IMM_HI16_PCREL externalsym3\+0x20
[ ]+2c:[ ]+c8000190[ ]+shori 0,r25
[ ]+2c:[ ]+R_SH_IMM_MEDHI16_PCREL externalsym3\+0x24
[ ]+30:[ ]+c8000190[ ]+shori 0,r25
[ ]+30:[ ]+R_SH_IMM_MEDLOW16_PCREL externalsym3\+0x28
[ ]+34:[ ]+c8000190[ ]+shori 0,r25
[ ]+34:[ ]+R_SH_IMM_LOW16_PCREL externalsym3\+0x2c
[ ]+38:[ ]+6bf56630[ ]+ptrel/l r25,tr3
[ ]+3c:[ ]+cc000190[ ]+movi 0,r25
[ ]+3c:[ ]+R_SH_IMM_HI16_PCREL externalsym4\+0x24
[ ]+40:[ ]+c8000190[ ]+shori 0,r25
[ ]+40:[ ]+R_SH_IMM_MEDHI16_PCREL externalsym4\+0x28
[ ]+44:[ ]+c8000190[ ]+shori 0,r25
[ ]+44:[ ]+R_SH_IMM_MEDLOW16_PCREL externalsym4\+0x2c
[ ]+48:[ ]+c8000190[ ]+shori 0,r25
[ ]+48:[ ]+R_SH_IMM_LOW16_PCREL externalsym4\+0x30
[ ]+4c:[ ]+6bf56450[ ]+ptrel/u r25,tr5
[ ]+50:[ ]+cc000190[ ]+movi 0,r25
[ ]+50:[ ]+R_SH_IMM_HI16_PCREL externalsym5\+0x28
[ ]+54:[ ]+c8000190[ ]+shori 0,r25
[ ]+54:[ ]+R_SH_IMM_MEDHI16_PCREL externalsym5\+0x2c
[ ]+58:[ ]+c8000190[ ]+shori 0,r25
[ ]+58:[ ]+R_SH_IMM_MEDLOW16_PCREL externalsym5\+0x30
[ ]+5c:[ ]+c8000190[ ]+shori 0,r25
[ ]+5c:[ ]+R_SH_IMM_LOW16_PCREL externalsym5\+0x34
[ ]+60:[ ]+6bf56440[ ]+ptrel/u r25,tr4
[ ]+64:[ ]+cc000190[ ]+movi 0,r25
[ ]+64:[ ]+R_SH_IMM_HI16_PCREL externalsym6\+0x2c
[ ]+68:[ ]+c8000190[ ]+shori 0,r25
[ ]+68:[ ]+R_SH_IMM_MEDHI16_PCREL externalsym6\+0x30
[ ]+6c:[ ]+c8000190[ ]+shori 0,r25
[ ]+6c:[ ]+R_SH_IMM_MEDLOW16_PCREL externalsym6\+0x34
[ ]+70:[ ]+c8000190[ ]+shori 0,r25
[ ]+70:[ ]+R_SH_IMM_LOW16_PCREL externalsym6\+0x38
[ ]+74:[ ]+6bf56430[ ]+ptrel/u r25,tr3

Some files were not shown because too many files have changed in this diff Show More