aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-04-16 15:29:39 +0930
committerAlan Modra <amodra@gmail.com>2018-04-16 15:29:39 +0930
commit211dc24b8744ed14ee5c293e7ac164d02e1fa1fe (patch)
treefcddbd29b4505638de6f018301a674816da8e025
parent4db9937a27496d2f62ac1dde76565809acd4ecde (diff)
downloadgdb-211dc24b8744ed14ee5c293e7ac164d02e1fa1fe.zip
gdb-211dc24b8744ed14ee5c293e7ac164d02e1fa1fe.tar.gz
gdb-211dc24b8744ed14ee5c293e7ac164d02e1fa1fe.tar.bz2
Remove sh5 and sh64 support
include/ * dis-asm.h: Remove sh5 and sh64 support. bfd/ * Makefile.am: Remove sh5 and sh64 support. * archures.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * cpu-sh.c: Likewise. * elf32-sh-relocs.h: Likewise. * elf32-sh.c: Likewise. * targets.c: Likewise. * elf32-sh64-com.c: Delete. * elf32-sh64.c: Delete. * elf32-sh64.h: Delete. * elf64-sh64.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. opcodes/ * Makefile.am: Remove sh5 and sh64 support. * configure.ac: Likewise. * disassemble.c: Likewise. * disassemble.h: Likewise. * sh-dis.c: Likewise. * sh64-dis.c: Delete. * sh64-opc.c: Delete. * sh64-opc.h: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/POTFILES.in: Regenerate. bintuils/ * testsuite/binutils-all/objcopy.exp: Remove sh5 and sh64 support. gas/ * Makefile.am: Remove sh5 and sh64 support. * config/tc-sh.c: Likewise. * configure.tgt: Likewise. * doc/Makefile.am: Likewise. * doc/as.texinfo: Likewise. * testsuite/gas/cfi/cfi.exp: Likewise. * testsuite/gas/sh/basic.exp: Likewise. * config/tc-sh64.c: Delete. * config/tc-sh64.h: Delete. * doc/c-sh64.texi: Delete. * testsuite/gas/sh/sh64/abi-32.d: Delete. * testsuite/gas/sh/sh64/abi-32.s: Delete. * testsuite/gas/sh/sh64/abi-64.d: Delete. * testsuite/gas/sh/sh64/abi-64.s: Delete. * testsuite/gas/sh/sh64/basic-1.d: Delete. * testsuite/gas/sh/sh64/basic-1.s: Delete. * testsuite/gas/sh/sh64/case-1.d: Delete. * testsuite/gas/sh/sh64/case-1.s: Delete. * testsuite/gas/sh/sh64/case-noexp-1.d: Delete. * testsuite/gas/sh/sh64/crange1-1.d: Delete. * testsuite/gas/sh/sh64/crange1-2.d: Delete. * testsuite/gas/sh/sh64/crange1.s: Delete. * testsuite/gas/sh/sh64/crange2-1.d: Delete. * testsuite/gas/sh/sh64/crange2-2.d: Delete. * testsuite/gas/sh/sh64/crange2-noexp-1.d: Delete. * testsuite/gas/sh/sh64/crange2.s: Delete. * testsuite/gas/sh/sh64/crange3-1.d: Delete. * testsuite/gas/sh/sh64/crange3.s: Delete. * testsuite/gas/sh/sh64/crange4-1.d: Delete. * testsuite/gas/sh/sh64/crange4.s: Delete. * testsuite/gas/sh/sh64/crange5-1.d: Delete. * testsuite/gas/sh/sh64/crange5.s: Delete. * testsuite/gas/sh/sh64/creg-1.d: Delete. * testsuite/gas/sh/sh64/creg-1.s: Delete. * testsuite/gas/sh/sh64/creg-2.d: Delete. * testsuite/gas/sh/sh64/creg-2.s: Delete. * testsuite/gas/sh/sh64/datal-1.s: Delete. * testsuite/gas/sh/sh64/datal-2.d: Delete. * testsuite/gas/sh/sh64/datal-2.s: Delete. * testsuite/gas/sh/sh64/datal-3.s: Delete. * testsuite/gas/sh/sh64/datal32-1.d: Delete. * testsuite/gas/sh/sh64/datal32-3.d: Delete. * testsuite/gas/sh/sh64/datal64-1.d: Delete. * testsuite/gas/sh/sh64/datal64-3.d: Delete. * testsuite/gas/sh/sh64/eh-1.d: Delete. * testsuite/gas/sh/sh64/eh-1.s: Delete. * testsuite/gas/sh/sh64/endian-1.d: Delete. * testsuite/gas/sh/sh64/endian-1.s: Delete. * testsuite/gas/sh/sh64/endian-2.d: Delete. * testsuite/gas/sh/sh64/endian-2.s: Delete. * testsuite/gas/sh/sh64/err-1.s: Delete. * testsuite/gas/sh/sh64/err-2.s: Delete. * testsuite/gas/sh/sh64/err-3.s: Delete. * testsuite/gas/sh/sh64/err-4.s: Delete. * testsuite/gas/sh/sh64/err-abi-32.s: Delete. * testsuite/gas/sh/sh64/err-abi-64.s: Delete. * testsuite/gas/sh/sh64/err-dsp.s: Delete. * testsuite/gas/sh/sh64/err-movi-noexp-1.s: Delete. * testsuite/gas/sh/sh64/err-noexp-cmd1.s: Delete. * testsuite/gas/sh/sh64/err-pt-1.s: Delete. * testsuite/gas/sh/sh64/err-pt32-cmd1.s: Delete. * testsuite/gas/sh/sh64/err-pt32-cmd2.s: Delete. * testsuite/gas/sh/sh64/err-pt32-cmd3.s: Delete. * testsuite/gas/sh/sh64/err-ptb-1.s: Delete. * testsuite/gas/sh/sh64/err-ptb-2.s: Delete. * testsuite/gas/sh/sh64/err.exp: Delete. * testsuite/gas/sh/sh64/immexpr1.s: Delete. * testsuite/gas/sh/sh64/immexpr2.s: Delete. * testsuite/gas/sh/sh64/immexpr32-1.d: Delete. * testsuite/gas/sh/sh64/immexpr32-2.d: Delete. * testsuite/gas/sh/sh64/immexpr64-1.d: Delete. * testsuite/gas/sh/sh64/immexpr64-2.d: Delete. * testsuite/gas/sh/sh64/lineno.d: Delete. * testsuite/gas/sh/sh64/lineno.s: Delete. * testsuite/gas/sh/sh64/localcom-1.d: Delete. * testsuite/gas/sh/sh64/localcom-1.s: Delete. * testsuite/gas/sh/sh64/mix-1.d: Delete. * testsuite/gas/sh/sh64/mix-1.s: Delete. * testsuite/gas/sh/sh64/mix-noexp-1.d: Delete. * testsuite/gas/sh/sh64/movi-1.s: Delete. * testsuite/gas/sh/sh64/movi-2.s: Delete. * testsuite/gas/sh/sh64/movi-3.d: Delete. * testsuite/gas/sh/sh64/movi-3.s: Delete. * testsuite/gas/sh/sh64/movi32-1.d: Delete. * testsuite/gas/sh/sh64/movi32-2.d: Delete. * testsuite/gas/sh/sh64/movi32-noexp-2.d: Delete. * testsuite/gas/sh/sh64/movi64-1.d: Delete. * testsuite/gas/sh/sh64/movi64-2.d: Delete. * testsuite/gas/sh/sh64/movi64-2.s: Delete. * testsuite/gas/sh/sh64/movi64-3.d: Delete. * testsuite/gas/sh/sh64/movi64-noexp-2.d: Delete. * testsuite/gas/sh/sh64/pt-1.d: Delete. * testsuite/gas/sh/sh64/pt-1.s: Delete. * testsuite/gas/sh/sh64/pt-2.s: Delete. * testsuite/gas/sh/sh64/pt-noexp-1.d: Delete. * testsuite/gas/sh/sh64/pt32-1.d: Delete. * testsuite/gas/sh/sh64/pt32-noexp-2.d: Delete. * testsuite/gas/sh/sh64/pt64-1.d: Delete. * testsuite/gas/sh/sh64/pt64-32-1.d: Delete. * testsuite/gas/sh/sh64/pt64-32-2.d: Delete. * testsuite/gas/sh/sh64/pt64-noexp-2.d: Delete. * testsuite/gas/sh/sh64/ptc-1.s: Delete. * testsuite/gas/sh/sh64/ptc32-1.d: Delete. * testsuite/gas/sh/sh64/ptc32-noexp-1.d: Delete. * testsuite/gas/sh/sh64/ptc64-1.d: Delete. * testsuite/gas/sh/sh64/ptc64-32-1.d: Delete. * testsuite/gas/sh/sh64/ptc64-noexp-1.d: Delete. * testsuite/gas/sh/sh64/ptext-1.s: Delete. * testsuite/gas/sh/sh64/ptext32-1.d: Delete. * testsuite/gas/sh/sh64/ptext32-noexp-1.d: Delete. * testsuite/gas/sh/sh64/ptext64-1.d: Delete. * testsuite/gas/sh/sh64/ptext64-32-1.d: Delete. * testsuite/gas/sh/sh64/ptext64-noexp-1.d: Delete. * testsuite/gas/sh/sh64/rel-1.s: Delete. * testsuite/gas/sh/sh64/rel-2.s: Delete. * testsuite/gas/sh/sh64/rel-3.s: Delete. * testsuite/gas/sh/sh64/rel-4.s: Delete. * testsuite/gas/sh/sh64/rel-5.s: Delete. * testsuite/gas/sh/sh64/rel32-1.d: Delete. * testsuite/gas/sh/sh64/rel32-2.d: Delete. * testsuite/gas/sh/sh64/rel32-3.d: Delete. * testsuite/gas/sh/sh64/rel32-4.d: Delete. * testsuite/gas/sh/sh64/rel32-5.d: Delete. * testsuite/gas/sh/sh64/rel64-1.d: Delete. * testsuite/gas/sh/sh64/rel64-2.d: Delete. * testsuite/gas/sh/sh64/rel64-3.d: Delete. * testsuite/gas/sh/sh64/rel64-4.d: Delete. * testsuite/gas/sh/sh64/rel64-5.d: Delete. * testsuite/gas/sh/sh64/relax-1.d: Delete. * testsuite/gas/sh/sh64/relax-1.s: Delete. * testsuite/gas/sh/sh64/relax-2.d: Delete. * testsuite/gas/sh/sh64/relax-2.s: Delete. * testsuite/gas/sh/sh64/relax-3.d: Delete. * testsuite/gas/sh/sh64/relax-3.s: Delete. * testsuite/gas/sh/sh64/sh64.exp: Delete. * testsuite/gas/sh/sh64/shift-1.s: Delete. * testsuite/gas/sh/sh64/shift-2.s: Delete. * testsuite/gas/sh/sh64/shift-3.s: Delete. * testsuite/gas/sh/sh64/shift32-1.d: Delete. * testsuite/gas/sh/sh64/shift32-3.d: Delete. * testsuite/gas/sh/sh64/shift32-noexp-3.d: Delete. * testsuite/gas/sh/sh64/shift64-1.d: Delete. * testsuite/gas/sh/sh64/shift64-2.d: Delete. * testsuite/gas/sh/sh64/shift64-3.d: Delete. * testsuite/gas/sh/sh64/shift64-noexp-3.d: Delete. * testsuite/gas/sh/sh64/syntax-1.d: Delete. * testsuite/gas/sh/sh64/syntax-1.s: Delete. * testsuite/gas/sh/sh64/syntax-2.d: Delete. * testsuite/gas/sh/sh64/syntax-2.s: Delete. * testsuite/gas/sh/sh64/ua-1.s: Delete. * testsuite/gas/sh/sh64/ua32-1.d: Delete. * testsuite/gas/sh/sh64/ua64-1.d: Delete. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * po/POTFILES.in: Regenerate. ld/ * Makefile.am: Remove sh5 and sh64 support. * configure.tgt: Likewise. * ldlang.c: Likewise. * testsuite/ld-elfcomm/elfcomm.exp: Likewise. * testsuite/ld-gc/gc.exp: Likewise. * testsuite/ld-gc/pr13683.d: Likewise. * testsuite/ld-scripts/crossref.exp: Likewise. * testsuite/ld-selective/selective.exp: Likewise. * testsuite/ld-sh/ld-r-1.d: Likewise. * testsuite/ld-sh/rd-sh.exp: Likewise. * testsuite/ld-sh/sh.exp: Likewise. * testsuite/ld-srec/srec.exp: Likewise. * testsuite/ld-undefined/undefined.exp: Likewise. * emulparams/shelf32.sh: Delete. * emulparams/shelf32_linux.sh: Delete. * emulparams/shelf32_nbsd.sh: Delete. * emulparams/shelf64.sh: Delete. * emulparams/shelf64_nbsd.sh: Delete. * emulparams/shlelf32.sh: Delete. * emulparams/shlelf32_linux.sh: Delete. * emulparams/shlelf32_nbsd.sh: Delete. * emulparams/shlelf64.sh: Delete. * emulparams/shlelf64_nbsd.sh: Delete. * emultempl/sh64elf.em: Delete. * testsuite/ld-sh/sh64/abi32.sd: Delete. * testsuite/ld-sh/sh64/abi32.xd: Delete. * testsuite/ld-sh/sh64/abi64.sd: Delete. * testsuite/ld-sh/sh64/abi64.xd: Delete. * testsuite/ld-sh/sh64/abixx-noexp.sd: Delete. * testsuite/ld-sh/sh64/cmpct1.sd: Delete. * testsuite/ld-sh/sh64/cmpct1.xd: Delete. * testsuite/ld-sh/sh64/crange-1.s: Delete. * testsuite/ld-sh/sh64/crange-2a.s: Delete. * testsuite/ld-sh/sh64/crange-2b.s: Delete. * testsuite/ld-sh/sh64/crange-2c.s: Delete. * testsuite/ld-sh/sh64/crange-2d.s: Delete. * testsuite/ld-sh/sh64/crange-2e.s: Delete. * testsuite/ld-sh/sh64/crange-2f.s: Delete. * testsuite/ld-sh/sh64/crange-2g.s: Delete. * testsuite/ld-sh/sh64/crange-2h.s: Delete. * testsuite/ld-sh/sh64/crange-2i.s: Delete. * testsuite/ld-sh/sh64/crange1.rd: Delete. * testsuite/ld-sh/sh64/crange2.rd: Delete. * testsuite/ld-sh/sh64/crange3-cmpct.rd: Delete. * testsuite/ld-sh/sh64/crange3-media.rd: Delete. * testsuite/ld-sh/sh64/crange3.dd: Delete. * testsuite/ld-sh/sh64/crange3.rd: Delete. * testsuite/ld-sh/sh64/crangerel1.rd: Delete. * testsuite/ld-sh/sh64/crangerel2.rd: Delete. * testsuite/ld-sh/sh64/dlsection-1.s: Delete. * testsuite/ld-sh/sh64/dlsection.sd: Delete. * testsuite/ld-sh/sh64/endian.dbd: Delete. * testsuite/ld-sh/sh64/endian.dld: Delete. * testsuite/ld-sh/sh64/endian.ld: Delete. * testsuite/ld-sh/sh64/endian.s: Delete. * testsuite/ld-sh/sh64/endian.sbd: Delete. * testsuite/ld-sh/sh64/endian.sld: Delete. * testsuite/ld-sh/sh64/gotplt.d: Delete. * testsuite/ld-sh/sh64/gotplt.map: Delete. * testsuite/ld-sh/sh64/gotplt.s: Delete. * testsuite/ld-sh/sh64/init-cmpct.d: Delete. * testsuite/ld-sh/sh64/init-media.d: Delete. * testsuite/ld-sh/sh64/init.s: Delete. * testsuite/ld-sh/sh64/init64.d: Delete. * testsuite/ld-sh/sh64/mix1-noexp.sd: Delete. * testsuite/ld-sh/sh64/mix1.sd: Delete. * testsuite/ld-sh/sh64/mix1.xd: Delete. * testsuite/ld-sh/sh64/mix2-noexp.sd: Delete. * testsuite/ld-sh/sh64/mix2.sd: Delete. * testsuite/ld-sh/sh64/mix2.xd: Delete. * testsuite/ld-sh/sh64/rd-sh64.exp: Delete. * testsuite/ld-sh/sh64/rel-1.s: Delete. * testsuite/ld-sh/sh64/rel-2.s: Delete. * testsuite/ld-sh/sh64/rel32.xd: Delete. * testsuite/ld-sh/sh64/rel64.xd: Delete. * testsuite/ld-sh/sh64/relax.exp: Delete. * testsuite/ld-sh/sh64/relax1.s: Delete. * testsuite/ld-sh/sh64/relax2.s: Delete. * testsuite/ld-sh/sh64/relax3.s: Delete. * testsuite/ld-sh/sh64/relax4.s: Delete. * testsuite/ld-sh/sh64/reldl-1.s: Delete. * testsuite/ld-sh/sh64/reldl-2.s: Delete. * testsuite/ld-sh/sh64/reldl32.rd: Delete. * testsuite/ld-sh/sh64/reldl64.rd: Delete. * testsuite/ld-sh/sh64/relfail.exp: Delete. * testsuite/ld-sh/sh64/relfail.s: Delete. * testsuite/ld-sh/sh64/sh64-1.s: Delete. * testsuite/ld-sh/sh64/sh64-2.s: Delete. * testsuite/ld-sh/sh64/sh64.exp: Delete. * testsuite/ld-sh/sh64/shcmp-1.s: Delete. * testsuite/ld-sh/sh64/shdl-1.s: Delete. * testsuite/ld-sh/sh64/shdl-2.s: Delete. * testsuite/ld-sh/sh64/shdl32.xd: Delete. * testsuite/ld-sh/sh64/shdl64.sd: Delete. * testsuite/ld-sh/sh64/shdl64.xd: Delete. * testsuite/ld-sh/sh64/shmix-1.s: Delete. * testsuite/ld-sh/sh64/shmix-2.s: Delete. * testsuite/ld-sh/sh64/shmix-3.s: Delete. * testsuite/ld-sh/sh64/stobin-0-dso.d: Delete. * testsuite/ld-sh/sh64/stobin-1.d: Delete. * testsuite/ld-sh/sh64/stobin.s: Delete. * testsuite/ld-sh/sh64/stolib.s: Delete. * Makefile.in: Regenerate. * po/BLD-POTFILES.in: Regenerate.
-rw-r--r--bfd/ChangeLog19
-rw-r--r--bfd/Makefile.am6
-rw-r--r--bfd/Makefile.in9
-rw-r--r--bfd/archures.c1
-rw-r--r--bfd/bfd-in2.h1
-rw-r--r--bfd/config.bfd78
-rwxr-xr-xbfd/configure12
-rw-r--r--bfd/configure.ac12
-rw-r--r--bfd/cpu-sh.c18
-rw-r--r--bfd/elf32-sh-relocs.h783
-rw-r--r--bfd/elf32-sh.c643
-rw-r--r--bfd/elf32-sh64-com.c245
-rw-r--r--bfd/elf32-sh64.c814
-rw-r--r--bfd/elf32-sh64.h88
-rw-r--r--bfd/elf64-sh64.c3987
-rw-r--r--bfd/po/SRC-POTFILES.in3
-rw-r--r--bfd/targets.c26
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/testsuite/binutils-all/objcopy.exp7
-rw-r--r--gas/ChangeLog158
-rw-r--r--gas/Makefile.am2
-rw-r--r--gas/Makefile.in17
-rw-r--r--gas/config/tc-sh.c562
-rw-r--r--gas/config/tc-sh64.c3526
-rw-r--r--gas/config/tc-sh64.h226
-rw-r--r--gas/configure.tgt7
-rw-r--r--gas/doc/Makefile.am1
-rw-r--r--gas/doc/Makefile.in1
-rw-r--r--gas/doc/as.texinfo2
-rw-r--r--gas/doc/c-sh64.texi219
-rw-r--r--gas/po/POTFILES.in2
-rw-r--r--gas/testsuite/gas/cfi/cfi.exp6
-rw-r--r--gas/testsuite/gas/sh/basic.exp21
-rw-r--r--gas/testsuite/gas/sh/sh64/abi-32.d10
-rw-r--r--gas/testsuite/gas/sh/sh64/abi-32.s7
-rw-r--r--gas/testsuite/gas/sh/sh64/abi-64.d9
-rw-r--r--gas/testsuite/gas/sh/sh64/abi-64.s7
-rw-r--r--gas/testsuite/gas/sh/sh64/basic-1.d234
-rw-r--r--gas/testsuite/gas/sh/sh64/basic-1.s233
-rw-r--r--gas/testsuite/gas/sh/sh64/case-1.d23
-rw-r--r--gas/testsuite/gas/sh/sh64/case-1.s12
-rw-r--r--gas/testsuite/gas/sh/sh64/case-noexp-1.d18
-rw-r--r--gas/testsuite/gas/sh/sh64/crange1-1.d104
-rw-r--r--gas/testsuite/gas/sh/sh64/crange1-2.d108
-rw-r--r--gas/testsuite/gas/sh/sh64/crange1.s210
-rw-r--r--gas/testsuite/gas/sh/sh64/crange2-1.d43
-rw-r--r--gas/testsuite/gas/sh/sh64/crange2-2.d22
-rw-r--r--gas/testsuite/gas/sh/sh64/crange2-noexp-1.d43
-rw-r--r--gas/testsuite/gas/sh/sh64/crange2.s34
-rw-r--r--gas/testsuite/gas/sh/sh64/crange3-1.d24
-rw-r--r--gas/testsuite/gas/sh/sh64/crange3.s34
-rw-r--r--gas/testsuite/gas/sh/sh64/crange4-1.d19
-rw-r--r--gas/testsuite/gas/sh/sh64/crange4.s8
-rw-r--r--gas/testsuite/gas/sh/sh64/crange5-1.d12
-rw-r--r--gas/testsuite/gas/sh/sh64/crange5.s26
-rw-r--r--gas/testsuite/gas/sh/sh64/creg-1.d77
-rw-r--r--gas/testsuite/gas/sh/sh64/creg-1.s79
-rw-r--r--gas/testsuite/gas/sh/sh64/creg-2.d17
-rw-r--r--gas/testsuite/gas/sh/sh64/creg-2.s14
-rw-r--r--gas/testsuite/gas/sh/sh64/datal-1.s41
-rw-r--r--gas/testsuite/gas/sh/sh64/datal-2.d44
-rw-r--r--gas/testsuite/gas/sh/sh64/datal-2.s46
-rw-r--r--gas/testsuite/gas/sh/sh64/datal-3.s48
-rw-r--r--gas/testsuite/gas/sh/sh64/datal32-1.d45
-rw-r--r--gas/testsuite/gas/sh/sh64/datal32-3.d94
-rw-r--r--gas/testsuite/gas/sh/sh64/datal64-1.d50
-rw-r--r--gas/testsuite/gas/sh/sh64/datal64-3.d123
-rw-r--r--gas/testsuite/gas/sh/sh64/eh-1.d14
-rw-r--r--gas/testsuite/gas/sh/sh64/eh-1.s7
-rw-r--r--gas/testsuite/gas/sh/sh64/endian-1.d9
-rw-r--r--gas/testsuite/gas/sh/sh64/endian-1.s7
-rw-r--r--gas/testsuite/gas/sh/sh64/endian-2.d10
-rw-r--r--gas/testsuite/gas/sh/sh64/endian-2.s7
-rw-r--r--gas/testsuite/gas/sh/sh64/err-1.s47
-rw-r--r--gas/testsuite/gas/sh/sh64/err-2.s16
-rw-r--r--gas/testsuite/gas/sh/sh64/err-3.s36
-rw-r--r--gas/testsuite/gas/sh/sh64/err-4.s27
-rw-r--r--gas/testsuite/gas/sh/sh64/err-abi-32.s10
-rw-r--r--gas/testsuite/gas/sh/sh64/err-abi-64.s10
-rw-r--r--gas/testsuite/gas/sh/sh64/err-dsp.s15
-rw-r--r--gas/testsuite/gas/sh/sh64/err-movi-noexp-1.s24
-rw-r--r--gas/testsuite/gas/sh/sh64/err-noexp-cmd1.s10
-rw-r--r--gas/testsuite/gas/sh/sh64/err-pt-1.s18
-rw-r--r--gas/testsuite/gas/sh/sh64/err-pt32-cmd1.s10
-rw-r--r--gas/testsuite/gas/sh/sh64/err-pt32-cmd2.s10
-rw-r--r--gas/testsuite/gas/sh/sh64/err-pt32-cmd3.s10
-rw-r--r--gas/testsuite/gas/sh/sh64/err-ptb-1.s34
-rw-r--r--gas/testsuite/gas/sh/sh64/err-ptb-2.s34
-rw-r--r--gas/testsuite/gas/sh/sh64/err.exp9
-rw-r--r--gas/testsuite/gas/sh/sh64/immexpr1.s85
-rw-r--r--gas/testsuite/gas/sh/sh64/immexpr2.s16
-rw-r--r--gas/testsuite/gas/sh/sh64/immexpr32-1.d67
-rw-r--r--gas/testsuite/gas/sh/sh64/immexpr32-2.d11
-rw-r--r--gas/testsuite/gas/sh/sh64/immexpr64-1.d68
-rw-r--r--gas/testsuite/gas/sh/sh64/immexpr64-2.d11
-rw-r--r--gas/testsuite/gas/sh/sh64/lineno.d19
-rw-r--r--gas/testsuite/gas/sh/sh64/lineno.s7
-rw-r--r--gas/testsuite/gas/sh/sh64/localcom-1.d30
-rw-r--r--gas/testsuite/gas/sh/sh64/localcom-1.s26
-rw-r--r--gas/testsuite/gas/sh/sh64/mix-1.d42
-rw-r--r--gas/testsuite/gas/sh/sh64/mix-1.s21
-rw-r--r--gas/testsuite/gas/sh/sh64/mix-noexp-1.d33
-rw-r--r--gas/testsuite/gas/sh/sh64/movi-1.s20
-rw-r--r--gas/testsuite/gas/sh/sh64/movi-2.s28
-rw-r--r--gas/testsuite/gas/sh/sh64/movi-3.d18
-rw-r--r--gas/testsuite/gas/sh/sh64/movi-3.s10
-rw-r--r--gas/testsuite/gas/sh/sh64/movi32-1.d35
-rw-r--r--gas/testsuite/gas/sh/sh64/movi32-2.d36
-rw-r--r--gas/testsuite/gas/sh/sh64/movi32-noexp-2.d28
-rw-r--r--gas/testsuite/gas/sh/sh64/movi64-1.d44
-rw-r--r--gas/testsuite/gas/sh/sh64/movi64-2.d30
-rw-r--r--gas/testsuite/gas/sh/sh64/movi64-2.s10
-rw-r--r--gas/testsuite/gas/sh/sh64/movi64-3.d52
-rw-r--r--gas/testsuite/gas/sh/sh64/movi64-noexp-2.d28
-rw-r--r--gas/testsuite/gas/sh/sh64/pt-1.d26
-rw-r--r--gas/testsuite/gas/sh/sh64/pt-1.s17
-rw-r--r--gas/testsuite/gas/sh/sh64/pt-2.s22
-rw-r--r--gas/testsuite/gas/sh/sh64/pt-noexp-1.d27
-rw-r--r--gas/testsuite/gas/sh/sh64/pt32-1.d39
-rw-r--r--gas/testsuite/gas/sh/sh64/pt32-noexp-2.d34
-rw-r--r--gas/testsuite/gas/sh/sh64/pt64-1.d47
-rw-r--r--gas/testsuite/gas/sh/sh64/pt64-32-1.d27
-rw-r--r--gas/testsuite/gas/sh/sh64/pt64-32-2.d39
-rw-r--r--gas/testsuite/gas/sh/sh64/pt64-noexp-2.d34
-rw-r--r--gas/testsuite/gas/sh/sh64/ptc-1.s5
-rw-r--r--gas/testsuite/gas/sh/sh64/ptc32-1.d15
-rw-r--r--gas/testsuite/gas/sh/sh64/ptc32-noexp-1.d12
-rw-r--r--gas/testsuite/gas/sh/sh64/ptc64-1.d19
-rw-r--r--gas/testsuite/gas/sh/sh64/ptc64-32-1.d15
-rw-r--r--gas/testsuite/gas/sh/sh64/ptc64-noexp-1.d13
-rw-r--r--gas/testsuite/gas/sh/sh64/ptext-1.s8
-rw-r--r--gas/testsuite/gas/sh/sh64/ptext32-1.d40
-rw-r--r--gas/testsuite/gas/sh/sh64/ptext32-noexp-1.d22
-rw-r--r--gas/testsuite/gas/sh/sh64/ptext64-1.d64
-rw-r--r--gas/testsuite/gas/sh/sh64/ptext64-32-1.d40
-rw-r--r--gas/testsuite/gas/sh/sh64/ptext64-noexp-1.d22
-rw-r--r--gas/testsuite/gas/sh/sh64/rel-1.s137
-rw-r--r--gas/testsuite/gas/sh/sh64/rel-2.s138
-rw-r--r--gas/testsuite/gas/sh/sh64/rel-3.s137
-rw-r--r--gas/testsuite/gas/sh/sh64/rel-4.s138
-rw-r--r--gas/testsuite/gas/sh/sh64/rel-5.s48
-rw-r--r--gas/testsuite/gas/sh/sh64/rel32-1.d86
-rw-r--r--gas/testsuite/gas/sh/sh64/rel32-2.d86
-rw-r--r--gas/testsuite/gas/sh/sh64/rel32-3.d86
-rw-r--r--gas/testsuite/gas/sh/sh64/rel32-4.d86
-rw-r--r--gas/testsuite/gas/sh/sh64/rel32-5.d30
-rw-r--r--gas/testsuite/gas/sh/sh64/rel64-1.d111
-rw-r--r--gas/testsuite/gas/sh/sh64/rel64-2.d111
-rw-r--r--gas/testsuite/gas/sh/sh64/rel64-3.d111
-rw-r--r--gas/testsuite/gas/sh/sh64/rel64-4.d111
-rw-r--r--gas/testsuite/gas/sh/sh64/rel64-5.d40
-rw-r--r--gas/testsuite/gas/sh/sh64/relax-1.d30
-rw-r--r--gas/testsuite/gas/sh/sh64/relax-1.s18
-rw-r--r--gas/testsuite/gas/sh/sh64/relax-2.d30
-rw-r--r--gas/testsuite/gas/sh/sh64/relax-2.s23
-rw-r--r--gas/testsuite/gas/sh/sh64/relax-3.d43
-rw-r--r--gas/testsuite/gas/sh/sh64/relax-3.s32
-rw-r--r--gas/testsuite/gas/sh/sh64/sh64.exp27
-rw-r--r--gas/testsuite/gas/sh/sh64/shift-1.s42
-rw-r--r--gas/testsuite/gas/sh/sh64/shift-2.s34
-rw-r--r--gas/testsuite/gas/sh/sh64/shift-3.s7
-rw-r--r--gas/testsuite/gas/sh/sh64/shift32-1.d58
-rw-r--r--gas/testsuite/gas/sh/sh64/shift32-3.d14
-rw-r--r--gas/testsuite/gas/sh/sh64/shift32-noexp-3.d14
-rw-r--r--gas/testsuite/gas/sh/sh64/shift64-1.d58
-rw-r--r--gas/testsuite/gas/sh/sh64/shift64-2.d42
-rw-r--r--gas/testsuite/gas/sh/sh64/shift64-3.d14
-rw-r--r--gas/testsuite/gas/sh/sh64/shift64-noexp-3.d14
-rw-r--r--gas/testsuite/gas/sh/sh64/syntax-1.d157
-rw-r--r--gas/testsuite/gas/sh/sh64/syntax-1.s199
-rw-r--r--gas/testsuite/gas/sh/sh64/syntax-2.d11
-rw-r--r--gas/testsuite/gas/sh/sh64/syntax-2.s10
-rw-r--r--gas/testsuite/gas/sh/sh64/ua-1.s16
-rw-r--r--gas/testsuite/gas/sh/sh64/ua32-1.d23
-rw-r--r--gas/testsuite/gas/sh/sh64/ua64-1.d23
-rw-r--r--include/ChangeLog4
-rw-r--r--include/dis-asm.h1
-rw-r--r--ld/ChangeLog107
-rw-r--r--ld/Makefile.am62
-rw-r--r--ld/Makefile.in72
-rw-r--r--ld/configure.tgt19
-rw-r--r--ld/emulparams/shelf32.sh43
-rw-r--r--ld/emulparams/shelf32_linux.sh2
-rw-r--r--ld/emulparams/shelf32_nbsd.sh17
-rw-r--r--ld/emulparams/shelf64.sh9
-rw-r--r--ld/emulparams/shelf64_nbsd.sh8
-rw-r--r--ld/emulparams/shlelf32.sh2
-rw-r--r--ld/emulparams/shlelf32_linux.sh43
-rw-r--r--ld/emulparams/shlelf32_nbsd.sh3
-rw-r--r--ld/emulparams/shlelf64.sh2
-rw-r--r--ld/emulparams/shlelf64_nbsd.sh3
-rw-r--r--ld/emultempl/sh64elf.em563
-rw-r--r--ld/ldlang.c4
-rw-r--r--ld/po/BLD-POTFILES.in10
-rw-r--r--ld/testsuite/ld-elfcomm/elfcomm.exp18
-rw-r--r--ld/testsuite/ld-gc/gc.exp9
-rw-r--r--ld/testsuite/ld-gc/pr13683.d2
-rw-r--r--ld/testsuite/ld-scripts/crossref.exp5
-rw-r--r--ld/testsuite/ld-selective/selective.exp7
-rw-r--r--ld/testsuite/ld-sh/ld-r-1.d1
-rw-r--r--ld/testsuite/ld-sh/rd-sh.exp11
-rw-r--r--ld/testsuite/ld-sh/sh.exp5
-rw-r--r--ld/testsuite/ld-sh/sh64/abi32.sd16
-rw-r--r--ld/testsuite/ld-sh/sh64/abi32.xd47
-rw-r--r--ld/testsuite/ld-sh/sh64/abi64.sd20
-rw-r--r--ld/testsuite/ld-sh/sh64/abi64.xd46
-rw-r--r--ld/testsuite/ld-sh/sh64/abixx-noexp.sd12
-rw-r--r--ld/testsuite/ld-sh/sh64/cmpct1.sd9
-rw-r--r--ld/testsuite/ld-sh/sh64/cmpct1.xd37
-rw-r--r--ld/testsuite/ld-sh/sh64/crange-1.s8
-rw-r--r--ld/testsuite/ld-sh/sh64/crange-2a.s22
-rw-r--r--ld/testsuite/ld-sh/sh64/crange-2b.s39
-rw-r--r--ld/testsuite/ld-sh/sh64/crange-2c.s16
-rw-r--r--ld/testsuite/ld-sh/sh64/crange-2d.s9
-rw-r--r--ld/testsuite/ld-sh/sh64/crange-2e.s12
-rw-r--r--ld/testsuite/ld-sh/sh64/crange-2f.s21
-rw-r--r--ld/testsuite/ld-sh/sh64/crange-2g.s26
-rw-r--r--ld/testsuite/ld-sh/sh64/crange-2h.s17
-rw-r--r--ld/testsuite/ld-sh/sh64/crange-2i.s8
-rw-r--r--ld/testsuite/ld-sh/sh64/crange1.rd47
-rw-r--r--ld/testsuite/ld-sh/sh64/crange2.rd56
-rw-r--r--ld/testsuite/ld-sh/sh64/crange3-cmpct.rd80
-rw-r--r--ld/testsuite/ld-sh/sh64/crange3-media.rd80
-rw-r--r--ld/testsuite/ld-sh/sh64/crange3.dd80
-rw-r--r--ld/testsuite/ld-sh/sh64/crange3.rd61
-rw-r--r--ld/testsuite/ld-sh/sh64/crangerel1.rd45
-rw-r--r--ld/testsuite/ld-sh/sh64/crangerel2.rd63
-rw-r--r--ld/testsuite/ld-sh/sh64/dlsection-1.s17
-rw-r--r--ld/testsuite/ld-sh/sh64/dlsection.sd9
-rw-r--r--ld/testsuite/ld-sh/sh64/endian.dbd11
-rw-r--r--ld/testsuite/ld-sh/sh64/endian.dld11
-rw-r--r--ld/testsuite/ld-sh/sh64/endian.ld6
-rw-r--r--ld/testsuite/ld-sh/sh64/endian.s7
-rw-r--r--ld/testsuite/ld-sh/sh64/endian.sbd5
-rw-r--r--ld/testsuite/ld-sh/sh64/endian.sld6
-rw-r--r--ld/testsuite/ld-sh/sh64/gotplt.d12
-rw-r--r--ld/testsuite/ld-sh/sh64/gotplt.map4
-rw-r--r--ld/testsuite/ld-sh/sh64/gotplt.s8
-rw-r--r--ld/testsuite/ld-sh/sh64/init-cmpct.d14
-rw-r--r--ld/testsuite/ld-sh/sh64/init-media.d14
-rw-r--r--ld/testsuite/ld-sh/sh64/init.s18
-rw-r--r--ld/testsuite/ld-sh/sh64/init64.d14
-rw-r--r--ld/testsuite/ld-sh/sh64/mix1-noexp.sd14
-rw-r--r--ld/testsuite/ld-sh/sh64/mix1.sd16
-rw-r--r--ld/testsuite/ld-sh/sh64/mix1.xd43
-rw-r--r--ld/testsuite/ld-sh/sh64/mix2-noexp.sd16
-rw-r--r--ld/testsuite/ld-sh/sh64/mix2.sd17
-rw-r--r--ld/testsuite/ld-sh/sh64/mix2.xd53
-rw-r--r--ld/testsuite/ld-sh/sh64/rd-sh64.exp44
-rw-r--r--ld/testsuite/ld-sh/sh64/rel-1.s48
-rw-r--r--ld/testsuite/ld-sh/sh64/rel-2.s46
-rw-r--r--ld/testsuite/ld-sh/sh64/rel32.xd92
-rw-r--r--ld/testsuite/ld-sh/sh64/rel64.xd92
-rw-r--r--ld/testsuite/ld-sh/sh64/relax.exp155
-rw-r--r--ld/testsuite/ld-sh/sh64/relax1.s12
-rw-r--r--ld/testsuite/ld-sh/sh64/relax2.s3
-rw-r--r--ld/testsuite/ld-sh/sh64/relax3.s8
-rw-r--r--ld/testsuite/ld-sh/sh64/relax4.s2
-rw-r--r--ld/testsuite/ld-sh/sh64/reldl-1.s171
-rw-r--r--ld/testsuite/ld-sh/sh64/reldl-2.s156
-rw-r--r--ld/testsuite/ld-sh/sh64/reldl32.rd358
-rw-r--r--ld/testsuite/ld-sh/sh64/reldl64.rd360
-rw-r--r--ld/testsuite/ld-sh/sh64/relfail.exp219
-rw-r--r--ld/testsuite/ld-sh/sh64/relfail.s36
-rw-r--r--ld/testsuite/ld-sh/sh64/sh64-1.s20
-rw-r--r--ld/testsuite/ld-sh/sh64/sh64-2.s27
-rw-r--r--ld/testsuite/ld-sh/sh64/sh64.exp137
-rw-r--r--ld/testsuite/ld-sh/sh64/shcmp-1.s15
-rw-r--r--ld/testsuite/ld-sh/sh64/shdl-1.s359
-rw-r--r--ld/testsuite/ld-sh/sh64/shdl-2.s286
-rw-r--r--ld/testsuite/ld-sh/sh64/shdl32.xd124
-rw-r--r--ld/testsuite/ld-sh/sh64/shdl64.sd87
-rw-r--r--ld/testsuite/ld-sh/sh64/shdl64.xd124
-rw-r--r--ld/testsuite/ld-sh/sh64/shmix-1.s33
-rw-r--r--ld/testsuite/ld-sh/sh64/shmix-2.s28
-rw-r--r--ld/testsuite/ld-sh/sh64/shmix-3.s32
-rw-r--r--ld/testsuite/ld-sh/sh64/stobin-0-dso.d9
-rw-r--r--ld/testsuite/ld-sh/sh64/stobin-1.d15
-rw-r--r--ld/testsuite/ld-sh/sh64/stobin.s5
-rw-r--r--ld/testsuite/ld-sh/sh64/stolib.s7
-rw-r--r--ld/testsuite/ld-srec/srec.exp8
-rw-r--r--ld/testsuite/ld-undefined/undefined.exp1
-rw-r--r--opcodes/ChangeLog14
-rw-r--r--opcodes/Makefile.am3
-rw-r--r--opcodes/Makefile.in5
-rwxr-xr-xopcodes/configure16
-rw-r--r--opcodes/configure.ac16
-rw-r--r--opcodes/disassemble.c1
-rw-r--r--opcodes/disassemble.h1
-rw-r--r--opcodes/po/POTFILES.in3
-rw-r--r--opcodes/sh-dis.c14
-rw-r--r--opcodes/sh64-dis.c619
-rw-r--r--opcodes/sh64-opc.c777
-rw-r--r--opcodes/sh64-opc.h142
294 files changed, 341 insertions, 24168 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f6e1e5c..337d1a0 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,24 @@
2018-04-16 Alan Modra <amodra@gmail.com>
+ * Makefile.am: Remove sh5 and sh64 support.
+ * archures.c: Likewise.
+ * config.bfd: Likewise.
+ * configure.ac: Likewise.
+ * cpu-sh.c: Likewise.
+ * elf32-sh-relocs.h: Likewise.
+ * elf32-sh.c: Likewise.
+ * targets.c: Likewise.
+ * elf32-sh64-com.c: Delete.
+ * elf32-sh64.c: Delete.
+ * elf32-sh64.h: Delete.
+ * elf64-sh64.c: Delete.
+ * Makefile.in: Regenerate.
+ * bfd-in2.h: Regenerate.
+ * configure: Regenerate.
+ * po/SRC-POTFILES.in: Regenerate.
+
+2018-04-16 Alan Modra <amodra@gmail.com>
+
* Makefile.am: Remove sh-symbianelf support.
* config.bfd: Likewise.
* configure.ac: Likewise.
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index e250c41..ff748d4 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -349,8 +349,6 @@ BFD32_BACKENDS = \
elf32-rx.lo \
elf32-s390.lo \
elf32-sh.lo \
- elf32-sh64-com.lo \
- elf32-sh64.lo \
elf32-sparc.lo \
elf32-spu.lo \
elf32-tic6x.lo \
@@ -522,8 +520,6 @@ BFD32_BACKENDS_CFILES = \
elf32-rx.c \
elf32-s390.c \
elf32-sh.c \
- elf32-sh64-com.c \
- elf32-sh64.c \
elf32-sparc.c \
elf32-spu.c \
elf32-tic6x.c \
@@ -635,7 +631,6 @@ BFD64_BACKENDS = \
elf64-riscv.lo \
elfxx-riscv.lo \
elf64-s390.lo \
- elf64-sh64.lo \
elf64-sparc.lo \
elf64-tilegx.lo \
elf64-x86-64.lo \
@@ -669,7 +664,6 @@ BFD64_BACKENDS_CFILES = \
elf64-mmix.c \
elf64-ppc.c \
elf64-s390.c \
- elf64-sh64.c \
elf64-sparc.c \
elf64-tilegx.c \
elf64-x86-64.c \
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index 0149d24..600afdd 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -683,8 +683,6 @@ BFD32_BACKENDS = \
elf32-rx.lo \
elf32-s390.lo \
elf32-sh.lo \
- elf32-sh64-com.lo \
- elf32-sh64.lo \
elf32-sparc.lo \
elf32-spu.lo \
elf32-tic6x.lo \
@@ -856,8 +854,6 @@ BFD32_BACKENDS_CFILES = \
elf32-rx.c \
elf32-s390.c \
elf32-sh.c \
- elf32-sh64-com.c \
- elf32-sh64.c \
elf32-sparc.c \
elf32-spu.c \
elf32-tic6x.c \
@@ -970,7 +966,6 @@ BFD64_BACKENDS = \
elf64-riscv.lo \
elfxx-riscv.lo \
elf64-s390.lo \
- elf64-sh64.lo \
elf64-sparc.lo \
elf64-tilegx.lo \
elf64-x86-64.lo \
@@ -1004,7 +999,6 @@ BFD64_BACKENDS_CFILES = \
elf64-mmix.c \
elf64-ppc.c \
elf64-s390.c \
- elf64-sh64.c \
elf64-sparc.c \
elf64-tilegx.c \
elf64-x86-64.c \
@@ -1451,8 +1445,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-score.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-score7.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-sh.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-sh64-com.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-sh64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-sparc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-spu.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-tic6x.Plo@am__quote@
@@ -1478,7 +1470,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-ppc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-riscv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-s390.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-sh64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-sparc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-tilegx.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-x86-64.Plo@am__quote@
diff --git a/bfd/archures.c b/bfd/archures.c
index 5adfc2f..2536949 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -305,7 +305,6 @@ DESCRIPTION
.#define bfd_mach_sh4a 0x4a
.#define bfd_mach_sh4a_nofpu 0x4b
.#define bfd_mach_sh4al_dsp 0x4d
-.#define bfd_mach_sh5 0x50
. bfd_arch_alpha, {* Dec Alpha. *}
.#define bfd_mach_alpha_ev4 0x10
.#define bfd_mach_alpha_ev5 0x20
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index bbbdf01..55fcd85 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -2180,7 +2180,6 @@ enum bfd_architecture
#define bfd_mach_sh4a 0x4a
#define bfd_mach_sh4a_nofpu 0x4b
#define bfd_mach_sh4al_dsp 0x4d
-#define bfd_mach_sh5 0x50
bfd_arch_alpha, /* Dec Alpha. */
#define bfd_mach_alpha_ev4 0x10
#define bfd_mach_alpha_ev5 0x20
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 2860d7a..f9c9f33 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -102,7 +102,6 @@ case $targ in
sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1] | \
sparc64-*-aout* | \
sparc*-*-coff* | \
- sh5*-*-* | sh64*-*-* | \
null)
if test "x$enable_obsolete" != xyes; then
echo "*** Configuration $targ is obsolete." >&2
@@ -137,7 +136,7 @@ case $targ in
m88*-*-* | \
maxq-*-coff | \
mips*el-*-rtems* | \
- sh*-*-symbianelf* | \
+ sh*-*-symbianelf* | sh5*-*-* | sh64*-*-* | \
sparc-*-lynxos* | \
tahoe-*-* | \
vax-*-bsd* | vax-*-ultrix* | vax-*-vms* | \
@@ -1409,35 +1408,6 @@ case "${targ}" in
targ_defvec=score_elf32_be_vec
targ_selvecs=score_elf32_le_vec
;;
-
- sh64l*-*-elf*)
- targ_defvec=sh64_elf32_le_vec
- targ_selvecs="sh64_elf32_vec sh64_elf64_le_vec sh64_elf64_vec sh_elf32_le_vec sh_elf32_vec"
- targ_underscore=yes
- want64=true
- ;;
- sh64-*-elf*)
- targ_defvec=sh64_elf32_vec
- targ_selvecs="sh64_elf32_le_vec sh64_elf64_vec sh64_elf64_le_vec sh_elf32_vec sh_elf32_le_vec"
- targ_underscore=yes
- want64=true
- ;;
- sh64eb-*-linux*)
- targ_defvec=sh64_elf32_linux_be_vec
- targ_selvecs="sh64_elf32_linux_vec sh64_elf64_linux_be_vec sh64_elf64_linux_vec sh_elf32_linux_be_vec sh_elf32_linux_vec"
- want64=true
- ;;
- sh64-*-linux*)
- targ_defvec=sh64_elf32_linux_vec
- targ_selvecs="sh64_elf32_linux_be_vec sh64_elf64_linux_vec sh64_elf64_linux_be_vec sh_elf32_linux_vec sh_elf32_linux_be_vec"
- want64=true
- ;;
- sh-*-linux*)
- targ_defvec=sh_elf32_linux_be_vec
- targ_selvecs="sh_elf32_linux_vec sh64_elf32_linux_vec sh64_elf32_linux_be_vec sh64_elf64_linux_vec sh64_elf64_linux_be_vec"
- targ_selvecs="${targ_selvecs} sh_elf32_fdpic_le_vec sh_elf32_fdpic_be_vec"
- want64=true
- ;;
#endif /* BFD64 */
sh*eb-*-linux*)
@@ -1454,68 +1424,28 @@ case "${targ}" in
sh-*-uclinux* | sh[12]-*-uclinux*)
targ_defvec=sh_elf32_vec
targ_selvecs="sh_elf32_le_vec sh_elf32_linux_be_vec sh_elf32_linux_vec sh_elf32_fdpic_le_vec sh_elf32_fdpic_be_vec"
-#ifdef BFD64
- targ_selvecs="${targ_selvecs} sh64_elf32_linux_vec sh64_elf32_linux_be_vec sh64_elf64_linux_vec sh64_elf64_linux_be_vec"
-#endif
- ;;
-
-#ifdef BFD64
- sh5le-*-netbsd*)
- targ_defvec=sh64_elf32_nbsd_le_vec
- targ_selvecs="sh64_elf32_nbsd_vec sh64_elf64_nbsd_le_vec sh64_elf64_nbsd_vec sh_elf32_nbsd_vec sh_elf32_nbsd_le_vec"
- want64=true
- ;;
- sh5-*-netbsd*)
- targ_defvec=sh64_elf32_nbsd_vec
- targ_selvecs="sh64_elf32_nbsd_le_vec sh64_elf64_nbsd_le_vec sh64_elf64_nbsd_vec sh_elf32_nbsd_vec sh_elf32_nbsd_le_vec"
- want64=true
- ;;
-
- sh64le-*-netbsd*)
- targ_defvec=sh64_elf64_nbsd_le_vec
- targ_selvecs="sh64_elf64_nbsd_vec sh64_elf32_nbsd_le_vec sh64_elf32_nbsd_vec sh_elf32_nbsd_vec sh_elf32_nbsd_le_vec"
- want64=true
- ;;
- sh64-*-netbsd*)
- targ_defvec=sh64_elf64_nbsd_vec
- targ_selvecs="sh64_elf64_nbsd_le_vec sh64_elf32_nbsd_le_vec sh64_elf32_nbsd_vec sh_elf32_nbsd_vec sh_elf32_nbsd_le_vec"
- want64=true
;;
sh*l*-*-netbsdelf*)
targ_defvec=sh_elf32_nbsd_le_vec
- targ_selvecs="sh_elf32_nbsd_vec sh_coff_vec sh_coff_le_vec sh64_elf32_nbsd_le_vec sh64_elf32_nbsd_vec sh64_elf64_nbsd_le_vec sh64_elf64_nbsd_vec"
- want64=true
- ;;
- sh-*-netbsdelf*)
- targ_defvec=sh_elf32_nbsd_vec
- targ_selvecs="sh_elf32_nbsd_le_vec sh_coff_vec sh_coff_le_vec sh64_elf32_nbsd_le_vec sh64_elf32_nbsd_vec sh64_elf64_nbsd_le_vec sh64_elf64_nbsd_vec"
- want64=true
+ targ_selvecs="sh_elf32_nbsd_vec sh_coff_vec sh_coff_le_vec"
;;
-#endif
-
sh*-*-netbsdelf*)
targ_defvec=sh_elf32_nbsd_vec
targ_selvecs="sh_elf32_nbsd_le_vec sh_coff_vec sh_coff_le_vec"
;;
-#ifdef BFD64
shl*-*-elf* | sh[1234]l*-*-elf* | sh3el*-*-elf* | shl*-*-kaos*)
targ_defvec=sh_elf32_le_vec
- targ_selvecs="sh_elf32_vec sh_coff_le_vec sh_coff_vec sh_coff_small_le_vec sh_coff_small_vec sh64_elf32_vec sh64_elf32_le_vec sh64_elf64_vec sh64_elf64_le_vec"
+ targ_selvecs="sh_elf32_vec sh_coff_le_vec sh_coff_vec sh_coff_small_le_vec sh_coff_small_vec"
targ_underscore=yes
- want64=true
;;
-#endif
-#ifdef BFD64
sh-*-elf* | sh[1234]*-elf* | sh-*-rtems* | sh-*-kaos*)
targ_defvec=sh_elf32_vec
- targ_selvecs="sh_elf32_le_vec sh_coff_vec sh_coff_le_vec sh_coff_small_vec sh_coff_small_le_vec sh64_elf32_vec sh64_elf32_le_vec sh64_elf64_vec sh64_elf64_le_vec"
+ targ_selvecs="sh_elf32_le_vec sh_coff_vec sh_coff_le_vec sh_coff_small_vec sh_coff_small_le_vec"
targ_underscore=yes
- want64=true
;;
-#endif
sh-*-nto*)
targ_defvec=sh_elf32_vec
diff --git a/bfd/configure b/bfd/configure
index d757d72..079ab66 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -14547,18 +14547,6 @@ do
s390_elf64_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
score_elf32_be_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64 ;;
score_elf32_le_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64 ;;
- sh64_elf32_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" target_size=64 ;;
- sh64_elf32_le_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" target_size=64 ;;
- sh64_elf32_linux_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" target_size=64 ;;
- sh64_elf32_linux_be_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" target_size=64 ;;
- sh64_elf32_nbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" ;;
- sh64_elf32_nbsd_le_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" ;;
- sh64_elf64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
- sh64_elf64_le_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
- sh64_elf64_linux_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
- sh64_elf64_linux_be_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
- sh64_elf64_nbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
- sh64_elf64_nbsd_le_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
sh_coff_vec) tb="$tb coff-sh.lo $coff" ;;
sh_coff_le_vec) tb="$tb coff-sh.lo $coff" ;;
sh_coff_small_vec) tb="$tb coff-sh.lo $coff" ;;
diff --git a/bfd/configure.ac b/bfd/configure.ac
index 9a29386..7eba3c6 100644
--- a/bfd/configure.ac
+++ b/bfd/configure.ac
@@ -624,18 +624,6 @@ do
s390_elf64_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
score_elf32_be_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64 ;;
score_elf32_le_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64 ;;
- sh64_elf32_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" target_size=64 ;;
- sh64_elf32_le_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" target_size=64 ;;
- sh64_elf32_linux_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" target_size=64 ;;
- sh64_elf32_linux_be_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" target_size=64 ;;
- sh64_elf32_nbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" ;;
- sh64_elf32_nbsd_le_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" ;;
- sh64_elf64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
- sh64_elf64_le_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
- sh64_elf64_linux_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
- sh64_elf64_linux_be_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
- sh64_elf64_nbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
- sh64_elf64_nbsd_le_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
sh_coff_vec) tb="$tb coff-sh.lo $coff" ;;
sh_coff_le_vec) tb="$tb coff-sh.lo $coff" ;;
sh_coff_small_vec) tb="$tb coff-sh.lo $coff" ;;
diff --git a/bfd/cpu-sh.c b/bfd/cpu-sh.c
index 0ab0c75..f6c493f 100644
--- a/bfd/cpu-sh.c
+++ b/bfd/cpu-sh.c
@@ -43,8 +43,7 @@
#define SH2A_NOFPU_OR_SH4_NOMMU_NOFPU_NEXT arch_info_struct + 16
#define SH2A_NOFPU_OR_SH3_NOMMU_NEXT arch_info_struct + 17
#define SH2A_OR_SH4_NEXT arch_info_struct + 18
-#define SH2A_OR_SH3E_NEXT arch_info_struct + 19
-#define SH64_NEXT NULL
+#define SH2A_OR_SH3E_NEXT NULL
static const bfd_arch_info_type arch_info_struct[] =
{
@@ -333,21 +332,6 @@ static const bfd_arch_info_type arch_info_struct[] =
bfd_arch_default_fill,
SH2A_OR_SH3E_NEXT
},
- {
- 64, /* 64 bits in a word. */
- 64, /* 64 bits in an address. */
- 8, /* 8 bits in a byte. */
- bfd_arch_sh,
- bfd_mach_sh5,
- "sh", /* Architecture name. */
- "sh5", /* Machine name. */
- 1,
- FALSE, /* Not the default. */
- bfd_default_compatible,
- bfd_default_scan,
- bfd_arch_default_fill,
- SH64_NEXT
- },
};
const bfd_arch_info_type bfd_sh_arch =
diff --git a/bfd/elf32-sh-relocs.h b/bfd/elf32-sh-relocs.h
index 8f3ac80..8dcd1fb 100644
--- a/bfd/elf32-sh-relocs.h
+++ b/bfd/elf32-sh-relocs.h
@@ -575,113 +575,6 @@
0x0f, /* dst_mask */
FALSE), /* pcrel_offset */
-#ifdef INCLUDE_SHMEDIA
- /* Used in SHLLI.L and SHLRI.L. */
- HOWTO (R_SH_DIR5U, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 5, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_unsigned, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_DIR5U", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xfc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in SHARI, SHLLI et al. */
- HOWTO (R_SH_DIR6U, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 6, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_unsigned, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_DIR6U", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xfc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in BxxI, LDHI.L et al. */
- HOWTO (R_SH_DIR6S, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 6, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_DIR6S", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xfc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in ADDI, ANDI et al. */
- HOWTO (R_SH_DIR10S, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 10, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_DIR10S", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in LD.UW, ST.W et al. */
- HOWTO (R_SH_DIR10SW, /* type */
- 1, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 11, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_DIR10SW", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in LD.L, FLD.S et al. */
- HOWTO (R_SH_DIR10SL, /* type */
- 2, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 12, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_DIR10SL", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in FLD.D, FST.P et al. */
- HOWTO (R_SH_DIR10SQ, /* type */
- 3, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 13, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_DIR10SQ", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
-#else
EMPTY_HOWTO (45),
EMPTY_HOWTO (46),
EMPTY_HOWTO (47),
@@ -689,7 +582,6 @@
EMPTY_HOWTO (49),
EMPTY_HOWTO (50),
EMPTY_HOWTO (51),
-#endif
EMPTY_HOWTO (52),
@@ -1046,423 +938,6 @@
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
-#ifdef INCLUDE_SHMEDIA
- /* Used in MOVI and SHORI (x & 65536). */
- HOWTO (R_SH_GOT_LOW16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOT_LOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 16) & 65536). */
- HOWTO (R_SH_GOT_MEDLOW16, /* type */
- 16, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOT_MEDLOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 32) & 65536). */
- HOWTO (R_SH_GOT_MEDHI16, /* type */
- 32, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOT_MEDHI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 48) & 65536). */
- HOWTO (R_SH_GOT_HI16, /* type */
- 48, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOT_HI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI (x & 65536). */
- HOWTO (R_SH_GOTPLT_LOW16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTPLT_LOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 16) & 65536). */
- HOWTO (R_SH_GOTPLT_MEDLOW16, /* type */
- 16, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTPLT_MEDLOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 32) & 65536). */
- HOWTO (R_SH_GOTPLT_MEDHI16, /* type */
- 32, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTPLT_MEDHI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 48) & 65536). */
- HOWTO (R_SH_GOTPLT_HI16, /* type */
- 48, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTPLT_HI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI (x & 65536). */
- HOWTO (R_SH_PLT_LOW16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_PLT_LOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 16) & 65536). */
- HOWTO (R_SH_PLT_MEDLOW16, /* type */
- 16, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_PLT_MEDLOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 32) & 65536). */
- HOWTO (R_SH_PLT_MEDHI16, /* type */
- 32, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_PLT_MEDHI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 48) & 65536). */
- HOWTO (R_SH_PLT_HI16, /* type */
- 48, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_PLT_HI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI (x & 65536). */
- HOWTO (R_SH_GOTOFF_LOW16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTOFF_LOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 16) & 65536). */
- HOWTO (R_SH_GOTOFF_MEDLOW16, /* type */
- 16, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTOFF_MEDLOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 32) & 65536). */
- HOWTO (R_SH_GOTOFF_MEDHI16, /* type */
- 32, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTOFF_MEDHI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 48) & 65536). */
- HOWTO (R_SH_GOTOFF_HI16, /* type */
- 48, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTOFF_HI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI (x & 65536). */
- HOWTO (R_SH_GOTPC_LOW16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTPC_LOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 16) & 65536). */
- HOWTO (R_SH_GOTPC_MEDLOW16, /* type */
- 16, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTPC_MEDLOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 32) & 65536). */
- HOWTO (R_SH_GOTPC_MEDHI16, /* type */
- 32, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTPC_MEDHI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 48) & 65536). */
- HOWTO (R_SH_GOTPC_HI16, /* type */
- 48, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTPC_HI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in LD.L, FLD.S et al. */
- HOWTO (R_SH_GOT10BY4, /* type */
- 2, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 12, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOT10BY4", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in LD.L, FLD.S et al. */
- HOWTO (R_SH_GOTPLT10BY4, /* type */
- 2, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 12, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTPLT10BY4", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in FLD.D, FST.P et al. */
- HOWTO (R_SH_GOT10BY8, /* type */
- 3, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 13, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOT10BY8", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in FLD.D, FST.P et al. */
- HOWTO (R_SH_GOTPLT10BY8, /* type */
- 3, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 13, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTPLT10BY8", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_SH_COPY64, /* type */
- 0, /* rightshift */
- 4, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_COPY64", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- ((bfd_vma) 0) - 1, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_SH_GLOB_DAT64, /* type */
- 0, /* rightshift */
- 4, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GLOB_DAT64", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- ((bfd_vma) 0) - 1, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_SH_JMP_SLOT64, /* type */
- 0, /* rightshift */
- 4, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_JMP_SLOT64", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- ((bfd_vma) 0) - 1, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_SH_RELATIVE64, /* type */
- 0, /* rightshift */
- 4, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_RELATIVE64", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- ((bfd_vma) 0) - 1, /* dst_mask */
- FALSE), /* pcrel_offset */
-#else
EMPTY_HOWTO (169),
EMPTY_HOWTO (170),
EMPTY_HOWTO (171),
@@ -1491,8 +966,6 @@
EMPTY_HOWTO (194),
EMPTY_HOWTO (195),
EMPTY_HOWTO (196),
-#endif
-
EMPTY_HOWTO (197),
EMPTY_HOWTO (198),
EMPTY_HOWTO (199),
@@ -1619,262 +1092,6 @@
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
-#ifdef INCLUDE_SHMEDIA
- EMPTY_HOWTO (209),
- EMPTY_HOWTO (210),
- EMPTY_HOWTO (211),
- EMPTY_HOWTO (212),
- EMPTY_HOWTO (213),
- EMPTY_HOWTO (214),
- EMPTY_HOWTO (215),
- EMPTY_HOWTO (216),
- EMPTY_HOWTO (217),
- EMPTY_HOWTO (218),
- EMPTY_HOWTO (219),
- EMPTY_HOWTO (220),
- EMPTY_HOWTO (221),
- EMPTY_HOWTO (222),
- EMPTY_HOWTO (223),
- EMPTY_HOWTO (224),
- EMPTY_HOWTO (225),
- EMPTY_HOWTO (226),
- EMPTY_HOWTO (227),
- EMPTY_HOWTO (228),
- EMPTY_HOWTO (229),
- EMPTY_HOWTO (230),
- EMPTY_HOWTO (231),
- EMPTY_HOWTO (232),
- EMPTY_HOWTO (233),
- EMPTY_HOWTO (234),
- EMPTY_HOWTO (235),
- EMPTY_HOWTO (236),
- EMPTY_HOWTO (237),
- EMPTY_HOWTO (238),
- EMPTY_HOWTO (239),
- EMPTY_HOWTO (240),
- EMPTY_HOWTO (241),
-
- /* Relocations for SHmedia code. None of these are partial_inplace or
- use the field being relocated (except R_SH_PT_16). */
-
- /* The assembler will generate this reloc before a block of SHmedia
- instructions. A section should be processed as assuming it contains
- data, unless this reloc is seen. Note that a block of SHcompact
- instructions are instead preceded by R_SH_CODE.
- This is currently not implemented, but should be used for SHmedia
- linker relaxation. */
- HOWTO (R_SH_SHMEDIA_CODE, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_unsigned, /* complain_on_overflow */
- sh_elf_ignore_reloc, /* special_function */
- "R_SH_SHMEDIA_CODE", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* The assembler will generate this reloc at a PTA or PTB instruction,
- and the linker checks the right type of target, or changes a PTA to a
- PTB, if the original insn was PT. */
- HOWTO (R_SH_PT_16, /* type */
- 2, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 18, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_PT_16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in unexpanded MOVI. */
- HOWTO (R_SH_IMMS16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_IMMS16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in SHORI. */
- HOWTO (R_SH_IMMU16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_unsigned, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_IMMU16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI (x & 65536). */
- HOWTO (R_SH_IMM_LOW16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_IMM_LOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x - $) & 65536). */
- HOWTO (R_SH_IMM_LOW16_PCREL, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_IMM_LOW16_PCREL", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 16) & 65536). */
- HOWTO (R_SH_IMM_MEDLOW16, /* type */
- 16, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_IMM_MEDLOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI (((x - $) >> 16) & 65536). */
- HOWTO (R_SH_IMM_MEDLOW16_PCREL, /* type */
- 16, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_IMM_MEDLOW16_PCREL", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 32) & 65536). */
- HOWTO (R_SH_IMM_MEDHI16, /* type */
- 32, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_IMM_MEDHI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI (((x - $) >> 32) & 65536). */
- HOWTO (R_SH_IMM_MEDHI16_PCREL, /* type */
- 32, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_IMM_MEDHI16_PCREL", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 48) & 65536). */
- HOWTO (R_SH_IMM_HI16, /* type */
- 48, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_IMM_HI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI (((x - $) >> 48) & 65536). */
- HOWTO (R_SH_IMM_HI16_PCREL, /* type */
- 48, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_IMM_HI16_PCREL", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* For the .uaquad pseudo. */
- HOWTO (R_SH_64, /* type */
- 0, /* rightshift */
- 4, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_64", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- ((bfd_vma) 0) - 1, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* For the .uaquad pseudo, (x - $). */
- HOWTO (R_SH_64_PCREL, /* type */
- 48, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_64_PCREL", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- ((bfd_vma) 0) - 1, /* dst_mask */
- TRUE), /* pcrel_offset */
-
-#endif
#undef SH_PARTIAL32
#undef SH_SRC_MASK32
#undef SH_ELF_RELOC
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index d0f5ac8..cd2c49c 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -38,10 +38,8 @@ static bfd_boolean sh_elf_relax_delete_bytes
(bfd *, asection *, bfd_vma, int);
static bfd_boolean sh_elf_align_loads
(bfd *, asection *, Elf_Internal_Rela *, bfd_byte *, bfd_boolean *);
-#ifndef SH64_ELF
static bfd_boolean sh_elf_swap_insns
(bfd *, asection *, void *, bfd_byte *, bfd_vma);
-#endif
static int sh_elf_optimized_tls_reloc
(struct bfd_link_info *, int, int);
static bfd_vma dtpoff_base
@@ -87,7 +85,7 @@ static reloc_howto_type sh_vxworks_howto_table[] =
static bfd_boolean
vxworks_object_p (bfd *abfd ATTRIBUTE_UNUSED)
{
-#if !defined INCLUDE_SHMEDIA && !defined SH_TARGET_ALREADY_DEFINED
+#if !defined SH_TARGET_ALREADY_DEFINED
extern const bfd_target sh_elf32_vxworks_le_vec;
extern const bfd_target sh_elf32_vxworks_vec;
@@ -103,7 +101,7 @@ vxworks_object_p (bfd *abfd ATTRIBUTE_UNUSED)
static bfd_boolean
fdpic_object_p (bfd *abfd ATTRIBUTE_UNUSED)
{
-#if !defined INCLUDE_SHMEDIA && !defined SH_TARGET_ALREADY_DEFINED
+#if !defined SH_TARGET_ALREADY_DEFINED
extern const bfd_target sh_elf32_fdpic_le_vec;
extern const bfd_target sh_elf32_fdpic_be_vec;
@@ -371,57 +369,6 @@ static const struct elf_reloc_map sh_reloc_map[] =
{ BFD_RELOC_SH_GOTOFFFUNCDESC, R_SH_GOTOFFFUNCDESC },
{ BFD_RELOC_SH_GOTOFFFUNCDESC20, R_SH_GOTOFFFUNCDESC20 },
{ BFD_RELOC_SH_FUNCDESC, R_SH_FUNCDESC },
-#ifdef INCLUDE_SHMEDIA
- { BFD_RELOC_SH_GOT_LOW16, R_SH_GOT_LOW16 },
- { BFD_RELOC_SH_GOT_MEDLOW16, R_SH_GOT_MEDLOW16 },
- { BFD_RELOC_SH_GOT_MEDHI16, R_SH_GOT_MEDHI16 },
- { BFD_RELOC_SH_GOT_HI16, R_SH_GOT_HI16 },
- { BFD_RELOC_SH_GOTPLT_LOW16, R_SH_GOTPLT_LOW16 },
- { BFD_RELOC_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDLOW16 },
- { BFD_RELOC_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_MEDHI16 },
- { BFD_RELOC_SH_GOTPLT_HI16, R_SH_GOTPLT_HI16 },
- { BFD_RELOC_SH_PLT_LOW16, R_SH_PLT_LOW16 },
- { BFD_RELOC_SH_PLT_MEDLOW16, R_SH_PLT_MEDLOW16 },
- { BFD_RELOC_SH_PLT_MEDHI16, R_SH_PLT_MEDHI16 },
- { BFD_RELOC_SH_PLT_HI16, R_SH_PLT_HI16 },
- { BFD_RELOC_SH_GOTOFF_LOW16, R_SH_GOTOFF_LOW16 },
- { BFD_RELOC_SH_GOTOFF_MEDLOW16, R_SH_GOTOFF_MEDLOW16 },
- { BFD_RELOC_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_MEDHI16 },
- { BFD_RELOC_SH_GOTOFF_HI16, R_SH_GOTOFF_HI16 },
- { BFD_RELOC_SH_GOTPC_LOW16, R_SH_GOTPC_LOW16 },
- { BFD_RELOC_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDLOW16 },
- { BFD_RELOC_SH_GOTPC_MEDHI16, R_SH_GOTPC_MEDHI16 },
- { BFD_RELOC_SH_GOTPC_HI16, R_SH_GOTPC_HI16 },
- { BFD_RELOC_SH_COPY64, R_SH_COPY64 },
- { BFD_RELOC_SH_GLOB_DAT64, R_SH_GLOB_DAT64 },
- { BFD_RELOC_SH_JMP_SLOT64, R_SH_JMP_SLOT64 },
- { BFD_RELOC_SH_RELATIVE64, R_SH_RELATIVE64 },
- { BFD_RELOC_SH_GOT10BY4, R_SH_GOT10BY4 },
- { BFD_RELOC_SH_GOT10BY8, R_SH_GOT10BY8 },
- { BFD_RELOC_SH_GOTPLT10BY4, R_SH_GOTPLT10BY4 },
- { BFD_RELOC_SH_GOTPLT10BY8, R_SH_GOTPLT10BY8 },
- { BFD_RELOC_SH_PT_16, R_SH_PT_16 },
- { BFD_RELOC_SH_SHMEDIA_CODE, R_SH_SHMEDIA_CODE },
- { BFD_RELOC_SH_IMMU5, R_SH_DIR5U },
- { BFD_RELOC_SH_IMMS6, R_SH_DIR6S },
- { BFD_RELOC_SH_IMMU6, R_SH_DIR6U },
- { BFD_RELOC_SH_IMMS10, R_SH_DIR10S },
- { BFD_RELOC_SH_IMMS10BY2, R_SH_DIR10SW },
- { BFD_RELOC_SH_IMMS10BY4, R_SH_DIR10SL },
- { BFD_RELOC_SH_IMMS10BY8, R_SH_DIR10SQ },
- { BFD_RELOC_SH_IMMS16, R_SH_IMMS16 },
- { BFD_RELOC_SH_IMMU16, R_SH_IMMU16 },
- { BFD_RELOC_SH_IMM_LOW16, R_SH_IMM_LOW16 },
- { BFD_RELOC_SH_IMM_LOW16_PCREL, R_SH_IMM_LOW16_PCREL },
- { BFD_RELOC_SH_IMM_MEDLOW16, R_SH_IMM_MEDLOW16 },
- { BFD_RELOC_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDLOW16_PCREL },
- { BFD_RELOC_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16 },
- { BFD_RELOC_SH_IMM_MEDHI16_PCREL, R_SH_IMM_MEDHI16_PCREL },
- { BFD_RELOC_SH_IMM_HI16, R_SH_IMM_HI16 },
- { BFD_RELOC_SH_IMM_HI16_PCREL, R_SH_IMM_HI16_PCREL },
- { BFD_RELOC_64, R_SH_64 },
- { BFD_RELOC_64_PCREL, R_SH_64_PCREL },
-#endif /* not INCLUDE_SHMEDIA */
};
/* Given a BFD reloc code, return the howto structure for the
@@ -526,14 +473,6 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
|| sec->reloc_count == 0)
return TRUE;
-#ifdef INCLUDE_SHMEDIA
- if (elf_section_data (sec)->this_hdr.sh_flags
- & (SHF_SH5_ISA32 | SHF_SH5_ISA32_MIXED))
- {
- return TRUE;
- }
-#endif
-
symtab_hdr = &elf_symtab_hdr (abfd);
internal_relocs = (_bfd_elf_link_read_relocs
@@ -1451,7 +1390,6 @@ sh_elf_align_loads (bfd *abfd ATTRIBUTE_UNUSED, asection *sec,
return FALSE;
}
-#ifndef SH64_ELF
/* Swap two SH instructions. This is like sh_swap_insns in coff-sh.c. */
static bfd_boolean
@@ -1581,7 +1519,6 @@ sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs,
return TRUE;
}
-#endif /* defined SH64_ELF */
/* Describes one of the various PLT styles. */
@@ -1626,223 +1563,6 @@ struct elf_sh_plt_info
const struct elf_sh_plt_info *short_plt;
};
-#ifdef INCLUDE_SHMEDIA
-
-/* The size in bytes of an entry in the procedure linkage table. */
-
-#define ELF_PLT_ENTRY_SIZE 64
-
-/* First entry in an absolute procedure linkage table look like this. */
-
-static const bfd_byte elf_sh_plt0_entry_be[ELF_PLT_ENTRY_SIZE] =
-{
- 0xcc, 0x00, 0x01, 0x10, /* movi .got.plt >> 16, r17 */
- 0xc8, 0x00, 0x01, 0x10, /* shori .got.plt & 65535, r17 */
- 0x89, 0x10, 0x09, 0x90, /* ld.l r17, 8, r25 */
- 0x6b, 0xf1, 0x66, 0x00, /* ptabs r25, tr0 */
- 0x89, 0x10, 0x05, 0x10, /* ld.l r17, 4, r17 */
- 0x44, 0x01, 0xff, 0xf0, /* blink tr0, r63 */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
-};
-
-static const bfd_byte elf_sh_plt0_entry_le[ELF_PLT_ENTRY_SIZE] =
-{
- 0x10, 0x01, 0x00, 0xcc, /* movi .got.plt >> 16, r17 */
- 0x10, 0x01, 0x00, 0xc8, /* shori .got.plt & 65535, r17 */
- 0x90, 0x09, 0x10, 0x89, /* ld.l r17, 8, r25 */
- 0x00, 0x66, 0xf1, 0x6b, /* ptabs r25, tr0 */
- 0x10, 0x05, 0x10, 0x89, /* ld.l r17, 4, r17 */
- 0xf0, 0xff, 0x01, 0x44, /* blink tr0, r63 */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
-};
-
-/* Sebsequent entries in an absolute procedure linkage table look like
- this. */
-
-static const bfd_byte elf_sh_plt_entry_be[ELF_PLT_ENTRY_SIZE] =
-{
- 0xcc, 0x00, 0x01, 0x90, /* movi nameN-in-GOT >> 16, r25 */
- 0xc8, 0x00, 0x01, 0x90, /* shori nameN-in-GOT & 65535, r25 */
- 0x89, 0x90, 0x01, 0x90, /* ld.l r25, 0, r25 */
- 0x6b, 0xf1, 0x66, 0x00, /* ptabs r25, tr0 */
- 0x44, 0x01, 0xff, 0xf0, /* blink tr0, r63 */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0xcc, 0x00, 0x01, 0x90, /* movi .PLT0 >> 16, r25 */
- 0xc8, 0x00, 0x01, 0x90, /* shori .PLT0 & 65535, r25 */
- 0x6b, 0xf1, 0x66, 0x00, /* ptabs r25, tr0 */
- 0xcc, 0x00, 0x01, 0x50, /* movi reloc-offset >> 16, r21 */
- 0xc8, 0x00, 0x01, 0x50, /* shori reloc-offset & 65535, r21 */
- 0x44, 0x01, 0xff, 0xf0, /* blink tr0, r63 */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
-};
-
-static const bfd_byte elf_sh_plt_entry_le[ELF_PLT_ENTRY_SIZE] =
-{
- 0x90, 0x01, 0x00, 0xcc, /* movi nameN-in-GOT >> 16, r25 */
- 0x90, 0x01, 0x00, 0xc8, /* shori nameN-in-GOT & 65535, r25 */
- 0x90, 0x01, 0x90, 0x89, /* ld.l r25, 0, r25 */
- 0x00, 0x66, 0xf1, 0x6b, /* ptabs r25, tr0 */
- 0xf0, 0xff, 0x01, 0x44, /* blink tr0, r63 */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0x90, 0x01, 0x00, 0xcc, /* movi .PLT0 >> 16, r25 */
- 0x90, 0x01, 0x00, 0xc8, /* shori .PLT0 & 65535, r25 */
- 0x00, 0x66, 0xf1, 0x6b, /* ptabs r25, tr0 */
- 0x50, 0x01, 0x00, 0xcc, /* movi reloc-offset >> 16, r21 */
- 0x50, 0x01, 0x00, 0xc8, /* shori reloc-offset & 65535, r21 */
- 0xf0, 0xff, 0x01, 0x44, /* blink tr0, r63 */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
-};
-
-/* Entries in a PIC procedure linkage table look like this. */
-
-static const bfd_byte elf_sh_pic_plt_entry_be[ELF_PLT_ENTRY_SIZE] =
-{
- 0xcc, 0x00, 0x01, 0x90, /* movi nameN@GOT >> 16, r25 */
- 0xc8, 0x00, 0x01, 0x90, /* shori nameN@GOT & 65535, r25 */
- 0x40, 0xc2, 0x65, 0x90, /* ldx.l r12, r25, r25 */
- 0x6b, 0xf1, 0x66, 0x00, /* ptabs r25, tr0 */
- 0x44, 0x01, 0xff, 0xf0, /* blink tr0, r63 */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0xce, 0x00, 0x01, 0x10, /* movi -GOT_BIAS, r17 */
- 0x00, 0xc8, 0x45, 0x10, /* add.l r12, r17, r17 */
- 0x89, 0x10, 0x09, 0x90, /* ld.l r17, 8, r25 */
- 0x6b, 0xf1, 0x66, 0x00, /* ptabs r25, tr0 */
- 0x89, 0x10, 0x05, 0x10, /* ld.l r17, 4, r17 */
- 0xcc, 0x00, 0x01, 0x50, /* movi reloc-offset >> 16, r21 */
- 0xc8, 0x00, 0x01, 0x50, /* shori reloc-offset & 65535, r21 */
- 0x44, 0x01, 0xff, 0xf0, /* blink tr0, r63 */
-};
-
-static const bfd_byte elf_sh_pic_plt_entry_le[ELF_PLT_ENTRY_SIZE] =
-{
- 0x90, 0x01, 0x00, 0xcc, /* movi nameN@GOT >> 16, r25 */
- 0x90, 0x01, 0x00, 0xc8, /* shori nameN@GOT & 65535, r25 */
- 0x90, 0x65, 0xc2, 0x40, /* ldx.l r12, r25, r25 */
- 0x00, 0x66, 0xf1, 0x6b, /* ptabs r25, tr0 */
- 0xf0, 0xff, 0x01, 0x44, /* blink tr0, r63 */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0x10, 0x01, 0x00, 0xce, /* movi -GOT_BIAS, r17 */
- 0x10, 0x45, 0xc8, 0x00, /* add.l r12, r17, r17 */
- 0x90, 0x09, 0x10, 0x89, /* ld.l r17, 8, r25 */
- 0x00, 0x66, 0xf1, 0x6b, /* ptabs r25, tr0 */
- 0x10, 0x05, 0x10, 0x89, /* ld.l r17, 4, r17 */
- 0x50, 0x01, 0x00, 0xcc, /* movi reloc-offset >> 16, r21 */
- 0x50, 0x01, 0x00, 0xc8, /* shori reloc-offset & 65535, r21 */
- 0xf0, 0xff, 0x01, 0x44, /* blink tr0, r63 */
-};
-
-static const struct elf_sh_plt_info elf_sh_plts[2][2] = {
- {
- {
- /* Big-endian non-PIC. */
- elf_sh_plt0_entry_be,
- ELF_PLT_ENTRY_SIZE,
- { 0, MINUS_ONE, MINUS_ONE },
- elf_sh_plt_entry_be,
- ELF_PLT_ENTRY_SIZE,
- { 0, 32, 48, FALSE },
- 33, /* includes ISA encoding */
- NULL
- },
- {
- /* Little-endian non-PIC. */
- elf_sh_plt0_entry_le,
- ELF_PLT_ENTRY_SIZE,
- { 0, MINUS_ONE, MINUS_ONE },
- elf_sh_plt_entry_le,
- ELF_PLT_ENTRY_SIZE,
- { 0, 32, 48, FALSE },
- 33, /* includes ISA encoding */
- NULL
- },
- },
- {
- {
- /* Big-endian PIC. */
- elf_sh_plt0_entry_be,
- ELF_PLT_ENTRY_SIZE,
- { MINUS_ONE, MINUS_ONE, MINUS_ONE },
- elf_sh_pic_plt_entry_be,
- ELF_PLT_ENTRY_SIZE,
- { 0, MINUS_ONE, 52, FALSE },
- 33, /* includes ISA encoding */
- NULL
- },
- {
- /* Little-endian PIC. */
- elf_sh_plt0_entry_le,
- ELF_PLT_ENTRY_SIZE,
- { MINUS_ONE, MINUS_ONE, MINUS_ONE },
- elf_sh_pic_plt_entry_le,
- ELF_PLT_ENTRY_SIZE,
- { 0, MINUS_ONE, 52, FALSE },
- 33, /* includes ISA encoding */
- NULL
- },
- }
-};
-
-/* Return offset of the linker in PLT0 entry. */
-#define elf_sh_plt0_gotplt_offset(info) 0
-
-/* Install a 32-bit PLT field starting at ADDR, which occurs in OUTPUT_BFD.
- VALUE is the field's value and CODE_P is true if VALUE refers to code,
- not data.
-
- On SH64, each 32-bit field is loaded by a movi/shori pair. */
-
-inline static void
-install_plt_field (bfd *output_bfd, bfd_boolean code_p,
- unsigned long value, bfd_byte *addr)
-{
- value |= code_p;
- bfd_put_32 (output_bfd,
- bfd_get_32 (output_bfd, addr)
- | ((value >> 6) & 0x3fffc00),
- addr);
- bfd_put_32 (output_bfd,
- bfd_get_32 (output_bfd, addr + 4)
- | ((value << 10) & 0x3fffc00),
- addr + 4);
-}
-
-/* Return the type of PLT associated with ABFD. PIC_P is true if
- the object is position-independent. */
-
-static const struct elf_sh_plt_info *
-get_plt_info (bfd *abfd ATTRIBUTE_UNUSED, bfd_boolean pic_p)
-{
- return &elf_sh_plts[pic_p][!bfd_big_endian (abfd)];
-}
-#else
/* The size in bytes of an entry in the procedure linkage table. */
#define ELF_PLT_ENTRY_SIZE 28
@@ -2321,7 +2041,6 @@ install_plt_field (bfd *output_bfd, bfd_boolean code_p ATTRIBUTE_UNUSED,
{
bfd_put_32 (output_bfd, value, addr);
}
-#endif
/* The number of PLT entries which can use a shorter PLT, if any.
Currently always 64K, since only SH-2A FDPIC uses this; a
@@ -2383,14 +2102,6 @@ struct elf_sh_link_hash_entry
{
struct elf_link_hash_entry root;
-#ifdef INCLUDE_SHMEDIA
- union
- {
- bfd_signed_vma refcount;
- bfd_vma offset;
- } datalabel_got;
-#endif
-
/* Track dynamic relocs copied for this symbol. */
struct elf_dyn_relocs *dyn_relocs;
@@ -2529,9 +2240,6 @@ sh_elf_link_hash_newfunc (struct bfd_hash_entry *entry,
{
ret->dyn_relocs = NULL;
ret->gotplt_refcount = 0;
-#ifdef INCLUDE_SHMEDIA
- ret->datalabel_got.refcount = ret->root.got.refcount;
-#endif
ret->funcdesc.refcount = 0;
ret->abs_funcdesc_refcount = 0;
ret->got_type = GOT_UNKNOWN;
@@ -3101,32 +2809,6 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
else
h->got.offset = (bfd_vma) -1;
-#ifdef INCLUDE_SHMEDIA
- if (eh->datalabel_got.refcount > 0)
- {
- asection *s;
- bfd_boolean dyn;
-
- /* Make sure this symbol is output as a dynamic symbol.
- Undefined weak syms won't yet be marked as dynamic. */
- if (h->dynindx == -1
- && !h->forced_local)
- {
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-
- s = htab->root.sgot;
- eh->datalabel_got.offset = s->size;
- s->size += 4;
- dyn = htab->root.dynamic_sections_created;
- if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h))
- htab->root.srelgot->size += sizeof (Elf32_External_Rela);
- }
- else
- eh->datalabel_got.offset = (bfd_vma) -1;
-#endif
-
/* Allocate space for any dynamic relocations to function
descriptors, canonical or otherwise. We need to relocate the
reference unless it resolves to zero, which only happens for
@@ -3406,10 +3088,6 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
symtab_hdr = &elf_symtab_hdr (ibfd);
locsymcount = symtab_hdr->sh_info;
-#ifdef INCLUDE_SHMEDIA
- /* Count datalabel local GOT. */
- locsymcount *= 2;
-#endif
s = htab->root.sgot;
srel = htab->root.srelgot;
@@ -4030,15 +3708,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
symname = h->root.root.string;
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
- {
-#ifdef INCLUDE_SHMEDIA
- /* If the reference passes a symbol marked with
- STT_DATALABEL, then any STO_SH5_ISA32 on the final value
- doesn't count. */
- seen_stt_datalabel |= h->type == STT_DATALABEL;
-#endif
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
- }
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
if (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
{
@@ -4217,11 +3887,6 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
break;
default:
-#ifdef INCLUDE_SHMEDIA
- if (shmedia_prepare_reloc (info, input_bfd, input_section,
- contents, rel, &relocation))
- goto final_link_relocate;
-#endif
bfd_set_error (bfd_error_bad_value);
return FALSE;
@@ -4298,12 +3963,6 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
case R_SH_DIR32:
case R_SH_REL32:
-#ifdef INCLUDE_SHMEDIA
- case R_SH_IMM_LOW16_PCREL:
- case R_SH_IMM_MEDLOW16_PCREL:
- case R_SH_IMM_MEDHI16_PCREL:
- case R_SH_IMM_HI16_PCREL:
-#endif
if (bfd_link_pic (info)
&& (h == NULL
|| (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
@@ -4355,17 +4014,6 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
? bfd_get_32 (input_bfd, contents + rel->r_offset)
: addend);
}
-#ifdef INCLUDE_SHMEDIA
- else if (r_type == R_SH_IMM_LOW16_PCREL
- || r_type == R_SH_IMM_MEDLOW16_PCREL
- || r_type == R_SH_IMM_MEDHI16_PCREL
- || r_type == R_SH_IMM_HI16_PCREL)
- {
- BFD_ASSERT (h != NULL && h->dynindx != -1);
- outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
- outrel.r_addend = addend;
- }
-#endif
else if (fdpic_p
&& (h == NULL
|| ((info->symbolic || h->dynindx == -1)
@@ -4461,14 +4109,6 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
goto final_link_relocate;
case R_SH_GOTPLT32:
-#ifdef INCLUDE_SHMEDIA
- case R_SH_GOTPLT_LOW16:
- case R_SH_GOTPLT_MEDLOW16:
- case R_SH_GOTPLT_MEDHI16:
- case R_SH_GOTPLT_HI16:
- case R_SH_GOTPLT10BY4:
- case R_SH_GOTPLT10BY8:
-#endif
/* Relocation is to the entry for this symbol in the
procedure linkage table. */
@@ -4499,14 +4139,6 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
force_got:
case R_SH_GOT32:
case R_SH_GOT20:
-#ifdef INCLUDE_SHMEDIA
- case R_SH_GOT_LOW16:
- case R_SH_GOT_MEDLOW16:
- case R_SH_GOT_MEDHI16:
- case R_SH_GOT_HI16:
- case R_SH_GOT10BY4:
- case R_SH_GOT10BY8:
-#endif
/* Relocation is to the entry for this symbol in the global
offset table. */
@@ -4519,15 +4151,6 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
bfd_boolean dyn;
off = h->got.offset;
-#ifdef INCLUDE_SHMEDIA
- if (seen_stt_datalabel)
- {
- struct elf_sh_link_hash_entry *hsh;
-
- hsh = (struct elf_sh_link_hash_entry *)h;
- off = hsh->datalabel_got.offset;
- }
-#endif
BFD_ASSERT (off != (bfd_vma) -1);
dyn = htab->root.dynamic_sections_created;
@@ -4558,17 +4181,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
bfd_put_32 (output_bfd, relocation,
sgot->contents + off);
-#ifdef INCLUDE_SHMEDIA
- if (seen_stt_datalabel)
- {
- struct elf_sh_link_hash_entry *hsh;
-
- hsh = (struct elf_sh_link_hash_entry *)h;
- hsh->datalabel_got.offset |= 1;
- }
- else
-#endif
- h->got.offset |= 1;
+ h->got.offset |= 1;
/* If we initialize the GOT entry here with a valid
symbol address, also add a fixup. */
@@ -4587,27 +4200,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
}
else
{
-#ifdef INCLUDE_SHMEDIA
- if (rel->r_addend)
- {
- BFD_ASSERT (local_got_offsets != NULL
- && (local_got_offsets[symtab_hdr->sh_info
- + r_symndx]
- != (bfd_vma) -1));
-
- off = local_got_offsets[symtab_hdr->sh_info
- + r_symndx];
- }
- else
- {
-#endif
BFD_ASSERT (local_got_offsets != NULL
&& local_got_offsets[r_symndx] != (bfd_vma) -1);
off = local_got_offsets[r_symndx];
-#ifdef INCLUDE_SHMEDIA
- }
-#endif
/* The offset must always be a multiple of 4. We use
the least significant bit to record whether we have
@@ -4651,12 +4247,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
+ sgot->output_offset
+ off);
-#ifdef INCLUDE_SHMEDIA
- if (rel->r_addend)
- local_got_offsets[symtab_hdr->sh_info + r_symndx] |= 1;
- else
-#endif
- local_got_offsets[r_symndx] |= 1;
+ local_got_offsets[r_symndx] |= 1;
}
relocation = sh_elf_got_offset (htab) + off;
@@ -4678,12 +4269,6 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
case R_SH_GOTOFF:
case R_SH_GOTOFF20:
-#ifdef INCLUDE_SHMEDIA
- case R_SH_GOTOFF_LOW16:
- case R_SH_GOTOFF_MEDLOW16:
- case R_SH_GOTOFF_MEDHI16:
- case R_SH_GOTOFF_HI16:
-#endif
/* GOTOFF relocations are relative to _GLOBAL_OFFSET_TABLE_, which
we place at the start of the .got.plt section. This is the same
as the start of the output .got section, unless there are function
@@ -4711,12 +4296,6 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
goto final_link_relocate;
case R_SH_GOTPC:
-#ifdef INCLUDE_SHMEDIA
- case R_SH_GOTPC_LOW16:
- case R_SH_GOTPC_MEDLOW16:
- case R_SH_GOTPC_MEDHI16:
- case R_SH_GOTPC_HI16:
-#endif
/* Use global offset table as symbol value. */
BFD_ASSERT (sgotplt != NULL);
@@ -4731,12 +4310,6 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
goto final_link_relocate;
case R_SH_PLT32:
-#ifdef INCLUDE_SHMEDIA
- case R_SH_PLT_LOW16:
- case R_SH_PLT_MEDLOW16:
- case R_SH_PLT_MEDHI16:
- case R_SH_PLT_HI16:
-#endif
/* Relocation is to the entry for this symbol in the
procedure linkage table. */
@@ -4769,10 +4342,6 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
+ splt->output_offset
+ h->plt.offset);
-#ifdef INCLUDE_SHMEDIA
- relocation++;
-#endif
-
addend = rel->r_addend;
goto final_link_relocate;
@@ -5720,10 +5289,6 @@ sh_elf_copy_indirect_symbol (struct bfd_link_info *info,
}
edir->gotplt_refcount = eind->gotplt_refcount;
eind->gotplt_refcount = 0;
-#ifdef INCLUDE_SHMEDIA
- edir->datalabel_got.refcount += eind->datalabel_got.refcount;
- eind->datalabel_got.refcount = 0;
-#endif
edir->funcdesc.refcount += eind->funcdesc.refcount;
eind->funcdesc.refcount = 0;
edir->abs_funcdesc_refcount += eind->abs_funcdesc_refcount;
@@ -5818,9 +5383,6 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
{
struct elf_link_hash_entry *h;
unsigned long r_symndx;
-#ifdef INCLUDE_SHMEDIA
- int seen_stt_datalabel = 0;
-#endif
r_symndx = ELF32_R_SYM (rel->r_info);
r_type = ELF32_R_TYPE (rel->r_info);
@@ -5832,12 +5394,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
- {
-#ifdef INCLUDE_SHMEDIA
- seen_stt_datalabel |= h->type == STT_DATALABEL;
-#endif
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
- }
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
}
r_type = sh_elf_optimized_tls_reloc (info, r_type, h == NULL);
@@ -5895,28 +5452,6 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
case R_SH_GOTOFFFUNCDESC:
case R_SH_GOTOFFFUNCDESC20:
case R_SH_GOTPC:
-#ifdef INCLUDE_SHMEDIA
- case R_SH_GOTPLT_LOW16:
- case R_SH_GOTPLT_MEDLOW16:
- case R_SH_GOTPLT_MEDHI16:
- case R_SH_GOTPLT_HI16:
- case R_SH_GOTPLT10BY4:
- case R_SH_GOTPLT10BY8:
- case R_SH_GOT_LOW16:
- case R_SH_GOT_MEDLOW16:
- case R_SH_GOT_MEDHI16:
- case R_SH_GOT_HI16:
- case R_SH_GOT10BY4:
- case R_SH_GOT10BY8:
- case R_SH_GOTOFF_LOW16:
- case R_SH_GOTOFF_MEDLOW16:
- case R_SH_GOTOFF_MEDHI16:
- case R_SH_GOTOFF_HI16:
- case R_SH_GOTPC_LOW16:
- case R_SH_GOTPC_MEDLOW16:
- case R_SH_GOTPC_MEDHI16:
- case R_SH_GOTPC_HI16:
-#endif
case R_SH_TLS_GD_32:
case R_SH_TLS_LD_32:
case R_SH_TLS_IE_32:
@@ -5958,14 +5493,6 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
case R_SH_TLS_GD_32:
case R_SH_GOT32:
case R_SH_GOT20:
-#ifdef INCLUDE_SHMEDIA
- case R_SH_GOT_LOW16:
- case R_SH_GOT_MEDLOW16:
- case R_SH_GOT_MEDHI16:
- case R_SH_GOT_HI16:
- case R_SH_GOT10BY4:
- case R_SH_GOT10BY8:
-#endif
case R_SH_GOTFUNCDESC:
case R_SH_GOTFUNCDESC20:
switch (r_type)
@@ -5987,17 +5514,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
if (h != NULL)
{
-#ifdef INCLUDE_SHMEDIA
- if (seen_stt_datalabel)
- {
- struct elf_sh_link_hash_entry *eh
- = (struct elf_sh_link_hash_entry *) h;
-
- eh->datalabel_got.refcount += 1;
- }
- else
-#endif
- h->got.refcount += 1;
+ h->got.refcount += 1;
old_got_type = sh_elf_hash_entry (h)->got_type;
}
else
@@ -6013,33 +5530,16 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
size = symtab_hdr->sh_info;
size *= sizeof (bfd_signed_vma);
-#ifdef INCLUDE_SHMEDIA
- /* Reserve space for both the datalabel and
- codelabel local GOT offsets. */
- size *= 2;
-#endif
size += symtab_hdr->sh_info;
local_got_refcounts = ((bfd_signed_vma *)
bfd_zalloc (abfd, size));
if (local_got_refcounts == NULL)
return FALSE;
elf_local_got_refcounts (abfd) = local_got_refcounts;
-#ifdef INCLUDE_SHMEDIA
- /* Take care of both the datalabel and codelabel local
- GOT offsets. */
- sh_elf_local_got_type (abfd)
- = (char *) (local_got_refcounts + 2 * symtab_hdr->sh_info);
-#else
sh_elf_local_got_type (abfd)
= (char *) (local_got_refcounts + symtab_hdr->sh_info);
-#endif
}
-#ifdef INCLUDE_SHMEDIA
- if (rel->r_addend & 1)
- local_got_refcounts[symtab_hdr->sh_info + r_symndx] += 1;
- else
-#endif
- local_got_refcounts[r_symndx] += 1;
+ local_got_refcounts[r_symndx] += 1;
old_got_type = sh_elf_local_got_type (abfd) [r_symndx];
}
@@ -6109,10 +5609,6 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
bfd_size_type size;
size = symtab_hdr->sh_info * sizeof (union gotref);
-#ifdef INCLUDE_SHMEDIA
- /* Count datalabel local GOT. */
- size *= 2;
-#endif
local_funcdesc = (union gotref *) bfd_zalloc (abfd, size);
if (local_funcdesc == NULL)
return FALSE;
@@ -6154,14 +5650,6 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
break;
case R_SH_GOTPLT32:
-#ifdef INCLUDE_SHMEDIA
- case R_SH_GOTPLT_LOW16:
- case R_SH_GOTPLT_MEDLOW16:
- case R_SH_GOTPLT_MEDHI16:
- case R_SH_GOTPLT_HI16:
- case R_SH_GOTPLT10BY4:
- case R_SH_GOTPLT10BY8:
-#endif
/* If this is a local symbol, we resolve it directly without
creating a procedure linkage table entry. */
@@ -6179,12 +5667,6 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
break;
case R_SH_PLT32:
-#ifdef INCLUDE_SHMEDIA
- case R_SH_PLT_LOW16:
- case R_SH_PLT_MEDLOW16:
- case R_SH_PLT_MEDHI16:
- case R_SH_PLT_HI16:
-#endif
/* This symbol requires a procedure linkage table entry. We
actually build the entry in adjust_dynamic_symbol,
because this might be a case of linking PIC code which is
@@ -6206,12 +5688,6 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
case R_SH_DIR32:
case R_SH_REL32:
-#ifdef INCLUDE_SHMEDIA
- case R_SH_IMM_LOW16_PCREL:
- case R_SH_IMM_MEDLOW16_PCREL:
- case R_SH_IMM_MEDHI16_PCREL:
- case R_SH_IMM_HI16_PCREL:
-#endif
if (h != NULL && ! bfd_link_pic (info))
{
h->non_got_ref = 1;
@@ -6307,14 +5783,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
}
p->count += 1;
- if (r_type == R_SH_REL32
-#ifdef INCLUDE_SHMEDIA
- || r_type == R_SH_IMM_LOW16_PCREL
- || r_type == R_SH_IMM_MEDLOW16_PCREL
- || r_type == R_SH_IMM_MEDHI16_PCREL
- || r_type == R_SH_IMM_HI16_PCREL
-#endif
- )
+ if (r_type == R_SH_REL32)
p->pc_count += 1;
}
@@ -6804,70 +6273,6 @@ sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info,
bfd_elf32_swap_reloca_out (output_bfd, &rel, loc);
}
-#ifdef INCLUDE_SHMEDIA
- {
- struct elf_sh_link_hash_entry *eh;
-
- eh = (struct elf_sh_link_hash_entry *) h;
- if (eh->datalabel_got.offset != (bfd_vma) -1)
- {
- asection *sgot;
- asection *srelgot;
- Elf_Internal_Rela rel;
- bfd_byte *loc;
-
- /* This symbol has a datalabel entry in the global offset table.
- Set it up. */
-
- sgot = htab->root.sgot;
- srelgot = htab->root.srelgot;
- BFD_ASSERT (sgot != NULL && srelgot != NULL);
-
- rel.r_offset = (sgot->output_section->vma
- + sgot->output_offset
- + (eh->datalabel_got.offset &~ (bfd_vma) 1));
-
- /* If this is a static link, or it is a -Bsymbolic link and the
- symbol is defined locally or was forced to be local because
- of a version file, we just want to emit a RELATIVE reloc.
- The entry in the global offset table will already have been
- initialized in the relocate_section function. */
- if (bfd_link_pic (info)
- && SYMBOL_REFERENCES_LOCAL (info, h))
- {
- if (htab->fdpic_p)
- {
- asection *sec = h->root.u.def.section;
- int dynindx
- = elf_section_data (sec->output_section)->dynindx;
-
- rel.r_info = ELF32_R_INFO (dynindx, R_SH_DIR32);
- rel.r_addend = (h->root.u.def.value
- + h->root.u.def.section->output_offset);
- }
- else
- {
- rel.r_info = ELF32_R_INFO (0, R_SH_RELATIVE);
- rel.r_addend = (h->root.u.def.value
- + h->root.u.def.section->output_section->vma
- + h->root.u.def.section->output_offset);
- }
- }
- else
- {
- bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents
- + eh->datalabel_got.offset);
- rel.r_info = ELF32_R_INFO (h->dynindx, R_SH_GLOB_DAT);
- rel.r_addend = 0;
- }
-
- loc = srelgot->contents;
- loc += srelgot->reloc_count++ * sizeof (Elf32_External_Rela);
- bfd_elf32_swap_reloca_out (output_bfd, &rel, loc);
- }
- }
-#endif
-
if (h->needs_copy)
{
asection *s;
@@ -6931,9 +6336,6 @@ sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
{
Elf_Internal_Dyn dyn;
asection *s;
-#ifdef INCLUDE_SHMEDIA
- const char *name;
-#endif
bfd_elf32_swap_dyn_in (htab->root.dynobj, dyncon, &dyn);
@@ -6945,29 +6347,6 @@ sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
-#ifdef INCLUDE_SHMEDIA
- case DT_INIT:
- name = info->init_function;
- goto get_sym;
-
- case DT_FINI:
- name = info->fini_function;
- get_sym:
- if (dyn.d_un.d_val != 0)
- {
- struct elf_link_hash_entry *h;
-
- h = elf_link_hash_lookup (&htab->root, name,
- FALSE, FALSE, TRUE);
- if (h != NULL && (h->other & STO_SH5_ISA32))
- {
- dyn.d_un.d_val |= 1;
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
- }
- }
- break;
-#endif
-
case DT_PLTGOT:
BFD_ASSERT (htab->root.hgot != NULL);
s = htab->root.hgot->root.u.def.section;
@@ -7317,7 +6696,7 @@ sh_elf_encode_eh_address (bfd *abfd,
#define elf_backend_linux_prpsinfo32_ugid16 TRUE
-#if !defined INCLUDE_SHMEDIA && !defined SH_TARGET_ALREADY_DEFINED
+#if !defined SH_TARGET_ALREADY_DEFINED
#include "elf32-target.h"
@@ -7415,4 +6794,4 @@ sh_elf_encode_eh_address (bfd *abfd,
#include "elf32-target.h"
-#endif /* neither INCLUDE_SHMEDIA nor SH_TARGET_ALREADY_DEFINED */
+#endif /* not SH_TARGET_ALREADY_DEFINED */
diff --git a/bfd/elf32-sh64-com.c b/bfd/elf32-sh64-com.c
deleted file mode 100644
index 1b69f88..0000000
--- a/bfd/elf32-sh64-com.c
+++ /dev/null
@@ -1,245 +0,0 @@
-/* SuperH SH64-specific support for 32-bit ELF
- Copyright (C) 2000-2018 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
- MA 02110-1301, USA. */
-
-#define SH64_ELF
-
-#include "sysdep.h"
-#include "bfd.h"
-#include "libbfd.h"
-#include "elf-bfd.h"
-#include "elf/sh.h"
-#include "elf32-sh64.h"
-#include "../opcodes/sh64-opc.h"
-
-static bfd_boolean sh64_address_in_cranges
- (asection *cranges, bfd_vma, sh64_elf_crange *);
-
-/* Ordering functions of a crange, for the qsort and bsearch calls and for
- different endianness. */
-
-int
-_bfd_sh64_crange_qsort_cmpb (const void *p1, const void *p2)
-{
- bfd_vma a1 = bfd_getb32 (p1);
- bfd_vma a2 = bfd_getb32 (p2);
-
- /* Preserve order if there's ambiguous contents. */
- if (a1 == a2)
- return (char *) p1 - (char *) p2;
-
- return a1 - a2;
-}
-
-int
-_bfd_sh64_crange_qsort_cmpl (const void *p1, const void *p2)
-{
- bfd_vma a1 = (bfd_vma) bfd_getl32 (p1);
- bfd_vma a2 = (bfd_vma) bfd_getl32 (p2);
-
- /* Preserve order if there's ambiguous contents. */
- if (a1 == a2)
- return (char *) p1 - (char *) p2;
-
- return a1 - a2;
-}
-
-int
-_bfd_sh64_crange_bsearch_cmpb (const void *p1, const void *p2)
-{
- bfd_vma a1 = *(bfd_vma *) p1;
- bfd_vma a2 = (bfd_vma) bfd_getb32 (p2);
- bfd_size_type size
- = (bfd_size_type) bfd_getb32 (SH64_CRANGE_CR_SIZE_OFFSET + (char *) p2);
-
- if (a1 >= a2 + size)
- return 1;
- if (a1 < a2)
- return -1;
- return 0;
-}
-
-int
-_bfd_sh64_crange_bsearch_cmpl (const void *p1, const void *p2)
-{
- bfd_vma a1 = *(bfd_vma *) p1;
- bfd_vma a2 = (bfd_vma) bfd_getl32 (p2);
- bfd_size_type size
- = (bfd_size_type) bfd_getl32 (SH64_CRANGE_CR_SIZE_OFFSET + (char *) p2);
-
- if (a1 >= a2 + size)
- return 1;
- if (a1 < a2)
- return -1;
- return 0;
-}
-
-/* Check whether a specific address is specified within a .cranges
- section. Return FALSE if not found, and TRUE if found, and the region
- filled into RANGEP if non-NULL. */
-
-static bfd_boolean
-sh64_address_in_cranges (asection *cranges, bfd_vma addr,
- sh64_elf_crange *rangep)
-{
- bfd_byte *cranges_contents;
- bfd_byte *found_rangep;
- bfd_size_type cranges_size = cranges->size;
-
- /* If the size is not a multiple of the cranges entry size, then
- something is badly wrong. */
- if ((cranges_size % SH64_CRANGE_SIZE) != 0)
- return FALSE;
-
- /* If this section has relocations, then we can't do anything sane. */
- if (bfd_get_section_flags (cranges->owner, cranges) & SEC_RELOC)
- return FALSE;
-
- /* Has some kind soul (or previous call) left processed, sorted contents
- for us? */
- if ((bfd_get_section_flags (cranges->owner, cranges) & SEC_IN_MEMORY)
- && elf_section_data (cranges)->this_hdr.sh_type == SHT_SH5_CR_SORTED)
- cranges_contents = cranges->contents;
- else
- {
- if (!bfd_malloc_and_get_section (cranges->owner, cranges,
- &cranges_contents))
- goto error_return;
-
- /* Is it sorted? */
- if (elf_section_data (cranges)->this_hdr.sh_type
- != SHT_SH5_CR_SORTED)
- /* Nope. Lets sort it. */
- qsort (cranges_contents, cranges_size / SH64_CRANGE_SIZE,
- SH64_CRANGE_SIZE,
- bfd_big_endian (cranges->owner)
- ? _bfd_sh64_crange_qsort_cmpb : _bfd_sh64_crange_qsort_cmpl);
-
- /* Let's keep it around. */
- cranges->contents = cranges_contents;
- bfd_set_section_flags (cranges->owner, cranges,
- bfd_get_section_flags (cranges->owner, cranges)
- | SEC_IN_MEMORY);
-
- /* It's sorted now. */
- elf_section_data (cranges)->this_hdr.sh_type = SHT_SH5_CR_SORTED;
- }
-
- /* Try and find a matching range. */
- found_rangep
- = bsearch (&addr, cranges_contents, cranges_size / SH64_CRANGE_SIZE,
- SH64_CRANGE_SIZE,
- bfd_big_endian (cranges->owner)
- ? _bfd_sh64_crange_bsearch_cmpb
- : _bfd_sh64_crange_bsearch_cmpl);
-
- /* Fill in a few return values if we found a matching range. */
- if (found_rangep)
- {
- enum sh64_elf_cr_type cr_type
- = bfd_get_16 (cranges->owner,
- SH64_CRANGE_CR_TYPE_OFFSET + found_rangep);
- bfd_vma cr_addr
- = bfd_get_32 (cranges->owner,
- SH64_CRANGE_CR_ADDR_OFFSET
- + (char *) found_rangep);
- bfd_size_type cr_size
- = bfd_get_32 (cranges->owner,
- SH64_CRANGE_CR_SIZE_OFFSET
- + (char *) found_rangep);
-
- rangep->cr_addr = cr_addr;
- rangep->cr_size = cr_size;
- rangep->cr_type = cr_type;
-
- return TRUE;
- }
-
- /* There is a .cranges section, but it does not have a descriptor
- matching this address. */
- return FALSE;
-
-error_return:
- if (cranges_contents != NULL)
- free (cranges_contents);
- return FALSE;
-}
-
-/* Determine what ADDR points to in SEC, and fill in a range descriptor in
- *RANGEP if it's non-NULL. */
-
-enum sh64_elf_cr_type
-sh64_get_contents_type (asection *sec, bfd_vma addr, sh64_elf_crange *rangep)
-{
- asection *cranges;
-
- /* Fill in the range with the boundaries of the section as a default. */
- if (bfd_get_flavour (sec->owner) == bfd_target_elf_flavour
- && elf_elfheader (sec->owner)->e_type == ET_EXEC)
- {
- rangep->cr_addr = bfd_get_section_vma (sec->owner, sec);
- rangep->cr_size = sec->size;
- rangep->cr_type = CRT_NONE;
- }
- else
- return FALSE;
-
- /* If none of the pertinent bits are set, then it's a SHcompact (or at
- least not SHmedia). */
- if ((elf_section_data (sec)->this_hdr.sh_flags
- & (SHF_SH5_ISA32 | SHF_SH5_ISA32_MIXED)) == 0)
- {
- enum sh64_elf_cr_type cr_type
- = ((bfd_get_section_flags (sec->owner, sec) & SEC_CODE) != 0
- ? CRT_SH5_ISA16 : CRT_DATA);
- rangep->cr_type = cr_type;
- return cr_type;
- }
-
- /* If only the SHF_SH5_ISA32 bit is set, then we have SHmedia. */
- if ((elf_section_data (sec)->this_hdr.sh_flags
- & (SHF_SH5_ISA32 | SHF_SH5_ISA32_MIXED)) == SHF_SH5_ISA32)
- {
- rangep->cr_type = CRT_SH5_ISA32;
- return CRT_SH5_ISA32;
- }
-
- /* Otherwise, we have to look up the .cranges section. */
- cranges = bfd_get_section_by_name (sec->owner, SH64_CRANGES_SECTION_NAME);
-
- if (cranges == NULL)
- /* A mixed section but there's no .cranges section. This is probably
- bad input; it does not comply to specs. */
- return CRT_NONE;
-
- /* If this call fails, we will still have CRT_NONE in rangep->cr_type
- and that will be suitable to return. */
- sh64_address_in_cranges (cranges, addr, rangep);
-
- return rangep->cr_type;
-}
-
-/* This is a simpler exported interface for the benefit of gdb et al. */
-
-bfd_boolean
-sh64_address_is_shmedia (asection *sec, bfd_vma addr)
-{
- sh64_elf_crange dummy;
- return sh64_get_contents_type (sec, addr, &dummy) == CRT_SH5_ISA32;
-}
diff --git a/bfd/elf32-sh64.c b/bfd/elf32-sh64.c
deleted file mode 100644
index b635841..0000000
--- a/bfd/elf32-sh64.c
+++ /dev/null
@@ -1,814 +0,0 @@
-/* SuperH SH64-specific support for 32-bit ELF
- Copyright (C) 2000-2018 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
- MA 02110-1301, USA. */
-
-#define SH64_ELF
-
-#include "sysdep.h"
-#include "bfd.h"
-#include "elf-bfd.h"
-#include "../opcodes/sh64-opc.h"
-#include "elf32-sh64.h"
-
-/* Add a suffix for datalabel indirection symbols. It must not match any
- other symbols; user symbols with or without version or other
- decoration. It must only be used internally and not emitted by any
- means. */
-#define DATALABEL_SUFFIX " DL"
-
-/* Used to hold data for function called through bfd_map_over_sections. */
-struct sh64_find_section_vma_data
- {
- asection *section;
- bfd_vma addr;
- };
-
-static bfd_boolean sh64_elf_new_section_hook
- (bfd *, asection *);
-static bfd_boolean sh64_elf_copy_private_data
- (bfd *, bfd *);
-static bfd_boolean sh64_elf_merge_private_data
- (bfd *, struct bfd_link_info *);
-static bfd_boolean sh64_elf_fake_sections
- (bfd *, Elf_Internal_Shdr *, asection *);
-static bfd_boolean sh64_elf_set_private_flags
- (bfd *, flagword);
-static bfd_boolean sh64_elf_set_mach_from_flags
- (bfd *);
-static bfd_boolean shmedia_prepare_reloc
- (struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- const Elf_Internal_Rela *, bfd_vma *);
-static int sh64_elf_get_symbol_type
- (Elf_Internal_Sym *, int);
-static bfd_boolean sh64_elf_add_symbol_hook
- (bfd *, struct bfd_link_info *, Elf_Internal_Sym *, const char **,
- flagword *, asection **, bfd_vma *);
-static int sh64_elf_link_output_symbol_hook
- (struct bfd_link_info *, const char *, Elf_Internal_Sym *, asection *,
- struct elf_link_hash_entry *);
-static bfd_boolean sh64_backend_section_from_shdr
- (bfd *, Elf_Internal_Shdr *, const char *, int);
-static void sh64_elf_final_write_processing
- (bfd *, bfd_boolean);
-static bfd_boolean sh64_bfd_elf_copy_private_section_data
- (bfd *, asection *, bfd *, asection *);
-static void sh64_find_section_for_address
- (bfd *, asection *, void *);
-
-/* Let elf32-sh.c handle the "bfd_" definitions, so we only have to
- intrude with an #ifndef around the function definition. */
-#define sh_elf_copy_private_data sh64_elf_copy_private_data
-#define sh_elf_merge_private_data sh64_elf_merge_private_data
-#define sh_elf_set_private_flags sh64_elf_set_private_flags
-/* Typo in elf32-sh.c (and unlinear name). */
-#define bfd_elf32_bfd_set_private_flags sh64_elf_set_private_flags
-#define sh_elf_set_mach_from_flags sh64_elf_set_mach_from_flags
-
-#define elf_backend_sign_extend_vma 1
-#define elf_backend_fake_sections sh64_elf_fake_sections
-#define elf_backend_get_symbol_type sh64_elf_get_symbol_type
-#define elf_backend_add_symbol_hook sh64_elf_add_symbol_hook
-#define elf_backend_link_output_symbol_hook \
- sh64_elf_link_output_symbol_hook
-#define elf_backend_merge_symbol_attribute sh64_elf_merge_symbol_attribute
-#define elf_backend_final_write_processing sh64_elf_final_write_processing
-#define elf_backend_section_from_shdr sh64_backend_section_from_shdr
-#define elf_backend_special_sections sh64_elf_special_sections
-#define elf_backend_section_flags sh64_elf_section_flags
-
-#define bfd_elf32_new_section_hook sh64_elf_new_section_hook
-
-/* For objcopy, we need to set up sh64_elf_section_data (asection *) from
- incoming section flags. This is otherwise done in sh64elf.em when
- linking or tc-sh64.c when assembling. */
-#define bfd_elf32_bfd_copy_private_section_data \
- sh64_bfd_elf_copy_private_section_data
-
-/* This COFF-only function (only compiled with COFF support, making
- ELF-only chains problematic) returns TRUE early for SH4, so let's just
- define it TRUE here. */
-#define _bfd_sh_align_load_span(a,b,c,d,e,f,g,h,i,j) \
- ((void) f, (void) h, (void) i, TRUE)
-
-#define GOT_BIAS (-((long)-32768))
-#define INCLUDE_SHMEDIA
-#define SH_TARGET_ALREADY_DEFINED
-#include "elf32-sh.c"
-
-/* Tack some extra info on struct bfd_elf_section_data. */
-
-static bfd_boolean
-sh64_elf_new_section_hook (bfd *abfd, asection *sec)
-{
- if (!sec->used_by_bfd)
- {
- struct _sh64_elf_section_data *sdata;
- bfd_size_type amt = sizeof (*sdata);
-
- sdata = bfd_zalloc (abfd, amt);
- if (sdata == NULL)
- return FALSE;
- sec->used_by_bfd = sdata;
- }
-
- return _bfd_elf_new_section_hook (abfd, sec);
-}
-
-/* Set the SHF_SH5_ISA32 flag for ISA SHmedia code sections, and pass
- through SHT_SH5_CR_SORTED on a sorted .cranges section. */
-
-bfd_boolean
-sh64_elf_fake_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
- Elf_Internal_Shdr *elf_section_hdr,
- asection *asect)
-{
- if (sh64_elf_section_data (asect)->sh64_info != NULL)
- elf_section_hdr->sh_flags
- |= sh64_elf_section_data (asect)->sh64_info->contents_flags;
-
- /* If this section has the SEC_SORT_ENTRIES flag set, it is a sorted
- .cranges section passing through objcopy. */
- if ((bfd_get_section_flags (output_bfd, asect) & SEC_SORT_ENTRIES) != 0
- && strcmp (bfd_get_section_name (output_bfd, asect),
- SH64_CRANGES_SECTION_NAME) == 0)
- elf_section_hdr->sh_type = SHT_SH5_CR_SORTED;
-
- return TRUE;
-}
-
-static bfd_boolean
-sh64_elf_set_mach_from_flags (bfd *abfd)
-{
- flagword flags = elf_elfheader (abfd)->e_flags;
-
- switch (flags & EF_SH_MACH_MASK)
- {
- case EF_SH5:
- /* These are fit to execute on SH5. Just one but keep the switch
- construct to make additions easy. */
- bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh5);
- break;
-
- default:
- bfd_set_error (bfd_error_wrong_format);
- return FALSE;
- }
-
- return TRUE;
-}
-
-static bfd_boolean
-sh64_elf_section_flags (flagword *flags,
- const Elf_Internal_Shdr *hdr)
-{
- if (hdr->bfd_section == NULL)
- return FALSE;
-
- if (strcmp (hdr->bfd_section->name, SH64_CRANGES_SECTION_NAME) == 0)
- *flags |= SEC_DEBUGGING;
-
- return TRUE;
-}
-
-static bfd_boolean
-sh64_elf_copy_private_data (bfd * ibfd, bfd * obfd)
-{
- if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return TRUE;
-
- BFD_ASSERT (!elf_flags_init (obfd)
- || (elf_elfheader (obfd)->e_flags
- == elf_elfheader (ibfd)->e_flags));
-
- elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
-
- return _bfd_elf_copy_private_bfd_data (ibfd, obfd);
-}
-
-static bfd_boolean
-sh64_elf_merge_private_data (bfd *ibfd, struct bfd_link_info *info)
-{
- bfd *obfd = info->output_bfd;
- flagword old_flags, new_flags;
-
- if (! _bfd_generic_verify_endian_match (ibfd, info))
- return FALSE;
-
- if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return TRUE;
-
- if (bfd_get_arch_size (ibfd) != bfd_get_arch_size (obfd))
- {
- const char *msg;
-
- if (bfd_get_arch_size (ibfd) == 32
- && bfd_get_arch_size (obfd) == 64)
- /* xgettext:c-format */
- msg = _("%pB: compiled as 32-bit object and %pB is 64-bit");
- else if (bfd_get_arch_size (ibfd) == 64
- && bfd_get_arch_size (obfd) == 32)
- /* xgettext:c-format */
- msg = _("%pB: compiled as 64-bit object and %pB is 32-bit");
- else
- /* xgettext:c-format */
- msg = _("%pB: object size does not match that of target %pB");
-
- _bfd_error_handler (msg, ibfd, obfd);
- bfd_set_error (bfd_error_wrong_format);
- return FALSE;
- }
-
- old_flags = elf_elfheader (obfd)->e_flags;
- new_flags = elf_elfheader (ibfd)->e_flags;
- if (! elf_flags_init (obfd))
- {
- /* This happens when ld starts out with a 'blank' output file. */
- elf_flags_init (obfd) = TRUE;
- elf_elfheader (obfd)->e_flags = old_flags = new_flags;
- }
- /* We don't allow linking in non-SH64 code. */
- else if ((new_flags & EF_SH_MACH_MASK) != EF_SH5)
- {
- _bfd_error_handler
- ("%pB: uses non-SH64 instructions while previous modules"
- " use SH64 instructions",
- ibfd);
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
- /* I can't think of anything sane other than old_flags being EF_SH5 and
- that we need to preserve that. */
- elf_elfheader (obfd)->e_flags = old_flags;
- return sh64_elf_set_mach_from_flags (obfd);
-}
-
-/* Handle a SH64-specific section when reading an object file. This
- is called when bfd_section_from_shdr finds a section with an unknown
- type.
-
- We only recognize SHT_SH5_CR_SORTED, on the .cranges section. */
-
-bfd_boolean
-sh64_backend_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr,
- const char *name, int shindex)
-{
- flagword flags = 0;
-
- /* We do like MIPS with a bit switch for recognized types, and returning
- FALSE for a recognized section type with an unexpected name. Right
- now we only have one recognized type, but that might change. */
- switch (hdr->sh_type)
- {
- case SHT_SH5_CR_SORTED:
- if (strcmp (name, SH64_CRANGES_SECTION_NAME) != 0)
- return FALSE;
-
- /* We set the SEC_SORT_ENTRIES flag so it can be passed on to
- sh64_elf_fake_sections, keeping SHT_SH5_CR_SORTED if this object
- passes through objcopy. Perhaps it is brittle; the flag can
- suddenly be used by other BFD parts, but it seems not really used
- anywhere at the moment. */
- flags = SEC_DEBUGGING | SEC_SORT_ENTRIES;
- break;
-
- default:
- return FALSE;
- }
-
- if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
- return FALSE;
-
- if (flags
- && ! bfd_set_section_flags (abfd, hdr->bfd_section,
- bfd_get_section_flags (abfd,
- hdr->bfd_section)
- | flags))
- return FALSE;
-
- return TRUE;
-}
-
-/* In contrast to sh64_backend_section_from_shdr, this is called for all
- sections, but only when copying sections, not when linking or
- assembling. We need to set up the sh64_elf_section_data (asection *)
- structure for the SH64 ELF section flags to be copied correctly. */
-
-bfd_boolean
-sh64_bfd_elf_copy_private_section_data (bfd *ibfd, asection *isec,
- bfd *obfd, asection *osec)
-{
- struct sh64_section_data *sh64_sec_data;
-
- if (ibfd->xvec->flavour != bfd_target_elf_flavour
- || obfd->xvec->flavour != bfd_target_elf_flavour)
- return TRUE;
-
- if (! _bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec))
- return FALSE;
-
- sh64_sec_data = sh64_elf_section_data (isec)->sh64_info;
- if (sh64_sec_data == NULL)
- {
- sh64_sec_data = bfd_zmalloc (sizeof (struct sh64_section_data));
-
- if (sh64_sec_data == NULL)
- return FALSE;
-
- sh64_sec_data->contents_flags
- = (elf_section_data (isec)->this_hdr.sh_flags
- & (SHF_SH5_ISA32 | SHF_SH5_ISA32_MIXED));
-
- sh64_elf_section_data (osec)->sh64_info = sh64_sec_data;
- }
-
- return TRUE;
-}
-
-/* Function to keep SH64 specific file flags. */
-
-static bfd_boolean
-sh64_elf_set_private_flags (bfd *abfd, flagword flags)
-{
- BFD_ASSERT (! elf_flags_init (abfd)
- || elf_elfheader (abfd)->e_flags == flags);
-
- elf_elfheader (abfd)->e_flags = flags;
- elf_flags_init (abfd) = TRUE;
- return sh64_elf_set_mach_from_flags (abfd);
-}
-
-/* Called when writing out an object file to decide the type of a symbol. */
-
-static int
-sh64_elf_get_symbol_type (Elf_Internal_Sym *elf_sym, int type)
-{
- if (ELF_ST_TYPE (elf_sym->st_info) == STT_DATALABEL)
- return STT_DATALABEL;
-
- return type;
-}
-
-/* Hook called by the linker routine which adds symbols from an object
- file. We must make indirect symbols for undefined symbols marked with
- STT_DATALABEL, so relocations passing them will pick up that attribute
- and neutralize STO_SH5_ISA32 found on the symbol definition.
-
- There is a problem, though: We want to fill in the hash-table entry for
- this symbol and signal to the caller that no further processing is
- needed. But we don't have the index for this hash-table entry. We
- rely here on that the current entry is the first hash-entry with NULL,
- which seems brittle. Also, iterating over the hash-table to find that
- entry is a linear operation on the number of symbols in this input
- file, and this function should take constant time, so that's not good
- too. Only comfort is that DataLabel references should only be found in
- hand-written assembly code and thus be rare. FIXME: Talk maintainers
- into adding an option to elf_add_symbol_hook (preferably) for the index
- or the hash entry, alternatively adding the index to Elf_Internal_Sym
- (not so good). */
-
-static bfd_boolean
-sh64_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
- Elf_Internal_Sym *sym, const char **namep,
- flagword *flagsp ATTRIBUTE_UNUSED,
- asection **secp, bfd_vma *valp)
-{
- /* We want to do this for relocatable as well as final linking. */
- if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL
- && is_elf_hash_table (info->hash))
- {
- struct elf_link_hash_entry *h;
-
- /* For relocatable links, we register the DataLabel sym in its own
- right, and tweak the name when it's output. Otherwise, we make
- an indirect symbol of it. */
- flagword flags
- = bfd_link_relocatable (info) || info->emitrelocations
- ? BSF_GLOBAL : BSF_GLOBAL | BSF_INDIRECT;
-
- char *dl_name
- = bfd_malloc (strlen (*namep) + sizeof (DATALABEL_SUFFIX));
- struct elf_link_hash_entry ** sym_hash = elf_sym_hashes (abfd);
-
- BFD_ASSERT (sym_hash != NULL);
-
- /* Allocation may fail. */
- if (dl_name == NULL)
- return FALSE;
-
- strcpy (dl_name, *namep);
- strcat (dl_name, DATALABEL_SUFFIX);
-
- h = (struct elf_link_hash_entry *)
- bfd_link_hash_lookup (info->hash, dl_name, FALSE, FALSE, FALSE);
-
- if (h == NULL)
- {
- /* No previous datalabel symbol. Make one. */
- struct bfd_link_hash_entry *bh = NULL;
- const struct elf_backend_data *bed = get_elf_backend_data (abfd);
-
- if (! _bfd_generic_link_add_one_symbol (info, abfd, dl_name,
- flags, *secp, *valp,
- *namep, FALSE,
- bed->collect, &bh))
- {
- free (dl_name);
- return FALSE;
- }
-
- h = (struct elf_link_hash_entry *) bh;
- h->non_elf = 0;
- h->type = STT_DATALABEL;
- }
- else
- /* If a new symbol was created, it holds the allocated name.
- Otherwise, we don't need it anymore and should deallocate it. */
- free (dl_name);
-
- if (h->type != STT_DATALABEL
- || ((bfd_link_relocatable (info) || info->emitrelocations)
- && h->root.type != bfd_link_hash_undefined)
- || (! bfd_link_relocatable (info) && !info->emitrelocations
- && h->root.type != bfd_link_hash_indirect))
- {
- /* Make sure we don't get confused on invalid input. */
- _bfd_error_handler
- (_("%pB: encountered datalabel symbol in input"), abfd);
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
- /* Now find the hash-table slot for this entry and fill it in. */
- while (*sym_hash != NULL)
- sym_hash++;
- *sym_hash = h;
-
- /* Signal to caller to skip this symbol - we've handled it. */
- *namep = NULL;
- }
-
- return TRUE;
-}
-
-/* This hook function is called before the linker writes out a global
- symbol. For relocatable links, DataLabel symbols will be present in
- linker output. We cut off the special suffix on those symbols, so the
- right name appears in the output.
-
- When linking and emitting relocations, there can appear global symbols
- that are not referenced by relocs, but rather only implicitly through
- DataLabel references, a relation that is not visible to the linker.
- Since no stripping of global symbols in done when doing such linking,
- we don't need to look up and make sure to emit the main symbol for each
- DataLabel symbol. */
-
-static int
-sh64_elf_link_output_symbol_hook (struct bfd_link_info *info,
- const char *cname,
- Elf_Internal_Sym *sym,
- asection *input_sec ATTRIBUTE_UNUSED,
- struct elf_link_hash_entry *h ATTRIBUTE_UNUSED)
-{
- char *name = (char *) cname;
-
- if (bfd_link_relocatable (info) || info->emitrelocations)
- {
- if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL)
- name[strlen (name) - strlen (DATALABEL_SUFFIX)] = 0;
- }
-
- return 1;
-}
-
-/* Check a SH64-specific reloc and put the value to relocate to into
- RELOCATION, ready to pass to _bfd_final_link_relocate. Return FALSE if
- bad value, TRUE if ok. */
-
-static bfd_boolean
-shmedia_prepare_reloc (struct bfd_link_info *info, bfd *abfd,
- asection *input_section, bfd_byte *contents,
- const Elf_Internal_Rela *rel, bfd_vma *relocation)
-{
- bfd_vma disp, dropped;
-
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_SH_PT_16:
- /* Check the lowest bit of the destination field. If it is 1, we
- check the ISA type of the destination (i.e. the low bit of the
- "relocation" value, and emit an error if the instruction does not
- match). If it is 0, we change a PTA to PTB. There should never
- be a PTB that should change to a PTA; that indicates a toolchain
- error; a mismatch with GAS. */
- {
- char *msg = NULL;
- bfd_vma insn = bfd_get_32 (abfd, contents + rel->r_offset);
-
- if (insn & (1 << 10))
- {
- /* Check matching insn and ISA (address of target). */
- if ((insn & SHMEDIA_PTB_BIT) != 0
- && ((*relocation + rel->r_addend) & 1) != 0)
- msg = _("PTB mismatch: a SHmedia address (bit 0 == 1)");
- else if ((insn & SHMEDIA_PTB_BIT) == 0
- && ((*relocation + rel->r_addend) & 1) == 0)
- msg = _("PTA mismatch: a SHcompact address (bit 0 == 0)");
-
- if (msg != NULL)
- (*info->callbacks->reloc_dangerous)
- (info, msg, abfd, input_section, rel->r_offset);
- }
- else
- {
- /* We shouldn't get here with a PTB insn and a R_SH_PT_16. It
- means GAS output does not match expectations; a PTA or PTB
- expressed as such (or a PT found at assembly to be PTB)
- would match the test above, and PT expansion with an
- unknown destination (or when relaxing) will get us here. */
- if ((insn & SHMEDIA_PTB_BIT) != 0)
- {
- _bfd_error_handler
- (_("%pB: GAS error: unexpected PTB insn with R_SH_PT_16"),
- input_section->owner);
- return FALSE;
- }
-
- /* Change the PTA to a PTB, if destination indicates so. */
- if (((*relocation + rel->r_addend) & 1) == 0)
- bfd_put_32 (abfd, insn | SHMEDIA_PTB_BIT,
- contents + rel->r_offset);
- }
- }
-
- case R_SH_SHMEDIA_CODE:
- case R_SH_DIR5U:
- case R_SH_DIR6S:
- case R_SH_DIR6U:
- case R_SH_DIR10S:
- case R_SH_DIR10SW:
- case R_SH_DIR10SL:
- case R_SH_DIR10SQ:
- case R_SH_IMMS16:
- case R_SH_IMMU16:
- case R_SH_IMM_LOW16:
- case R_SH_IMM_LOW16_PCREL:
- case R_SH_IMM_MEDLOW16:
- case R_SH_IMM_MEDLOW16_PCREL:
- case R_SH_IMM_MEDHI16:
- case R_SH_IMM_MEDHI16_PCREL:
- case R_SH_IMM_HI16:
- case R_SH_IMM_HI16_PCREL:
- case R_SH_64:
- case R_SH_64_PCREL:
- break;
-
- default:
- return FALSE;
- }
-
- disp = (*relocation & 0xf);
- dropped = 0;
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_SH_DIR10SW: dropped = disp & 1; break;
- case R_SH_DIR10SL: dropped = disp & 3; break;
- case R_SH_DIR10SQ: dropped = disp & 7; break;
- }
- if (dropped != 0)
- {
- _bfd_error_handler
- /* xgettext:c-format */
- (_("%pB: error: unaligned relocation type %d "
- "at %#" PRIx64 " reloc %#" PRIx64),
- input_section->owner, (int) ELF32_R_TYPE (rel->r_info),
- (uint64_t) rel->r_offset, (uint64_t) *relocation);
- return FALSE;
- }
-
- return TRUE;
-}
-
-/* Helper function to locate the section holding a certain address. This
- is called via bfd_map_over_sections. */
-
-static void
-sh64_find_section_for_address (bfd *abfd ATTRIBUTE_UNUSED,
- asection *section, void *data)
-{
- bfd_vma vma;
- bfd_size_type size;
-
- struct sh64_find_section_vma_data *fsec_datap
- = (struct sh64_find_section_vma_data *) data;
-
- /* Return if already found. */
- if (fsec_datap->section)
- return;
-
- /* If this section isn't part of the addressable contents, skip it. */
- if ((bfd_get_section_flags (abfd, section) & SEC_ALLOC) == 0)
- return;
-
- vma = bfd_get_section_vma (abfd, section);
- if (fsec_datap->addr < vma)
- return;
-
- size = section->size;
- if (fsec_datap->addr >= vma + size)
- return;
-
- fsec_datap->section = section;
-}
-
-/* Make sure to write out the generated entries in the .cranges section
- when doing partial linking, and set bit 0 on the entry address if it
- points to SHmedia code and write sorted .cranges entries when writing
- executables (final linking and objcopy). */
-
-static void
-sh64_elf_final_write_processing (bfd *abfd,
- bfd_boolean linker ATTRIBUTE_UNUSED)
-{
- bfd_vma ld_generated_cranges_size;
- asection *cranges
- = bfd_get_section_by_name (abfd, SH64_CRANGES_SECTION_NAME);
-
- /* If no new .cranges were added, the generic ELF linker parts will
- write it all out. If not, we need to write them out when doing
- partial linking. For a final link, we will sort them and write them
- all out further below. */
- if (linker
- && cranges != NULL
- && elf_elfheader (abfd)->e_type != ET_EXEC
- && (ld_generated_cranges_size
- = sh64_elf_section_data (cranges)->sh64_info->cranges_growth) != 0)
- {
- bfd_vma incoming_cranges_size
- = cranges->size - ld_generated_cranges_size;
-
- if (! bfd_set_section_contents (abfd, cranges,
- cranges->contents
- + incoming_cranges_size,
- cranges->output_offset
- + incoming_cranges_size,
- ld_generated_cranges_size))
- {
- bfd_set_error (bfd_error_file_truncated);
- _bfd_error_handler
- (_("%pB: could not write out added .cranges entries"), abfd);
- }
- }
-
- /* Only set entry address bit 0 and sort .cranges when linking to an
- executable; never with objcopy or strip. */
- if (linker && elf_elfheader (abfd)->e_type == ET_EXEC)
- {
- struct sh64_find_section_vma_data fsec_data;
- sh64_elf_crange dummy;
-
- /* For a final link, set the low bit of the entry address to
- reflect whether or not it is a SHmedia address.
- FIXME: Perhaps we shouldn't do this if the entry address was
- supplied numerically, but we currently lack the infrastructure to
- recognize that: The entry symbol, and info whether it is numeric
- or a symbol name is kept private in the linker. */
- fsec_data.addr = elf_elfheader (abfd)->e_entry;
- fsec_data.section = NULL;
-
- bfd_map_over_sections (abfd, sh64_find_section_for_address,
- &fsec_data);
- if (fsec_data.section
- && (sh64_get_contents_type (fsec_data.section,
- elf_elfheader (abfd)->e_entry,
- &dummy) == CRT_SH5_ISA32))
- elf_elfheader (abfd)->e_entry |= 1;
-
- /* If we have a .cranges section, sort the entries. */
- if (cranges != NULL)
- {
- bfd_size_type cranges_size = cranges->size;
-
- /* We know we always have these in memory at this time. */
- BFD_ASSERT (cranges->contents != NULL);
-
- /* The .cranges may already have been sorted in the process of
- finding out the ISA-type of the entry address. If not, we do
- it here. */
- if (elf_section_data (cranges)->this_hdr.sh_type
- != SHT_SH5_CR_SORTED)
- {
- qsort (cranges->contents, cranges_size / SH64_CRANGE_SIZE,
- SH64_CRANGE_SIZE,
- bfd_big_endian (cranges->owner)
- ? _bfd_sh64_crange_qsort_cmpb
- : _bfd_sh64_crange_qsort_cmpl);
- elf_section_data (cranges)->this_hdr.sh_type
- = SHT_SH5_CR_SORTED;
- }
-
- /* We need to write it out in whole as sorted. */
- if (! bfd_set_section_contents (abfd, cranges,
- cranges->contents,
- cranges->output_offset,
- cranges_size))
- {
- bfd_set_error (bfd_error_file_truncated);
- _bfd_error_handler
- (_("%pB: could not write out sorted .cranges entries"), abfd);
- }
- }
- }
-}
-
-/* Merge non visibility st_other attribute when the symbol comes from
- a dynamic object. */
-static void
-sh64_elf_merge_symbol_attribute (struct elf_link_hash_entry *h,
- const Elf_Internal_Sym *isym,
- bfd_boolean definition,
- bfd_boolean dynamic ATTRIBUTE_UNUSED)
-{
- if ((isym->st_other & ~ELF_ST_VISIBILITY (-1)) != 0)
- {
- unsigned char other;
-
- /* Take the balance of OTHER from the definition. */
- other = (definition ? isym->st_other : h->other);
- other &= ~ ELF_ST_VISIBILITY (-1);
- h->other = other | ELF_ST_VISIBILITY (h->other);
- }
-
- return;
-}
-
-static const struct bfd_elf_special_section sh64_elf_special_sections[] =
-{
- { STRING_COMMA_LEN (".cranges"), 0, SHT_PROGBITS, 0 },
- { NULL, 0, 0, 0, 0 }
-};
-
-#undef TARGET_BIG_SYM
-#define TARGET_BIG_SYM sh64_elf32_vec
-#undef TARGET_BIG_NAME
-#define TARGET_BIG_NAME "elf32-sh64"
-#undef TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM sh64_elf32_le_vec
-#undef TARGET_LITTLE_NAME
-#define TARGET_LITTLE_NAME "elf32-sh64l"
-
-#include "elf32-target.h"
-
-/* NetBSD support. */
-#undef TARGET_BIG_SYM
-#define TARGET_BIG_SYM sh64_elf32_nbsd_vec
-#undef TARGET_BIG_NAME
-#define TARGET_BIG_NAME "elf32-sh64-nbsd"
-#undef TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM sh64_elf32_nbsd_le_vec
-#undef TARGET_LITTLE_NAME
-#define TARGET_LITTLE_NAME "elf32-sh64l-nbsd"
-#undef ELF_MAXPAGESIZE
-#define ELF_MAXPAGESIZE 0x10000
-#undef ELF_COMMONPAGESIZE
-#undef elf_symbol_leading_char
-#define elf_symbol_leading_char 0
-#undef elf32_bed
-#define elf32_bed elf32_sh64_nbsd_bed
-
-#include "elf32-target.h"
-
-/* Linux support. */
-#undef TARGET_BIG_SYM
-#define TARGET_BIG_SYM sh64_elf32_linux_be_vec
-#undef TARGET_BIG_NAME
-#define TARGET_BIG_NAME "elf32-sh64big-linux"
-#undef TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM sh64_elf32_linux_vec
-#undef TARGET_LITTLE_NAME
-#define TARGET_LITTLE_NAME "elf32-sh64-linux"
-#undef elf32_bed
-#define elf32_bed elf32_sh64_lin_bed
-#undef ELF_COMMONPAGESIZE
-#define ELF_COMMONPAGESIZE 0x1000
-
-#include "elf32-target.h"
-
diff --git a/bfd/elf32-sh64.h b/bfd/elf32-sh64.h
deleted file mode 100644
index 83065e7..0000000
--- a/bfd/elf32-sh64.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* SH ELF support for BFD.
- Copyright (C) 2003-2018 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef ELF32_SH64_H
-#define ELF32_SH64_H
-
-#define SH64_CRANGES_SECTION_NAME ".cranges"
-enum sh64_elf_cr_type {
- CRT_NONE = 0,
- CRT_DATA = 1,
- CRT_SH5_ISA16 = 2,
- CRT_SH5_ISA32 = 3
-};
-
-/* The official definition is this:
-
- typedef struct {
- Elf32_Addr cr_addr;
- Elf32_Word cr_size;
- Elf32_Half cr_type;
- } Elf32_CRange;
-
- but we have no use for that exact type. Instead we use this struct for
- the internal representation. */
-typedef struct {
- bfd_vma cr_addr;
- bfd_size_type cr_size;
- enum sh64_elf_cr_type cr_type;
-} sh64_elf_crange;
-
-#define SH64_CRANGE_SIZE (4 + 4 + 2)
-#define SH64_CRANGE_CR_ADDR_OFFSET 0
-#define SH64_CRANGE_CR_SIZE_OFFSET 4
-#define SH64_CRANGE_CR_TYPE_OFFSET (4 + 4)
-
-/* Get the contents type of an arbitrary address, or return CRT_NONE. */
-extern enum sh64_elf_cr_type sh64_get_contents_type
- (asection *, bfd_vma, sh64_elf_crange *);
-
-/* Simpler interface.
- FIXME: This seems redundant now that we export the interface above. */
-extern bfd_boolean sh64_address_is_shmedia
- (asection *, bfd_vma);
-
-extern int _bfd_sh64_crange_qsort_cmpb
- (const void *, const void *);
-extern int _bfd_sh64_crange_qsort_cmpl
- (const void *, const void *);
-extern int _bfd_sh64_crange_bsearch_cmpb
- (const void *, const void *);
-extern int _bfd_sh64_crange_bsearch_cmpl
- (const void *, const void *);
-
-struct sh64_section_data
-{
- flagword contents_flags;
-
- /* Only used in the cranges section, but we don't have an official
- backend-specific bfd field. */
- bfd_size_type cranges_growth;
-};
-
-struct _sh64_elf_section_data
-{
- struct bfd_elf_section_data elf;
- struct sh64_section_data *sh64_info;
-};
-
-#define sh64_elf_section_data(sec) \
- ((struct _sh64_elf_section_data *) elf_section_data (sec))
-
-#endif /* ELF32_SH64_H */
diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c
deleted file mode 100644
index b771759..0000000
--- a/bfd/elf64-sh64.c
+++ /dev/null
@@ -1,3987 +0,0 @@
-/* SuperH SH64-specific support for 64-bit ELF
- Copyright (C) 2000-2018 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
- MA 02110-1301, USA. */
-
-#define SH64_ELF64
-
-#include "sysdep.h"
-#include "bfd.h"
-#include "bfdlink.h"
-#include "libbfd.h"
-#include "elf-bfd.h"
-#include "elf/sh.h"
-
-/* Add a suffix for datalabel indirection symbols. It must not match any
- other symbols; user symbols with or without version or other
- decoration. It must only be used internally and not emitted by any
- means. */
-#define DATALABEL_SUFFIX " DL"
-
-#define GOT_BIAS (-((long)-32768))
-
-#define PLT_ENTRY_SIZE 64
-
-/* Return size of a PLT entry. */
-#define elf_sh64_sizeof_plt(info) PLT_ENTRY_SIZE
-
-/* Return offset of the PLT0 address in an absolute PLT entry. */
-#define elf_sh64_plt_plt0_offset(info) 32
-
-/* Return offset of the linker in PLT0 entry. */
-#define elf_sh64_plt0_gotplt_offset(info) 0
-
-/* Return offset of the trampoline in PLT entry */
-#define elf_sh64_plt_temp_offset(info) 33 /* Add one because it's SHmedia. */
-
-/* Return offset of the symbol in PLT entry. */
-#define elf_sh64_plt_symbol_offset(info) 0
-
-/* Return offset of the relocation in PLT entry. */
-#define elf_sh64_plt_reloc_offset(info) (bfd_link_pic (info) ? 52 : 44)
-
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/libc.so.1"
-
-/* The sh linker needs to keep track of the number of relocs that it
- decides to copy in check_relocs for each symbol. This is so that
- it can discard PC relative relocs if it doesn't need them when
- linking with -Bsymbolic. We store the information in a field
- extending the regular ELF linker hash table. */
-
-/* This structure keeps track of the number of PC relative relocs we
- have copied for a given symbol. */
-
-struct elf_sh64_pcrel_relocs_copied
-{
- /* Next section. */
- struct elf_sh64_pcrel_relocs_copied *next;
- /* A section in dynobj. */
- asection *section;
- /* Number of relocs copied in this section. */
- bfd_size_type count;
-};
-
-/* sh ELF linker hash entry. */
-
-struct elf_sh64_link_hash_entry
-{
- struct elf_link_hash_entry root;
-
- bfd_vma datalabel_got_offset;
-
- /* Number of PC relative relocs copied for this symbol. */
- struct elf_sh64_pcrel_relocs_copied *pcrel_relocs_copied;
-};
-
-/* Traverse an sh ELF linker hash table. */
-
-#define sh64_elf64_link_hash_traverse(table, func, info) \
- (elf_link_hash_traverse \
- ((table), \
- (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \
- (info)))
-
-static bfd_reloc_status_type sh_elf64_ignore_reloc
- (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
-static bfd_reloc_status_type sh_elf64_reloc
- (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
-
-static reloc_howto_type sh_elf64_howto_table[] = {
- /* No relocation. */
- HOWTO (R_SH_NONE, /* type */
- 0, /* rightshift */
- 3, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- sh_elf64_ignore_reloc, /* special_function */
- "R_SH_NONE", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* 32 bit absolute relocation. Setting partial_inplace to TRUE and
- src_mask to a non-zero value is similar to the COFF toolchain. */
- HOWTO (R_SH_DIR32, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- sh_elf64_reloc, /* special_function */
- "R_SH_DIR32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* 32 bit PC relative relocation. */
- HOWTO (R_SH_REL32, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- sh_elf64_ignore_reloc, /* special_function */
- "R_SH_REL32", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xffffffff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* For 32-bit sh, this is R_SH_DIR8WPN. */
- EMPTY_HOWTO (3),
-
- /* For 32-bit sh, this is R_SH_IND12W. */
- EMPTY_HOWTO (4),
-
- /* For 32-bit sh, this is R_SH_DIR8WPL. */
- EMPTY_HOWTO (5),
-
- /* For 32-bit sh, this is R_SH_DIR8WPZ. */
- EMPTY_HOWTO (6),
-
- /* For 32-bit sh, this is R_SH_DIR8BP. */
- EMPTY_HOWTO (7),
-
- /* For 32-bit sh, this is R_SH_DIR8W. */
- EMPTY_HOWTO (8),
-
- /* For 32-bit sh, this is R_SH_DIR8L. */
- EMPTY_HOWTO (9),
-
- EMPTY_HOWTO (10),
- EMPTY_HOWTO (11),
- EMPTY_HOWTO (12),
- EMPTY_HOWTO (13),
- EMPTY_HOWTO (14),
- EMPTY_HOWTO (15),
- EMPTY_HOWTO (16),
- EMPTY_HOWTO (17),
- EMPTY_HOWTO (18),
- EMPTY_HOWTO (19),
- EMPTY_HOWTO (20),
- EMPTY_HOWTO (21),
- EMPTY_HOWTO (22),
- EMPTY_HOWTO (23),
- EMPTY_HOWTO (24),
-
- /* The remaining relocs are a GNU extension used for relaxing. The
- final pass of the linker never needs to do anything with any of
- these relocs. Any required operations are handled by the
- relaxation code. */
-
- /* A 16 bit switch table entry. This is generated for an expression
- such as ``.word L1 - L2''. The offset holds the difference
- between the reloc address and L2. */
- HOWTO (R_SH_SWITCH16, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_unsigned, /* complain_on_overflow */
- sh_elf64_ignore_reloc, /* special_function */
- "R_SH_SWITCH16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* A 32 bit switch table entry. This is generated for an expression
- such as ``.long L1 - L2''. The offset holds the difference
- between the reloc address and L2. */
- HOWTO (R_SH_SWITCH32, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_unsigned, /* complain_on_overflow */
- sh_elf64_ignore_reloc, /* special_function */
- "R_SH_SWITCH32", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* For 32-bit sh, this is R_SH_USES. */
- EMPTY_HOWTO (27),
-
- /* For 32-bit sh, this is R_SH_COUNT. */
- EMPTY_HOWTO (28),
-
- /* For 32-bit sh, this is R_SH_ALIGN. FIXME: For linker relaxation,
- this might be emitted. When linker relaxation is implemented, we
- might want to use it. */
- EMPTY_HOWTO (29),
-
- /* For 32-bit sh, this is R_SH_CODE. FIXME: For linker relaxation,
- this might be emitted. When linker relaxation is implemented, we
- might want to use it. */
- EMPTY_HOWTO (30),
-
- /* For 32-bit sh, this is R_SH_DATA. FIXME: For linker relaxation,
- this might be emitted. When linker relaxation is implemented, we
- might want to use it. */
- EMPTY_HOWTO (31),
-
- /* For 32-bit sh, this is R_SH_LABEL. FIXME: For linker relaxation,
- this might be emitted. When linker relaxation is implemented, we
- might want to use it. */
- EMPTY_HOWTO (32),
-
- /* An 8 bit switch table entry. This is generated for an expression
- such as ``.word L1 - L2''. The offset holds the difference
- between the reloc address and L2. */
- HOWTO (R_SH_SWITCH8, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_unsigned, /* complain_on_overflow */
- sh_elf64_ignore_reloc, /* special_function */
- "R_SH_SWITCH8", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* GNU extension to record C++ vtable hierarchy */
- HOWTO (R_SH_GNU_VTINHERIT, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- NULL, /* special_function */
- "R_SH_GNU_VTINHERIT", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* GNU extension to record C++ vtable member usage */
- HOWTO (R_SH_GNU_VTENTRY, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- _bfd_elf_rel_vtable_reloc_fn, /* special_function */
- "R_SH_GNU_VTENTRY", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* For 32-bit sh, this is R_SH_LOOP_START. */
- EMPTY_HOWTO (36),
-
- /* For 32-bit sh, this is R_SH_LOOP_END. */
- EMPTY_HOWTO (37),
-
- EMPTY_HOWTO (38),
- EMPTY_HOWTO (39),
- EMPTY_HOWTO (40),
- EMPTY_HOWTO (41),
- EMPTY_HOWTO (42),
- EMPTY_HOWTO (43),
- EMPTY_HOWTO (44),
-
- /* Used in SHLLI.L and SHLRI.L. */
- HOWTO (R_SH_DIR5U, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 5, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_unsigned, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_DIR5U", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xfc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in SHARI, SHLLI et al. */
- HOWTO (R_SH_DIR6U, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 6, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_unsigned, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_DIR6U", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xfc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in BxxI, LDHI.L et al. */
- HOWTO (R_SH_DIR6S, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 6, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_DIR6S", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xfc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in ADDI, ANDI et al. */
- HOWTO (R_SH_DIR10S, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 10, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_DIR10S", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in LD.UW, ST.W et al. */
- HOWTO (R_SH_DIR10SW, /* type */
- 1, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 11, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_DIR10SW", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in LD.L, FLD.S et al. */
- HOWTO (R_SH_DIR10SL, /* type */
- 2, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 12, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_DIR10SL", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in FLD.D, FST.P et al. */
- HOWTO (R_SH_DIR10SQ, /* type */
- 3, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 13, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_DIR10SQ", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- EMPTY_HOWTO (52),
- EMPTY_HOWTO (53),
- EMPTY_HOWTO (54),
- EMPTY_HOWTO (55),
- EMPTY_HOWTO (56),
- EMPTY_HOWTO (57),
- EMPTY_HOWTO (58),
- EMPTY_HOWTO (59),
- EMPTY_HOWTO (60),
- EMPTY_HOWTO (61),
- EMPTY_HOWTO (62),
- EMPTY_HOWTO (63),
- EMPTY_HOWTO (64),
- EMPTY_HOWTO (65),
- EMPTY_HOWTO (66),
- EMPTY_HOWTO (67),
- EMPTY_HOWTO (68),
- EMPTY_HOWTO (69),
- EMPTY_HOWTO (70),
- EMPTY_HOWTO (71),
- EMPTY_HOWTO (72),
- EMPTY_HOWTO (73),
- EMPTY_HOWTO (74),
- EMPTY_HOWTO (75),
- EMPTY_HOWTO (76),
- EMPTY_HOWTO (77),
- EMPTY_HOWTO (78),
- EMPTY_HOWTO (79),
- EMPTY_HOWTO (80),
- EMPTY_HOWTO (81),
- EMPTY_HOWTO (82),
- EMPTY_HOWTO (83),
- EMPTY_HOWTO (84),
- EMPTY_HOWTO (85),
- EMPTY_HOWTO (86),
- EMPTY_HOWTO (87),
- EMPTY_HOWTO (88),
- EMPTY_HOWTO (89),
- EMPTY_HOWTO (90),
- EMPTY_HOWTO (91),
- EMPTY_HOWTO (92),
- EMPTY_HOWTO (93),
- EMPTY_HOWTO (94),
- EMPTY_HOWTO (95),
- EMPTY_HOWTO (96),
- EMPTY_HOWTO (97),
- EMPTY_HOWTO (98),
- EMPTY_HOWTO (99),
- EMPTY_HOWTO (100),
- EMPTY_HOWTO (101),
- EMPTY_HOWTO (102),
- EMPTY_HOWTO (103),
- EMPTY_HOWTO (104),
- EMPTY_HOWTO (105),
- EMPTY_HOWTO (106),
- EMPTY_HOWTO (107),
- EMPTY_HOWTO (108),
- EMPTY_HOWTO (109),
- EMPTY_HOWTO (110),
- EMPTY_HOWTO (111),
- EMPTY_HOWTO (112),
- EMPTY_HOWTO (113),
- EMPTY_HOWTO (114),
- EMPTY_HOWTO (115),
- EMPTY_HOWTO (116),
- EMPTY_HOWTO (117),
- EMPTY_HOWTO (118),
- EMPTY_HOWTO (119),
- EMPTY_HOWTO (120),
- EMPTY_HOWTO (121),
- EMPTY_HOWTO (122),
- EMPTY_HOWTO (123),
- EMPTY_HOWTO (124),
- EMPTY_HOWTO (125),
- EMPTY_HOWTO (126),
- EMPTY_HOWTO (127),
- EMPTY_HOWTO (128),
- EMPTY_HOWTO (129),
- EMPTY_HOWTO (130),
- EMPTY_HOWTO (131),
- EMPTY_HOWTO (132),
- EMPTY_HOWTO (133),
- EMPTY_HOWTO (134),
- EMPTY_HOWTO (135),
- EMPTY_HOWTO (136),
- EMPTY_HOWTO (137),
- EMPTY_HOWTO (138),
- EMPTY_HOWTO (139),
- EMPTY_HOWTO (140),
- EMPTY_HOWTO (141),
- EMPTY_HOWTO (142),
- EMPTY_HOWTO (143),
- EMPTY_HOWTO (144),
- EMPTY_HOWTO (145),
- EMPTY_HOWTO (146),
- EMPTY_HOWTO (147),
- EMPTY_HOWTO (148),
- EMPTY_HOWTO (149),
- EMPTY_HOWTO (150),
- EMPTY_HOWTO (151),
- EMPTY_HOWTO (152),
- EMPTY_HOWTO (153),
- EMPTY_HOWTO (154),
- EMPTY_HOWTO (155),
- EMPTY_HOWTO (156),
- EMPTY_HOWTO (157),
- EMPTY_HOWTO (158),
- EMPTY_HOWTO (159),
-
- /* Relocs for dynamic linking for 32-bit SH would follow. We don't have
- any dynamic linking support for 64-bit SH at present. */
-
- EMPTY_HOWTO (160),
- EMPTY_HOWTO (161),
- EMPTY_HOWTO (162),
- EMPTY_HOWTO (163),
- EMPTY_HOWTO (164),
- EMPTY_HOWTO (165),
- EMPTY_HOWTO (166),
- EMPTY_HOWTO (167),
- EMPTY_HOWTO (168),
-
- /* Back to SH5 relocations. */
- /* Used in MOVI and SHORI (x & 65536). */
- HOWTO (R_SH_GOT_LOW16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOT_LOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 16) & 65536). */
- HOWTO (R_SH_GOT_MEDLOW16, /* type */
- 16, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOT_MEDLOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 32) & 65536). */
- HOWTO (R_SH_GOT_MEDHI16, /* type */
- 32, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOT_MEDHI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 48) & 65536). */
- HOWTO (R_SH_GOT_HI16, /* type */
- 48, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOT_HI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI (x & 65536). */
- HOWTO (R_SH_GOTPLT_LOW16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTPLT_LOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 16) & 65536). */
- HOWTO (R_SH_GOTPLT_MEDLOW16, /* type */
- 16, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTPLT_MEDLOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 32) & 65536). */
- HOWTO (R_SH_GOTPLT_MEDHI16, /* type */
- 32, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTPLT_MEDHI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 48) & 65536). */
- HOWTO (R_SH_GOTPLT_HI16, /* type */
- 48, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTPLT_HI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI (x & 65536). */
- HOWTO (R_SH_PLT_LOW16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_PLT_LOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 16) & 65536). */
- HOWTO (R_SH_PLT_MEDLOW16, /* type */
- 16, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_PLT_MEDLOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 32) & 65536). */
- HOWTO (R_SH_PLT_MEDHI16, /* type */
- 32, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_PLT_MEDHI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 48) & 65536). */
- HOWTO (R_SH_PLT_HI16, /* type */
- 48, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_PLT_HI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI (x & 65536). */
- HOWTO (R_SH_GOTOFF_LOW16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTOFF_LOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 16) & 65536). */
- HOWTO (R_SH_GOTOFF_MEDLOW16, /* type */
- 16, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTOFF_MEDLOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 32) & 65536). */
- HOWTO (R_SH_GOTOFF_MEDHI16, /* type */
- 32, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTOFF_MEDHI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 48) & 65536). */
- HOWTO (R_SH_GOTOFF_HI16, /* type */
- 48, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTOFF_HI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI (x & 65536). */
- HOWTO (R_SH_GOTPC_LOW16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTPC_LOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 16) & 65536). */
- HOWTO (R_SH_GOTPC_MEDLOW16, /* type */
- 16, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTPC_MEDLOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 32) & 65536). */
- HOWTO (R_SH_GOTPC_MEDHI16, /* type */
- 32, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTPC_MEDHI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 48) & 65536). */
- HOWTO (R_SH_GOTPC_HI16, /* type */
- 48, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTPC_HI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in LD.L, FLD.S et al. */
- HOWTO (R_SH_GOT10BY4, /* type */
- 2, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 12, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOT10BY4", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in LD.L, FLD.S et al. */
- HOWTO (R_SH_GOTPLT10BY4, /* type */
- 2, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 12, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTPLT10BY4", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in FLD.D, FST.P et al. */
- HOWTO (R_SH_GOT10BY8, /* type */
- 3, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 13, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOT10BY8", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in FLD.D, FST.P et al. */
- HOWTO (R_SH_GOTPLT10BY8, /* type */
- 3, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 13, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GOTPLT10BY8", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0xffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_SH_COPY64, /* type */
- 0, /* rightshift */
- 4, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_COPY64", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- ((bfd_vma) 0) - 1, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_SH_GLOB_DAT64, /* type */
- 0, /* rightshift */
- 4, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_GLOB_DAT64", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- ((bfd_vma) 0) - 1, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_SH_JMP_SLOT64, /* type */
- 0, /* rightshift */
- 4, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_JMP_SLOT64", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- ((bfd_vma) 0) - 1, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_SH_RELATIVE64, /* type */
- 0, /* rightshift */
- 4, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_RELATIVE64", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- ((bfd_vma) 0) - 1, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- EMPTY_HOWTO (197),
- EMPTY_HOWTO (198),
- EMPTY_HOWTO (199),
- EMPTY_HOWTO (200),
- EMPTY_HOWTO (201),
- EMPTY_HOWTO (202),
- EMPTY_HOWTO (203),
- EMPTY_HOWTO (204),
- EMPTY_HOWTO (205),
- EMPTY_HOWTO (206),
- EMPTY_HOWTO (207),
- EMPTY_HOWTO (208),
- EMPTY_HOWTO (209),
- EMPTY_HOWTO (210),
- EMPTY_HOWTO (211),
- EMPTY_HOWTO (212),
- EMPTY_HOWTO (213),
- EMPTY_HOWTO (214),
- EMPTY_HOWTO (215),
- EMPTY_HOWTO (216),
- EMPTY_HOWTO (217),
- EMPTY_HOWTO (218),
- EMPTY_HOWTO (219),
- EMPTY_HOWTO (220),
- EMPTY_HOWTO (221),
- EMPTY_HOWTO (222),
- EMPTY_HOWTO (223),
- EMPTY_HOWTO (224),
- EMPTY_HOWTO (225),
- EMPTY_HOWTO (226),
- EMPTY_HOWTO (227),
- EMPTY_HOWTO (228),
- EMPTY_HOWTO (229),
- EMPTY_HOWTO (230),
- EMPTY_HOWTO (231),
- EMPTY_HOWTO (232),
- EMPTY_HOWTO (233),
- EMPTY_HOWTO (234),
- EMPTY_HOWTO (235),
- EMPTY_HOWTO (236),
- EMPTY_HOWTO (237),
- EMPTY_HOWTO (238),
- EMPTY_HOWTO (239),
- EMPTY_HOWTO (240),
- EMPTY_HOWTO (241),
-
- /* Relocations for SHmedia code. None of these are partial_inplace or
- use the field being relocated. */
-
- /* The assembler will generate this reloc before a block of SHmedia
- instructions. A section should be processed as assuming it contains
- data, unless this reloc is seen. Note that a block of SHcompact
- instructions are instead preceded by R_SH_CODE.
- This is currently not implemented, but should be used for SHmedia
- linker relaxation. */
- HOWTO (R_SH_SHMEDIA_CODE, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_unsigned, /* complain_on_overflow */
- sh_elf64_ignore_reloc, /* special_function */
- "R_SH_SHMEDIA_CODE", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* The assembler will generate this reloc at a PTA or PTB instruction,
- and the linker checks the right type of target, or changes a PTA to a
- PTB, if the original insn was PT. */
- HOWTO (R_SH_PT_16, /* type */
- 2, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 18, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_PT_16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in unexpanded MOVI. */
- HOWTO (R_SH_IMMS16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_IMMS16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in SHORI. */
- HOWTO (R_SH_IMMU16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_unsigned, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_IMMU16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI (x & 65536). */
- HOWTO (R_SH_IMM_LOW16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_IMM_LOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x - $) & 65536). */
- HOWTO (R_SH_IMM_LOW16_PCREL, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_IMM_LOW16_PCREL", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 16) & 65536). */
- HOWTO (R_SH_IMM_MEDLOW16, /* type */
- 16, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_IMM_MEDLOW16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI (((x - $) >> 16) & 65536). */
- HOWTO (R_SH_IMM_MEDLOW16_PCREL, /* type */
- 16, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_IMM_MEDLOW16_PCREL", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 32) & 65536). */
- HOWTO (R_SH_IMM_MEDHI16, /* type */
- 32, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_IMM_MEDHI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI (((x - $) >> 32) & 65536). */
- HOWTO (R_SH_IMM_MEDHI16_PCREL, /* type */
- 32, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_IMM_MEDHI16_PCREL", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI ((x >> 48) & 65536). */
- HOWTO (R_SH_IMM_HI16, /* type */
- 48, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_IMM_HI16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Used in MOVI and SHORI (((x - $) >> 48) & 65536). */
- HOWTO (R_SH_IMM_HI16_PCREL, /* type */
- 48, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_IMM_HI16_PCREL", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0x3fffc00, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* For the .uaquad pseudo. */
- HOWTO (R_SH_64, /* type */
- 0, /* rightshift */
- 4, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_64", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- ((bfd_vma) 0) - 1, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* For the .uaquad pseudo, (x - $). */
- HOWTO (R_SH_64_PCREL, /* type */
- 48, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 10, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SH_64_PCREL", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- ((bfd_vma) 0) - 1, /* dst_mask */
- TRUE), /* pcrel_offset */
-
-};
-
-/* This function is used for relocs which are only used for relaxing,
- which the linker should otherwise ignore. */
-
-static bfd_reloc_status_type
-sh_elf64_ignore_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry,
- asymbol *symbol ATTRIBUTE_UNUSED,
- void *data ATTRIBUTE_UNUSED, asection *input_section,
- bfd *output_bfd,
- char **error_message ATTRIBUTE_UNUSED)
-{
- if (output_bfd != NULL)
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
-}
-
-/* This function is used for normal relocs. This used to be like the COFF
- function, and is almost certainly incorrect for other ELF targets.
-
- See sh_elf_reloc in elf32-sh.c for the original. */
-
-static bfd_reloc_status_type
-sh_elf64_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol_in,
- void *data, asection *input_section, bfd *output_bfd,
- char **error_message ATTRIBUTE_UNUSED)
-{
- unsigned long insn;
- bfd_vma sym_value;
- enum elf_sh_reloc_type r_type;
- bfd_vma addr = reloc_entry->address;
- bfd_byte *hit_data = addr + (bfd_byte *) data;
-
- r_type = (enum elf_sh_reloc_type) reloc_entry->howto->type;
-
- if (output_bfd != NULL)
- {
- /* Partial linking--do nothing. */
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- if (symbol_in != NULL
- && bfd_is_und_section (symbol_in->section))
- return bfd_reloc_undefined;
-
- if (bfd_is_com_section (symbol_in->section))
- sym_value = 0;
- else
- sym_value = (symbol_in->value +
- symbol_in->section->output_section->vma +
- symbol_in->section->output_offset);
-
- switch (r_type)
- {
- case R_SH_DIR32:
- insn = bfd_get_32 (abfd, hit_data);
- insn += sym_value + reloc_entry->addend;
- bfd_put_32 (abfd, insn, hit_data);
- break;
-
- default:
- abort ();
- break;
- }
-
- return bfd_reloc_ok;
-}
-
-/* This structure is used to map BFD reloc codes to SH ELF relocs. */
-
-struct elf_reloc_map
-{
- bfd_reloc_code_real_type bfd_reloc_val;
- unsigned char elf_reloc_val;
-};
-
-/* An array mapping BFD reloc codes to SH ELF relocs. */
-
-static const struct elf_reloc_map sh64_reloc_map[] =
-{
- { BFD_RELOC_NONE, R_SH_NONE },
- { BFD_RELOC_32, R_SH_DIR32 },
- { BFD_RELOC_CTOR, R_SH_DIR32 },
- { BFD_RELOC_32_PCREL, R_SH_REL32 },
- { BFD_RELOC_8_PCREL, R_SH_SWITCH8 },
- { BFD_RELOC_SH_SWITCH16, R_SH_SWITCH16 },
- { BFD_RELOC_SH_SWITCH32, R_SH_SWITCH32 },
- { BFD_RELOC_VTABLE_INHERIT, R_SH_GNU_VTINHERIT },
- { BFD_RELOC_VTABLE_ENTRY, R_SH_GNU_VTENTRY },
- { BFD_RELOC_SH_GOT_LOW16, R_SH_GOT_LOW16 },
- { BFD_RELOC_SH_GOT_MEDLOW16, R_SH_GOT_MEDLOW16 },
- { BFD_RELOC_SH_GOT_MEDHI16, R_SH_GOT_MEDHI16 },
- { BFD_RELOC_SH_GOT_HI16, R_SH_GOT_HI16 },
- { BFD_RELOC_SH_GOTPLT_LOW16, R_SH_GOTPLT_LOW16 },
- { BFD_RELOC_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDLOW16 },
- { BFD_RELOC_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_MEDHI16 },
- { BFD_RELOC_SH_GOTPLT_HI16, R_SH_GOTPLT_HI16 },
- { BFD_RELOC_SH_PLT_LOW16, R_SH_PLT_LOW16 },
- { BFD_RELOC_SH_PLT_MEDLOW16, R_SH_PLT_MEDLOW16 },
- { BFD_RELOC_SH_PLT_MEDHI16, R_SH_PLT_MEDHI16 },
- { BFD_RELOC_SH_PLT_HI16, R_SH_PLT_HI16 },
- { BFD_RELOC_SH_GOTOFF_LOW16, R_SH_GOTOFF_LOW16 },
- { BFD_RELOC_SH_GOTOFF_MEDLOW16, R_SH_GOTOFF_MEDLOW16 },
- { BFD_RELOC_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_MEDHI16 },
- { BFD_RELOC_SH_GOTOFF_HI16, R_SH_GOTOFF_HI16 },
- { BFD_RELOC_SH_GOTPC_LOW16, R_SH_GOTPC_LOW16 },
- { BFD_RELOC_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDLOW16 },
- { BFD_RELOC_SH_GOTPC_MEDHI16, R_SH_GOTPC_MEDHI16 },
- { BFD_RELOC_SH_GOTPC_HI16, R_SH_GOTPC_HI16 },
- { BFD_RELOC_SH_COPY64, R_SH_COPY64 },
- { BFD_RELOC_SH_GLOB_DAT64, R_SH_GLOB_DAT64 },
- { BFD_RELOC_SH_JMP_SLOT64, R_SH_JMP_SLOT64 },
- { BFD_RELOC_SH_RELATIVE64, R_SH_RELATIVE64 },
- { BFD_RELOC_SH_GOT10BY4, R_SH_GOT10BY4 },
- { BFD_RELOC_SH_GOT10BY8, R_SH_GOT10BY8 },
- { BFD_RELOC_SH_GOTPLT10BY4, R_SH_GOTPLT10BY4 },
- { BFD_RELOC_SH_GOTPLT10BY8, R_SH_GOTPLT10BY8 },
- { BFD_RELOC_SH_PT_16, R_SH_PT_16 },
- { BFD_RELOC_SH_SHMEDIA_CODE, R_SH_SHMEDIA_CODE },
- { BFD_RELOC_SH_IMMU5, R_SH_DIR5U },
- { BFD_RELOC_SH_IMMS6, R_SH_DIR6S },
- { BFD_RELOC_SH_IMMU6, R_SH_DIR6U },
- { BFD_RELOC_SH_IMMS10, R_SH_DIR10S },
- { BFD_RELOC_SH_IMMS10BY2, R_SH_DIR10SW },
- { BFD_RELOC_SH_IMMS10BY4, R_SH_DIR10SL },
- { BFD_RELOC_SH_IMMS10BY8, R_SH_DIR10SQ },
- { BFD_RELOC_SH_IMMS16, R_SH_IMMS16 },
- { BFD_RELOC_SH_IMMU16, R_SH_IMMU16 },
- { BFD_RELOC_SH_IMM_LOW16, R_SH_IMM_LOW16 },
- { BFD_RELOC_SH_IMM_LOW16_PCREL, R_SH_IMM_LOW16_PCREL },
- { BFD_RELOC_SH_IMM_MEDLOW16, R_SH_IMM_MEDLOW16 },
- { BFD_RELOC_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDLOW16_PCREL },
- { BFD_RELOC_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16 },
- { BFD_RELOC_SH_IMM_MEDHI16_PCREL, R_SH_IMM_MEDHI16_PCREL },
- { BFD_RELOC_SH_IMM_HI16, R_SH_IMM_HI16 },
- { BFD_RELOC_SH_IMM_HI16_PCREL, R_SH_IMM_HI16_PCREL },
- { BFD_RELOC_64, R_SH_64 },
- { BFD_RELOC_64_PCREL, R_SH_64_PCREL },
-};
-
-/* Given a BFD reloc code, return the howto structure for the
- corresponding SH ELf reloc. */
-
-static reloc_howto_type *
-sh_elf64_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
- bfd_reloc_code_real_type code)
-{
- unsigned int i;
-
- for (i = 0; i < sizeof (sh64_reloc_map) / sizeof (struct elf_reloc_map); i++)
- {
- if (sh64_reloc_map[i].bfd_reloc_val == code)
- return &sh_elf64_howto_table[(int) sh64_reloc_map[i].elf_reloc_val];
- }
-
- return NULL;
-}
-
-static reloc_howto_type *
-sh_elf64_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
- const char *r_name)
-{
- unsigned int i;
-
- for (i = 0;
- i < sizeof (sh_elf64_howto_table) / sizeof (sh_elf64_howto_table[0]);
- i++)
- if (sh_elf64_howto_table[i].name != NULL
- && strcasecmp (sh_elf64_howto_table[i].name, r_name) == 0)
- return &sh_elf64_howto_table[i];
-
- return NULL;
-}
-
-/* Given an ELF reloc, fill in the howto field of a relent.
-
- See sh_elf_info_to_howto in elf32-sh.c for the original. */
-
-static bfd_boolean
-sh_elf64_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
- Elf_Internal_Rela *dst)
-{
- unsigned int r;
-
- r = ELF64_R_TYPE (dst->r_info);
-
- if (r > (unsigned int) R_SH_64_PCREL)
- {
- /* xgettext:c-format */
- _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r);
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
- BFD_ASSERT (r < R_SH_FIRST_INVALID_RELOC || r > R_SH_LAST_INVALID_RELOC);
- BFD_ASSERT (r < R_SH_DIR8WPN || r > R_SH_LAST_INVALID_RELOC_2);
- BFD_ASSERT (r < R_SH_FIRST_INVALID_RELOC_3 || r > R_SH_GOTPLT32);
- BFD_ASSERT (r < R_SH_FIRST_INVALID_RELOC_4 || r > R_SH_LAST_INVALID_RELOC_4);
-
- cache_ptr->howto = &sh_elf64_howto_table[r];
- return cache_ptr->howto != NULL;
-}
-
-/* Relocate an SH ELF section.
-
- See sh_elf_info_to_howto in elf32-sh.c for the original. */
-
-static bfd_boolean
-sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
- struct bfd_link_info *info, bfd *input_bfd,
- asection *input_section, bfd_byte *contents,
- Elf_Internal_Rela *relocs,
- Elf_Internal_Sym *local_syms,
- asection **local_sections)
-{
- Elf_Internal_Shdr *symtab_hdr;
- struct elf_link_hash_entry **sym_hashes;
- Elf_Internal_Rela *rel, *relend;
- bfd_vma *local_got_offsets;
- asection *sgot;
- asection *sgotplt;
- asection *splt;
- asection *sreloc;
- bfd_vma disp, dropped;
-
- symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
- sym_hashes = elf_sym_hashes (input_bfd);
- local_got_offsets = elf_local_got_offsets (input_bfd);
-
- sreloc = NULL;
-
- rel = relocs;
- relend = relocs + input_section->reloc_count;
- for (; rel < relend; rel++)
- {
- int r_type;
- reloc_howto_type *howto;
- unsigned long r_symndx;
- Elf_Internal_Sym *sym;
- asection *sec;
- struct elf_link_hash_entry *h;
- bfd_vma relocation;
- bfd_vma addend = (bfd_vma)0;
- bfd_reloc_status_type r;
- int seen_stt_datalabel = 0;
-
- r_symndx = ELF64_R_SYM (rel->r_info);
-
- r_type = ELF64_R_TYPE (rel->r_info);
-
- if (r_type == (int) R_SH_NONE)
- continue;
-
- if (r_type < 0
- || r_type > R_SH_64_PCREL
- || (r_type >= (int) R_SH_FIRST_INVALID_RELOC
- && r_type <= (int) R_SH_LAST_INVALID_RELOC)
- || (r_type >= (int) R_SH_DIR8WPN
- && r_type <= (int) R_SH_LAST_INVALID_RELOC)
- || (r_type >= (int) R_SH_GNU_VTINHERIT
- && r_type <= (int) R_SH_PSHL)
- || (r_type >= (int) R_SH_FIRST_INVALID_RELOC_2
- && r_type <= R_SH_GOTPLT32)
- || (r_type >= (int) R_SH_FIRST_INVALID_RELOC_4
- && r_type <= (int) R_SH_LAST_INVALID_RELOC_4))
- {
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
- howto = sh_elf64_howto_table + r_type;
-
- h = NULL;
- sym = NULL;
- sec = NULL;
- relocation = 0;
- if (r_symndx < symtab_hdr->sh_info)
- {
- sym = local_syms + r_symndx;
- sec = local_sections[r_symndx];
- relocation = ((sec->output_section->vma
- + sec->output_offset
- + sym->st_value)
- | ((sym->st_other & STO_SH5_ISA32) != 0));
-
- /* A local symbol never has STO_SH5_ISA32, so we don't need
- datalabel processing here. Make sure this does not change
- without notice. */
- if ((sym->st_other & STO_SH5_ISA32) != 0)
- (*info->callbacks->reloc_dangerous)
- (info,
- _("unexpected STO_SH5_ISA32 on local symbol is not handled"),
- input_bfd, input_section, rel->r_offset);
-
- if (sec != NULL && discarded_section (sec))
- /* Handled below. */
- ;
- else if (bfd_link_relocatable (info))
- {
- /* This is a relocatable link. We don't have to change
- anything, unless the reloc is against a section symbol,
- in which case we have to adjust according to where the
- section symbol winds up in the output section. */
- if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
- goto final_link_relocate;
-
- continue;
- }
- else if (! howto->partial_inplace)
- {
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
- relocation |= ((sym->st_other & STO_SH5_ISA32) != 0);
- }
- else if ((sec->flags & SEC_MERGE)
- && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
- {
- asection *msec;
-
- if (howto->rightshift || howto->src_mask != 0xffffffff)
- {
- _bfd_error_handler
- /* xgettext:c-format */
- (_("%pB(%pA+%#" PRIx64 "): "
- "%s relocation against SEC_MERGE section"),
- input_bfd, input_section,
- (uint64_t) rel->r_offset, howto->name);
- return FALSE;
- }
-
- addend = bfd_get_32 (input_bfd, contents + rel->r_offset);
- msec = sec;
- addend =
- _bfd_elf_rel_local_sym (output_bfd, sym, &msec, addend)
- - relocation;
- addend += msec->output_section->vma + msec->output_offset;
- bfd_put_32 (input_bfd, addend, contents + rel->r_offset);
- addend = 0;
- }
- }
- else
- {
- /* ??? Could we use the RELOC_FOR_GLOBAL_SYMBOL macro here ? */
-
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- {
- /* If the reference passes a symbol marked with
- STT_DATALABEL, then any STO_SH5_ISA32 on the final value
- doesn't count. */
- seen_stt_datalabel |= h->type == STT_DATALABEL;
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
- }
-
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- {
- sec = h->root.u.def.section;
- /* In these cases, we don't need the relocation value.
- We check specially because in some obscure cases
- sec->output_section will be NULL. */
- if (r_type == R_SH_GOTPC_LOW16
- || r_type == R_SH_GOTPC_MEDLOW16
- || r_type == R_SH_GOTPC_MEDHI16
- || r_type == R_SH_GOTPC_HI16
- || ((r_type == R_SH_PLT_LOW16
- || r_type == R_SH_PLT_MEDLOW16
- || r_type == R_SH_PLT_MEDHI16
- || r_type == R_SH_PLT_HI16)
- && h->plt.offset != (bfd_vma) -1)
- || ((r_type == R_SH_GOT_LOW16
- || r_type == R_SH_GOT_MEDLOW16
- || r_type == R_SH_GOT_MEDHI16
- || r_type == R_SH_GOT_HI16)
- && elf_hash_table (info)->dynamic_sections_created
- && (! bfd_link_pic (info)
- || (! info->symbolic && h->dynindx != -1)
- || !h->def_regular))
- /* The cases above are those in which relocation is
- overwritten in the switch block below. The cases
- below are those in which we must defer relocation
- to run-time, because we can't resolve absolute
- addresses when creating a shared library. */
- || (bfd_link_pic (info)
- && ((! info->symbolic && h->dynindx != -1)
- || !h->def_regular)
- && ((r_type == R_SH_64
- && !(ELF_ST_VISIBILITY (h->other) == STV_INTERNAL
- || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN))
- || r_type == R_SH_64_PCREL)
- && ((input_section->flags & SEC_ALLOC) != 0
- /* DWARF will emit R_SH_DIR32 relocations in its
- sections against symbols defined externally
- in shared libraries. We can't do anything
- with them here. */
- || (input_section->flags & SEC_DEBUGGING) != 0))
- /* Dynamic relocs are not propagated for SEC_DEBUGGING
- sections because such sections are not SEC_ALLOC and
- thus ld.so will not process them. */
- || (sec->output_section == NULL
- && ((input_section->flags & SEC_DEBUGGING) != 0
- && h->def_dynamic)))
- ;
- else if (sec->output_section != NULL)
- relocation = ((h->root.u.def.value
- + sec->output_section->vma
- + sec->output_offset)
- /* A STO_SH5_ISA32 causes a "bitor 1" to the
- symbol value, unless we've seen
- STT_DATALABEL on the way to it. */
- | ((h->other & STO_SH5_ISA32) != 0
- && ! seen_stt_datalabel));
- else if (!bfd_link_relocatable (info)
- && (_bfd_elf_section_offset (output_bfd, info,
- input_section,
- rel->r_offset)
- != (bfd_vma) -1))
- {
- _bfd_error_handler
- /* xgettext:c-format */
- (_("%pB(%pA+%#" PRIx64 "): "
- "unresolvable %s relocation against symbol `%s'"),
- input_bfd,
- input_section,
- (uint64_t) rel->r_offset,
- howto->name,
- h->root.root.string);
- }
- }
- else if (h->root.type == bfd_link_hash_undefweak)
- ;
- else if (info->unresolved_syms_in_objects == RM_IGNORE
- && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
- ;
- else if (!bfd_link_relocatable (info))
- (*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset,
- (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
- || ELF_ST_VISIBILITY (h->other)));
- }
-
- if (sec != NULL && discarded_section (sec))
- RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
-
- if (bfd_link_relocatable (info))
- continue;
-
- disp = (relocation
- - input_section->output_section->vma
- - input_section->output_offset
- - rel->r_offset);
- dropped = 0;
- switch ((int)r_type)
- {
- case R_SH_PT_16: dropped = disp & 2; break;
- case R_SH_DIR10SW: dropped = disp & 1; break;
- case R_SH_DIR10SL: dropped = disp & 3; break;
- case R_SH_DIR10SQ: dropped = disp & 7; break;
- }
- if (dropped != 0)
- {
- _bfd_error_handler
- /* xgettext:c-format */
- (_("%pB: error: unaligned relocation type %d at "
- "%08" PRIx64 " reloc %08" PRIx64 ""),
- input_bfd, (int) r_type,
- (uint64_t) rel->r_offset, (uint64_t) relocation);
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
- switch ((int)r_type)
- {
- case R_SH_64:
- case R_SH_64_PCREL:
- if (bfd_link_pic (info)
- && (input_section->flags & SEC_ALLOC) != 0
- && (r_type != R_SH_64_PCREL
- || (h != NULL
- && h->dynindx != -1
- && (! info->symbolic
- || !h->def_regular))))
- {
- Elf_Internal_Rela outrel;
- bfd_byte *loc;
- bfd_boolean skip, relocate;
-
- /* When generating a shared object, these relocations
- are copied into the output file to be resolved at run
- time. */
-
- if (sreloc == NULL)
- {
- sreloc = _bfd_elf_get_dynamic_reloc_section
- (input_bfd, input_section, /*rela?*/ TRUE);
- if (sreloc == NULL)
- return FALSE;
- }
-
- skip = FALSE;
- relocate = FALSE;
-
- outrel.r_offset
- = _bfd_elf_section_offset (output_bfd, info,
- input_section, rel->r_offset);
-
- if (outrel.r_offset == (bfd_vma) -1)
- skip = TRUE;
- else if (outrel.r_offset == (bfd_vma) -2)
- skip = TRUE, relocate = TRUE;
-
- outrel.r_offset += (input_section->output_section->vma
- + input_section->output_offset);
-
- if (skip)
- memset (&outrel, 0, sizeof outrel);
- else if (r_type == R_SH_64_PCREL)
- {
- BFD_ASSERT (h != NULL && h->dynindx != -1);
- outrel.r_info = ELF64_R_INFO (h->dynindx, R_SH_64_PCREL);
- outrel.r_addend = rel->r_addend;
- }
- else
- {
- /* h->dynindx may be -1 if this symbol was marked to
- become local. */
- if (h == NULL
- || ((info->symbolic || h->dynindx == -1)
- && h->def_regular))
- {
- relocate = TRUE;
- outrel.r_info = ELF64_R_INFO (0, R_SH_RELATIVE64);
- outrel.r_addend = relocation + rel->r_addend;
- }
- else
- {
- BFD_ASSERT (h->dynindx != -1);
- outrel.r_info = ELF64_R_INFO (h->dynindx, R_SH_64);
- outrel.r_addend = relocation + rel->r_addend;
- }
- }
-
- loc = sreloc->contents;
- loc += sreloc->reloc_count++ * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
-
- /* If this reloc is against an external symbol, we do
- not want to fiddle with the addend. Otherwise, we
- need to include the symbol value so that it becomes
- an addend for the dynamic reloc. */
- if (! relocate)
- continue;
- }
- else if (r_type == R_SH_64)
- addend = rel->r_addend;
- goto final_link_relocate;
-
- case R_SH_GOTPLT_LOW16:
- case R_SH_GOTPLT_MEDLOW16:
- case R_SH_GOTPLT_MEDHI16:
- case R_SH_GOTPLT_HI16:
- case R_SH_GOTPLT10BY4:
- case R_SH_GOTPLT10BY8:
- /* Relocation is to the entry for this symbol in the
- procedure linkage table. */
-
- if (h == NULL
- || ELF_ST_VISIBILITY (h->other) == STV_INTERNAL
- || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN
- || ! bfd_link_pic (info)
- || info->symbolic
- || h->dynindx == -1
- || h->plt.offset == (bfd_vma) -1
- || h->got.offset != (bfd_vma) -1)
- goto force_got;
-
- /* Relocation is to the entry for this symbol in the global
- offset table extension for the procedure linkage table. */
- sgotplt = elf_hash_table (info)->sgotplt;
- BFD_ASSERT (sgotplt != NULL);
-
- relocation = (sgotplt->output_offset
- + ((h->plt.offset / elf_sh64_sizeof_plt (info)
- - 1 + 3) * 8));
-
- relocation -= GOT_BIAS;
-
- goto final_link_relocate;
-
- force_got:
- case R_SH_GOT_LOW16:
- case R_SH_GOT_MEDLOW16:
- case R_SH_GOT_MEDHI16:
- case R_SH_GOT_HI16:
- case R_SH_GOT10BY4:
- case R_SH_GOT10BY8:
- /* Relocation is to the entry for this symbol in the global
- offset table. */
- sgot = elf_hash_table (info)->sgot;
- BFD_ASSERT (sgot != NULL);
-
- if (h != NULL)
- {
- bfd_vma off;
-
- off = h->got.offset;
- if (seen_stt_datalabel)
- {
- struct elf_sh64_link_hash_entry *hsh;
-
- hsh = (struct elf_sh64_link_hash_entry *)h;
- off = hsh->datalabel_got_offset;
- }
- BFD_ASSERT (off != (bfd_vma) -1);
-
- if (! elf_hash_table (info)->dynamic_sections_created
- || (bfd_link_pic (info)
- && (info->symbolic || h->dynindx == -1
- || ELF_ST_VISIBILITY (h->other) == STV_INTERNAL
- || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN)
- && h->def_regular))
- {
- /* This is actually a static link, or it is a
- -Bsymbolic link and the symbol is defined
- locally, or the symbol was forced to be local
- because of a version file. We must initialize
- this entry in the global offset table. Since the
- offset must always be a multiple of 4, we use the
- least significant bit to record whether we have
- initialized it already.
-
- When doing a dynamic link, we create a .rela.got
- relocation entry to initialize the value. This
- is done in the finish_dynamic_symbol routine. */
- if ((off & 1) != 0)
- off &= ~1;
- else
- {
- bfd_put_64 (output_bfd, relocation,
- sgot->contents + off);
- if (seen_stt_datalabel)
- {
- struct elf_sh64_link_hash_entry *hsh;
-
- hsh = (struct elf_sh64_link_hash_entry *)h;
- hsh->datalabel_got_offset |= 1;
- }
- else
- h->got.offset |= 1;
- }
- }
-
- relocation = sgot->output_offset + off;
- }
- else
- {
- bfd_vma off;
-
- if (rel->r_addend)
- {
- BFD_ASSERT (local_got_offsets != NULL
- && (local_got_offsets[symtab_hdr->sh_info
- + r_symndx]
- != (bfd_vma) -1));
-
- off = local_got_offsets[symtab_hdr->sh_info
- + r_symndx];
- }
- else
- {
- BFD_ASSERT (local_got_offsets != NULL
- && local_got_offsets[r_symndx] != (bfd_vma) -1);
-
- off = local_got_offsets[r_symndx];
- }
-
- /* The offset must always be a multiple of 8. We use
- the least significant bit to record whether we have
- already generated the necessary reloc. */
- if ((off & 1) != 0)
- off &= ~1;
- else
- {
- bfd_put_64 (output_bfd, relocation, sgot->contents + off);
-
- if (bfd_link_pic (info))
- {
- asection *s;
- Elf_Internal_Rela outrel;
- bfd_byte *loc;
-
- s = elf_hash_table (info)->srelgot;
- BFD_ASSERT (s != NULL);
-
- outrel.r_offset = (sgot->output_section->vma
- + sgot->output_offset
- + off);
- outrel.r_info = ELF64_R_INFO (0, R_SH_RELATIVE64);
- outrel.r_addend = relocation;
- loc = s->contents;
- loc += s->reloc_count++ * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
- }
-
- if (rel->r_addend)
- local_got_offsets[symtab_hdr->sh_info + r_symndx] |= 1;
- else
- local_got_offsets[r_symndx] |= 1;
- }
-
- relocation = sgot->output_offset + off;
- }
-
- relocation -= GOT_BIAS;
-
- goto final_link_relocate;
-
- case R_SH_GOTOFF_LOW16:
- case R_SH_GOTOFF_MEDLOW16:
- case R_SH_GOTOFF_MEDHI16:
- case R_SH_GOTOFF_HI16:
- /* Relocation is relative to the start of the global offset
- table. */
-
- sgot = elf_hash_table (info)->sgot;
- BFD_ASSERT (sgot != NULL);
-
- /* Note that sgot->output_offset is not involved in this
- calculation. We always want the start of .got. If we
- defined _GLOBAL_OFFSET_TABLE in a different way, as is
- permitted by the ABI, we might have to change this
- calculation. */
- relocation -= sgot->output_section->vma;
-
- relocation -= GOT_BIAS;
-
- addend = rel->r_addend;
-
- goto final_link_relocate;
-
- case R_SH_GOTPC_LOW16:
- case R_SH_GOTPC_MEDLOW16:
- case R_SH_GOTPC_MEDHI16:
- case R_SH_GOTPC_HI16:
- /* Use global offset table as symbol value. */
-
- sgot = elf_hash_table (info)->sgot;
- BFD_ASSERT (sgot != NULL);
-
- relocation = sgot->output_section->vma;
-
- relocation += GOT_BIAS;
-
- addend = rel->r_addend;
-
- goto final_link_relocate;
-
- case R_SH_PLT_LOW16:
- case R_SH_PLT_MEDLOW16:
- case R_SH_PLT_MEDHI16:
- case R_SH_PLT_HI16:
- /* Relocation is to the entry for this symbol in the
- procedure linkage table. */
-
- /* Resolve a PLT reloc against a local symbol directly,
- without using the procedure linkage table. */
- if (h == NULL)
- goto final_link_relocate;
-
- if (ELF_ST_VISIBILITY (h->other) == STV_INTERNAL
- || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN)
- goto final_link_relocate;
-
- if (h->plt.offset == (bfd_vma) -1)
- {
- /* We didn't make a PLT entry for this symbol. This
- happens when statically linking PIC code, or when
- using -Bsymbolic. */
- goto final_link_relocate;
- }
-
- splt = elf_hash_table (info)->splt;
- BFD_ASSERT (splt != NULL);
-
- relocation = (splt->output_section->vma
- + splt->output_offset
- + h->plt.offset);
- relocation++;
-
- addend = rel->r_addend;
-
- goto final_link_relocate;
-
- case R_SH_DIR32:
- case R_SH_SHMEDIA_CODE:
- case R_SH_PT_16:
- case R_SH_DIR5U:
- case R_SH_DIR6S:
- case R_SH_DIR6U:
- case R_SH_DIR10S:
- case R_SH_DIR10SW:
- case R_SH_DIR10SL:
- case R_SH_DIR10SQ:
- case R_SH_IMMS16:
- case R_SH_IMMU16:
- case R_SH_IMM_LOW16:
- case R_SH_IMM_LOW16_PCREL:
- case R_SH_IMM_MEDLOW16:
- case R_SH_IMM_MEDLOW16_PCREL:
- case R_SH_IMM_MEDHI16:
- case R_SH_IMM_MEDHI16_PCREL:
- case R_SH_IMM_HI16:
- case R_SH_IMM_HI16_PCREL:
- addend = rel->r_addend;
- /* Fall through. */
- case R_SH_REL32:
- final_link_relocate:
- r = _bfd_final_link_relocate (howto, input_bfd, input_section,
- contents, rel->r_offset,
- relocation, addend);
- break;
-
- default:
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
-
- }
-
- if (r != bfd_reloc_ok)
- {
- switch (r)
- {
- default:
- case bfd_reloc_outofrange:
- abort ();
- case bfd_reloc_overflow:
- {
- const char *name;
-
- if (h != NULL)
- name = NULL;
- else
- {
- name = (bfd_elf_string_from_elf_section
- (input_bfd, symtab_hdr->sh_link, sym->st_name));
- if (name == NULL)
- return FALSE;
- if (*name == '\0')
- name = bfd_section_name (input_bfd, sec);
- }
- (*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
- }
- break;
- }
- }
- }
-
- return TRUE;
-}
-
-/* This is a version of bfd_generic_get_relocated_section_contents
- that uses sh_elf64_relocate_section.
-
- See sh_elf_relocate_section in elf32-sh.c for the original. */
-
-static bfd_byte *
-sh_elf64_get_relocated_section_contents (bfd *output_bfd,
- struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
- bfd_byte *data,
- bfd_boolean relocatable,
- asymbol **symbols)
-{
- Elf_Internal_Shdr *symtab_hdr;
- asection *input_section = link_order->u.indirect.section;
- bfd *input_bfd = input_section->owner;
- asection **sections = NULL;
- Elf_Internal_Rela *internal_relocs = NULL;
- Elf_Internal_Sym *isymbuf = NULL;
-
- /* We only need to handle the case of relaxing, or of having a
- particular set of section contents, specially. */
- if (relocatable
- || elf_section_data (input_section)->this_hdr.contents == NULL)
- return bfd_generic_get_relocated_section_contents (output_bfd, link_info,
- link_order, data,
- relocatable,
- symbols);
-
- symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
-
- memcpy (data, elf_section_data (input_section)->this_hdr.contents,
- input_section->size);
-
- if ((input_section->flags & SEC_RELOC) != 0
- && input_section->reloc_count > 0)
- {
- Elf_Internal_Sym *isymp;
- Elf_Internal_Sym *isymend;
- asection **secpp;
-
- /* Read this BFD's local symbols. */
- if (symtab_hdr->sh_info != 0)
- {
- isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
- if (isymbuf == NULL)
- isymbuf = bfd_elf_get_elf_syms (input_bfd, symtab_hdr,
- symtab_hdr->sh_info, 0,
- NULL, NULL, NULL);
- if (isymbuf == NULL)
- goto error_return;
- }
-
- internal_relocs = (_bfd_elf_link_read_relocs
- (input_bfd, input_section, NULL,
- (Elf_Internal_Rela *) NULL, FALSE));
- if (internal_relocs == NULL)
- goto error_return;
-
- sections = (asection **) bfd_malloc (symtab_hdr->sh_info
- * sizeof (asection *));
- if (sections == NULL && symtab_hdr->sh_info > 0)
- goto error_return;
-
- secpp = sections;
- isymend = isymbuf + symtab_hdr->sh_info;
- for (isymp = isymbuf; isymp < isymend; ++isymp, ++secpp)
- {
- asection *isec;
-
- if (isymp->st_shndx == SHN_UNDEF)
- isec = bfd_und_section_ptr;
- else if (isymp->st_shndx == SHN_ABS)
- isec = bfd_abs_section_ptr;
- else if (isymp->st_shndx == SHN_COMMON)
- isec = bfd_com_section_ptr;
- else
- isec = bfd_section_from_elf_index (input_bfd, isymp->st_shndx);
-
- *secpp = isec;
- }
-
- if (! sh_elf64_relocate_section (output_bfd, link_info, input_bfd,
- input_section, data, internal_relocs,
- isymbuf, sections))
- goto error_return;
-
- if (sections != NULL)
- free (sections);
- if (internal_relocs != elf_section_data (input_section)->relocs)
- free (internal_relocs);
- if (isymbuf != NULL
- && (unsigned char *) isymbuf != symtab_hdr->contents)
- free (isymbuf);
- }
-
- return data;
-
- error_return:
- if (sections != NULL)
- free (sections);
- if (internal_relocs != NULL
- && internal_relocs != elf_section_data (input_section)->relocs)
- free (internal_relocs);
- if (isymbuf != NULL
- && (unsigned char *) isymbuf != symtab_hdr->contents)
- free (isymbuf);
- return NULL;
-}
-
-/* Set the SHF_SH5_ISA32 flag for ISA SHmedia code sections. */
-
-static bfd_boolean
-sh64_elf64_fake_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
- Elf_Internal_Shdr *elf_section_hdr,
- asection *asect)
-{
- /* Code sections can only contain SH64 code, so mark them as such. */
- if (bfd_get_section_flags (output_bfd, asect) & SEC_CODE)
- elf_section_hdr->sh_flags |= SHF_SH5_ISA32;
-
- return TRUE;
-}
-
-static bfd_boolean
-sh_elf64_set_mach_from_flags (bfd *abfd)
-{
- flagword flags = elf_elfheader (abfd)->e_flags;
-
- switch (flags & EF_SH_MACH_MASK)
- {
- case EF_SH5:
- /* Just one, but keep the switch construct to make additions easy. */
- bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh5);
- break;
-
- default:
- bfd_set_error (bfd_error_wrong_format);
- return FALSE;
- }
- return TRUE;
-}
-
-/* Function to keep SH64 specific file flags.
-
- See sh64_elf_set_private_flags in elf32-sh64.c for the original. */
-
-static bfd_boolean
-sh_elf64_set_private_flags (bfd *abfd, flagword flags)
-{
- BFD_ASSERT (! elf_flags_init (abfd)
- || elf_elfheader (abfd)->e_flags == flags);
-
- elf_elfheader (abfd)->e_flags = flags;
- elf_flags_init (abfd) = TRUE;
- return sh_elf64_set_mach_from_flags (abfd);
-}
-
-/* Copy the SHF_SH5_ISA32 attribute that we keep on all sections with
- code, to keep attributes the same as for SHmedia in 32-bit ELF. */
-
-static bfd_boolean
-sh_elf64_copy_private_data_internal (bfd *ibfd, bfd *obfd)
-{
- if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return TRUE;
-
- /* Copy object attributes. */
- _bfd_elf_copy_private_bfd_data (ibfd, obfd);
-
- return sh_elf64_set_private_flags (obfd, elf_elfheader (ibfd)->e_flags);
-}
-
-static bfd_boolean
-sh_elf64_copy_private_data (bfd *ibfd, bfd *obfd)
-{
- return sh_elf64_copy_private_data_internal (ibfd, obfd);
-}
-
-static bfd_boolean
-sh_elf64_merge_private_data (bfd *ibfd, struct bfd_link_info *info)
-{
- bfd *obfd = info->output_bfd;
- flagword old_flags, new_flags;
-
- if (! _bfd_generic_verify_endian_match (ibfd, info))
- return FALSE;
-
- if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return TRUE;
-
- if (bfd_get_arch_size (ibfd) != bfd_get_arch_size (obfd))
- {
- const char *msg;
-
- if (bfd_get_arch_size (ibfd) == 32
- && bfd_get_arch_size (obfd) == 64)
- /* xgettext:c-format */
- msg = _("%pB: compiled as 32-bit object and %pB is 64-bit");
- else if (bfd_get_arch_size (ibfd) == 64
- && bfd_get_arch_size (obfd) == 32)
- /* xgettext:c-format */
- msg = _("%pB: compiled as 64-bit object and %pB is 32-bit");
- else
- /* xgettext:c-format */
- msg = _("%pB: object size does not match that of target %pB");
-
- _bfd_error_handler (msg, ibfd, obfd);
- bfd_set_error (bfd_error_wrong_format);
- return FALSE;
- }
-
- old_flags = elf_elfheader (obfd)->e_flags;
- new_flags = elf_elfheader (ibfd)->e_flags;
- if (! elf_flags_init (obfd))
- {
- /* This happens when ld starts out with a 'blank' output file. */
- elf_flags_init (obfd) = TRUE;
- elf_elfheader (obfd)->e_flags = old_flags = new_flags;
- }
- /* We don't allow linking in anything else than SH64 code, and since
- this is a 64-bit ELF, we assume the 64-bit ABI is used. Add code
- here as things change. */
- else if ((new_flags & EF_SH_MACH_MASK) != EF_SH5)
- {
- _bfd_error_handler
- ("%pB: does not use the SH64 64-bit ABI as previous modules do", ibfd);
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
- sh_elf64_copy_private_data_internal (ibfd, obfd);
-
- /* I can't think of anything sane other than old_flags being EF_SH5 and
- that we need to preserve that. */
- elf_elfheader (obfd)->e_flags = old_flags;
-
- return sh_elf64_set_mach_from_flags (obfd);
-}
-
-/* Return the section that should be marked against GC for a given
- relocation. */
-
-static asection *
-sh_elf64_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
- Elf_Internal_Rela *rel,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
-{
- if (h != NULL)
- switch (ELF64_R_TYPE (rel->r_info))
- {
- case R_SH_GNU_VTINHERIT:
- case R_SH_GNU_VTENTRY:
- return NULL;
- }
-
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
-}
-
-/* Look through the relocs for a section during the first phase.
- Since we don't do .gots or .plts, we just need to consider the
- virtual table relocs for gc. */
-
-static bfd_boolean
-sh_elf64_check_relocs (bfd *abfd, struct bfd_link_info *info,
- asection *sec, const Elf_Internal_Rela *relocs)
-{
- Elf_Internal_Shdr *symtab_hdr;
- struct elf_link_hash_entry **sym_hashes;
- const Elf_Internal_Rela *rel;
- const Elf_Internal_Rela *rel_end;
- bfd *dynobj;
- bfd_vma *local_got_offsets;
- asection *sgot;
- asection *srelgot;
- asection *sreloc;
-
- sreloc = NULL;
-
- if (bfd_link_relocatable (info))
- return TRUE;
-
- symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- sym_hashes = elf_sym_hashes (abfd);
-
- dynobj = elf_hash_table (info)->dynobj;
- local_got_offsets = elf_local_got_offsets (abfd);
-
- rel_end = relocs + sec->reloc_count;
- for (rel = relocs; rel < rel_end; rel++)
- {
- struct elf_link_hash_entry *h;
- unsigned long r_symndx;
-
- r_symndx = ELF64_R_SYM (rel->r_info);
- if (r_symndx < symtab_hdr->sh_info)
- h = NULL;
- else
- {
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
- }
-
- /* Some relocs require a global offset table. */
- if (dynobj == NULL)
- {
- switch (ELF64_R_TYPE (rel->r_info))
- {
- case R_SH_GOTPLT_LOW16:
- case R_SH_GOTPLT_MEDLOW16:
- case R_SH_GOTPLT_MEDHI16:
- case R_SH_GOTPLT_HI16:
- case R_SH_GOTPLT10BY4:
- case R_SH_GOTPLT10BY8:
- case R_SH_GOT_LOW16:
- case R_SH_GOT_MEDLOW16:
- case R_SH_GOT_MEDHI16:
- case R_SH_GOT_HI16:
- case R_SH_GOT10BY4:
- case R_SH_GOT10BY8:
- case R_SH_GOTOFF_LOW16:
- case R_SH_GOTOFF_MEDLOW16:
- case R_SH_GOTOFF_MEDHI16:
- case R_SH_GOTOFF_HI16:
- case R_SH_GOTPC_LOW16:
- case R_SH_GOTPC_MEDLOW16:
- case R_SH_GOTPC_MEDHI16:
- case R_SH_GOTPC_HI16:
- elf_hash_table (info)->dynobj = dynobj = abfd;
- if (! _bfd_elf_create_got_section (dynobj, info))
- return FALSE;
- break;
-
- default:
- break;
- }
- }
-
- switch (ELF64_R_TYPE (rel->r_info))
- {
- /* This relocation describes the C++ object vtable hierarchy.
- Reconstruct it for later use during GC. */
- case R_SH_GNU_VTINHERIT:
- if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
- return FALSE;
- break;
-
- /* This relocation describes which C++ vtable entries are actually
- used. Record for later use during GC. */
- case R_SH_GNU_VTENTRY:
- BFD_ASSERT (h != NULL);
- if (h != NULL
- && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
- return FALSE;
- break;
-
- force_got:
- case R_SH_GOT_LOW16:
- case R_SH_GOT_MEDLOW16:
- case R_SH_GOT_MEDHI16:
- case R_SH_GOT_HI16:
- case R_SH_GOT10BY4:
- case R_SH_GOT10BY8:
- /* This symbol requires a global offset table entry. */
-
- sgot = elf_hash_table (info)->sgot;
- srelgot = elf_hash_table (info)->srelgot;
- BFD_ASSERT (sgot != NULL && srelgot != NULL);
-
- if (h != NULL)
- {
- if (h->type == STT_DATALABEL)
- {
- struct elf_sh64_link_hash_entry *hsh;
-
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
- hsh = (struct elf_sh64_link_hash_entry *)h;
- if (hsh->datalabel_got_offset != (bfd_vma) -1)
- break;
-
- hsh->datalabel_got_offset = sgot->size;
- }
- else
- {
- if (h->got.offset != (bfd_vma) -1)
- {
- /* We have already allocated space in the .got. */
- break;
- }
- h->got.offset = sgot->size;
- }
-
- /* Make sure this symbol is output as a dynamic symbol. */
- if (h->dynindx == -1)
- {
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-
- srelgot->size += sizeof (Elf64_External_Rela);
- }
- else
- {
- /* This is a global offset table entry for a local
- symbol. */
- if (local_got_offsets == NULL)
- {
- size_t size;
- register unsigned int i;
-
- size = symtab_hdr->sh_info * sizeof (bfd_vma);
- /* Reserve space for both the datalabel and
- codelabel local GOT offsets. */
- size *= 2;
- local_got_offsets = (bfd_vma *) bfd_alloc (abfd, size);
- if (local_got_offsets == NULL)
- return FALSE;
- elf_local_got_offsets (abfd) = local_got_offsets;
- for (i = 0; i < symtab_hdr->sh_info; i++)
- local_got_offsets[i] = (bfd_vma) -1;
- for (; i < 2 * symtab_hdr->sh_info; i++)
- local_got_offsets[i] = (bfd_vma) -1;
- }
- if ((rel->r_addend & 1) != 0)
- {
- if (local_got_offsets[symtab_hdr->sh_info
- + r_symndx] != (bfd_vma) -1)
- {
- /* We have already allocated space in the .got. */
- break;
- }
- local_got_offsets[symtab_hdr->sh_info
- + r_symndx] = sgot->size;
- }
- else
- {
- if (local_got_offsets[r_symndx] != (bfd_vma) -1)
- {
- /* We have already allocated space in the .got. */
- break;
- }
- local_got_offsets[r_symndx] = sgot->size;
- }
-
- if (bfd_link_pic (info))
- {
- /* If we are generating a shared object, we need to
- output a R_SH_RELATIVE reloc so that the dynamic
- linker can adjust this GOT entry. */
- srelgot->size += sizeof (Elf64_External_Rela);
- }
- }
-
- sgot->size += 8;
-
- break;
-
- case R_SH_GOTPLT_LOW16:
- case R_SH_GOTPLT_MEDLOW16:
- case R_SH_GOTPLT_MEDHI16:
- case R_SH_GOTPLT_HI16:
- case R_SH_GOTPLT10BY4:
- case R_SH_GOTPLT10BY8:
- /* If this is a local symbol, we resolve it directly without
- creating a procedure linkage table entry. */
-
- if (h == NULL
- || ELF_ST_VISIBILITY (h->other) == STV_INTERNAL
- || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN
- || ! bfd_link_pic (info)
- || info->symbolic
- || h->dynindx == -1
- || h->got.offset != (bfd_vma) -1)
- goto force_got;
-
- /* Make sure this symbol is output as a dynamic symbol. */
- if (h->dynindx == -1)
- {
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-
- h->needs_plt = 1;
-
- break;
-
- case R_SH_PLT_LOW16:
- case R_SH_PLT_MEDLOW16:
- case R_SH_PLT_MEDHI16:
- case R_SH_PLT_HI16:
- /* This symbol requires a procedure linkage table entry. We
- actually build the entry in adjust_dynamic_symbol,
- because this might be a case of linking PIC code which is
- never referenced by a dynamic object, in which case we
- don't need to generate a procedure linkage table entry
- after all. */
-
- /* If this is a local symbol, we resolve it directly without
- creating a procedure linkage table entry. */
- if (h == NULL)
- continue;
-
- if (ELF_ST_VISIBILITY (h->other) == STV_INTERNAL
- || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN)
- break;
-
- h->needs_plt = 1;
-
- break;
-
- case R_SH_64:
- case R_SH_64_PCREL:
- if (h != NULL)
- h->non_got_ref = 1;
-
- /* If we are creating a shared library, and this is a reloc
- against a global symbol, or a non PC relative reloc
- against a local symbol, then we need to copy the reloc
- into the shared library. However, if we are linking with
- -Bsymbolic, we do not need to copy a reloc against a
- global symbol which is defined in an object we are
- including in the link (i.e., DEF_REGULAR is set). At
- this point we have not seen all the input files, so it is
- possible that DEF_REGULAR is not set now but will be set
- later (it is never cleared). We account for that
- possibility below by storing information in the
- pcrel_relocs_copied field of the hash table entry. */
- if (bfd_link_pic (info)
- && (sec->flags & SEC_ALLOC) != 0
- && (ELF32_R_TYPE (rel->r_info) != R_SH_64_PCREL
- || (h != NULL
- && (! info->symbolic
- || !h->def_regular))))
- {
- /* When creating a shared object, we must copy these
- reloc types into the output file. We create a reloc
- section in dynobj and make room for this reloc. */
- if (sreloc == NULL)
- {
- sreloc = _bfd_elf_make_dynamic_reloc_section
- (sec, dynobj, 2, abfd, /*rela?*/ TRUE);
-
- if (sreloc == NULL)
- return FALSE;
- }
-
- sreloc->size += sizeof (Elf64_External_Rela);
-
- /* If we are linking with -Bsymbolic, and this is a
- global symbol, we count the number of PC relative
- relocations we have entered for this symbol, so that
- we can discard them again if the symbol is later
- defined by a regular object. Note that this function
- is only called if we are using an elf_sh linker
- hash table, which means that h is really a pointer to
- an elf_sh_link_hash_entry. */
- if (h != NULL && info->symbolic
- && ELF64_R_TYPE (rel->r_info) == R_SH_64_PCREL)
- {
- struct elf_sh64_link_hash_entry *eh;
- struct elf_sh64_pcrel_relocs_copied *p;
-
- eh = (struct elf_sh64_link_hash_entry *) h;
-
- for (p = eh->pcrel_relocs_copied; p != NULL; p = p->next)
- if (p->section == sreloc)
- break;
-
- if (p == NULL)
- {
- p = ((struct elf_sh64_pcrel_relocs_copied *)
- bfd_alloc (dynobj, sizeof *p));
- if (p == NULL)
- return FALSE;
- p->next = eh->pcrel_relocs_copied;
- eh->pcrel_relocs_copied = p;
- p->section = sreloc;
- p->count = 0;
- }
-
- ++p->count;
- }
- }
-
- break;
- }
- }
-
- return TRUE;
-}
-
-static int
-sh64_elf64_get_symbol_type (Elf_Internal_Sym * elf_sym, int type)
-{
- if (ELF_ST_TYPE (elf_sym->st_info) == STT_DATALABEL)
- return STT_DATALABEL;
-
- return type;
-}
-
-/* FIXME: This is a copy of sh64_elf_add_symbol_hook in elf32-sh64.c.
- Either file can presumably exist without the other, but do not differ
- in elf-size-ness. How to share?
-
- Hook called by the linker routine which adds symbols from an object
- file. We must make indirect symbols for undefined symbols marked with
- STT_DATALABEL, so relocations passing them will pick up that attribute
- and neutralize STO_SH5_ISA32 found on the symbol definition.
-
- There is a problem, though: We want to fill in the hash-table entry for
- this symbol and signal to the caller that no further processing is
- needed. But we don't have the index for this hash-table entry. We
- rely here on that the current entry is the first hash-entry with NULL,
- which seems brittle. Also, iterating over the hash-table to find that
- entry is a linear operation on the number of symbols in this input
- file, and this function should take constant time, so that's not good
- too. Only comfort is that DataLabel references should only be found in
- hand-written assembly code and thus be rare. FIXME: Talk maintainers
- into adding an option to elf_add_symbol_hook (preferably) for the index
- or the hash entry, alternatively adding the index to Elf_Internal_Sym
- (not so good). */
-
-static bfd_boolean
-sh64_elf64_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
- Elf_Internal_Sym *sym, const char **namep,
- flagword *flagsp ATTRIBUTE_UNUSED,
- asection **secp, bfd_vma *valp)
-{
- /* We want to do this for relocatable as well as final linking. */
- if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL
- && is_elf_hash_table (info->hash))
- {
- struct elf_link_hash_entry *h;
-
- /* For relocatable links, we register the DataLabel sym in its own
- right, and tweak the name when it's output. Otherwise, we make
- an indirect symbol of it. */
- flagword flags
- = bfd_link_relocatable (info) || info->emitrelocations
- ? BSF_GLOBAL : BSF_GLOBAL | BSF_INDIRECT;
-
- char *dl_name
- = bfd_malloc (strlen (*namep) + sizeof (DATALABEL_SUFFIX));
- struct elf_link_hash_entry ** sym_hash = elf_sym_hashes (abfd);
-
- BFD_ASSERT (sym_hash != NULL);
-
- /* Allocation may fail. */
- if (dl_name == NULL)
- return FALSE;
-
- strcpy (dl_name, *namep);
- strcat (dl_name, DATALABEL_SUFFIX);
-
- h = (struct elf_link_hash_entry *)
- bfd_link_hash_lookup (info->hash, dl_name, FALSE, FALSE, FALSE);
-
- if (h == NULL)
- {
- /* No previous datalabel symbol. Make one. */
- struct bfd_link_hash_entry *bh = NULL;
- const struct elf_backend_data *bed = get_elf_backend_data (abfd);
-
- if (! _bfd_generic_link_add_one_symbol (info, abfd, dl_name,
- flags, *secp, *valp,
- *namep, FALSE,
- bed->collect, &bh))
- {
- free (dl_name);
- return FALSE;
- }
-
- h = (struct elf_link_hash_entry *) bh;
- h->non_elf = 0;
- h->type = STT_DATALABEL;
- }
- else
- /* If a new symbol was created, it holds the allocated name.
- Otherwise, we don't need it anymore and should deallocate it. */
- free (dl_name);
-
- if (h->type != STT_DATALABEL
- || ((bfd_link_relocatable (info) || info->emitrelocations)
- && h->root.type != bfd_link_hash_undefined)
- || (! bfd_link_relocatable (info) && !info->emitrelocations
- && h->root.type != bfd_link_hash_indirect))
- {
- /* Make sure we don't get confused on invalid input. */
- _bfd_error_handler
- (_("%pB: encountered datalabel symbol in input"), abfd);
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
- /* Now find the hash-table slot for this entry and fill it in. */
- while (*sym_hash != NULL)
- sym_hash++;
- *sym_hash = h;
-
- /* Signal to caller to skip this symbol - we've handled it. */
- *namep = NULL;
- }
-
- return TRUE;
-}
-
-/* This hook function is called before the linker writes out a global
- symbol. For relocatable links, DataLabel symbols will be present in
- linker output. We cut off the special suffix on those symbols, so the
- right name appears in the output.
-
- When linking and emitting relocations, there can appear global symbols
- that are not referenced by relocs, but rather only implicitly through
- DataLabel references, a relation that is not visible to the linker.
- Since no stripping of global symbols in done when doing such linking,
- we don't need to look up and make sure to emit the main symbol for each
- DataLabel symbol. */
-
-static int
-sh64_elf64_link_output_symbol_hook (struct bfd_link_info *info,
- const char *cname,
- Elf_Internal_Sym *sym,
- asection *input_sec ATTRIBUTE_UNUSED,
- struct elf_link_hash_entry *h ATTRIBUTE_UNUSED)
-{
- char *name = (char *) cname;
-
- if (bfd_link_relocatable (info) || info->emitrelocations)
- {
- if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL)
- name[strlen (name) - strlen (DATALABEL_SUFFIX)] = 0;
- }
-
- return 1;
-}
-
-/* Set bit 0 on the entry address; it always points to SHmedia code. This
- is mostly for symmetry with the 32-bit format, where code can be
- SHcompact and we need to make a distinction to make sure execution
- starts in the right ISA mode. It is also convenient for a loader,
- which would otherwise have to set this bit when loading a TR register
- before jumping to the program entry. */
-
-static void
-sh64_elf64_final_write_processing (bfd *abfd,
- bfd_boolean linker ATTRIBUTE_UNUSED)
-{
- /* FIXME: Perhaps we shouldn't do this if the entry address was supplied
- numerically, but we currently lack the infrastructure to recognize
- that: The entry symbol, and info whether it is numeric or a symbol
- name is kept private in the linker. */
- if (elf_elfheader (abfd)->e_type == ET_EXEC)
- elf_elfheader (abfd)->e_entry |= 1;
-}
-
-/* First entry in an absolute procedure linkage table look like this. */
-
-static const bfd_byte elf_sh64_plt0_entry_be[PLT_ENTRY_SIZE] =
-{
- 0xcc, 0x00, 0x01, 0x10, /* movi .got.plt >> 48, r17 */
- 0xc8, 0x00, 0x01, 0x10, /* shori (.got.plt >> 32) & 65535, r17 */
- 0xc8, 0x00, 0x01, 0x10, /* shori (.got.plt >> 16) & 65535, r17 */
- 0xc8, 0x00, 0x01, 0x10, /* shori .got.plt & 65535, r17 */
- 0x8d, 0x10, 0x09, 0x90, /* ld.q r17, 16, r25 */
- 0x6b, 0xf1, 0x66, 0x00, /* ptabs r25, tr0 */
- 0x8d, 0x10, 0x05, 0x10, /* ld.q r17, 8, r17 */
- 0x44, 0x01, 0xff, 0xf0, /* blink tr0, r63 */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
-};
-
-static const bfd_byte elf_sh64_plt0_entry_le[PLT_ENTRY_SIZE] =
-{
- 0x10, 0x01, 0x00, 0xcc, /* movi .got.plt >> 16, r17 */
- 0x10, 0x01, 0x00, 0xc8, /* shori (.got.plt >> 32) & 65535, r17 */
- 0x10, 0x01, 0x00, 0xc8, /* shori (.got.plt >> 16) & 65535, r17 */
- 0x10, 0x01, 0x00, 0xc8, /* shori .got.plt & 65535, r17 */
- 0x90, 0x09, 0x10, 0x8d, /* ld.q r17, 16, r25 */
- 0x00, 0x66, 0xf1, 0x6b, /* ptabs r25, tr0 */
- 0x10, 0x05, 0x10, 0x8d, /* ld.q r17, 8, r17 */
- 0xf0, 0xff, 0x01, 0x44, /* blink tr0, r63 */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
-};
-
-/* Sebsequent entries in an absolute procedure linkage table look like
- this. */
-
-static const bfd_byte elf_sh64_plt_entry_be[PLT_ENTRY_SIZE] =
-{
- 0xcc, 0x00, 0x01, 0x90, /* movi nameN-in-GOT >> 48, r25 */
- 0xc8, 0x00, 0x01, 0x90, /* shori (nameN-in-GOT >> 32) & 65535, r25 */
- 0xc8, 0x00, 0x01, 0x90, /* shori (nameN-in-GOT >> 16) & 65535, r25 */
- 0xc8, 0x00, 0x01, 0x90, /* shori nameN-in-GOT & 65535, r25 */
- 0x8d, 0x90, 0x01, 0x90, /* ld.q r25, 0, r25 */
- 0x6b, 0xf1, 0x66, 0x00, /* ptabs r25, tr0 */
- 0x44, 0x01, 0xff, 0xf0, /* blink tr0, r63 */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0xcc, 0x00, 0x01, 0x90, /* movi (.+8-.PLT0) >> 16, r25 */
- 0xc8, 0x00, 0x01, 0x90, /* shori (.+4-.PLT0) & 65535, r25 */
- 0x6b, 0xf5, 0x66, 0x00, /* ptrel r25, tr0 */
- 0xcc, 0x00, 0x01, 0x50, /* movi reloc-offset >> 16, r21 */
- 0xc8, 0x00, 0x01, 0x50, /* shori reloc-offset & 65535, r21 */
- 0x44, 0x01, 0xff, 0xf0, /* blink tr0, r63 */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
-};
-
-static const bfd_byte elf_sh64_plt_entry_le[PLT_ENTRY_SIZE] =
-{
- 0x90, 0x01, 0x00, 0xcc, /* movi nameN-in-GOT >> 16, r25 */
- 0x90, 0x01, 0x00, 0xc8, /* shori nameN-in-GOT & 65535, r25 */
- 0x90, 0x01, 0x00, 0xc8, /* shori nameN-in-GOT & 65535, r25 */
- 0x90, 0x01, 0x00, 0xc8, /* shori nameN-in-GOT & 65535, r25 */
- 0x90, 0x01, 0x90, 0x8d, /* ld.q r25, 0, r25 */
- 0x00, 0x66, 0xf1, 0x6b, /* ptabs r25, tr0 */
- 0xf0, 0xff, 0x01, 0x44, /* blink tr0, r63 */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0x90, 0x01, 0x00, 0xcc, /* movi (.+8-.PLT0) >> 16, r25 */
- 0x90, 0x01, 0x00, 0xc8, /* shori (.+4-.PLT0) & 65535, r25 */
- 0x00, 0x66, 0xf5, 0x6b, /* ptrel r25, tr0 */
- 0x50, 0x01, 0x00, 0xcc, /* movi reloc-offset >> 16, r21 */
- 0x50, 0x01, 0x00, 0xc8, /* shori reloc-offset & 65535, r21 */
- 0xf0, 0xff, 0x01, 0x44, /* blink tr0, r63 */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
-};
-
-/* Entries in a PIC procedure linkage table look like this. */
-
-static const bfd_byte elf_sh64_pic_plt_entry_be[PLT_ENTRY_SIZE] =
-{
- 0xcc, 0x00, 0x01, 0x90, /* movi nameN@GOT >> 16, r25 */
- 0xc8, 0x00, 0x01, 0x90, /* shori nameN@GOT & 65535, r25 */
- 0x40, 0xc3, 0x65, 0x90, /* ldx.q r12, r25, r25 */
- 0x6b, 0xf1, 0x66, 0x00, /* ptabs r25, tr0 */
- 0x44, 0x01, 0xff, 0xf0, /* blink tr0, r63 */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0xce, 0x00, 0x01, 0x10, /* movi -GOT_BIAS, r17 */
- 0x00, 0xc9, 0x45, 0x10, /* add r12, r17, r17 */
- 0x8d, 0x10, 0x09, 0x90, /* ld.q r17, 16, r25 */
- 0x6b, 0xf1, 0x66, 0x00, /* ptabs r25, tr0 */
- 0x8d, 0x10, 0x05, 0x10, /* ld.q r17, 8, r17 */
- 0xcc, 0x00, 0x01, 0x50, /* movi reloc-offset >> 16, r21 */
- 0xc8, 0x00, 0x01, 0x50, /* shori reloc-offset & 65535, r21 */
- 0x44, 0x01, 0xff, 0xf0, /* blink tr0, r63 */
-};
-
-static const bfd_byte elf_sh64_pic_plt_entry_le[PLT_ENTRY_SIZE] =
-{
- 0x90, 0x01, 0x00, 0xcc, /* movi nameN@GOT >> 16, r25 */
- 0x90, 0x01, 0x00, 0xc8, /* shori nameN@GOT & 65535, r25 */
- 0x90, 0x65, 0xc3, 0x40, /* ldx.q r12, r25, r25 */
- 0x00, 0x66, 0xf1, 0x6b, /* ptabs r25, tr0 */
- 0xf0, 0xff, 0x01, 0x44, /* blink tr0, r63 */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0x10, 0x01, 0x00, 0xce, /* movi -GOT_BIAS, r17 */
- 0x10, 0x45, 0xc9, 0x00, /* add r12, r17, r17 */
- 0x90, 0x09, 0x10, 0x8d, /* ld.q r17, 16, r25 */
- 0x00, 0x66, 0xf1, 0x6b, /* ptabs r25, tr0 */
- 0x10, 0x05, 0x10, 0x8d, /* ld.q r17, 8, r17 */
- 0x50, 0x01, 0x00, 0xcc, /* movi reloc-offset >> 16, r21 */
- 0x50, 0x01, 0x00, 0xc8, /* shori reloc-offset & 65535, r21 */
- 0xf0, 0xff, 0x01, 0x44, /* blink tr0, r63 */
-};
-
-static const bfd_byte *elf_sh64_plt0_entry;
-static const bfd_byte *elf_sh64_plt_entry;
-static const bfd_byte *elf_sh64_pic_plt_entry;
-
-/* Create an entry in an sh ELF linker hash table. */
-
-static struct bfd_hash_entry *
-sh64_elf64_link_hash_newfunc (struct bfd_hash_entry *entry,
- struct bfd_hash_table *table,
- const char *string)
-{
- struct elf_sh64_link_hash_entry *ret =
- (struct elf_sh64_link_hash_entry *) entry;
-
- /* Allocate the structure if it has not already been allocated by a
- subclass. */
- if (ret == (struct elf_sh64_link_hash_entry *) NULL)
- ret = ((struct elf_sh64_link_hash_entry *)
- bfd_hash_allocate (table,
- sizeof (struct elf_sh64_link_hash_entry)));
- if (ret == (struct elf_sh64_link_hash_entry *) NULL)
- return (struct bfd_hash_entry *) ret;
-
- /* Call the allocation method of the superclass. */
- ret = ((struct elf_sh64_link_hash_entry *)
- _bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret,
- table, string));
- if (ret != (struct elf_sh64_link_hash_entry *) NULL)
- {
- ret->pcrel_relocs_copied = NULL;
- ret->datalabel_got_offset = (bfd_vma) -1;
- }
-
- return (struct bfd_hash_entry *) ret;
-}
-
-/* Create an sh64 ELF linker hash table. */
-
-static struct bfd_link_hash_table *
-sh64_elf64_link_hash_table_create (bfd *abfd)
-{
- struct elf_link_hash_table *ret;
-
- ret = (struct elf_link_hash_table *) bfd_zmalloc (sizeof (* ret));
- if (ret == (struct elf_link_hash_table *) NULL)
- return NULL;
-
- if (!_bfd_elf_link_hash_table_init (ret, abfd,
- sh64_elf64_link_hash_newfunc,
- sizeof (struct elf_sh64_link_hash_entry),
- GENERIC_ELF_DATA))
- {
- free (ret);
- return NULL;
- }
-
- return &ret->root;
-}
-
-inline static void
-movi_shori_putval (bfd *output_bfd, unsigned long value, bfd_byte *addr)
-{
- bfd_put_32 (output_bfd,
- bfd_get_32 (output_bfd, addr)
- | ((value >> 6) & 0x3fffc00),
- addr);
- bfd_put_32 (output_bfd,
- bfd_get_32 (output_bfd, addr + 4)
- | ((value << 10) & 0x3fffc00),
- addr + 4);
-}
-
-inline static void
-movi_3shori_putval (bfd *output_bfd, bfd_vma value, bfd_byte *addr)
-{
- bfd_put_32 (output_bfd,
- bfd_get_32 (output_bfd, addr)
- | ((value >> 38) & 0x3fffc00),
- addr);
- bfd_put_32 (output_bfd,
- bfd_get_32 (output_bfd, addr + 4)
- | ((value >> 22) & 0x3fffc00),
- addr + 4);
- bfd_put_32 (output_bfd,
- bfd_get_32 (output_bfd, addr + 8)
- | ((value >> 6) & 0x3fffc00),
- addr + 8);
- bfd_put_32 (output_bfd,
- bfd_get_32 (output_bfd, addr + 12)
- | ((value << 10) & 0x3fffc00),
- addr + 12);
-}
-
-/* Create dynamic sections when linking against a dynamic object. */
-
-static bfd_boolean
-sh64_elf64_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
-{
- flagword flags, pltflags;
- register asection *s;
- const struct elf_backend_data *bed = get_elf_backend_data (abfd);
- int ptralign = 0;
-
- switch (bed->s->arch_size)
- {
- case 32:
- ptralign = 2;
- break;
-
- case 64:
- ptralign = 3;
- break;
-
- default:
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
- /* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and
- .rel[a].bss sections. */
-
- flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
- | SEC_LINKER_CREATED);
-
- pltflags = flags;
- pltflags |= SEC_CODE;
- if (bed->plt_not_loaded)
- pltflags &= ~ (SEC_LOAD | SEC_HAS_CONTENTS);
- if (bed->plt_readonly)
- pltflags |= SEC_READONLY;
-
- s = bfd_make_section_anyway_with_flags (abfd, ".plt", pltflags);
- if (s == NULL
- || ! bfd_set_section_alignment (abfd, s, bed->plt_alignment))
- return FALSE;
-
- if (bed->want_plt_sym)
- {
- /* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the
- .plt section. */
- struct elf_link_hash_entry *h;
- struct bfd_link_hash_entry *bh = NULL;
-
- if (! (_bfd_generic_link_add_one_symbol
- (info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s,
- (bfd_vma) 0, (const char *) NULL, FALSE, bed->collect, &bh)))
- return FALSE;
-
- h = (struct elf_link_hash_entry *) bh;
- h->def_regular = 1;
- h->type = STT_OBJECT;
- elf_hash_table (info)->hplt = h;
-
- if (bfd_link_pic (info)
- && ! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-
- s = bfd_make_section_anyway_with_flags (abfd,
- bed->default_use_rela_p
- ? ".rela.plt" : ".rel.plt",
- flags | SEC_READONLY);
- if (s == NULL
- || ! bfd_set_section_alignment (abfd, s, ptralign))
- return FALSE;
-
- if (! _bfd_elf_create_got_section (abfd, info))
- return FALSE;
-
- if (bed->want_dynbss)
- {
- /* The .dynbss section is a place to put symbols which are defined
- by dynamic objects, are referenced by regular objects, and are
- not functions. We must allocate space for them in the process
- image and use a R_*_COPY reloc to tell the dynamic linker to
- initialize them at run time. The linker script puts the .dynbss
- section into the .bss section of the final image. */
- s = bfd_make_section_anyway_with_flags (abfd, ".dynbss",
- SEC_ALLOC | SEC_LINKER_CREATED);
- if (s == NULL)
- return FALSE;
-
- /* The .rel[a].bss section holds copy relocs. This section is not
- normally needed. We need to create it here, though, so that the
- linker will map it to an output section. We can't just create it
- only if we need it, because we will not know whether we need it
- until we have seen all the input files, and the first time the
- main linker code calls BFD after examining all the input files
- (size_dynamic_sections) the input sections have already been
- mapped to the output sections. If the section turns out not to
- be needed, we can discard it later. We will never need this
- section when generating a shared object, since they do not use
- copy relocs. */
- if (! bfd_link_pic (info))
- {
- s = bfd_make_section_anyway_with_flags (abfd,
- (bed->default_use_rela_p
- ? ".rela.bss" : ".rel.bss"),
- flags | SEC_READONLY);
- if (s == NULL
- || ! bfd_set_section_alignment (abfd, s, ptralign))
- return FALSE;
- }
- }
-
- return TRUE;
-}
-
-/* Adjust a symbol defined by a dynamic object and referenced by a
- regular object. The current definition is in some section of the
- dynamic object, but we're not including those sections. We have to
- change the definition to something the rest of the link can
- understand. */
-
-static bfd_boolean
-sh64_elf64_adjust_dynamic_symbol (struct bfd_link_info *info,
- struct elf_link_hash_entry *h)
-{
- bfd *dynobj;
- asection *s;
-
- dynobj = elf_hash_table (info)->dynobj;
-
- /* Make sure we know what is going on here. */
- BFD_ASSERT (dynobj != NULL
- && (h->needs_plt
- || h->is_weakalias
- || (h->def_dynamic
- && h->ref_regular
- && !h->def_regular)));
-
- /* If this is a function, put it in the procedure linkage table. We
- will fill in the contents of the procedure linkage table later,
- when we know the address of the .got section. */
- if (h->type == STT_FUNC
- || h->needs_plt)
- {
- if (! bfd_link_pic (info)
- && !h->def_dynamic
- && !h->ref_dynamic)
- {
- /* This case can occur if we saw a PLT reloc in an input
- file, but the symbol was never referred to by a dynamic
- object. In such a case, we don't actually need to build
- a procedure linkage table, and we can just do a REL64
- reloc instead. */
- BFD_ASSERT (h->needs_plt);
- return TRUE;
- }
-
- /* Make sure this symbol is output as a dynamic symbol. */
- if (h->dynindx == -1)
- {
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-
- s = elf_hash_table (info)->splt;
- BFD_ASSERT (s != NULL);
-
- /* If this is the first .plt entry, make room for the special
- first entry. */
- if (s->size == 0)
- s->size += PLT_ENTRY_SIZE;
-
- /* If this symbol is not defined in a regular file, and we are
- not generating a shared library, then set the symbol to this
- location in the .plt. This is required to make function
- pointers compare as equal between the normal executable and
- the shared library. */
- if (! bfd_link_pic (info)
- && !h->def_regular)
- {
- h->root.u.def.section = s;
- h->root.u.def.value = s->size;
- }
-
- h->plt.offset = s->size;
-
- /* Make room for this entry. */
- s->size += elf_sh64_sizeof_plt (info);
-
- /* We also need to make an entry in the .got.plt section, which
- will be placed in the .got section by the linker script. */
-
- s = elf_hash_table (info)->sgotplt;
- BFD_ASSERT (s != NULL);
- s->size += 8;
-
- /* We also need to make an entry in the .rela.plt section. */
-
- s = elf_hash_table (info)->srelplt;
- BFD_ASSERT (s != NULL);
- s->size += sizeof (Elf64_External_Rela);
-
- return TRUE;
- }
-
- /* If this is a weak symbol, and there is a real definition, the
- processor independent code will have arranged for us to see the
- real definition first, and we can just use the same value. */
- if (h->is_weakalias)
- {
- struct elf_link_hash_entry *def = weakdef (h);
- BFD_ASSERT (def->root.type == bfd_link_hash_defined);
- h->root.u.def.section = def->root.u.def.section;
- h->root.u.def.value = def->root.u.def.value;
- return TRUE;
- }
-
- /* This is a reference to a symbol defined by a dynamic object which
- is not a function. */
-
- /* If we are creating a shared library, we must presume that the
- only references to the symbol are via the global offset table.
- For such cases we need not do anything here; the relocations will
- be handled correctly by relocate_section. */
- if (bfd_link_pic (info))
- return TRUE;
-
- /* If there are no references to this symbol that do not use the
- GOT, we don't need to generate a copy reloc. */
- if (!h->non_got_ref)
- return TRUE;
-
- /* We must allocate the symbol in our .dynbss section, which will
- become part of the .bss section of the executable. There will be
- an entry for this symbol in the .dynsym section. The dynamic
- object will contain position independent code, so all references
- from the dynamic object to this symbol will go through the global
- offset table. The dynamic linker will use the .dynsym entry to
- determine the address it must put in the global offset table, so
- both the dynamic object and the regular object will refer to the
- same memory location for the variable. */
-
- s = bfd_get_linker_section (dynobj, ".dynbss");
- BFD_ASSERT (s != NULL);
-
- /* We must generate a R_SH_COPY reloc to tell the dynamic linker to
- copy the initial value out of the dynamic object and into the
- runtime process image. We need to remember the offset into the
- .rela.bss section we are going to use. */
- if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
- {
- asection *srel;
-
- srel = bfd_get_linker_section (dynobj, ".rela.bss");
- BFD_ASSERT (srel != NULL);
- srel->size += sizeof (Elf64_External_Rela);
- h->needs_copy = 1;
- }
-
- return _bfd_elf_adjust_dynamic_copy (info, h, s);
-}
-
-/* This function is called via sh_elf_link_hash_traverse if we are
- creating a shared object with -Bsymbolic. It discards the space
- allocated to copy PC relative relocs against symbols which are
- defined in regular objects. We allocated space for them in the
- check_relocs routine, but we won't fill them in in the
- relocate_section routine. */
-
-static bfd_boolean
-sh64_elf64_discard_copies (struct elf_sh64_link_hash_entry *h,
- void *ignore ATTRIBUTE_UNUSED)
-{
- struct elf_sh64_pcrel_relocs_copied *s;
-
- /* We only discard relocs for symbols defined in a regular object. */
- if (!h->root.def_regular)
- return TRUE;
-
- for (s = h->pcrel_relocs_copied; s != NULL; s = s->next)
- s->section->size -= s->count * sizeof (Elf64_External_Rela);
-
- return TRUE;
-}
-
-/* Set the sizes of the dynamic sections. */
-
-static bfd_boolean
-sh64_elf64_size_dynamic_sections (bfd *output_bfd,
- struct bfd_link_info *info)
-{
- bfd *dynobj;
- asection *s;
- bfd_boolean plt;
- bfd_boolean relocs;
- bfd_boolean reltext;
-
- dynobj = elf_hash_table (info)->dynobj;
- BFD_ASSERT (dynobj != NULL);
-
- if (elf_hash_table (info)->dynamic_sections_created)
- {
- /* Set the contents of the .interp section to the interpreter. */
- if (bfd_link_executable (info) && !info->nointerp)
- {
- s = bfd_get_linker_section (dynobj, ".interp");
- BFD_ASSERT (s != NULL);
- s->size = sizeof ELF_DYNAMIC_INTERPRETER;
- s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
- }
- }
- else
- {
- /* We may have created entries in the .rela.got section.
- However, if we are not creating the dynamic sections, we will
- not actually use these entries. Reset the size of .rela.got,
- which will cause it to get stripped from the output file
- below. */
- s = elf_hash_table (info)->srelgot;
- if (s != NULL)
- s->size = 0;
- }
-
- /* If this is a -Bsymbolic shared link, then we need to discard all
- PC relative relocs against symbols defined in a regular object.
- We allocated space for them in the check_relocs routine, but we
- will not fill them in in the relocate_section routine. */
- if (bfd_link_pic (info) && info->symbolic)
- sh64_elf64_link_hash_traverse (elf_hash_table (info),
- sh64_elf64_discard_copies, NULL);
-
- /* The check_relocs and adjust_dynamic_symbol entry points have
- determined the sizes of the various dynamic sections. Allocate
- memory for them. */
- plt = FALSE;
- relocs = FALSE;
- reltext = FALSE;
- for (s = dynobj->sections; s != NULL; s = s->next)
- {
- const char *name;
-
- if ((s->flags & SEC_LINKER_CREATED) == 0)
- continue;
-
- /* It's OK to base decisions on the section name, because none
- of the dynobj section names depend upon the input files. */
- name = bfd_get_section_name (dynobj, s);
-
- if (strcmp (name, ".plt") == 0)
- {
- /* Remember whether there is a PLT. */
- plt = s->size != 0;
- }
- else if (CONST_STRNEQ (name, ".rela"))
- {
- if (s->size != 0)
- {
- asection *target;
-
- /* Remember whether there are any reloc sections other
- than .rela.plt. */
- if (strcmp (name, ".rela.plt") != 0)
- {
- const char *outname;
-
- relocs = TRUE;
-
- /* If this relocation section applies to a read only
- section, then we probably need a DT_TEXTREL
- entry. The entries in the .rela.plt section
- really apply to the .got section, which we
- created ourselves and so know is not readonly. */
- outname = bfd_get_section_name (output_bfd,
- s->output_section);
- target = bfd_get_section_by_name (output_bfd, outname + 5);
- if (target != NULL
- && (target->flags & SEC_READONLY) != 0
- && (target->flags & SEC_ALLOC) != 0)
- reltext = TRUE;
- }
-
- /* We use the reloc_count field as a counter if we need
- to copy relocs into the output file. */
- s->reloc_count = 0;
- }
- }
- else if (! CONST_STRNEQ (name, ".got")
- && strcmp (name, ".dynbss") != 0)
- {
- /* It's not one of our sections, so don't allocate space. */
- continue;
- }
-
- if (s->size == 0)
- {
- /* If we don't need this section, strip it from the
- output file. This is mostly to handle .rela.bss and
- .rela.plt. We must create both sections in
- create_dynamic_sections, because they must be created
- before the linker maps input sections to output
- sections. The linker does that before
- adjust_dynamic_symbol is called, and it is that
- function which decides whether anything needs to go
- into these sections. */
- s->flags |= SEC_EXCLUDE;
- continue;
- }
-
- if ((s->flags & SEC_HAS_CONTENTS) == 0)
- continue;
-
- /* Allocate memory for the section contents. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
- if (s->contents == NULL)
- return FALSE;
- }
-
- if (elf_hash_table (info)->dynamic_sections_created)
- {
- /* Add some entries to the .dynamic section. We fill in the
- values later, in sh64_elf64_finish_dynamic_sections, but we
- must add the entries now so that we get the correct size for
- the .dynamic section. The DT_DEBUG entry is filled in by the
- dynamic linker and used by the debugger. */
- if (bfd_link_executable (info))
- {
- if (!_bfd_elf_add_dynamic_entry (info, DT_DEBUG, 0))
- return FALSE;
- }
-
- if (plt)
- {
- if (!_bfd_elf_add_dynamic_entry (info, DT_PLTGOT, 0)
- || !_bfd_elf_add_dynamic_entry (info, DT_PLTRELSZ, 0)
- || !_bfd_elf_add_dynamic_entry (info, DT_PLTREL, DT_RELA)
- || !_bfd_elf_add_dynamic_entry (info, DT_JMPREL, 0))
- return FALSE;
- }
-
- if (relocs)
- {
- if (!_bfd_elf_add_dynamic_entry (info, DT_RELA, 0)
- || !_bfd_elf_add_dynamic_entry (info, DT_RELASZ, 0)
- || !_bfd_elf_add_dynamic_entry (info, DT_RELAENT,
- sizeof (Elf64_External_Rela)))
- return FALSE;
- }
-
- if (reltext)
- {
- if (!_bfd_elf_add_dynamic_entry (info, DT_TEXTREL, 0))
- return FALSE;
- }
- }
-
- return TRUE;
-}
-
-/* Finish up dynamic symbol handling. We set the contents of various
- dynamic sections here. */
-
-static bfd_boolean
-sh64_elf64_finish_dynamic_symbol (bfd *output_bfd,
- struct bfd_link_info *info,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
-{
- bfd *dynobj;
-
- dynobj = elf_hash_table (info)->dynobj;
-
- if (h->plt.offset != (bfd_vma) -1)
- {
- asection *splt;
- asection *sgot;
- asection *srel;
-
- bfd_vma plt_index;
- bfd_vma got_offset;
- Elf_Internal_Rela rel;
- bfd_byte *loc;
-
- /* This symbol has an entry in the procedure linkage table. Set
- it up. */
-
- BFD_ASSERT (h->dynindx != -1);
-
- splt = elf_hash_table (info)->splt;
- sgot = elf_hash_table (info)->sgotplt;
- srel = elf_hash_table (info)->srelplt;
- BFD_ASSERT (splt != NULL && sgot != NULL && srel != NULL);
-
- /* Get the index in the procedure linkage table which
- corresponds to this symbol. This is the index of this symbol
- in all the symbols for which we are making plt entries. The
- first entry in the procedure linkage table is reserved. */
- plt_index = h->plt.offset / elf_sh64_sizeof_plt (info) - 1;
-
- /* Get the offset into the .got table of the entry that
- corresponds to this function. Each .got entry is 8 bytes.
- The first three are reserved. */
- got_offset = (plt_index + 3) * 8;
-
- if (bfd_link_pic (info))
- got_offset -= GOT_BIAS;
-
- /* Fill in the entry in the procedure linkage table. */
- if (! bfd_link_pic (info))
- {
- if (elf_sh64_plt_entry == NULL)
- {
- elf_sh64_plt_entry = (bfd_big_endian (output_bfd) ?
- elf_sh64_plt_entry_be : elf_sh64_plt_entry_le);
- }
- memcpy (splt->contents + h->plt.offset, elf_sh64_plt_entry,
- elf_sh64_sizeof_plt (info));
- movi_3shori_putval (output_bfd,
- (sgot->output_section->vma
- + sgot->output_offset
- + got_offset),
- (splt->contents + h->plt.offset
- + elf_sh64_plt_symbol_offset (info)));
-
- /* Set bottom bit because its for a branch to SHmedia */
- movi_shori_putval (output_bfd,
- -(h->plt.offset
- + elf_sh64_plt_plt0_offset (info) + 8)
- | 1,
- (splt->contents + h->plt.offset
- + elf_sh64_plt_plt0_offset (info)));
- }
- else
- {
- if (elf_sh64_pic_plt_entry == NULL)
- {
- elf_sh64_pic_plt_entry = (bfd_big_endian (output_bfd) ?
- elf_sh64_pic_plt_entry_be :
- elf_sh64_pic_plt_entry_le);
- }
- memcpy (splt->contents + h->plt.offset, elf_sh64_pic_plt_entry,
- elf_sh64_sizeof_plt (info));
- movi_shori_putval (output_bfd, got_offset,
- (splt->contents + h->plt.offset
- + elf_sh64_plt_symbol_offset (info)));
- }
-
- if (bfd_link_pic (info))
- got_offset += GOT_BIAS;
-
- movi_shori_putval (output_bfd,
- plt_index * sizeof (Elf64_External_Rela),
- (splt->contents + h->plt.offset
- + elf_sh64_plt_reloc_offset (info)));
-
- /* Fill in the entry in the global offset table. */
- bfd_put_64 (output_bfd,
- (splt->output_section->vma
- + splt->output_offset
- + h->plt.offset
- + elf_sh64_plt_temp_offset (info)),
- sgot->contents + got_offset);
-
- /* Fill in the entry in the .rela.plt section. */
- rel.r_offset = (sgot->output_section->vma
- + sgot->output_offset
- + got_offset);
- rel.r_info = ELF64_R_INFO (h->dynindx, R_SH_JMP_SLOT64);
- rel.r_addend = 0;
- rel.r_addend = GOT_BIAS;
- loc = srel->contents + plt_index * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (output_bfd, &rel, loc);
-
- if (!h->def_regular)
- {
- /* Mark the symbol as undefined, rather than as defined in
- the .plt section. Leave the value alone. */
- sym->st_shndx = SHN_UNDEF;
- }
- }
-
- if (h->got.offset != (bfd_vma) -1)
- {
- asection *sgot;
- asection *srel;
- Elf_Internal_Rela rel;
- bfd_byte *loc;
-
- /* This symbol has an entry in the global offset table. Set it
- up. */
-
- sgot = elf_hash_table (info)->sgot;
- srel = elf_hash_table (info)->srelgot;
- BFD_ASSERT (sgot != NULL && srel != NULL);
-
- rel.r_offset = (sgot->output_section->vma
- + sgot->output_offset
- + (h->got.offset &~ 1));
-
- /* If this is a -Bsymbolic link, and the symbol is defined
- locally, we just want to emit a RELATIVE reloc. Likewise if
- the symbol was forced to be local because of a version file.
- The entry in the global offset table will already have been
- initialized in the relocate_section function. */
- if (bfd_link_pic (info)
- && (info->symbolic || h->dynindx == -1)
- && h->def_regular)
- {
- rel.r_info = ELF64_R_INFO (0, R_SH_RELATIVE64);
- rel.r_addend = (h->root.u.def.value
- + h->root.u.def.section->output_section->vma
- + h->root.u.def.section->output_offset);
- }
- else
- {
- bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
- rel.r_info = ELF64_R_INFO (h->dynindx, R_SH_GLOB_DAT64);
- rel.r_addend = 0;
- }
-
- loc = srel->contents;
- loc += srel->reloc_count++ * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (output_bfd, &rel, loc);
- }
-
- if (h->needs_copy)
- {
- asection *s;
- Elf_Internal_Rela rel;
- bfd_byte *loc;
-
- /* This symbol needs a copy reloc. Set it up. */
-
- BFD_ASSERT (h->dynindx != -1
- && (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak));
-
- s = bfd_get_linker_section (dynobj, ".rela.bss");
- BFD_ASSERT (s != NULL);
-
- rel.r_offset = (h->root.u.def.value
- + h->root.u.def.section->output_section->vma
- + h->root.u.def.section->output_offset);
- rel.r_info = ELF64_R_INFO (h->dynindx, R_SH_COPY64);
- rel.r_addend = 0;
- loc = s->contents;
- loc += s->reloc_count++ * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (output_bfd, &rel, loc);
- }
-
- /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */
- if (h == elf_hash_table (info)->hdynamic
- || h == elf_hash_table (info)->hgot)
- sym->st_shndx = SHN_ABS;
-
- return TRUE;
-}
-
-/* Finish up the dynamic sections. */
-
-static bfd_boolean
-sh64_elf64_finish_dynamic_sections (bfd *output_bfd,
- struct bfd_link_info *info)
-{
- bfd *dynobj;
- asection *sgot;
- asection *sdyn;
-
- dynobj = elf_hash_table (info)->dynobj;
-
- sgot = elf_hash_table (info)->sgotplt;
- BFD_ASSERT (sgot != NULL);
- sdyn = bfd_get_linker_section (dynobj, ".dynamic");
-
- if (elf_hash_table (info)->dynamic_sections_created)
- {
- asection *splt;
- Elf64_External_Dyn *dyncon, *dynconend;
-
- BFD_ASSERT (sdyn != NULL);
-
- dyncon = (Elf64_External_Dyn *) sdyn->contents;
- dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->size);
- for (; dyncon < dynconend; dyncon++)
- {
- Elf_Internal_Dyn dyn;
- const char *name;
- asection *s;
- struct elf_link_hash_entry *h;
-
- bfd_elf64_swap_dyn_in (dynobj, dyncon, &dyn);
-
- switch (dyn.d_tag)
- {
- default:
- break;
-
- case DT_INIT:
- name = info->init_function;
- goto get_sym;
-
- case DT_FINI:
- name = info->fini_function;
- get_sym:
- if (dyn.d_un.d_val != 0)
- {
- h = elf_link_hash_lookup (elf_hash_table (info), name,
- FALSE, FALSE, TRUE);
- if (h != NULL && (h->other & STO_SH5_ISA32))
- {
- dyn.d_un.d_val |= 1;
- bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
- }
- }
- break;
-
- case DT_PLTGOT:
- s = elf_hash_table (info)->sgotplt;
- goto get_vma;
-
- case DT_JMPREL:
- s = elf_hash_table (info)->srelplt;
- get_vma:
- dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
- bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
- break;
-
- case DT_PLTRELSZ:
- s = elf_hash_table (info)->srelplt;
- dyn.d_un.d_val = s->size;
- bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
- break;
- }
- }
-
- /* Fill in the first entry in the procedure linkage table. */
- splt = elf_hash_table (info)->splt;
- if (splt && splt->size > 0)
- {
- if (bfd_link_pic (info))
- {
- if (elf_sh64_pic_plt_entry == NULL)
- {
- elf_sh64_pic_plt_entry = (bfd_big_endian (output_bfd) ?
- elf_sh64_pic_plt_entry_be :
- elf_sh64_pic_plt_entry_le);
- }
- memcpy (splt->contents, elf_sh64_pic_plt_entry,
- elf_sh64_sizeof_plt (info));
- }
- else
- {
- if (elf_sh64_plt0_entry == NULL)
- {
- elf_sh64_plt0_entry = (bfd_big_endian (output_bfd) ?
- elf_sh64_plt0_entry_be :
- elf_sh64_plt0_entry_le);
- }
- memcpy (splt->contents, elf_sh64_plt0_entry, PLT_ENTRY_SIZE);
- movi_3shori_putval (output_bfd,
- sgot->output_section->vma
- + sgot->output_offset,
- splt->contents
- + elf_sh64_plt0_gotplt_offset (info));
- }
-
- /* UnixWare sets the entsize of .plt to 8, although that doesn't
- really seem like the right value. */
- elf_section_data (splt->output_section)->this_hdr.sh_entsize = 8;
- }
- }
-
- /* Fill in the first three entries in the global offset table. */
- if (sgot->size > 0)
- {
- if (sdyn == NULL)
- bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents);
- else
- bfd_put_64 (output_bfd,
- sdyn->output_section->vma + sdyn->output_offset,
- sgot->contents);
- bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents + 8);
- bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents + 16);
- }
-
- elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 8;
-
- return TRUE;
-}
-
-/* Merge non visibility st_other attribute when the symbol comes from
- a dynamic object. */
-static void
-sh64_elf64_merge_symbol_attribute (struct elf_link_hash_entry *h,
- const Elf_Internal_Sym *isym,
- bfd_boolean definition,
- bfd_boolean dynamic ATTRIBUTE_UNUSED)
-{
- if ((isym->st_other & ~ELF_ST_VISIBILITY (-1)) != 0)
- {
- unsigned char other;
-
- /* Take the balance of OTHER from the definition. */
- other = (definition ? isym->st_other : h->other);
- other &= ~ ELF_ST_VISIBILITY (-1);
- h->other = other | ELF_ST_VISIBILITY (h->other);
- }
-
- return;
-}
-
-static const struct bfd_elf_special_section sh64_elf64_special_sections[]=
-{
- { STRING_COMMA_LEN (".cranges"), 0, SHT_PROGBITS, 0 },
- { NULL, 0, 0, 0, 0 }
-};
-
-#define TARGET_BIG_SYM sh64_elf64_vec
-#define TARGET_BIG_NAME "elf64-sh64"
-#define TARGET_LITTLE_SYM sh64_elf64_le_vec
-#define TARGET_LITTLE_NAME "elf64-sh64l"
-#define ELF_ARCH bfd_arch_sh
-#define ELF_MACHINE_CODE EM_SH
-#define ELF_MAXPAGESIZE 128
-
-#define elf_symbol_leading_char '_'
-
-#define bfd_elf64_bfd_reloc_type_lookup sh_elf64_reloc_type_lookup
-#define bfd_elf64_bfd_reloc_name_lookup \
- sh_elf64_reloc_name_lookup
-#define elf_info_to_howto sh_elf64_info_to_howto
-
-/* Note: there's no relaxation at present. */
-
-#define elf_backend_relocate_section sh_elf64_relocate_section
-#define bfd_elf64_bfd_get_relocated_section_contents \
- sh_elf64_get_relocated_section_contents
-#define elf_backend_object_p sh_elf64_set_mach_from_flags
-#define bfd_elf64_bfd_set_private_flags \
- sh_elf64_set_private_flags
-#define bfd_elf64_bfd_copy_private_bfd_data \
- sh_elf64_copy_private_data
-#define bfd_elf64_bfd_merge_private_bfd_data \
- sh_elf64_merge_private_data
-#define elf_backend_fake_sections sh64_elf64_fake_sections
-
-#define elf_backend_gc_mark_hook sh_elf64_gc_mark_hook
-#define elf_backend_check_relocs sh_elf64_check_relocs
-
-#define elf_backend_can_gc_sections 1
-
-#define elf_backend_get_symbol_type sh64_elf64_get_symbol_type
-
-#define elf_backend_add_symbol_hook sh64_elf64_add_symbol_hook
-
-#define elf_backend_link_output_symbol_hook \
- sh64_elf64_link_output_symbol_hook
-
-#define elf_backend_merge_symbol_attribute \
- sh64_elf64_merge_symbol_attribute
-
-#define elf_backend_final_write_processing \
- sh64_elf64_final_write_processing
-
-#define elf_backend_create_dynamic_sections \
- sh64_elf64_create_dynamic_sections
-#define bfd_elf64_bfd_link_hash_table_create \
- sh64_elf64_link_hash_table_create
-#define elf_backend_adjust_dynamic_symbol \
- sh64_elf64_adjust_dynamic_symbol
-#define elf_backend_size_dynamic_sections \
- sh64_elf64_size_dynamic_sections
-#define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all
-#define elf_backend_finish_dynamic_symbol \
- sh64_elf64_finish_dynamic_symbol
-#define elf_backend_finish_dynamic_sections \
- sh64_elf64_finish_dynamic_sections
-#define elf_backend_special_sections sh64_elf64_special_sections
-
-#define elf_backend_want_got_plt 1
-#define elf_backend_plt_readonly 1
-#define elf_backend_want_plt_sym 0
-#define elf_backend_got_header_size 24
-#define elf_backend_dtrel_excludes_plt 1
-
-#define elf_backend_linux_prpsinfo64_ugid16 TRUE
-
-#include "elf64-target.h"
-
-/* NetBSD support. */
-#undef TARGET_BIG_SYM
-#define TARGET_BIG_SYM sh64_elf64_nbsd_vec
-#undef TARGET_BIG_NAME
-#define TARGET_BIG_NAME "elf64-sh64-nbsd"
-#undef TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM sh64_elf64_nbsd_le_vec
-#undef TARGET_LITTLE_NAME
-#define TARGET_LITTLE_NAME "elf64-sh64l-nbsd"
-#undef ELF_MAXPAGESIZE
-#define ELF_MAXPAGESIZE 0x10000
-#undef elf_symbol_leading_char
-#define elf_symbol_leading_char 0
-
-#define elf64_bed elf64_sh64_nbsd_bed
-
-#include "elf64-target.h"
-
-/* Linux support. */
-#undef TARGET_BIG_SYM
-#define TARGET_BIG_SYM sh64_elf64_linux_be_vec
-#undef TARGET_BIG_NAME
-#define TARGET_BIG_NAME "elf64-sh64big-linux"
-#undef TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM sh64_elf64_linux_vec
-#undef TARGET_LITTLE_NAME
-#define TARGET_LITTLE_NAME "elf64-sh64-linux"
-#undef elf64_bed
-#define elf64_bed elf64_sh64_linux_bed
-
-#include "elf64-target.h"
diff --git a/bfd/po/SRC-POTFILES.in b/bfd/po/SRC-POTFILES.in
index 9738035..bd42206 100644
--- a/bfd/po/SRC-POTFILES.in
+++ b/bfd/po/SRC-POTFILES.in
@@ -202,8 +202,6 @@ elf32-s390.c
elf32-score.c
elf32-score7.c
elf32-sh.c
-elf32-sh64-com.c
-elf32-sh64.c
elf32-sparc.c
elf32-spu.c
elf32-tic6x.c
@@ -227,7 +225,6 @@ elf64-mips.c
elf64-mmix.c
elf64-ppc.c
elf64-s390.c
-elf64-sh64.c
elf64-sparc.c
elf64-tilegx.c
elf64-x86-64.c
diff --git a/bfd/targets.c b/bfd/targets.c
index 64e3178..6f683f5 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -805,18 +805,6 @@ extern const bfd_target s390_elf32_vec;
extern const bfd_target s390_elf64_vec;
extern const bfd_target score_elf32_be_vec;
extern const bfd_target score_elf32_le_vec;
-extern const bfd_target sh64_elf32_vec;
-extern const bfd_target sh64_elf32_le_vec;
-extern const bfd_target sh64_elf32_linux_vec;
-extern const bfd_target sh64_elf32_linux_be_vec;
-extern const bfd_target sh64_elf32_nbsd_vec;
-extern const bfd_target sh64_elf32_nbsd_le_vec;
-extern const bfd_target sh64_elf64_vec;
-extern const bfd_target sh64_elf64_le_vec;
-extern const bfd_target sh64_elf64_linux_vec;
-extern const bfd_target sh64_elf64_linux_be_vec;
-extern const bfd_target sh64_elf64_nbsd_vec;
-extern const bfd_target sh64_elf64_nbsd_le_vec;
extern const bfd_target sh_coff_vec;
extern const bfd_target sh_coff_le_vec;
extern const bfd_target sh_coff_small_vec;
@@ -1295,20 +1283,6 @@ static const bfd_target * const _bfd_target_vector[] =
&score_elf32_le_vec,
#endif
-#ifdef BFD64
- &sh64_elf32_vec,
- &sh64_elf32_le_vec,
- &sh64_elf32_linux_vec,
- &sh64_elf32_linux_be_vec,
- &sh64_elf32_nbsd_vec,
- &sh64_elf32_nbsd_le_vec,
- &sh64_elf64_vec,
- &sh64_elf64_le_vec,
- &sh64_elf64_linux_vec,
- &sh64_elf64_linux_be_vec,
- &sh64_elf64_nbsd_vec,
- &sh64_elf64_nbsd_le_vec,
-#endif
&sh_coff_vec,
&sh_coff_le_vec,
&sh_coff_small_vec,
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 419d6bb..f8411fb 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,9 @@
2018-04-16 Alan Modra <amodra@gmail.com>
+ * testsuite/binutils-all/objcopy.exp: Remove sh5 and sh64 support.
+
+2018-04-16 Alan Modra <amodra@gmail.com>
+
* testsuite/binutils-all/objcopy.exp: Remove w65 support.
2018-04-16 Alan Modra <amodra@gmail.com>
diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp
index 81ec3ec..8787a9e 100644
--- a/binutils/testsuite/binutils-all/objcopy.exp
+++ b/binutils/testsuite/binutils-all/objcopy.exp
@@ -1132,12 +1132,7 @@ if [is_elf_format] {
if { [supports_gnu_unique] } {
run_dump_test "strip-10"
}
- set extra_strip11 ""
- if { [istarget "sh64*-*"] } {
- # pr17755 testcase
- set extra_strip11 { { "as" "--isa=SHmedia --abi=64" } }
- }
- run_dump_test "strip-11" $extra_strip11
+ run_dump_test "strip-11"
if { [istarget "i*86-*"] || [istarget "x86_64-*-*"] } {
# Check to make sure we don't strip a symbol named in relocations.
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 2f21bd5..2816772 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,163 @@
2018-04-16 Alan Modra <amodra@gmail.com>
+ * Makefile.am: Remove sh5 and sh64 support.
+ * config/tc-sh.c: Likewise.
+ * configure.tgt: Likewise.
+ * doc/Makefile.am: Likewise.
+ * doc/as.texinfo: Likewise.
+ * testsuite/gas/cfi/cfi.exp: Likewise.
+ * testsuite/gas/sh/basic.exp: Likewise.
+ * config/tc-sh64.c: Delete.
+ * config/tc-sh64.h: Delete.
+ * doc/c-sh64.texi: Delete.
+ * testsuite/gas/sh/sh64/abi-32.d: Delete.
+ * testsuite/gas/sh/sh64/abi-32.s: Delete.
+ * testsuite/gas/sh/sh64/abi-64.d: Delete.
+ * testsuite/gas/sh/sh64/abi-64.s: Delete.
+ * testsuite/gas/sh/sh64/basic-1.d: Delete.
+ * testsuite/gas/sh/sh64/basic-1.s: Delete.
+ * testsuite/gas/sh/sh64/case-1.d: Delete.
+ * testsuite/gas/sh/sh64/case-1.s: Delete.
+ * testsuite/gas/sh/sh64/case-noexp-1.d: Delete.
+ * testsuite/gas/sh/sh64/crange1-1.d: Delete.
+ * testsuite/gas/sh/sh64/crange1-2.d: Delete.
+ * testsuite/gas/sh/sh64/crange1.s: Delete.
+ * testsuite/gas/sh/sh64/crange2-1.d: Delete.
+ * testsuite/gas/sh/sh64/crange2-2.d: Delete.
+ * testsuite/gas/sh/sh64/crange2-noexp-1.d: Delete.
+ * testsuite/gas/sh/sh64/crange2.s: Delete.
+ * testsuite/gas/sh/sh64/crange3-1.d: Delete.
+ * testsuite/gas/sh/sh64/crange3.s: Delete.
+ * testsuite/gas/sh/sh64/crange4-1.d: Delete.
+ * testsuite/gas/sh/sh64/crange4.s: Delete.
+ * testsuite/gas/sh/sh64/crange5-1.d: Delete.
+ * testsuite/gas/sh/sh64/crange5.s: Delete.
+ * testsuite/gas/sh/sh64/creg-1.d: Delete.
+ * testsuite/gas/sh/sh64/creg-1.s: Delete.
+ * testsuite/gas/sh/sh64/creg-2.d: Delete.
+ * testsuite/gas/sh/sh64/creg-2.s: Delete.
+ * testsuite/gas/sh/sh64/datal-1.s: Delete.
+ * testsuite/gas/sh/sh64/datal-2.d: Delete.
+ * testsuite/gas/sh/sh64/datal-2.s: Delete.
+ * testsuite/gas/sh/sh64/datal-3.s: Delete.
+ * testsuite/gas/sh/sh64/datal32-1.d: Delete.
+ * testsuite/gas/sh/sh64/datal32-3.d: Delete.
+ * testsuite/gas/sh/sh64/datal64-1.d: Delete.
+ * testsuite/gas/sh/sh64/datal64-3.d: Delete.
+ * testsuite/gas/sh/sh64/eh-1.d: Delete.
+ * testsuite/gas/sh/sh64/eh-1.s: Delete.
+ * testsuite/gas/sh/sh64/endian-1.d: Delete.
+ * testsuite/gas/sh/sh64/endian-1.s: Delete.
+ * testsuite/gas/sh/sh64/endian-2.d: Delete.
+ * testsuite/gas/sh/sh64/endian-2.s: Delete.
+ * testsuite/gas/sh/sh64/err-1.s: Delete.
+ * testsuite/gas/sh/sh64/err-2.s: Delete.
+ * testsuite/gas/sh/sh64/err-3.s: Delete.
+ * testsuite/gas/sh/sh64/err-4.s: Delete.
+ * testsuite/gas/sh/sh64/err-abi-32.s: Delete.
+ * testsuite/gas/sh/sh64/err-abi-64.s: Delete.
+ * testsuite/gas/sh/sh64/err-dsp.s: Delete.
+ * testsuite/gas/sh/sh64/err-movi-noexp-1.s: Delete.
+ * testsuite/gas/sh/sh64/err-noexp-cmd1.s: Delete.
+ * testsuite/gas/sh/sh64/err-pt-1.s: Delete.
+ * testsuite/gas/sh/sh64/err-pt32-cmd1.s: Delete.
+ * testsuite/gas/sh/sh64/err-pt32-cmd2.s: Delete.
+ * testsuite/gas/sh/sh64/err-pt32-cmd3.s: Delete.
+ * testsuite/gas/sh/sh64/err-ptb-1.s: Delete.
+ * testsuite/gas/sh/sh64/err-ptb-2.s: Delete.
+ * testsuite/gas/sh/sh64/err.exp: Delete.
+ * testsuite/gas/sh/sh64/immexpr1.s: Delete.
+ * testsuite/gas/sh/sh64/immexpr2.s: Delete.
+ * testsuite/gas/sh/sh64/immexpr32-1.d: Delete.
+ * testsuite/gas/sh/sh64/immexpr32-2.d: Delete.
+ * testsuite/gas/sh/sh64/immexpr64-1.d: Delete.
+ * testsuite/gas/sh/sh64/immexpr64-2.d: Delete.
+ * testsuite/gas/sh/sh64/lineno.d: Delete.
+ * testsuite/gas/sh/sh64/lineno.s: Delete.
+ * testsuite/gas/sh/sh64/localcom-1.d: Delete.
+ * testsuite/gas/sh/sh64/localcom-1.s: Delete.
+ * testsuite/gas/sh/sh64/mix-1.d: Delete.
+ * testsuite/gas/sh/sh64/mix-1.s: Delete.
+ * testsuite/gas/sh/sh64/mix-noexp-1.d: Delete.
+ * testsuite/gas/sh/sh64/movi-1.s: Delete.
+ * testsuite/gas/sh/sh64/movi-2.s: Delete.
+ * testsuite/gas/sh/sh64/movi-3.d: Delete.
+ * testsuite/gas/sh/sh64/movi-3.s: Delete.
+ * testsuite/gas/sh/sh64/movi32-1.d: Delete.
+ * testsuite/gas/sh/sh64/movi32-2.d: Delete.
+ * testsuite/gas/sh/sh64/movi32-noexp-2.d: Delete.
+ * testsuite/gas/sh/sh64/movi64-1.d: Delete.
+ * testsuite/gas/sh/sh64/movi64-2.d: Delete.
+ * testsuite/gas/sh/sh64/movi64-2.s: Delete.
+ * testsuite/gas/sh/sh64/movi64-3.d: Delete.
+ * testsuite/gas/sh/sh64/movi64-noexp-2.d: Delete.
+ * testsuite/gas/sh/sh64/pt-1.d: Delete.
+ * testsuite/gas/sh/sh64/pt-1.s: Delete.
+ * testsuite/gas/sh/sh64/pt-2.s: Delete.
+ * testsuite/gas/sh/sh64/pt-noexp-1.d: Delete.
+ * testsuite/gas/sh/sh64/pt32-1.d: Delete.
+ * testsuite/gas/sh/sh64/pt32-noexp-2.d: Delete.
+ * testsuite/gas/sh/sh64/pt64-1.d: Delete.
+ * testsuite/gas/sh/sh64/pt64-32-1.d: Delete.
+ * testsuite/gas/sh/sh64/pt64-32-2.d: Delete.
+ * testsuite/gas/sh/sh64/pt64-noexp-2.d: Delete.
+ * testsuite/gas/sh/sh64/ptc-1.s: Delete.
+ * testsuite/gas/sh/sh64/ptc32-1.d: Delete.
+ * testsuite/gas/sh/sh64/ptc32-noexp-1.d: Delete.
+ * testsuite/gas/sh/sh64/ptc64-1.d: Delete.
+ * testsuite/gas/sh/sh64/ptc64-32-1.d: Delete.
+ * testsuite/gas/sh/sh64/ptc64-noexp-1.d: Delete.
+ * testsuite/gas/sh/sh64/ptext-1.s: Delete.
+ * testsuite/gas/sh/sh64/ptext32-1.d: Delete.
+ * testsuite/gas/sh/sh64/ptext32-noexp-1.d: Delete.
+ * testsuite/gas/sh/sh64/ptext64-1.d: Delete.
+ * testsuite/gas/sh/sh64/ptext64-32-1.d: Delete.
+ * testsuite/gas/sh/sh64/ptext64-noexp-1.d: Delete.
+ * testsuite/gas/sh/sh64/rel-1.s: Delete.
+ * testsuite/gas/sh/sh64/rel-2.s: Delete.
+ * testsuite/gas/sh/sh64/rel-3.s: Delete.
+ * testsuite/gas/sh/sh64/rel-4.s: Delete.
+ * testsuite/gas/sh/sh64/rel-5.s: Delete.
+ * testsuite/gas/sh/sh64/rel32-1.d: Delete.
+ * testsuite/gas/sh/sh64/rel32-2.d: Delete.
+ * testsuite/gas/sh/sh64/rel32-3.d: Delete.
+ * testsuite/gas/sh/sh64/rel32-4.d: Delete.
+ * testsuite/gas/sh/sh64/rel32-5.d: Delete.
+ * testsuite/gas/sh/sh64/rel64-1.d: Delete.
+ * testsuite/gas/sh/sh64/rel64-2.d: Delete.
+ * testsuite/gas/sh/sh64/rel64-3.d: Delete.
+ * testsuite/gas/sh/sh64/rel64-4.d: Delete.
+ * testsuite/gas/sh/sh64/rel64-5.d: Delete.
+ * testsuite/gas/sh/sh64/relax-1.d: Delete.
+ * testsuite/gas/sh/sh64/relax-1.s: Delete.
+ * testsuite/gas/sh/sh64/relax-2.d: Delete.
+ * testsuite/gas/sh/sh64/relax-2.s: Delete.
+ * testsuite/gas/sh/sh64/relax-3.d: Delete.
+ * testsuite/gas/sh/sh64/relax-3.s: Delete.
+ * testsuite/gas/sh/sh64/sh64.exp: Delete.
+ * testsuite/gas/sh/sh64/shift-1.s: Delete.
+ * testsuite/gas/sh/sh64/shift-2.s: Delete.
+ * testsuite/gas/sh/sh64/shift-3.s: Delete.
+ * testsuite/gas/sh/sh64/shift32-1.d: Delete.
+ * testsuite/gas/sh/sh64/shift32-3.d: Delete.
+ * testsuite/gas/sh/sh64/shift32-noexp-3.d: Delete.
+ * testsuite/gas/sh/sh64/shift64-1.d: Delete.
+ * testsuite/gas/sh/sh64/shift64-2.d: Delete.
+ * testsuite/gas/sh/sh64/shift64-3.d: Delete.
+ * testsuite/gas/sh/sh64/shift64-noexp-3.d: Delete.
+ * testsuite/gas/sh/sh64/syntax-1.d: Delete.
+ * testsuite/gas/sh/sh64/syntax-1.s: Delete.
+ * testsuite/gas/sh/sh64/syntax-2.d: Delete.
+ * testsuite/gas/sh/sh64/syntax-2.s: Delete.
+ * testsuite/gas/sh/sh64/ua-1.s: Delete.
+ * testsuite/gas/sh/sh64/ua32-1.d: Delete.
+ * testsuite/gas/sh/sh64/ua64-1.d: Delete.
+ * Makefile.in: Regenerate.
+ * doc/Makefile.in: Regenerate.
+ * po/POTFILES.in: Regenerate.
+
+2018-04-16 Alan Modra <amodra@gmail.com>
+
* config/tc-sh.c: Remove sh-symbianelf support.
* config/tc-sh.h: Likewise.
* configure.ac: Likewise.
diff --git a/gas/Makefile.am b/gas/Makefile.am
index a6d3caa..5411cef 100644
--- a/gas/Makefile.am
+++ b/gas/Makefile.am
@@ -181,7 +181,6 @@ TARGET_CPU_CFILES = \
config/tc-s390.c \
config/tc-score.c \
config/tc-sh.c \
- config/tc-sh64.c \
config/tc-sparc.c \
config/tc-spu.c \
config/tc-tic30.c \
@@ -254,7 +253,6 @@ TARGET_CPU_HFILES = \
config/tc-s390.h \
config/tc-score.h \
config/tc-sh.h \
- config/tc-sh64.h \
config/tc-sparc.h \
config/tc-spu.h \
config/tc-tic30.h \
diff --git a/gas/Makefile.in b/gas/Makefile.in
index a95f74e..4460a39 100644
--- a/gas/Makefile.in
+++ b/gas/Makefile.in
@@ -477,7 +477,6 @@ TARGET_CPU_CFILES = \
config/tc-s390.c \
config/tc-score.c \
config/tc-sh.c \
- config/tc-sh64.c \
config/tc-sparc.c \
config/tc-spu.c \
config/tc-tic30.c \
@@ -550,7 +549,6 @@ TARGET_CPU_HFILES = \
config/tc-s390.h \
config/tc-score.h \
config/tc-sh.h \
- config/tc-sh64.h \
config/tc-sparc.h \
config/tc-spu.h \
config/tc-tic30.h \
@@ -907,7 +905,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-s390.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-score.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-sh.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-sh64.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-sparc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-spu.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-tic30.Po@am__quote@
@@ -1679,20 +1676,6 @@ tc-sh.obj: config/tc-sh.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tc-sh.obj `if test -f 'config/tc-sh.c'; then $(CYGPATH_W) 'config/tc-sh.c'; else $(CYGPATH_W) '$(srcdir)/config/tc-sh.c'; fi`
-tc-sh64.o: config/tc-sh64.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tc-sh64.o -MD -MP -MF $(DEPDIR)/tc-sh64.Tpo -c -o tc-sh64.o `test -f 'config/tc-sh64.c' || echo '$(srcdir)/'`config/tc-sh64.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/tc-sh64.Tpo $(DEPDIR)/tc-sh64.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config/tc-sh64.c' object='tc-sh64.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tc-sh64.o `test -f 'config/tc-sh64.c' || echo '$(srcdir)/'`config/tc-sh64.c
-
-tc-sh64.obj: config/tc-sh64.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tc-sh64.obj -MD -MP -MF $(DEPDIR)/tc-sh64.Tpo -c -o tc-sh64.obj `if test -f 'config/tc-sh64.c'; then $(CYGPATH_W) 'config/tc-sh64.c'; else $(CYGPATH_W) '$(srcdir)/config/tc-sh64.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/tc-sh64.Tpo $(DEPDIR)/tc-sh64.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config/tc-sh64.c' object='tc-sh64.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tc-sh64.obj `if test -f 'config/tc-sh64.c'; then $(CYGPATH_W) 'config/tc-sh64.c'; else $(CYGPATH_W) '$(srcdir)/config/tc-sh64.c'; fi`
-
tc-sparc.o: config/tc-sparc.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tc-sparc.o -MD -MP -MF $(DEPDIR)/tc-sparc.Tpo -c -o tc-sparc.o `test -f 'config/tc-sparc.c' || echo '$(srcdir)/'`config/tc-sparc.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/tc-sparc.Tpo $(DEPDIR)/tc-sparc.Po
diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c
index 2704457..9b58db3 100644
--- a/gas/config/tc-sh.c
+++ b/gas/config/tc-sh.c
@@ -106,18 +106,6 @@ const pseudo_typeS md_pseudo_table[] =
{"2byte", s_uacons, 2},
{"4byte", s_uacons, 4},
{"8byte", s_uacons, 8},
-#ifdef HAVE_SH64
- {"mode", s_sh64_mode, 0 },
-
- /* Have the old name too. */
- {"isa", s_sh64_mode, 0 },
-
- /* Assert that the right ABI is used. */
- {"abi", s_sh64_abi, 0 },
-
- { "vtable_inherit", sh64_vtable_inherit, 0 },
- { "vtable_entry", sh64_vtable_entry, 0 },
-#endif /* HAVE_SH64 */
{0, 0, 0}
};
@@ -167,31 +155,8 @@ const char FLT_CHARS[] = "rRsSfFdDxXpP";
#define COND_JUMP_DELAY 2
#define UNCOND_JUMP 3
-#ifdef HAVE_SH64
-
-/* A 16-bit (times four) pc-relative operand, at most expanded to 32 bits. */
-#define SH64PCREL16_32 4
-/* A 16-bit (times four) pc-relative operand, at most expanded to 64 bits. */
-#define SH64PCREL16_64 5
-
-/* Variants of the above for adjusting the insn to PTA or PTB according to
- the label. */
-#define SH64PCREL16PT_32 6
-#define SH64PCREL16PT_64 7
-
-/* A MOVI expansion, expanding to at most 32 or 64 bits. */
-#define MOVI_IMM_32 8
-#define MOVI_IMM_32_PCREL 9
-#define MOVI_IMM_64 10
-#define MOVI_IMM_64_PCREL 11
-#define END 12
-
-#else /* HAVE_SH64 */
-
#define END 4
-#endif /* HAVE_SH64 */
-
#define UNDEF_DISP 0
#define COND8 1
#define COND12 2
@@ -201,24 +166,6 @@ const char FLT_CHARS[] = "rRsSfFdDxXpP";
#define UNCOND12 1
#define UNCOND32 2
-#ifdef HAVE_SH64
-#define UNDEF_SH64PCREL 0
-#define SH64PCREL16 1
-#define SH64PCREL32 2
-#define SH64PCREL48 3
-#define SH64PCREL64 4
-#define SH64PCRELPLT 5
-
-#define UNDEF_MOVI 0
-#define MOVI_16 1
-#define MOVI_32 2
-#define MOVI_48 3
-#define MOVI_64 4
-#define MOVI_PLT 5
-#define MOVI_GOTOFF 6
-#define MOVI_GOTPC 7
-#endif /* HAVE_SH64 */
-
/* Branch displacements are from the address of the branch plus
four, thus all minimum and maximum values have 4 added to them. */
#define COND8_F 258
@@ -249,85 +196,6 @@ const char FLT_CHARS[] = "rRsSfFdDxXpP";
#define UNCOND32_M -(1<<30)
#define UNCOND32_LENGTH 14
-#ifdef HAVE_SH64
-/* The trivial expansion of a SH64PCREL16 relaxation is just a "PT label,
- TRd" as is the current insn, so no extra length. Note that the "reach"
- is calculated from the address *after* that insn, but the offset in the
- insn is calculated from the beginning of the insn. We also need to
- take into account the implicit 1 coded as the "A" in PTA when counting
- forward. If PTB reaches an odd address, we trap that as an error
- elsewhere, so we don't have to have different relaxation entries. We
- don't add a one to the negative range, since PTB would then have the
- farthest backward-reaching value skipped, not generated at relaxation. */
-#define SH64PCREL16_F (32767 * 4 - 4 + 1)
-#define SH64PCREL16_M (-32768 * 4 - 4)
-#define SH64PCREL16_LENGTH 0
-
-/* The next step is to change that PT insn into
- MOVI ((label - datalabel Ln) >> 16) & 65535, R25
- SHORI (label - datalabel Ln) & 65535, R25
- Ln:
- PTREL R25,TRd
- which means two extra insns, 8 extra bytes. This is the limit for the
- 32-bit ABI.
-
- The expressions look a bit bad since we have to adjust this to avoid overflow on a
- 32-bit host. */
-#define SH64PCREL32_F ((((long) 1 << 30) - 1) * 2 + 1 - 4)
-#define SH64PCREL32_LENGTH (2 * 4)
-
-/* Similarly, we just change the MOVI and add a SHORI for the 48-bit
- expansion. */
-#if BFD_HOST_64BIT_LONG
-/* The "reach" type is long, so we can only do this for a 64-bit-long
- host. */
-#define SH64PCREL32_M ((-((long) 1 << 30)) * 2 - 4)
-#define SH64PCREL48_F ((((long) 1 << 47) - 1) - 4)
-#define SH64PCREL48_M ((-((long) 1 << 47)) - 4)
-#define SH64PCREL48_LENGTH (3 * 4)
-#else
-/* If the host does not have 64-bit longs, just make this state identical
- in reach to the 32-bit state. Note that we have a slightly incorrect
- reach, but the correct one above will overflow a 32-bit number. */
-#define SH64PCREL32_M ((-((long) 1 << 30)) * 2)
-#define SH64PCREL48_F SH64PCREL32_F
-#define SH64PCREL48_M SH64PCREL32_M
-#define SH64PCREL48_LENGTH (3 * 4)
-#endif /* BFD_HOST_64BIT_LONG */
-
-/* And similarly for the 64-bit expansion; a MOVI + SHORI + SHORI + SHORI
- + PTREL sequence. */
-#define SH64PCREL64_LENGTH (4 * 4)
-
-/* For MOVI, we make the MOVI + SHORI... expansion you can see in the
- SH64PCREL expansions. The PCREL one is similar, but the other has no
- pc-relative reach; it must be fully expanded in
- shmedia_md_estimate_size_before_relax. */
-#define MOVI_16_LENGTH 0
-#define MOVI_16_F (32767 - 4)
-#define MOVI_16_M (-32768 - 4)
-#define MOVI_32_LENGTH 4
-#define MOVI_32_F ((((long) 1 << 30) - 1) * 2 + 1 - 4)
-#define MOVI_48_LENGTH 8
-
-#if BFD_HOST_64BIT_LONG
-/* The "reach" type is long, so we can only do this for a 64-bit-long
- host. */
-#define MOVI_32_M ((-((long) 1 << 30)) * 2 - 4)
-#define MOVI_48_F ((((long) 1 << 47) - 1) - 4)
-#define MOVI_48_M ((-((long) 1 << 47)) - 4)
-#else
-/* If the host does not have 64-bit longs, just make this state identical
- in reach to the 32-bit state. Note that we have a slightly incorrect
- reach, but the correct one above will overflow a 32-bit number. */
-#define MOVI_32_M ((-((long) 1 << 30)) * 2)
-#define MOVI_48_F MOVI_32_F
-#define MOVI_48_M MOVI_32_M
-#endif /* BFD_HOST_64BIT_LONG */
-
-#define MOVI_64_LENGTH 12
-#endif /* HAVE_SH64 */
-
#define EMPTY { 0, 0, 0, 0 }
const relax_typeS md_relax_table[C (END, 0)] = {
@@ -369,117 +237,6 @@ const relax_typeS md_relax_table[C (END, 0)] = {
EMPTY, EMPTY, EMPTY,
EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
-#ifdef HAVE_SH64
- /* C (SH64PCREL16_32, SH64PCREL16) */
- EMPTY,
- { SH64PCREL16_F, SH64PCREL16_M, SH64PCREL16_LENGTH, C (SH64PCREL16_32, SH64PCREL32) },
- /* C (SH64PCREL16_32, SH64PCREL32) */
- { 0, 0, SH64PCREL32_LENGTH, 0 },
- EMPTY, EMPTY,
- /* C (SH64PCREL16_32, SH64PCRELPLT) */
- { 0, 0, SH64PCREL32_LENGTH, 0 },
- EMPTY, EMPTY,
- EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
-
- /* C (SH64PCREL16_64, SH64PCREL16) */
- EMPTY,
- { SH64PCREL16_F, SH64PCREL16_M, SH64PCREL16_LENGTH, C (SH64PCREL16_64, SH64PCREL32) },
- /* C (SH64PCREL16_64, SH64PCREL32) */
- { SH64PCREL32_F, SH64PCREL32_M, SH64PCREL32_LENGTH, C (SH64PCREL16_64, SH64PCREL48) },
- /* C (SH64PCREL16_64, SH64PCREL48) */
- { SH64PCREL48_F, SH64PCREL48_M, SH64PCREL48_LENGTH, C (SH64PCREL16_64, SH64PCREL64) },
- /* C (SH64PCREL16_64, SH64PCREL64) */
- { 0, 0, SH64PCREL64_LENGTH, 0 },
- /* C (SH64PCREL16_64, SH64PCRELPLT) */
- { 0, 0, SH64PCREL64_LENGTH, 0 },
- EMPTY, EMPTY,
- EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
-
- /* C (SH64PCREL16PT_32, SH64PCREL16) */
- EMPTY,
- { SH64PCREL16_F, SH64PCREL16_M, SH64PCREL16_LENGTH, C (SH64PCREL16PT_32, SH64PCREL32) },
- /* C (SH64PCREL16PT_32, SH64PCREL32) */
- { 0, 0, SH64PCREL32_LENGTH, 0 },
- EMPTY, EMPTY,
- /* C (SH64PCREL16PT_32, SH64PCRELPLT) */
- { 0, 0, SH64PCREL32_LENGTH, 0 },
- EMPTY, EMPTY,
- EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
-
- /* C (SH64PCREL16PT_64, SH64PCREL16) */
- EMPTY,
- { SH64PCREL16_F, SH64PCREL16_M, SH64PCREL16_LENGTH, C (SH64PCREL16PT_64, SH64PCREL32) },
- /* C (SH64PCREL16PT_64, SH64PCREL32) */
- { SH64PCREL32_F,
- SH64PCREL32_M,
- SH64PCREL32_LENGTH,
- C (SH64PCREL16PT_64, SH64PCREL48) },
- /* C (SH64PCREL16PT_64, SH64PCREL48) */
- { SH64PCREL48_F, SH64PCREL48_M, SH64PCREL48_LENGTH, C (SH64PCREL16PT_64, SH64PCREL64) },
- /* C (SH64PCREL16PT_64, SH64PCREL64) */
- { 0, 0, SH64PCREL64_LENGTH, 0 },
- /* C (SH64PCREL16PT_64, SH64PCRELPLT) */
- { 0, 0, SH64PCREL64_LENGTH, 0},
- EMPTY, EMPTY,
- EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
-
- /* C (MOVI_IMM_32, UNDEF_MOVI) */
- { 0, 0, MOVI_32_LENGTH, 0 },
- /* C (MOVI_IMM_32, MOVI_16) */
- { MOVI_16_F, MOVI_16_M, MOVI_16_LENGTH, C (MOVI_IMM_32, MOVI_32) },
- /* C (MOVI_IMM_32, MOVI_32) */
- { MOVI_32_F, MOVI_32_M, MOVI_32_LENGTH, 0 },
- EMPTY, EMPTY, EMPTY,
- /* C (MOVI_IMM_32, MOVI_GOTOFF) */
- { 0, 0, MOVI_32_LENGTH, 0 },
- EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
-
- /* C (MOVI_IMM_32_PCREL, MOVI_16) */
- EMPTY,
- { MOVI_16_F, MOVI_16_M, MOVI_16_LENGTH, C (MOVI_IMM_32_PCREL, MOVI_32) },
- /* C (MOVI_IMM_32_PCREL, MOVI_32) */
- { 0, 0, MOVI_32_LENGTH, 0 },
- EMPTY, EMPTY,
- /* C (MOVI_IMM_32_PCREL, MOVI_PLT) */
- { 0, 0, MOVI_32_LENGTH, 0 },
- EMPTY,
- /* C (MOVI_IMM_32_PCREL, MOVI_GOTPC) */
- { 0, 0, MOVI_32_LENGTH, 0 },
- EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
-
- /* C (MOVI_IMM_64, UNDEF_MOVI) */
- { 0, 0, MOVI_64_LENGTH, 0 },
- /* C (MOVI_IMM_64, MOVI_16) */
- { MOVI_16_F, MOVI_16_M, MOVI_16_LENGTH, C (MOVI_IMM_64, MOVI_32) },
- /* C (MOVI_IMM_64, MOVI_32) */
- { MOVI_32_F, MOVI_32_M, MOVI_32_LENGTH, C (MOVI_IMM_64, MOVI_48) },
- /* C (MOVI_IMM_64, MOVI_48) */
- { MOVI_48_F, MOVI_48_M, MOVI_48_LENGTH, C (MOVI_IMM_64, MOVI_64) },
- /* C (MOVI_IMM_64, MOVI_64) */
- { 0, 0, MOVI_64_LENGTH, 0 },
- EMPTY,
- /* C (MOVI_IMM_64, MOVI_GOTOFF) */
- { 0, 0, MOVI_64_LENGTH, 0 },
- EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
-
- /* C (MOVI_IMM_64_PCREL, MOVI_16) */
- EMPTY,
- { MOVI_16_F, MOVI_16_M, MOVI_16_LENGTH, C (MOVI_IMM_64_PCREL, MOVI_32) },
- /* C (MOVI_IMM_64_PCREL, MOVI_32) */
- { MOVI_32_F, MOVI_32_M, MOVI_32_LENGTH, C (MOVI_IMM_64_PCREL, MOVI_48) },
- /* C (MOVI_IMM_64_PCREL, MOVI_48) */
- { MOVI_48_F, MOVI_48_M, MOVI_48_LENGTH, C (MOVI_IMM_64_PCREL, MOVI_64) },
- /* C (MOVI_IMM_64_PCREL, MOVI_64) */
- { 0, 0, MOVI_64_LENGTH, 0 },
- /* C (MOVI_IMM_64_PCREL, MOVI_PLT) */
- { 0, 0, MOVI_64_LENGTH, 0 },
- EMPTY,
- /* C (MOVI_IMM_64_PCREL, MOVI_GOTPC) */
- { 0, 0, MOVI_64_LENGTH, 0 },
- EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
-
-#endif /* HAVE_SH64 */
-
};
#undef EMPTY
@@ -501,11 +258,6 @@ sh_PIC_related_p (symbolS *sym)
if (sym == GOT_symbol)
return 1;
-#ifdef HAVE_SH64
- if (sh_PIC_related_p (*symbol_get_tc (sym)))
- return 1;
-#endif
-
exp = symbol_get_value_expression (sym);
return (exp->X_op == O_PIC_reloc
@@ -567,47 +319,11 @@ sh_check_fixup (expressionS *main_exp, bfd_reloc_code_real_type *r_type_p)
if (exp->X_op == O_symbol || exp->X_op == O_add || exp->X_op == O_subtract)
{
-#ifdef HAVE_SH64
- if (exp->X_add_symbol
- && (exp->X_add_symbol == GOT_symbol
- || (GOT_symbol
- && *symbol_get_tc (exp->X_add_symbol) == GOT_symbol)))
- {
- switch (*r_type_p)
- {
- case BFD_RELOC_SH_IMM_LOW16:
- *r_type_p = BFD_RELOC_SH_GOTPC_LOW16;
- break;
-
- case BFD_RELOC_SH_IMM_MEDLOW16:
- *r_type_p = BFD_RELOC_SH_GOTPC_MEDLOW16;
- break;
-
- case BFD_RELOC_SH_IMM_MEDHI16:
- *r_type_p = BFD_RELOC_SH_GOTPC_MEDHI16;
- break;
-
- case BFD_RELOC_SH_IMM_HI16:
- *r_type_p = BFD_RELOC_SH_GOTPC_HI16;
- break;
-
- case BFD_RELOC_NONE:
- case BFD_RELOC_UNUSED:
- *r_type_p = BFD_RELOC_SH_GOTPC;
- break;
-
- default:
- abort ();
- }
- return 0;
- }
-#else
if (exp->X_add_symbol && exp->X_add_symbol == GOT_symbol)
{
*r_type_p = BFD_RELOC_SH_GOTPC;
return 0;
}
-#endif
exp = symbol_get_value_expression (exp->X_add_symbol);
if (! exp)
return 0;
@@ -646,104 +362,6 @@ sh_check_fixup (expressionS *main_exp, bfd_reloc_code_real_type *r_type_p)
}
break;
-#ifdef HAVE_SH64
- case BFD_RELOC_SH_IMM_LOW16:
- switch (exp->X_md)
- {
- case BFD_RELOC_32_GOTOFF:
- *r_type_p = BFD_RELOC_SH_GOTOFF_LOW16;
- break;
-
- case BFD_RELOC_SH_GOTPLT32:
- *r_type_p = BFD_RELOC_SH_GOTPLT_LOW16;
- break;
-
- case BFD_RELOC_32_GOT_PCREL:
- *r_type_p = BFD_RELOC_SH_GOT_LOW16;
- break;
-
- case BFD_RELOC_32_PLT_PCREL:
- *r_type_p = BFD_RELOC_SH_PLT_LOW16;
- break;
-
- default:
- abort ();
- }
- break;
-
- case BFD_RELOC_SH_IMM_MEDLOW16:
- switch (exp->X_md)
- {
- case BFD_RELOC_32_GOTOFF:
- *r_type_p = BFD_RELOC_SH_GOTOFF_MEDLOW16;
- break;
-
- case BFD_RELOC_SH_GOTPLT32:
- *r_type_p = BFD_RELOC_SH_GOTPLT_MEDLOW16;
- break;
-
- case BFD_RELOC_32_GOT_PCREL:
- *r_type_p = BFD_RELOC_SH_GOT_MEDLOW16;
- break;
-
- case BFD_RELOC_32_PLT_PCREL:
- *r_type_p = BFD_RELOC_SH_PLT_MEDLOW16;
- break;
-
- default:
- abort ();
- }
- break;
-
- case BFD_RELOC_SH_IMM_MEDHI16:
- switch (exp->X_md)
- {
- case BFD_RELOC_32_GOTOFF:
- *r_type_p = BFD_RELOC_SH_GOTOFF_MEDHI16;
- break;
-
- case BFD_RELOC_SH_GOTPLT32:
- *r_type_p = BFD_RELOC_SH_GOTPLT_MEDHI16;
- break;
-
- case BFD_RELOC_32_GOT_PCREL:
- *r_type_p = BFD_RELOC_SH_GOT_MEDHI16;
- break;
-
- case BFD_RELOC_32_PLT_PCREL:
- *r_type_p = BFD_RELOC_SH_PLT_MEDHI16;
- break;
-
- default:
- abort ();
- }
- break;
-
- case BFD_RELOC_SH_IMM_HI16:
- switch (exp->X_md)
- {
- case BFD_RELOC_32_GOTOFF:
- *r_type_p = BFD_RELOC_SH_GOTOFF_HI16;
- break;
-
- case BFD_RELOC_SH_GOTPLT32:
- *r_type_p = BFD_RELOC_SH_GOTPLT_HI16;
- break;
-
- case BFD_RELOC_32_GOT_PCREL:
- *r_type_p = BFD_RELOC_SH_GOT_HI16;
- break;
-
- case BFD_RELOC_32_PLT_PCREL:
- *r_type_p = BFD_RELOC_SH_PLT_HI16;
- break;
-
- default:
- abort ();
- }
- break;
-#endif
-
default:
abort ();
}
@@ -815,16 +433,6 @@ sh_elf_cons (int nbytes)
{
expressionS exp;
-#ifdef HAVE_SH64
-
- /* Update existing range to include a previous insn, if there was one. */
- sh64_update_contents_mark (TRUE);
-
- /* We need to make sure the contents type is set to data. */
- sh64_flag_output ();
-
-#endif /* HAVE_SH64 */
-
if (is_it_end_of_statement ())
{
demand_empty_rest_of_line ();
@@ -957,10 +565,6 @@ md_begin (void)
= preset_target_arch ? preset_target_arch : arch_sh_up & ~arch_sh_has_dsp;
valid_arch = target_arch;
-#ifdef HAVE_SH64
- shmedia_md_begin ();
-#endif
-
opcode_hash_control = hash_new ();
/* Insert unique names into hash table. */
@@ -2906,26 +2510,6 @@ md_assemble (char *str)
unsigned int size = 0;
char *initial_str = str;
-#ifdef HAVE_SH64
- if (sh64_isa_mode == sh64_isa_shmedia)
- {
- shmedia_md_assemble (str);
- return;
- }
- else
- {
- /* If we've seen pseudo-directives, make sure any emitted data or
- frags are marked as data. */
- if (!seen_insn)
- {
- sh64_update_contents_mark (TRUE);
- sh64_set_contents_type (CRT_SH5_ISA16);
- }
-
- seen_insn = TRUE;
- }
-#endif /* HAVE_SH64 */
-
opcode = find_cooked_opcode (&str);
op_end = str;
@@ -3136,13 +2720,6 @@ enum options
OPTION_ISA,
OPTION_RENESAS,
OPTION_ALLOW_REG_PREFIX,
-#ifdef HAVE_SH64
- OPTION_ABI,
- OPTION_NO_MIX,
- OPTION_SHCOMPACT_CONST_CRANGE,
- OPTION_NO_EXPAND,
- OPTION_PT32,
-#endif
OPTION_H_TICK_HEX,
#ifdef OBJ_ELF
OPTION_FDPIC,
@@ -3166,13 +2743,6 @@ struct option md_longopts[] =
{"renesas", no_argument, NULL, OPTION_RENESAS},
{"allow-reg-prefix", no_argument, NULL, OPTION_ALLOW_REG_PREFIX},
-#ifdef HAVE_SH64
- {"abi", required_argument, NULL, OPTION_ABI},
- {"no-mix", no_argument, NULL, OPTION_NO_MIX},
- {"shcompact-const-crange", no_argument, NULL, OPTION_SHCOMPACT_CONST_CRANGE},
- {"no-expand", no_argument, NULL, OPTION_NO_EXPAND},
- {"expand-pt32", no_argument, NULL, OPTION_PT32},
-#endif /* HAVE_SH64 */
{ "h-tick-hex", no_argument, NULL, OPTION_H_TICK_HEX },
#ifdef OBJ_ELF
@@ -3223,22 +2793,6 @@ md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
preset_target_arch = arch_sh_up & ~arch_sh_has_dsp;
else if (strcasecmp (arg, "any") == 0)
preset_target_arch = arch_sh_up;
-#ifdef HAVE_SH64
- else if (strcasecmp (arg, "shmedia") == 0)
- {
- if (sh64_isa_mode == sh64_isa_shcompact)
- as_bad (_("Invalid combination: --isa=SHcompact with --isa=SHmedia"));
- sh64_isa_mode = sh64_isa_shmedia;
- }
- else if (strcasecmp (arg, "shcompact") == 0)
- {
- if (sh64_isa_mode == sh64_isa_shmedia)
- as_bad (_("Invalid combination: --isa=SHmedia with --isa=SHcompact"));
- if (sh64_abi == sh64_abi_64)
- as_bad (_("Invalid combination: --abi=64 with --isa=SHcompact"));
- sh64_isa_mode = sh64_isa_shcompact;
- }
-#endif /* HAVE_SH64 */
else
{
extern const bfd_arch_info_type bfd_sh_arch;
@@ -3249,9 +2803,6 @@ md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
{
int len = strlen(bfd_arch->printable_name);
- if (bfd_arch->mach == bfd_mach_sh5)
- continue;
-
if (strncasecmp (bfd_arch->printable_name, arg, len) != 0)
continue;
@@ -3271,43 +2822,6 @@ md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
}
break;
-#ifdef HAVE_SH64
- case OPTION_ABI:
- if (strcmp (arg, "32") == 0)
- {
- if (sh64_abi == sh64_abi_64)
- as_bad (_("Invalid combination: --abi=32 with --abi=64"));
- sh64_abi = sh64_abi_32;
- }
- else if (strcmp (arg, "64") == 0)
- {
- if (sh64_abi == sh64_abi_32)
- as_bad (_("Invalid combination: --abi=64 with --abi=32"));
- if (sh64_isa_mode == sh64_isa_shcompact)
- as_bad (_("Invalid combination: --isa=SHcompact with --abi=64"));
- sh64_abi = sh64_abi_64;
- }
- else
- as_bad (_("Invalid argument to --abi option: %s"), arg);
- break;
-
- case OPTION_NO_MIX:
- sh64_mix = FALSE;
- break;
-
- case OPTION_SHCOMPACT_CONST_CRANGE:
- sh64_shcompact_const_crange = TRUE;
- break;
-
- case OPTION_NO_EXPAND:
- sh64_expand = FALSE;
- break;
-
- case OPTION_PT32:
- sh64_pt32 = TRUE;
- break;
-#endif /* HAVE_SH64 */
-
case OPTION_H_TICK_HEX:
enable_h_tick_hex = 1;
break;
@@ -3346,30 +2860,12 @@ SH options:\n\
bfd_arch_info_type const *bfd_arch = &bfd_sh_arch;
for (; bfd_arch; bfd_arch=bfd_arch->next)
- if (bfd_arch->mach != bfd_mach_sh5)
- {
- fprintf (stream, "\n | %s", bfd_arch->printable_name);
- fprintf (stream, "\n | %s-up", bfd_arch->printable_name);
- }
+ {
+ fprintf (stream, "\n | %s", bfd_arch->printable_name);
+ fprintf (stream, "\n | %s-up", bfd_arch->printable_name);
+ }
}
fprintf (stream, "]\n");
-#ifdef HAVE_SH64
- fprintf (stream, _("\
---isa=[shmedia set as the default instruction set for SH64\n\
- | SHmedia\n\
- | shcompact\n\
- | SHcompact]\n"));
- fprintf (stream, _("\
---abi=[32|64] set size of expanded SHmedia operands and object\n\
- file type\n\
---shcompact-const-crange emit code-range descriptors for constants in\n\
- SHcompact code sections\n\
---no-mix disallow SHmedia code in the same section as\n\
- constants and SHcompact code\n\
---no-expand do not expand MOVI, PT, PTA or PTB instructions\n\
---expand-pt32 with -abi=64, expand PT, PTA and PTB instructions\n\
- to 32 bits only\n"));
-#endif /* HAVE_SH64 */
#ifdef OBJ_ELF
fprintf (stream, _("\
--fdpic generate an FDPIC object file\n"));
@@ -3537,10 +3033,6 @@ sh_frob_section (bfd *abfd ATTRIBUTE_UNUSED, segT sec,
void
sh_frob_file (void)
{
-#ifdef HAVE_SH64
- shmedia_frob_file_before_adjust ();
-#endif
-
if (! sh_relax)
return;
@@ -3673,11 +3165,7 @@ md_convert_frag (bfd *headers ATTRIBUTE_UNUSED, segT seg, fragS *fragP)
break;
default:
-#ifdef HAVE_SH64
- shmedia_md_convert_frag (headers, seg, fragP, TRUE);
-#else
abort ();
-#endif
}
if (donerelax && !sh_relax)
@@ -3854,9 +3342,6 @@ sh_force_relocation (fixS *fix)
|| fix->fx_r_type == BFD_RELOC_SH_ALIGN
|| fix->fx_r_type == BFD_RELOC_SH_CODE
|| fix->fx_r_type == BFD_RELOC_SH_DATA
-#ifdef HAVE_SH64
- || fix->fx_r_type == BFD_RELOC_SH_SHMEDIA_CODE
-#endif
|| fix->fx_r_type == BFD_RELOC_SH_LABEL);
}
@@ -3892,14 +3377,7 @@ sh_elf_final_processing (void)
/* Set file-specific flags to indicate if this code needs
a processor with the sh-dsp / sh2e ISA to execute. */
-#ifdef HAVE_SH64
- /* SH5 and above don't know about the valid_arch arch_sh* bits defined
- in sh-opc.h, so check SH64 mode before checking valid_arch. */
- if (sh64_isa_mode != sh64_isa_unspecified)
- val = EF_SH5;
- else
-#endif /* HAVE_SH64 */
- val = sh_find_elf_flags (valid_arch);
+ val = sh_find_elf_flags (valid_arch);
elf_elfheader (stdoutput)->e_flags &= ~EF_SH_MACH_MASK;
elf_elfheader (stdoutput)->e_flags |= val;
@@ -3961,11 +3439,6 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
the other symbol. We have to adjust the relocation type here. */
if (fixP->fx_pcrel)
{
-#ifndef HAVE_SH64
- /* Safeguard; this must not occur for non-sh64 configurations. */
- gas_assert (fixP->fx_r_type != BFD_RELOC_64);
-#endif
-
switch (fixP->fx_r_type)
{
default:
@@ -4164,12 +3637,6 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
buf[highbyte] |= (val >> 8) & 0xf;
break;
-#ifndef HAVE_SH64
- case BFD_RELOC_64:
- apply_full_field_fix (fixP, buf, *valP, 8);
- break;
-#endif
-
case BFD_RELOC_32:
case BFD_RELOC_32_PCREL:
apply_full_field_fix (fixP, buf, val, 4);
@@ -4260,12 +3727,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
#endif
default:
-#ifdef HAVE_SH64
- shmedia_md_apply_fix (fixP, valP);
- return;
-#else
abort ();
-#endif
}
if (shift != 0)
@@ -4304,12 +3766,7 @@ md_estimate_size_before_relax (fragS *fragP, segT segment_type)
switch (fragP->fr_subtype)
{
default:
-#ifdef HAVE_SH64
- return shmedia_md_estimate_size_before_relax (fragP, segment_type);
-#else
abort ();
-#endif
-
case C (UNCOND_JUMP, UNDEF_DISP):
/* Used to be a branch to somewhere which was unknown. */
@@ -4375,11 +3832,6 @@ md_estimate_size_before_relax (fragS *fragP, segT segment_type)
void
md_number_to_chars (char *ptr, valueT use, int nbytes)
{
-#ifdef HAVE_SH64
- /* We might need to set the contents type to data. */
- sh64_flag_output ();
-#endif
-
if (! target_big_endian)
number_to_chars_littleendian (ptr, use, nbytes);
else
@@ -4457,10 +3909,6 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
rel->addend = 0;
rel->address = rel->addend = fixp->fx_offset;
}
-#ifdef HAVE_SH64
- else if (shmedia_init_reloc (rel, fixp))
- ;
-#endif
else
rel->addend = fixp->fx_addnumber;
diff --git a/gas/config/tc-sh64.c b/gas/config/tc-sh64.c
deleted file mode 100644
index 001fa2a..0000000
--- a/gas/config/tc-sh64.c
+++ /dev/null
@@ -1,3526 +0,0 @@
-/* tc-sh64.c -- Assemble code for the SuperH SH SHcompact and SHmedia.
- Copyright (C) 2000-2018 Free Software Foundation, Inc.
-
- This file is part of GAS, the GNU Assembler.
-
- GAS is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- GAS is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-/* This file defines SHmedia ISA-specific functions and includes tc-sh.c.
- The SHcompact ISA is in all useful aspects the "old" sh4 as implemented
- in tc-sh.c. Not making this file part of tc-sh.c makes it easier to
- keep a leaner sh[1-4]-only implementation. */
-
-#define HAVE_SH64
-
-#include "as.h"
-#include "safe-ctype.h"
-#include "opcodes/sh64-opc.h"
-
-#ifndef OBJ_ELF
-#error This file assumes object output is in the ELF format
-#endif
-
-/* Suffix used when we make "datalabel" symbol copies. It must not
- collide with anything that can normally appear in a symbol, "faked
- symbol" or local symbol. */
-#define DATALABEL_SUFFIX " DL"
-
-/* See shmedia_md_apply_fix and shmedia_md_pcrel_from_section for usage. */
-#define SHMEDIA_MD_PCREL_FROM_FIX(FIXP) \
- ((FIXP)->fx_size + (FIXP)->fx_where + (FIXP)->fx_frag->fr_address - 4)
-
-/* We use this internally to see which one is PT and which is a PTA/PTB
- that should be error-checked. We give it a better name here (but not
- one that looks official). Adding it to reloc.c would make it look too
- much of a real reloc; it is just used temporarily as a fixup-type. */
-#define SHMEDIA_BFD_RELOC_PT BFD_RELOC_12_PCREL
-
-typedef struct
- {
- shmedia_arg_type type;
-
- /* These could go into a union, but that would uglify the code. */
- int reg;
- expressionS immediate;
-
- /* If IMMEDIATE was a shift-expression, like "(S >> N) & 65535", where
- N = 0, 16, 32, 48, used to extract a certain 16-bit-field to make up
- a MOVI or SHORI relocation for a symbol, then we put the
- corresponding reloc-type here and modify the "immediate" expression
- to S. Otherwise, this is just BFD_RELOC_NONE. */
- bfd_reloc_code_real_type reloctype;
- } shmedia_operand_info;
-
-/* Frag containing last base instruction. This is put in the TC field in
- a frag, so we can emit fixups for fr_opcode without needing to make
- sure that the opcode is in the same frag as any variant operand. */
-fragS *sh64_last_insn_frag = NULL;
-
-typedef struct
- {
- shmedia_operand_info operands[3];
- unsigned long ops_val;
- } shmedia_operands_info;
-
-enum sh64_abi_values
- { sh64_abi_unspecified, sh64_abi_32, sh64_abi_64 };
-
-/* What ISA are we assembling code for? */
-enum sh64_isa_values sh64_isa_mode = sh64_isa_unspecified;
-
-/* What ABI was specified, if any (implicitly or explicitly)? */
-static enum sh64_abi_values sh64_abi = sh64_abi_unspecified;
-
-/* A note that says if we're in a sequence of insns without label
- settings, segment or ISA mode changes or emitted data. */
-static bfd_boolean seen_insn = FALSE;
-
-/* This is set to TRUE in shmedia_md_end, so that we don't emit any
- .cranges entries when the assembler calls output functions while
- grinding along after all input is seen. */
-static bfd_boolean sh64_end_of_assembly = FALSE;
-
-/* Controlled by the option -no-mix, this invalidates mixing SHcompact and
- SHmedia code in the same section, and also invalidates mixing data and
- SHmedia code in the same section. No .cranges will therefore be
- emitted, unless -shcompact-const-crange is specified and there is a
- constant pool in SHcompact code. */
-static bfd_boolean sh64_mix = TRUE;
-
-static bfd_boolean sh64_shcompact_const_crange = FALSE;
-
-/* Controlled by the option -no-expand, this says whether or not we expand
- MOVI and PT/PTA/PTB. When we do not expand these insns to fit an
- operand, we will emit errors for operands out of range and generate the
- basic instruction and reloc for an external symbol. */
-static bfd_boolean sh64_expand = TRUE;
-
-/* Controlled by the option -expand-pt32, this says whether we expand
- PT/PTA/PTB of an external symbol to (only) 32 or (the full) 64 bits
- when -abi=64 is in effect. */
-static bfd_boolean sh64_pt32 = FALSE;
-
-/* When emitting a .cranges descriptor, we want to avoid getting recursive
- calls through emit_expr. */
-static bfd_boolean emitting_crange = FALSE;
-
-/* SHmedia mnemonics. */
-static struct hash_control *shmedia_opcode_hash_control = NULL;
-
-static const unsigned char shmedia_big_nop_pattern[4] =
- {
- (SHMEDIA_NOP_OPC >> 24) & 255, (SHMEDIA_NOP_OPC >> 16) & 255,
- (SHMEDIA_NOP_OPC >> 8) & 255, SHMEDIA_NOP_OPC & 255
- };
-
-static const unsigned char shmedia_little_nop_pattern[4] =
- {
- SHMEDIA_NOP_OPC & 255, (SHMEDIA_NOP_OPC >> 8) & 255,
- (SHMEDIA_NOP_OPC >> 16) & 255, (SHMEDIA_NOP_OPC >> 24) & 255
- };
-
-static void shmedia_md_begin (void);
-static int shmedia_parse_reg (char *, shmedia_arg_type *, int *,
- shmedia_arg_type);
-static void shmedia_md_assemble (char *);
-static void shmedia_md_apply_fix (fixS *, valueT *);
-static int shmedia_md_estimate_size_before_relax (fragS *, segT);
-static int shmedia_init_reloc (arelent *, fixS *);
-static char *shmedia_get_operands (shmedia_opcode_info *, char *,
- shmedia_operands_info *);
-static void s_sh64_mode (int);
-static void s_sh64_abi (int);
-static void shmedia_md_convert_frag (bfd *, segT, fragS *, bfd_boolean);
-static void shmedia_check_limits (offsetT *, bfd_reloc_code_real_type,
- fixS *);
-static void sh64_set_contents_type (enum sh64_elf_cr_type);
-static void shmedia_get_operand (char **, shmedia_operand_info *,
- shmedia_arg_type);
-static unsigned long shmedia_immediate_op (char *, shmedia_operand_info *,
- int, bfd_reloc_code_real_type);
-static char *shmedia_parse_exp (char *, shmedia_operand_info *);
-static void shmedia_frob_file_before_adjust (void);
-static void sh64_emit_crange (symbolS *, symbolS *, enum sh64_elf_cr_type);
-static void sh64_flush_last_crange (bfd *, asection *, void *);
-static void sh64_flag_output (void);
-static void sh64_update_contents_mark (bfd_boolean);
-static void sh64_vtable_entry (int);
-static void sh64_vtable_inherit (int);
-static char *strip_datalabels (void);
-static int shmedia_build_Mytes (shmedia_opcode_info *,
- shmedia_operands_info *);
-static shmedia_opcode_info *shmedia_find_cooked_opcode (char **);
-static unsigned long shmedia_mask_number (unsigned long,
- bfd_reloc_code_real_type);
-
-#include "tc-sh.c"
-
-void
-shmedia_md_end (void)
-{
- symbolS *symp;
-
- /* First, update the last range to include whatever data was last
- emitted. */
- sh64_update_contents_mark (TRUE);
-
- /* Make sure frags generated after this point are not marked with the
- wrong ISA; make them easily spottable. We still want to distinguish
- it from sh64_isa_unspecified when we compile for SHcompact or
- SHmedia. */
- if (sh64_isa_mode != sh64_isa_unspecified)
- sh64_isa_mode = sh64_isa_sh5_guard;
-
- sh64_end_of_assembly = TRUE;
-
- bfd_map_over_sections (stdoutput, sh64_flush_last_crange, NULL);
-
- /* Iterate over segments and emit the last .cranges descriptor. */
- for (symp = symbol_rootP; symp != NULL; symp = symp->sy_next)
- {
- symbolS *mainsym = *symbol_get_tc (symp);
-
- /* Is this a datalabel symbol; does it have a pointer to the main
- symbol? */
- if (mainsym != NULL)
- {
- /* If the datalabel symbol is undefined, check if the main
- symbol has changed in that respect. */
- if (S_GET_SEGMENT (symp) == undefined_section)
- {
- segT symseg;
-
- symseg = S_GET_SEGMENT (mainsym);
-
- /* If the symbol is now defined to something that is not
- global and without STO_SH5_ISA32, we just equate the
- datalabel symbol to the main symbol, and the lack of
- STO_SH5_ISA32 will handle the datalabelness. */
- if (symseg != undefined_section)
- {
- if (S_GET_OTHER (mainsym) != STO_SH5_ISA32)
- {
- symp->sy_value.X_op = O_symbol;
- symp->sy_value.X_add_symbol = mainsym;
- symp->sy_value.X_op_symbol = NULL;
- symp->sy_value.X_add_number = 0;
- S_SET_SEGMENT (symp, S_GET_SEGMENT (mainsym));
- symbol_set_frag (symp, &zero_address_frag);
- copy_symbol_attributes (symp, mainsym);
- }
- else
- {
- /* An undefined symbol has since we saw it at
- "datalabel", been defined to a BranchTarget
- symbol. What we need to do here is very similar
- to when we find the "datalabel" for a defined
- symbol. FIXME: Break out to common function. */
- symbol_set_value_expression (symp,
- symbol_get_value_expression
- (mainsym));
- S_SET_SEGMENT (symp, symseg);
- symbol_set_frag (symp, symbol_get_frag (mainsym));
- copy_symbol_attributes (symp, mainsym);
-
- /* Unset the BranchTarget mark that can be set at
- attribute-copying. */
- S_SET_OTHER (symp,
- S_GET_OTHER (symp) & ~STO_SH5_ISA32);
-
- /* The GLOBAL and WEAK attributes are not copied
- over by copy_symbol_attributes. Do it here. */
- if (S_IS_WEAK (mainsym))
- S_SET_WEAK (symp);
- else if (S_IS_EXTERNAL (mainsym))
- S_SET_EXTERNAL (symp);
- }
- }
- else
- {
- /* A symbol that was defined at the time we saw
- "datalabel" can since have been attributed with being
- weak or global. */
- if (S_IS_WEAK (mainsym))
- S_SET_WEAK (symp);
- else if (S_IS_EXTERNAL (mainsym))
- S_SET_EXTERNAL (symp);
- }
- }
- }
- }
-
- for (symp = symbol_rootP; symp != NULL; symp = symp->sy_next)
- if (S_GET_OTHER (symp) & STO_SH5_ISA32)
- symp->sy_value.X_add_number++;
-}
-
-/* When resolving symbols, the main assembler has done us a misfavour. It
- has removed the equation to the main symbol for a datalabel reference
- that should be equal to the main symbol, e.g. when it's a global or
- weak symbol and is a non-BranchTarget symbol anyway. We change that
- back, so that relocs are against the main symbol, not the local "section
- + offset" value. */
-
-static void
-shmedia_frob_file_before_adjust (void)
-{
- symbolS *symp;
- for (symp = symbol_rootP; symp != NULL; symp = symp->sy_next)
- {
- symbolS *mainsym = *symbol_get_tc (symp);
-
- if (mainsym != NULL
- && S_GET_OTHER (mainsym) != STO_SH5_ISA32
- && (S_IS_EXTERNAL (mainsym) || S_IS_WEAK (mainsym)))
- {
- symp->sy_value.X_op = O_symbol;
- symp->sy_value.X_add_symbol = mainsym;
- symp->sy_value.X_op_symbol = NULL;
- symp->sy_value.X_add_number = 0;
-
- /* For the "equation trick" to work, we have to set the section
- to undefined. */
- S_SET_SEGMENT (symp, undefined_section);
- symbol_set_frag (symp, &zero_address_frag);
- copy_symbol_attributes (symp, mainsym);
-
- /* Don't forget to remove the STO_SH5_ISA32 attribute after
- copying the other attributes. */
- S_SET_OTHER (symp, S_GET_OTHER (symp) & ~STO_SH5_ISA32);
- }
- }
-}
-
-/* We need to mark the current location after the alignment. This is
- copied code the caller, do_align. We mark the frag location before and
- after as we need and arrange to skip the same code in do_align.
-
- An alternative to code duplication is to call the do_align recursively,
- arranging to fall through into do_align if we're already here. That
- would require do_align as an incoming function parameter, since it's
- static in read.c. That solution was discarded a too kludgy. */
-
-void
-sh64_do_align (int n, const char *fill, int len, int max)
-{
- /* Update region, or put a data region in front. */
- sh64_update_contents_mark (TRUE);
-
- /* Only make a frag if we HAVE to... */
- if (n != 0 && !need_pass_2)
- {
- if (fill == NULL)
- {
- if (subseg_text_p (now_seg))
- frag_align_code (n, max);
- else
- frag_align (n, 0, max);
- }
- else if (len <= 1)
- frag_align (n, *fill, max);
- else
- frag_align_pattern (n, fill, len, max);
- }
-
- /* Update mark for current region with current type. */
- sh64_update_contents_mark (FALSE);
-}
-
-/* The MAX_MEM_FOR_RS_ALIGN_CODE worker. We have to find out the ISA of
- the current segment at this position. We can't look just at
- sh64_isa_shmedia, and we can't look at frag_now. This is brittle:
- callers are currently frag_align_code from subsegs_finish in write.c
- (end of assembly) and frag_align_code from do_align in read.c (during
- assembly). */
-
-int
-sh64_max_mem_for_rs_align_code (void)
-{
- segment_info_type *seginfo;
- fragS *mode_start_frag;
- seginfo = seg_info (now_seg);
-
- /* We don't use the contents type we find at the tc_segment_info_data,
- since that does not give us absolute information about the ISA; the
- contents type can presumably be CRT_DATA and we'd be none the wiser.
- Instead we use the information stored at the frag of the symbol at
- the start of this range. If any information is missing or NULL,
- assume SHcompact. */
- return
- /* If the current ISA mode is SHmedia, that's the mode that we're
- going to assign to the new frag, so request enough memory for
- it, even if we switch modes afterwards, otherwise we may
- allocate too little memory and end up overflowing our buffer. */
- (sh64_isa_mode == sh64_isa_shmedia
- || (sh64_isa_mode != sh64_isa_unspecified
- && seginfo != NULL
- && seginfo->tc_segment_info_data.mode_start_symbol != NULL
- && ((mode_start_frag
- = (symbol_get_frag
- (seginfo->tc_segment_info_data.mode_start_symbol)))
- != NULL)
- && mode_start_frag->tc_frag_data.isa == sh64_isa_shmedia))
- ? (3 + 4) : (2 + 1);
-}
-
-/* Put in SHmedia NOP:s if the alignment was created when in SHmedia mode. */
-
-void
-sh64_handle_align (fragS * frag)
-{
- int bytes = frag->fr_next->fr_address - frag->fr_address - frag->fr_fix;
- char * p = frag->fr_literal + frag->fr_fix;
-
- if (frag->tc_frag_data.isa == sh64_isa_shmedia
- && frag->fr_type == rs_align_code)
- {
- while (bytes & 3)
- {
- *p++ = 0;
- bytes--;
- frag->fr_fix += 1;
- }
-
- if (target_big_endian)
- {
- memcpy (p, shmedia_big_nop_pattern,
- sizeof shmedia_big_nop_pattern);
- frag->fr_var = sizeof shmedia_big_nop_pattern;
- }
- else
- {
- memcpy (p, shmedia_little_nop_pattern,
- sizeof shmedia_little_nop_pattern);
- frag->fr_var = sizeof shmedia_little_nop_pattern;
- }
- }
- else
- /* Punt to SHcompact function. */
- sh_handle_align (frag);
-}
-
-/* Set SEC_SH64_ISA32 for SHmedia sections. */
-
-void
-shmedia_frob_section_type (asection *sec)
-{
- segment_info_type *seginfo;
- seginfo = seg_info (sec);
-
- /* This and elf32-sh64.c:sh64_elf_fake_sections are the only places
- where we use anything else than ELF header flags to communicate the
- section as containing SHmedia or other contents. BFD SEC_* section
- flags are running out and should not be overloaded with
- target-specific semantics. This target is ELF only (semantics not
- defined for other formats), so we use the target-specific pointer
- field of the ELF section data. */
- if (seginfo && sh64_abi == sh64_abi_32)
- {
- struct sh64_section_data *sec_elf_data;
- flagword sec_type = 0;
-
- if (seginfo->tc_segment_info_data.emitted_ranges != 0)
- sec_type = SHF_SH5_ISA32_MIXED;
- else if (seginfo->tc_segment_info_data.contents_type == CRT_SH5_ISA32)
- sec_type = SHF_SH5_ISA32;
-
- sec_elf_data = sh64_elf_section_data (sec)->sh64_info;
- if (sec_elf_data == NULL)
- {
- sec_elf_data = XCNEW (struct sh64_section_data);
- sh64_elf_section_data (sec)->sh64_info = sec_elf_data;
- }
-
- sec_elf_data->contents_flags = sec_type;
- }
-}
-
-/* This function is called by write_object_file right before the symbol
- table is written. We subtract 1 from all symbols marked STO_SH5_ISA32,
- as their values are temporarily incremented in shmedia_md_end, before
- symbols values are used by relocs and fixups.
-
- To increment all symbols and then decrement here is admittedly a
- hackish solution. The alternative is to add infrastructure and hooks
- to symbol evaluation that evaluates symbols differently internally to
- the value output into the object file, but at the moment that just
- seems too much for little benefit. */
-
-void
-sh64_adjust_symtab (void)
-{
- symbolS *symp;
-
- for (symp = symbol_rootP; symp; symp = symbol_next (symp))
- {
- symbolS *main_symbol = *symbol_get_tc (symp);
-
- if (main_symbol)
- {
- char *sym_name = (char *) S_GET_NAME (symp);
-
- /* All datalabels not used in relocs should be gone by now.
-
- We change those remaining to have the name of the main
- symbol, and we set the ELF type of the symbol of the reloc to
- STT_DATALABEL. */
- sym_name[strlen (sym_name) - strlen (DATALABEL_SUFFIX)] = 0;
- elf_symbol (symbol_get_bfdsym (symp))->internal_elf_sym.st_info
- = STT_DATALABEL;
-
- /* Also set this symbol to "undefined", so we'll have only one
- definition. */
- S_SET_SEGMENT (symp, undefined_section);
- }
- else if (S_GET_OTHER (symp) & STO_SH5_ISA32)
- {
- /* It's important to change the BFD symbol value, since it is now
- set to the GAS symbolS value. */
- symp->bsym->value--;
-
- /* Note that we do *not* adjust symp->sy_value.X_add_number. If
- you do this, the test case in sh/sh64/immexpr2.s will fail.
- This is because *after* symbols have been output but before
- relocs are output, fixups are inspected one more time, and
- some leftover expressions are resolved. To resolve to the
- same values, those expressions must have the same GAS symbol
- values before as after symbols have been output. We could
- "symp->sy_value.X_add_number++" on the STO_SH5_ISA32 symbols
- through tc_frob_file after symbols have been output, but that
- would be too gross. */
- }
- }
-}
-
-/* Fill-in an allocated arelent. */
-
-static int
-shmedia_init_reloc (arelent *rel, fixS *fixP)
-{
- /* Adjust parts of *relp according to *fixp, and tell that it has been
- done, so default initializations will not happen. */
- switch (fixP->fx_r_type)
- {
- case BFD_RELOC_64:
- case BFD_RELOC_64_PCREL:
- case BFD_RELOC_SH_IMM_LOW16:
- case BFD_RELOC_SH_IMM_MEDLOW16:
- case BFD_RELOC_SH_IMM_MEDHI16:
- case BFD_RELOC_SH_IMM_HI16:
- case BFD_RELOC_SH_IMM_LOW16_PCREL:
- case BFD_RELOC_SH_IMM_MEDLOW16_PCREL:
- case BFD_RELOC_SH_IMM_MEDHI16_PCREL:
- case BFD_RELOC_SH_IMM_HI16_PCREL:
- case BFD_RELOC_SH_IMMU5:
- case BFD_RELOC_SH_IMMU6:
- case BFD_RELOC_SH_IMMS6:
- case BFD_RELOC_SH_IMMS10:
- case BFD_RELOC_SH_IMMS10BY2:
- case BFD_RELOC_SH_IMMS10BY4:
- case BFD_RELOC_SH_IMMS10BY8:
- case BFD_RELOC_SH_IMMS16:
- case BFD_RELOC_SH_IMMU16:
- case BFD_RELOC_SH_PT_16:
- case BFD_RELOC_SH_GOT_LOW16:
- case BFD_RELOC_SH_GOT_MEDLOW16:
- case BFD_RELOC_SH_GOT_MEDHI16:
- case BFD_RELOC_SH_GOT_HI16:
- case BFD_RELOC_SH_GOT10BY4:
- case BFD_RELOC_SH_GOT10BY8:
- case BFD_RELOC_SH_GOTPLT_LOW16:
- case BFD_RELOC_SH_GOTPLT_MEDLOW16:
- case BFD_RELOC_SH_GOTPLT_MEDHI16:
- case BFD_RELOC_SH_GOTPLT_HI16:
- case BFD_RELOC_SH_GOTPLT10BY4:
- case BFD_RELOC_SH_GOTPLT10BY8:
- case BFD_RELOC_SH_GOTOFF_LOW16:
- case BFD_RELOC_SH_GOTOFF_MEDLOW16:
- case BFD_RELOC_SH_GOTOFF_MEDHI16:
- case BFD_RELOC_SH_GOTOFF_HI16:
- case BFD_RELOC_SH_GOTPC_LOW16:
- case BFD_RELOC_SH_GOTPC_MEDLOW16:
- case BFD_RELOC_SH_GOTPC_MEDHI16:
- case BFD_RELOC_SH_GOTPC_HI16:
- case BFD_RELOC_SH_PLT_LOW16:
- case BFD_RELOC_SH_PLT_MEDLOW16:
- case BFD_RELOC_SH_PLT_MEDHI16:
- case BFD_RELOC_SH_PLT_HI16:
- rel->addend = fixP->fx_addnumber + fixP->fx_offset;
- return 1;
-
- case BFD_RELOC_SH_IMMS6BY32:
- /* This must be resolved in assembly; we do not support it as a
- reloc in an object file. */
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("This operand must be constant at assembly time"));
- break;
-
- /* There are valid cases where we get here for other than SHmedia
- relocs, so don't make a BAD_CASE out of this. */
- default:
- ;
- }
-
- return 0;
-}
-
-/* Hook called from md_apply_fix in tc-sh.c. */
-
-static void
-shmedia_md_apply_fix (fixS *fixP, valueT *valp)
-{
- offsetT val = *valp;
- char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
- unsigned long insn
- = target_big_endian ? bfd_getb32 (buf) : bfd_getl32 (buf);
- bfd_reloc_code_real_type orig_fx_r_type = fixP->fx_r_type;
-
- /* Change a 64-bit pc-relative reloc into the correct type, just like
- tc-sh.c:md_apply_fix. */
- if (fixP->fx_pcrel)
- {
- switch (orig_fx_r_type)
- {
- case BFD_RELOC_64:
- case BFD_RELOC_SH_IMM_LOW16:
- case BFD_RELOC_SH_IMM_MEDLOW16:
- case BFD_RELOC_SH_IMM_MEDHI16:
- case BFD_RELOC_SH_IMM_HI16:
- /* Because write.c calls MD_PCREL_FROM_SECTION twice, we need to
- undo one of the adjustments, if the relocation is not
- actually for a symbol within the same segment (which we
- cannot check, because we're not called from md_apply_fix, so
- we have to keep the reloc). FIXME: This is a bug in
- write.c:fixup_segment affecting most targets that change
- ordinary relocs to pcrel relocs in md_apply_fix. */
- fixP->fx_offset
- = *valp + SHMEDIA_MD_PCREL_FROM_FIX (fixP);
- break;
-
- case BFD_RELOC_SH_PLT_LOW16:
- case BFD_RELOC_SH_PLT_MEDLOW16:
- case BFD_RELOC_SH_PLT_MEDHI16:
- case BFD_RELOC_SH_PLT_HI16:
- case BFD_RELOC_SH_GOTPC_LOW16:
- case BFD_RELOC_SH_GOTPC_MEDLOW16:
- case BFD_RELOC_SH_GOTPC_MEDHI16:
- case BFD_RELOC_SH_GOTPC_HI16:
- *valp = 0;
- return;
-
- default:
- ;
- }
-
- /* We might need to change some relocs into the corresponding
- PC-relative one. */
- switch (orig_fx_r_type)
- {
- case BFD_RELOC_64:
- fixP->fx_r_type = BFD_RELOC_64_PCREL;
- break;
-
- case BFD_RELOC_SH_IMM_LOW16:
- fixP->fx_r_type = BFD_RELOC_SH_IMM_LOW16_PCREL;
- break;
-
- case BFD_RELOC_SH_IMM_MEDLOW16:
- fixP->fx_r_type = BFD_RELOC_SH_IMM_MEDLOW16_PCREL;
- break;
-
- case BFD_RELOC_SH_IMM_MEDHI16:
- fixP->fx_r_type = BFD_RELOC_SH_IMM_MEDHI16_PCREL;
- break;
-
- case BFD_RELOC_SH_IMM_HI16:
- fixP->fx_r_type = BFD_RELOC_SH_IMM_HI16_PCREL;
- break;
-
- case SHMEDIA_BFD_RELOC_PT:
- /* This is how we see a difference between PT and PTA when not
- expanding (in which case we handle it in
- shmedia_md_convert_frag). Note that we don't see a
- difference after the reloc is emitted. */
- fixP->fx_r_type = BFD_RELOC_SH_PT_16;
- break;
-
- case BFD_RELOC_SH_PT_16:
- /* This tells us there was a PTA or PTB insn explicitly
- expressed as such (not as PT). We "or" in a 1 into the
- lowest bit in the (unused) destination field to tell the
- linker that it should check the right ISA type of the
- destination and not just change a PTA to PTB (if necessary). */
- md_number_to_chars (buf, insn | (1 << 10), 4);
- break;
-
- case BFD_RELOC_64_PCREL:
- case BFD_RELOC_SH_IMM_LOW16_PCREL:
- case BFD_RELOC_SH_IMM_MEDLOW16_PCREL:
- case BFD_RELOC_SH_IMM_MEDHI16_PCREL:
- case BFD_RELOC_SH_IMM_HI16_PCREL:
- /* Already handled. */
- break;
-
- default:
- /* Everything else that changes into a pc-relative relocation is
- an error. */
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid operand expression"));
- break;
- }
-
- return;
- }
-
- /* If an expression looked like it was PC-relative, but was completely
- resolvable, we end up here with the result only in *VALP, and no
- relocation will be emitted. */
- if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0)
- {
- /* Emit error for an out-of-range value. */
- shmedia_check_limits ((offsetT *) valp, fixP->fx_r_type, fixP);
-
- switch (fixP->fx_r_type)
- {
- case BFD_RELOC_SH_IMM_LOW16:
- md_number_to_chars (buf, insn | ((val & 65535) << 10), 4);
- break;
-
- case BFD_RELOC_SH_IMM_MEDLOW16:
- md_number_to_chars (buf,
- insn
- | ((valueT) (val & ((valueT) 65535 << 16))
- >> (16 - 10)), 4);
- break;
-
- case BFD_RELOC_SH_IMM_MEDHI16:
- md_number_to_chars (buf,
- insn
- | ((valueT) (val & ((valueT) 65535 << 32))
- >> (32 - 10)), 4);
- break;
-
- case BFD_RELOC_SH_IMM_HI16:
- md_number_to_chars (buf,
- insn
- | ((valueT) (val & ((valueT) 65535 << 48))
- >> (48 - 10)), 4);
- break;
-
- case BFD_RELOC_SH_IMMS16:
- case BFD_RELOC_SH_IMMU16:
- md_number_to_chars (buf, insn | ((val & 65535) << 10), 4);
- break;
-
- case BFD_RELOC_SH_IMMS10:
- md_number_to_chars (buf, insn | ((val & 0x3ff) << 10), 4);
- break;
-
- case BFD_RELOC_SH_IMMS10BY2:
- md_number_to_chars (buf,
- insn | ((val & (0x3ff << 1)) << (10 - 1)), 4);
- break;
-
- case BFD_RELOC_SH_IMMS10BY4:
- md_number_to_chars (buf,
- insn | ((val & (0x3ff << 2)) << (10 - 2)), 4);
- break;
-
- case BFD_RELOC_SH_IMMS10BY8:
- md_number_to_chars (buf,
- insn | ((val & (0x3ff << 3)) << (10 - 3)), 4);
- break;
-
- case BFD_RELOC_SH_SHMEDIA_CODE:
- /* We just ignore and remove this one for the moment. FIXME:
- Use it when implementing relaxing. */
- break;
-
- case BFD_RELOC_64:
- md_number_to_chars (buf, val, 8);
- break;
-
- case SHMEDIA_BFD_RELOC_PT:
- /* Change a PT to PTB if the operand turned out to be SHcompact.
- The basic opcode specified with PT is equivalent to PTA. */
- if ((val & 1) == 0)
- insn |= SHMEDIA_PTB_BIT;
- /* Fall through. */
-
- case BFD_RELOC_SH_PT_16:
- if (! sh64_expand || sh_relax)
- {
- /* Check if the operand of a PTA or PTB was for the "wrong"
- ISA. A PT had an incoming fixup of SHMEDIA_BFD_RELOC_PT,
- which we have changed to the right type above. */
- if (orig_fx_r_type != SHMEDIA_BFD_RELOC_PT)
- {
- if ((insn & SHMEDIA_PTB_BIT) != 0 && (val & 1) != 0)
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("PTB operand is a SHmedia symbol"));
- else if ((insn & SHMEDIA_PTB_BIT) == 0 && (val & 1) == 0)
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("PTA operand is a SHcompact symbol"));
- }
-
- md_number_to_chars (buf,
- insn | ((val & (0xffff << 2))
- << (10 - 2)),
- 4);
- break;
- }
- /* Fall through. */
-
- default:
- /* This isn't a BAD_CASE, because presumably we can get here
- from unexpected operands. Since we don't handle them, make
- them syntax errors. */
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("invalid expression in operand"));
- }
- fixP->fx_done = 1;
- }
-}
-
-/* Hook called from md_convert_frag in tc-sh.c. */
-
-static void
-shmedia_md_convert_frag (bfd *output_bfd ATTRIBUTE_UNUSED,
- segT seg ATTRIBUTE_UNUSED, fragS *fragP,
- bfd_boolean final)
-{
- /* Pointer to first byte in variable-sized part of the frag. */
- char *var_partp;
-
- /* Pointer to first opcode byte in frag. */
- char *opcodep;
-
- /* Pointer to frag of opcode. */
- fragS *opc_fragP = fragP->tc_frag_data.opc_frag;
-
- /* Size in bytes of variable-sized part of frag. */
- int var_part_size = 0;
-
- /* This is part of *fragP. It contains all information about addresses
- and offsets to varying parts. */
- symbolS *symbolP = fragP->fr_symbol;
-
- bfd_boolean reloc_needed
- = (! final
- || sh_relax
- || symbolP == NULL
- || ! S_IS_DEFINED (symbolP)
- || S_IS_EXTERNAL (symbolP)
- || S_IS_WEAK (symbolP)
- || (S_GET_SEGMENT (fragP->fr_symbol) != absolute_section
- && S_GET_SEGMENT (fragP->fr_symbol) != seg));
-
- bfd_reloc_code_real_type reloctype = BFD_RELOC_NONE;
-
- unsigned long var_part_offset;
-
- /* Where, in file space, does addr point? */
- bfd_vma target_address;
- bfd_vma opcode_address;
-
- /* What was the insn? */
- unsigned long insn;
- know (fragP->fr_type == rs_machine_dependent);
-
- var_part_offset = fragP->fr_fix;
- var_partp = fragP->fr_literal + var_part_offset;
- opcodep = fragP->fr_opcode;
-
- insn = target_big_endian ? bfd_getb32 (opcodep) : bfd_getl32 (opcodep);
-
- target_address
- = ((symbolP && final && ! sh_relax ? S_GET_VALUE (symbolP) : 0)
- + fragP->fr_offset);
-
- /* The opcode that would be extended is the last four "fixed" bytes. */
- opcode_address = fragP->fr_address + fragP->fr_fix - 4;
-
- switch (fragP->fr_subtype)
- {
- case C (SH64PCREL16PT_64, SH64PCREL16):
- case C (SH64PCREL16PT_32, SH64PCREL16):
- /* We can get a PT to a relaxed SHcompact address if it is in the
- same section; a mixed-ISA section. Change the opcode to PTB if
- so. */
- if ((target_address & 1) == 0)
- insn |= SHMEDIA_PTB_BIT;
- /* Fall through. */
-
- case C (SH64PCREL16_32, SH64PCREL16):
- case C (SH64PCREL16_64, SH64PCREL16):
- /* Check that a PTA or PTB points to the right type of target. We
- can get here for a SHcompact target if we are in a mixed-ISA
- section. */
- if (((target_address & 1) == 0) && ((insn & SHMEDIA_PTB_BIT) == 0))
- as_bad_where (fragP->fr_file, fragP->fr_line,
- _("PTA operand is a SHcompact symbol"));
- if (((target_address & 1) != 0) && ((insn & SHMEDIA_PTB_BIT) != 0))
- as_bad_where (fragP->fr_file, fragP->fr_line,
- _("PTB operand is a SHmedia symbol"));
-
- /* When relaxing, we do not output the address in the insn, but
- instead a 1 into the low bit. This matches what the linker
- expects to find for a BFD_RELOC_SH_PT_16 reloc, when it checks
- correctness for PTA/PTB insn; used when the target address is
- unknown (which is not the case here). */
- md_number_to_chars (opcodep,
- insn
- | (((sh_relax
- ? 1 : ((target_address - opcode_address) / 4))
- & ((1 << 16) - 1)) << 10),
- 4);
-
- /* Note that we do not emit info that this was originally a PT since
- we have resolved to which one of PTA or PTB it will be. */
- if (sh_relax)
- fix_new (opc_fragP, opcodep - opc_fragP->fr_literal, 4,
- fragP->fr_symbol, fragP->fr_offset, 1, BFD_RELOC_SH_PT_16);
- var_part_size = 0;
- break;
-
- case C (SH64PCREL16_32, SH64PCRELPLT):
- case C (SH64PCREL16PT_32, SH64PCRELPLT):
- reloctype = BFD_RELOC_32_PLT_PCREL;
- reloc_needed = 1;
- /* Fall through */
-
- case C (SH64PCREL16_32, SH64PCREL32):
- case C (SH64PCREL16_64, SH64PCREL32):
- case C (SH64PCREL16PT_32, SH64PCREL32):
- case C (SH64PCREL16PT_64, SH64PCREL32):
- /* In the fixed bit, put in a MOVI. */
- md_number_to_chars (opcodep,
- SHMEDIA_MOVI_OPC
- | (SHMEDIA_TEMP_REG << 4)
- | ((((reloc_needed
- ? 0 : (target_address - (opcode_address + 8))
- ) >> 16) & 65535) << 10),
- 4);
-
- /* Fill in a SHORI for the low part. */
- md_number_to_chars (var_partp,
- SHMEDIA_SHORI_OPC
- | (SHMEDIA_TEMP_REG << 4)
- | (((reloc_needed
- ? 0 : (target_address - (opcode_address + 8)))
- & 65535) << 10),
- 4);
-
- /* End with a "PTREL R25,TRd". */
- md_number_to_chars (var_partp + 4,
- SHMEDIA_PTREL_OPC | (insn & SHMEDIA_LIKELY_BIT)
- | (SHMEDIA_TEMP_REG << 10)
- | (insn & (7 << 4)),
- 4);
-
- /* We need relocs only if the target symbol was undefined or if
- we're relaxing. */
- if (reloc_needed)
- {
- fix_new (opc_fragP, opcodep - opc_fragP->fr_literal, 4,
- fragP->fr_symbol, fragP->fr_offset - 8, 1,
- reloctype == BFD_RELOC_32_PLT_PCREL
- ? BFD_RELOC_SH_PLT_MEDLOW16
- : BFD_RELOC_SH_IMM_MEDLOW16_PCREL);
- fix_new (fragP, var_partp - fragP->fr_literal, 4, fragP->fr_symbol,
- fragP->fr_offset - 4, 1,
- reloctype == BFD_RELOC_32_PLT_PCREL
- ? BFD_RELOC_SH_PLT_LOW16
- : BFD_RELOC_SH_IMM_LOW16_PCREL);
- }
-
- var_part_size = 8;
- break;
-
- case C (SH64PCREL16_64, SH64PCREL48):
- case C (SH64PCREL16PT_64, SH64PCREL48):
- /* In the fixed bit, put in a MOVI. */
- md_number_to_chars (opcodep,
- SHMEDIA_MOVI_OPC
- | (SHMEDIA_TEMP_REG << 4)
- | ((((reloc_needed
- ? 0 : (target_address - (opcode_address + 12))
- ) >> 32) & 65535) << 10),
- 4);
-
- /* The first SHORI, for the medium part. */
- md_number_to_chars (var_partp,
- SHMEDIA_SHORI_OPC
- | (SHMEDIA_TEMP_REG << 4)
- | ((((reloc_needed
- ? 0 : (target_address - (opcode_address + 12))
- ) >> 16) & 65535) << 10),
- 4);
-
- /* Fill in a SHORI for the low part. */
- md_number_to_chars (var_partp + 4,
- SHMEDIA_SHORI_OPC
- | (SHMEDIA_TEMP_REG << 4)
- | (((reloc_needed
- ? 0 : (target_address - (opcode_address + 12)))
- & 65535) << 10),
- 4);
-
- /* End with a "PTREL R25,TRd". */
- md_number_to_chars (var_partp + 8,
- SHMEDIA_PTREL_OPC | (insn & SHMEDIA_LIKELY_BIT)
- | (SHMEDIA_TEMP_REG << 10)
- | (insn & (7 << 4)),
- 4);
-
- /* We need relocs only if the target symbol was undefined or if
- we're relaxing. */
- if (reloc_needed)
- {
- fix_new (opc_fragP, opcodep - opc_fragP->fr_literal, 4,
- fragP->fr_symbol, fragP->fr_offset - 12, 1,
- reloctype == BFD_RELOC_32_PLT_PCREL
- ? BFD_RELOC_SH_PLT_MEDHI16
- : BFD_RELOC_SH_IMM_MEDHI16_PCREL);
- fix_new (fragP, var_partp - fragP->fr_literal, 4, fragP->fr_symbol,
- fragP->fr_offset - 8, 1,
- reloctype == BFD_RELOC_32_PLT_PCREL
- ? BFD_RELOC_SH_PLT_MEDLOW16
- : BFD_RELOC_SH_IMM_MEDLOW16_PCREL);
- fix_new (fragP, var_partp - fragP->fr_literal + 4, 4, fragP->fr_symbol,
- fragP->fr_offset - 4, 1,
- reloctype == BFD_RELOC_32_PLT_PCREL
- ? BFD_RELOC_SH_PLT_LOW16
- : BFD_RELOC_SH_IMM_LOW16_PCREL);
- }
-
- var_part_size = 12;
- break;
-
- case C (SH64PCREL16_64, SH64PCRELPLT):
- case C (SH64PCREL16PT_64, SH64PCRELPLT):
- reloctype = BFD_RELOC_32_PLT_PCREL;
- reloc_needed = 1;
- /* Fall through */
-
- case C (SH64PCREL16_64, SH64PCREL64):
- case C (SH64PCREL16PT_64, SH64PCREL64):
- /* In the fixed bit, put in a MOVI. */
- md_number_to_chars (opcodep,
- SHMEDIA_MOVI_OPC
- | (SHMEDIA_TEMP_REG << 4)
- | ((((reloc_needed
- ? 0 : (target_address - (opcode_address + 16))
- ) >> 48) & 65535) << 10),
- 4);
-
- /* The first SHORI, for the medium-high part. */
- md_number_to_chars (var_partp,
- SHMEDIA_SHORI_OPC
- | (SHMEDIA_TEMP_REG << 4)
- | ((((reloc_needed
- ? 0 : (target_address - (opcode_address + 16))
- ) >> 32) & 65535) << 10),
- 4);
-
- /* A SHORI, for the medium-low part. */
- md_number_to_chars (var_partp + 4,
- SHMEDIA_SHORI_OPC
- | (SHMEDIA_TEMP_REG << 4)
- | ((((reloc_needed
- ? 0 : (target_address - (opcode_address + 16))
- ) >> 16) & 65535) << 10),
- 4);
-
- /* Fill in a SHORI for the low part. */
- md_number_to_chars (var_partp + 8,
- SHMEDIA_SHORI_OPC
- | (SHMEDIA_TEMP_REG << 4)
- | (((reloc_needed
- ? 0 : (target_address - (opcode_address + 16)))
- & 65535) << 10),
- 4);
-
- /* End with a "PTREL R25,TRd". */
- md_number_to_chars (var_partp + 12,
- SHMEDIA_PTREL_OPC | (insn & SHMEDIA_LIKELY_BIT)
- | (SHMEDIA_TEMP_REG << 10)
- | (insn & (7 << 4)),
- 4);
-
- /* We need relocs only if the target symbol was undefined or if
- we're relaxing. */
- if (reloc_needed)
- {
- fix_new (opc_fragP, opcodep - opc_fragP->fr_literal, 4,
- fragP->fr_symbol, fragP->fr_offset - 16, 1,
- reloctype == BFD_RELOC_32_PLT_PCREL
- ? BFD_RELOC_SH_PLT_HI16
- : BFD_RELOC_SH_IMM_HI16_PCREL);
- fix_new (fragP, var_partp - fragP->fr_literal, 4, fragP->fr_symbol,
- fragP->fr_offset - 12, 1,
- reloctype == BFD_RELOC_32_PLT_PCREL
- ? BFD_RELOC_SH_PLT_MEDHI16
- : BFD_RELOC_SH_IMM_MEDHI16_PCREL);
- fix_new (fragP, var_partp - fragP->fr_literal + 4, 4, fragP->fr_symbol,
- fragP->fr_offset - 8, 1,
- reloctype == BFD_RELOC_32_PLT_PCREL
- ? BFD_RELOC_SH_PLT_MEDLOW16
- : BFD_RELOC_SH_IMM_MEDLOW16_PCREL);
- fix_new (fragP, var_partp - fragP->fr_literal + 8, 4, fragP->fr_symbol,
- fragP->fr_offset - 4, 1,
- reloctype == BFD_RELOC_32_PLT_PCREL
- ? BFD_RELOC_SH_PLT_LOW16
- : BFD_RELOC_SH_IMM_LOW16_PCREL);
- }
-
- var_part_size = 16;
- break;
-
- case C (MOVI_IMM_64, MOVI_GOTOFF):
- reloctype = BFD_RELOC_32_GOTOFF;
- reloc_needed = 1;
- /* Fall through. */
-
- case C (MOVI_IMM_64, UNDEF_MOVI):
- case C (MOVI_IMM_64, MOVI_64):
- {
- /* We only get here for undefined symbols, so we can simplify
- handling compared to those above; we have 0 in the parts that
- will be filled with the symbol parts. */
-
- int reg = (insn >> 4) & 0x3f;
-
- /* In the fixed bit, put in a MOVI. */
- md_number_to_chars (opcodep, SHMEDIA_MOVI_OPC | (reg << 4), 4);
- fix_new (opc_fragP, opcodep - opc_fragP->fr_literal, 4,
- fragP->fr_symbol, fragP->fr_offset, 0,
- reloctype == BFD_RELOC_NONE
- ? BFD_RELOC_SH_IMM_HI16
- : reloctype == BFD_RELOC_32_GOTOFF
- ? BFD_RELOC_SH_GOTOFF_HI16
- : (abort (), BFD_RELOC_SH_IMM_HI16));
-
- /* The first SHORI, for the medium-high part. */
- md_number_to_chars (var_partp, SHMEDIA_SHORI_OPC | (reg << 4), 4);
- fix_new (fragP, var_partp - fragP->fr_literal, 4, fragP->fr_symbol,
- fragP->fr_offset, 0,
- reloctype == BFD_RELOC_NONE
- ? BFD_RELOC_SH_IMM_MEDHI16
- : reloctype == BFD_RELOC_32_GOTOFF
- ? BFD_RELOC_SH_GOTOFF_MEDHI16
- : (abort (), BFD_RELOC_SH_IMM_MEDHI16));
-
- /* A SHORI, for the medium-low part. */
- md_number_to_chars (var_partp + 4,
- SHMEDIA_SHORI_OPC | (reg << 4), 4);
- fix_new (fragP, var_partp - fragP->fr_literal + 4, 4, fragP->fr_symbol,
- fragP->fr_offset, 0,
- reloctype == BFD_RELOC_NONE
- ? BFD_RELOC_SH_IMM_MEDLOW16
- : reloctype == BFD_RELOC_32_GOTOFF
- ? BFD_RELOC_SH_GOTOFF_MEDLOW16
- : (abort (), BFD_RELOC_SH_IMM_MEDLOW16));
-
- /* Fill in a SHORI for the low part. */
- md_number_to_chars (var_partp + 8,
- SHMEDIA_SHORI_OPC | (reg << 4), 4);
- fix_new (fragP, var_partp - fragP->fr_literal + 8, 4, fragP->fr_symbol,
- fragP->fr_offset, 0,
- reloctype == BFD_RELOC_NONE
- ? BFD_RELOC_SH_IMM_LOW16
- : reloctype == BFD_RELOC_32_GOTOFF
- ? BFD_RELOC_SH_GOTOFF_LOW16
- : (abort (), BFD_RELOC_SH_IMM_LOW16));
-
- var_part_size = 12;
- break;
- }
-
- case C (MOVI_IMM_32, MOVI_GOTOFF):
- reloctype = BFD_RELOC_32_GOTOFF;
- reloc_needed = 1;
- /* Fall through. */
-
- case C (MOVI_IMM_32, UNDEF_MOVI):
- case C (MOVI_IMM_32, MOVI_32):
- {
- /* Note that we only get here for undefined symbols. */
-
- int reg = (insn >> 4) & 0x3f;
-
- /* A MOVI, for the high part. */
- md_number_to_chars (opcodep, SHMEDIA_MOVI_OPC | (reg << 4), 4);
- fix_new (opc_fragP, opcodep - opc_fragP->fr_literal, 4,
- fragP->fr_symbol, fragP->fr_offset, 0,
- reloctype == BFD_RELOC_NONE
- ? BFD_RELOC_SH_IMM_MEDLOW16
- : reloctype == BFD_RELOC_32_GOTOFF
- ? BFD_RELOC_SH_GOTOFF_MEDLOW16
- : reloctype == BFD_RELOC_SH_GOTPC
- ? BFD_RELOC_SH_GOTPC_MEDLOW16
- : reloctype == BFD_RELOC_32_PLT_PCREL
- ? BFD_RELOC_SH_PLT_MEDLOW16
- : (abort (), BFD_RELOC_SH_IMM_MEDLOW16));
-
- /* Fill in a SHORI for the low part. */
- md_number_to_chars (var_partp,
- SHMEDIA_SHORI_OPC | (reg << 4), 4);
- fix_new (fragP, var_partp - fragP->fr_literal, 4, fragP->fr_symbol,
- fragP->fr_offset, 0,
- reloctype == BFD_RELOC_NONE
- ? BFD_RELOC_SH_IMM_LOW16
- : reloctype == BFD_RELOC_32_GOTOFF
- ? BFD_RELOC_SH_GOTOFF_LOW16
- : reloctype == BFD_RELOC_SH_GOTPC
- ? BFD_RELOC_SH_GOTPC_LOW16
- : reloctype == BFD_RELOC_32_PLT_PCREL
- ? BFD_RELOC_SH_PLT_LOW16
- : (abort (), BFD_RELOC_SH_IMM_LOW16));
-
- var_part_size = 4;
- break;
- }
-
- case C (MOVI_IMM_32_PCREL, MOVI_16):
- case C (MOVI_IMM_64_PCREL, MOVI_16):
- md_number_to_chars (opcodep,
- insn
- | (((reloc_needed
- ? 0 : (target_address - opcode_address))
- & 65535) << 10),
- 4);
- if (reloc_needed)
- fix_new (opc_fragP, opcodep - opc_fragP->fr_literal, 4,
- fragP->fr_symbol, fragP->fr_offset, 1,
- BFD_RELOC_SH_IMM_LOW16_PCREL);
- var_part_size = 0;
- break;
-
- case C (MOVI_IMM_32, MOVI_16):
- case C (MOVI_IMM_64, MOVI_16):
- md_number_to_chars (opcodep,
- insn
- | (((reloc_needed ? 0 : target_address)
- & 65535) << 10),
- 4);
- if (reloc_needed)
- abort ();
- var_part_size = 0;
- break;
-
- case C (MOVI_IMM_32_PCREL, MOVI_PLT):
- reloctype = BFD_RELOC_32_PLT_PCREL;
- goto movi_imm_32_pcrel_reloc_needed;
-
- case C (MOVI_IMM_32_PCREL, MOVI_GOTPC):
- reloctype = BFD_RELOC_SH_GOTPC;
- /* Fall through. */
-
- movi_imm_32_pcrel_reloc_needed:
- reloc_needed = 1;
- /* Fall through. */
-
- case C (MOVI_IMM_32_PCREL, MOVI_32):
- case C (MOVI_IMM_64_PCREL, MOVI_32):
- {
- int reg = (insn >> 4) & 0x3f;
-
- md_number_to_chars (opcodep,
- insn
- | (((((reloc_needed
- ? 0 : (target_address - opcode_address)))
- >> 16) & 65535) << 10), 4);
-
- /* A SHORI, for the low part. */
- md_number_to_chars (var_partp,
- SHMEDIA_SHORI_OPC
- | (reg << 4)
- | (((reloc_needed
- ? 0 : (target_address - opcode_address))
- & 65535) << 10), 4);
- if (reloc_needed)
- {
- fix_new (opc_fragP, opcodep - opc_fragP->fr_literal, 4,
- fragP->fr_symbol, fragP->fr_offset, 1,
- reloctype == BFD_RELOC_NONE
- ? BFD_RELOC_SH_IMM_MEDLOW16_PCREL
- : reloctype == BFD_RELOC_SH_GOTPC
- ? BFD_RELOC_SH_GOTPC_MEDLOW16
- : reloctype == BFD_RELOC_32_PLT_PCREL
- ? BFD_RELOC_SH_PLT_MEDLOW16
- : (abort (), BFD_RELOC_SH_IMM_MEDLOW16_PCREL));
- fix_new (fragP, var_partp - fragP->fr_literal, 4, fragP->fr_symbol,
- fragP->fr_offset + 4, 1,
- reloctype == BFD_RELOC_NONE
- ? BFD_RELOC_SH_IMM_LOW16_PCREL
- : reloctype == BFD_RELOC_SH_GOTPC
- ? BFD_RELOC_SH_GOTPC_LOW16
- : reloctype == BFD_RELOC_32_PLT_PCREL
- ? BFD_RELOC_SH_PLT_LOW16
- : (abort (), BFD_RELOC_SH_IMM_LOW16_PCREL));
- }
- var_part_size = 4;
- }
- break;
-
- case C (MOVI_IMM_32_PCREL, MOVI_48):
- case C (MOVI_IMM_64_PCREL, MOVI_48):
- {
- int reg = (insn >> 4) & 0x3f;
-
- md_number_to_chars (opcodep,
- insn
- | (((((reloc_needed
- ? 0 : (target_address - opcode_address)))
- >> 32) & 65535) << 10), 4);
-
- /* A SHORI, for the medium part. */
- md_number_to_chars (var_partp,
- SHMEDIA_SHORI_OPC
- | (reg << 4)
- | ((((reloc_needed
- ? 0 : (target_address - opcode_address))
- >> 16) & 65535) << 10), 4);
-
- /* A SHORI, for the low part. */
- md_number_to_chars (var_partp + 4,
- SHMEDIA_SHORI_OPC
- | (reg << 4)
- | (((reloc_needed
- ? 0 : (target_address - opcode_address))
- & 65535) << 10), 4);
- if (reloc_needed)
- {
- fix_new (opc_fragP, opcodep - opc_fragP->fr_literal, 4,
- fragP->fr_symbol, fragP->fr_offset, 1,
- BFD_RELOC_SH_IMM_MEDHI16_PCREL);
- fix_new (fragP, var_partp - fragP->fr_literal, 4, fragP->fr_symbol,
- fragP->fr_offset + 4, 1, BFD_RELOC_SH_IMM_MEDLOW16_PCREL);
- fix_new (fragP, var_partp - fragP->fr_literal + 4, 4, fragP->fr_symbol,
- fragP->fr_offset + 8, 1, BFD_RELOC_SH_IMM_LOW16_PCREL);
- }
- var_part_size = 8;
- }
- break;
-
- case C (MOVI_IMM_64_PCREL, MOVI_PLT):
- reloctype = BFD_RELOC_32_PLT_PCREL;
- goto movi_imm_64_pcrel_reloc_needed;
-
- case C (MOVI_IMM_64_PCREL, MOVI_GOTPC):
- reloctype = BFD_RELOC_SH_GOTPC;
- /* Fall through. */
-
- movi_imm_64_pcrel_reloc_needed:
- reloc_needed = 1;
- /* Fall through. */
-
- case C (MOVI_IMM_32_PCREL, MOVI_64):
- case C (MOVI_IMM_64_PCREL, MOVI_64):
- {
- int reg = (insn >> 4) & 0x3f;
-
- md_number_to_chars (opcodep,
- insn
- | (((((reloc_needed
- ? 0 : (target_address - opcode_address)))
- >> 48) & 65535) << 10), 4);
-
- /* A SHORI, for the medium-high part. */
- md_number_to_chars (var_partp,
- SHMEDIA_SHORI_OPC
- | (reg << 4)
- | ((((reloc_needed
- ? 0 : (target_address - opcode_address))
- >> 32) & 65535) << 10), 4);
-
- /* A SHORI, for the medium-low part. */
- md_number_to_chars (var_partp + 4,
- SHMEDIA_SHORI_OPC
- | (reg << 4)
- | ((((reloc_needed
- ? 0 : (target_address - opcode_address))
- >> 16) & 65535) << 10), 4);
-
- /* A SHORI, for the low part. */
- md_number_to_chars (var_partp + 8,
- SHMEDIA_SHORI_OPC
- | (reg << 4)
- | (((reloc_needed
- ? 0 : (target_address - opcode_address))
- & 65535) << 10), 4);
- if (reloc_needed)
- {
- fix_new (opc_fragP, opcodep - opc_fragP->fr_literal, 4,
- fragP->fr_symbol, fragP->fr_offset, 1,
- reloctype == BFD_RELOC_NONE
- ? BFD_RELOC_SH_IMM_HI16_PCREL
- : reloctype == BFD_RELOC_SH_GOTPC
- ? BFD_RELOC_SH_GOTPC_HI16
- : reloctype == BFD_RELOC_32_PLT_PCREL
- ? BFD_RELOC_SH_PLT_HI16
- : (abort (), BFD_RELOC_SH_IMM_HI16_PCREL));
- fix_new (fragP, var_partp - fragP->fr_literal, 4, fragP->fr_symbol,
- fragP->fr_offset + 4, 1,
- reloctype == BFD_RELOC_NONE
- ? BFD_RELOC_SH_IMM_MEDHI16_PCREL
- : reloctype == BFD_RELOC_SH_GOTPC
- ? BFD_RELOC_SH_GOTPC_MEDHI16
- : reloctype == BFD_RELOC_32_PLT_PCREL
- ? BFD_RELOC_SH_PLT_MEDHI16
- : (abort (), BFD_RELOC_SH_IMM_MEDHI16_PCREL));
- fix_new (fragP, var_partp - fragP->fr_literal + 4, 4,
- fragP->fr_symbol,
- fragP->fr_offset + 8, 1,
- reloctype == BFD_RELOC_NONE
- ? BFD_RELOC_SH_IMM_MEDLOW16_PCREL
- : reloctype == BFD_RELOC_SH_GOTPC
- ? BFD_RELOC_SH_GOTPC_MEDLOW16
- : reloctype == BFD_RELOC_32_PLT_PCREL
- ? BFD_RELOC_SH_PLT_MEDLOW16
- : (abort (), BFD_RELOC_SH_IMM_MEDLOW16_PCREL));
- fix_new (fragP, var_partp - fragP->fr_literal + 8, 4,
- fragP->fr_symbol,
- fragP->fr_offset + 12, 1,
- reloctype == BFD_RELOC_NONE
- ? BFD_RELOC_SH_IMM_LOW16_PCREL
- : reloctype == BFD_RELOC_SH_GOTPC
- ? BFD_RELOC_SH_GOTPC_LOW16
- : reloctype == BFD_RELOC_32_PLT_PCREL
- ? BFD_RELOC_SH_PLT_LOW16
- : (abort (), BFD_RELOC_SH_IMM_LOW16_PCREL));
- }
- var_part_size = 12;
- }
- break;
-
- default:
- BAD_CASE (fragP->fr_subtype);
- }
-
- fragP->fr_fix += var_part_size;
- fragP->fr_var = 0;
-}
-
-/* Mask NUMBER (originating from a signed number) corresponding to the HOW
- reloc. */
-
-static unsigned long
-shmedia_mask_number (unsigned long number, bfd_reloc_code_real_type how)
-{
- switch (how)
- {
- case BFD_RELOC_SH_IMMU5:
- number &= (1 << 5) - 1;
- break;
-
- case BFD_RELOC_SH_IMMS6:
- case BFD_RELOC_SH_IMMU6:
- number &= (1 << 6) - 1;
- break;
-
- case BFD_RELOC_SH_IMMS6BY32:
- number = (number & ((1 << (6 + 5)) - 1)) >> 5;
- break;
-
- case BFD_RELOC_SH_IMMS10:
- number &= (1 << 10) - 1;
- break;
-
- case BFD_RELOC_SH_IMMS10BY2:
- number = (number & ((1 << (10 + 1)) - 1)) >> 1;
- break;
-
- case BFD_RELOC_SH_IMMS10BY4:
- number = (number & ((1 << (10 + 2)) - 1)) >> 2;
- break;
-
- case BFD_RELOC_SH_IMMS10BY8:
- number = (number & ((1 << (10 + 3)) - 1)) >> 3;
- break;
-
- case BFD_RELOC_SH_IMMS16:
- case BFD_RELOC_SH_IMMU16:
- number &= (1 << 16) - 1;
- break;
-
- default:
- BAD_CASE (how);
- }
-
- return number;
-}
-
-/* Emit errors for values out-of-range, using as_bad_where if FRAGP is
- non-NULL, as_bad otherwise. */
-
-static void
-shmedia_check_limits (offsetT *valp, bfd_reloc_code_real_type reloc,
- fixS *fixp)
-{
- offsetT val = *valp;
-
- const char *msg = NULL;
-
- switch (reloc)
- {
- case BFD_RELOC_SH_IMMU5:
- if (val < 0 || val > (1 << 5) - 1)
- msg = _("invalid operand, not a 5-bit unsigned value: %d");
- break;
-
- case BFD_RELOC_SH_IMMS6:
- if (val < -(1 << 5) || val > (1 << 5) - 1)
- msg = _("invalid operand, not a 6-bit signed value: %d");
- break;
-
- case BFD_RELOC_SH_IMMU6:
- if (val < 0 || val > (1 << 6) - 1)
- msg = _("invalid operand, not a 6-bit unsigned value: %d");
- break;
-
- case BFD_RELOC_SH_IMMS6BY32:
- if (val < -(1 << 10) || val > (1 << 10) - 1)
- msg = _("invalid operand, not a 11-bit signed value: %d");
- else if (val & 31)
- msg = _("invalid operand, not a multiple of 32: %d");
- break;
-
- case BFD_RELOC_SH_IMMS10:
- if (val < -(1 << 9) || val > (1 << 9) - 1)
- msg = _("invalid operand, not a 10-bit signed value: %d");
- break;
-
- case BFD_RELOC_SH_IMMS10BY2:
- if (val < -(1 << 10) || val > (1 << 10) - 1)
- msg = _("invalid operand, not a 11-bit signed value: %d");
- else if (val & 1)
- msg = _("invalid operand, not an even value: %d");
- break;
-
- case BFD_RELOC_SH_IMMS10BY4:
- if (val < -(1 << 11) || val > (1 << 11) - 1)
- msg = _("invalid operand, not a 12-bit signed value: %d");
- else if (val & 3)
- msg = _("invalid operand, not a multiple of 4: %d");
- break;
-
- case BFD_RELOC_SH_IMMS10BY8:
- if (val < -(1 << 12) || val > (1 << 12) - 1)
- msg = _("invalid operand, not a 13-bit signed value: %d");
- else if (val & 7)
- msg = _("invalid operand, not a multiple of 8: %d");
- break;
-
- case BFD_RELOC_SH_IMMS16:
- if (val < -(1 << 15) || val > (1 << 15) - 1)
- msg = _("invalid operand, not a 16-bit signed value: %d");
- break;
-
- case BFD_RELOC_SH_IMMU16:
- if (val < 0 || val > (1 << 16) - 1)
- msg = _("invalid operand, not a 16-bit unsigned value: %d");
- break;
-
- case BFD_RELOC_SH_PT_16:
- case SHMEDIA_BFD_RELOC_PT:
- if (val < -(1 << 15) * 4 || val > ((1 << 15) - 1) * 4 + 1)
- msg = _("operand out of range for PT, PTA and PTB");
- else if ((val % 4) != 0 && ((val - 1) % 4) != 0)
- msg = _("operand not a multiple of 4 for PT, PTA or PTB: %d");
- break;
-
- /* These have no limits; they take a 16-bit slice of a 32- or 64-bit
- number. */
- case BFD_RELOC_SH_IMM_HI16:
- case BFD_RELOC_SH_IMM_MEDHI16:
- case BFD_RELOC_SH_IMM_MEDLOW16:
- case BFD_RELOC_SH_IMM_LOW16:
- case BFD_RELOC_SH_IMM_HI16_PCREL:
- case BFD_RELOC_SH_IMM_MEDHI16_PCREL:
- case BFD_RELOC_SH_IMM_MEDLOW16_PCREL:
- case BFD_RELOC_SH_IMM_LOW16_PCREL:
-
- case BFD_RELOC_SH_SHMEDIA_CODE:
- break;
-
- /* This one has limits out of our reach. */
- case BFD_RELOC_64:
- break;
-
- default:
- BAD_CASE (reloc);
- }
-
- if (msg)
- {
- if (fixp)
- as_bad_where (fixp->fx_file, fixp->fx_line, msg, val);
- else
- as_bad (msg, val);
- }
-}
-
-/* Handle an immediate operand by checking limits and noting it for later
- evaluation if not computable yet, and return a bitfield suitable to
- "or" into the opcode (non-zero if the value was a constant number). */
-
-static unsigned long
-shmedia_immediate_op (char *where, shmedia_operand_info *op, int pcrel,
- bfd_reloc_code_real_type how)
-{
- unsigned long retval = 0;
-
- /* If this is not an absolute number, make it a fixup. A constant in
- place of a pc-relative operand also needs a fixup. */
- if (op->immediate.X_op != O_constant || pcrel)
- fix_new_exp (frag_now,
- where - frag_now->fr_literal,
- 4,
- &op->immediate,
- pcrel,
- how);
- else
- {
- /* Check that the number is within limits as represented by the
- reloc, and return the number. */
- shmedia_check_limits (&op->immediate.X_add_number, how, NULL);
-
- retval
- = shmedia_mask_number ((unsigned long) op->immediate.X_add_number,
- how);
- }
-
- return retval << 10;
-}
-
-/* Try and parse a register name case-insensitively, return the number of
- chars consumed. */
-
-static int
-shmedia_parse_reg (char *src, shmedia_arg_type *mode, int *reg,
- shmedia_arg_type argtype)
-{
- int l0 = TOLOWER (src[0]);
- int l1 = l0 ? TOLOWER (src[1]) : 0;
-
- if (l0 == 'r')
- {
- if (src[1] >= '1' && src[1] <= '5')
- {
- if (src[2] >= '0' && src[2] <= '9'
- && ! IDENT_CHAR ((unsigned char) src[3]))
- {
- *mode = A_GREG_M;
- *reg = 10 * (src[1] - '0') + src[2] - '0';
- return 3;
- }
- }
-
- if (src[1] == '6')
- {
- if (src[2] >= '0' && src[2] <= '3'
- && ! IDENT_CHAR ((unsigned char) src[3]))
- {
- *mode = A_GREG_M;
- *reg = 60 + src[2] - '0';
- return 3;
- }
- }
-
- if (src[1] >= '0' && src[1] <= '9'
- && ! IDENT_CHAR ((unsigned char) src[2]))
- {
- *mode = A_GREG_M;
- *reg = (src[1] - '0');
- return 2;
- }
- }
-
- if (l0 == 't' && l1 == 'r')
- {
- if (src[2] >= '0' && src[2] <= '7'
- && ! IDENT_CHAR ((unsigned char) src[3]))
- {
- *mode = A_TREG_B;
- *reg = (src[2] - '0');
- return 3;
- }
- }
-
- if (l0 == 'f' && l1 == 'r')
- {
- if (src[2] >= '1' && src[2] <= '5')
- {
- if (src[3] >= '0' && src[3] <= '9'
- && ! IDENT_CHAR ((unsigned char) src[4]))
- {
- *mode = A_FREG_G;
- *reg = 10 * (src[2] - '0') + src[3] - '0';
- return 4;
- }
- }
- if (src[2] == '6')
- {
- if (src[3] >= '0' && src[3] <= '3'
- && ! IDENT_CHAR ((unsigned char) src[4]))
- {
- *mode = A_FREG_G;
- *reg = 60 + src[3] - '0';
- return 4;
- }
- }
- if (src[2] >= '0' && src[2] <= '9'
- && ! IDENT_CHAR ((unsigned char) src[3]))
- {
- *mode = A_FREG_G;
- *reg = (src[2] - '0');
- return 3;
- }
- }
-
- if (l0 == 'f' && l1 == 'v')
- {
- if (src[2] >= '1' && src[2] <= '5')
- {
- if (src[3] >= '0' && src[3] <= '9'
- && ((10 * (src[2] - '0') + src[3] - '0') % 4) == 0
- && ! IDENT_CHAR ((unsigned char) src[4]))
- {
- *mode = A_FVREG_G;
- *reg = 10 * (src[2] - '0') + src[3] - '0';
- return 4;
- }
- }
- if (src[2] == '6')
- {
- if (src[3] == '0'
- && ! IDENT_CHAR ((unsigned char) src[4]))
- {
- *mode = A_FVREG_G;
- *reg = 60 + src[3] - '0';
- return 4;
- }
- }
- if (src[2] >= '0' && src[2] <= '9'
- && ((src[2] - '0') % 4) == 0
- && ! IDENT_CHAR ((unsigned char) src[3]))
- {
- *mode = A_FVREG_G;
- *reg = (src[2] - '0');
- return 3;
- }
- }
-
- if (l0 == 'd' && l1 == 'r')
- {
- if (src[2] >= '1' && src[2] <= '5')
- {
- if (src[3] >= '0' && src[3] <= '9'
- && ((src[3] - '0') % 2) == 0
- && ! IDENT_CHAR ((unsigned char) src[4]))
- {
- *mode = A_DREG_G;
- *reg = 10 * (src[2] - '0') + src[3] - '0';
- return 4;
- }
- }
-
- if (src[2] == '6')
- {
- if ((src[3] == '0' || src[3] == '2')
- && ! IDENT_CHAR ((unsigned char) src[4]))
- {
- *mode = A_DREG_G;
- *reg = 60 + src[3] - '0';
- return 4;
- }
- }
-
- if (src[2] >= '0' && src[2] <= '9'
- && ((src[2] - '0') % 2) == 0
- && ! IDENT_CHAR ((unsigned char) src[3]))
- {
- *mode = A_DREG_G;
- *reg = (src[2] - '0');
- return 3;
- }
- }
-
- if (l0 == 'f' && l1 == 'p')
- {
- if (src[2] >= '1' && src[2] <= '5')
- {
- if (src[3] >= '0' && src[3] <= '9'
- && ((src[3] - '0') % 2) == 0
- && ! IDENT_CHAR ((unsigned char) src[4]))
- {
- *mode = A_FPREG_G;
- *reg = 10 * (src[2] - '0') + src[3] - '0';
- return 4;
- }
- }
-
- if (src[2] == '6')
- {
- if ((src[3] == '0' || src[3] == '2')
- && ! IDENT_CHAR ((unsigned char) src[4]))
- {
- *mode = A_FPREG_G;
- *reg = 60 + src[3] - '0';
- return 4;
- }
- }
-
- if (src[2] >= '0' && src[2] <= '9'
- && ((src[2] - '0') % 2) == 0
- && ! IDENT_CHAR ((unsigned char) src[3]))
- {
- *mode = A_FPREG_G;
- *reg = (src[2] - '0');
- return 3;
- }
- }
-
- if (l0 == 'm' && strncasecmp (src, "mtrx", 4) == 0)
- {
- if (src[4] == '0' && ! IDENT_CHAR ((unsigned char) src[5]))
- {
- *mode = A_FMREG_G;
- *reg = 0;
- return 5;
- }
-
- if (src[4] == '1' && src[5] == '6'
- && ! IDENT_CHAR ((unsigned char) src[6]))
- {
- *mode = A_FMREG_G;
- *reg = 16;
- return 6;
- }
-
- if (src[4] == '3' && src[5] == '2'
- && ! IDENT_CHAR ((unsigned char) src[6]))
- {
- *mode = A_FMREG_G;
- *reg = 32;
- return 6;
- }
-
- if (src[4] == '4' && src[5] == '8'
- && ! IDENT_CHAR ((unsigned char) src[6]))
- {
- *mode = A_FMREG_G;
- *reg = 48;
- return 6;
- }
- }
-
- if (l0 == 'c' && l1 == 'r')
- {
- if (src[2] >= '1' && src[2] <= '5')
- {
- if (src[3] >= '0' && src[3] <= '9'
- && ! IDENT_CHAR ((unsigned char) src[4]))
- {
- *mode = A_CREG_K;
- *reg = 10 * (src[2] - '0') + src[3] - '0';
- return 4;
- }
- }
- if (src[2] == '6')
- {
- if (src[3] >= '0' && src[3] <= '3'
- && ! IDENT_CHAR ((unsigned char) src[4]))
- {
- *mode = A_CREG_K;
- *reg = 60 + src[3] - '0';
- return 4;
- }
- }
- if (src[2] >= '0' && src[2] <= '9'
- && ! IDENT_CHAR ((unsigned char) src[3]))
- {
- *mode = A_CREG_K;
- *reg = (src[2] - '0');
- return 3;
- }
- }
-
- /* We either have an error, a symbol or a control register by predefined
- name. To keep things simple but still fast for normal cases, we do
- linear search in the (not to big) table of predefined control
- registers. We only do this when we *expect* a control register.
- Those instructions should be rare enough that linear searching is ok.
- Or just read them into a hash-table in shmedia_md_begin. Since they
- cannot be specified in the same place of symbol operands, don't add
- them there to the *main* symbol table as being in "reg_section". */
- if (argtype == A_CREG_J || argtype == A_CREG_K)
- {
- const shmedia_creg_info *cregp;
- int len = 0;
-
- for (cregp = shmedia_creg_table; cregp->name != NULL; cregp++)
- {
- len = strlen (cregp->name);
- if (strncasecmp (cregp->name, src, len) == 0
- && ! IDENT_CHAR (src[len]))
- break;
- }
-
- if (cregp->name != NULL)
- {
- *mode = A_CREG_K;
- *reg = cregp->cregno;
- return len;
- }
- }
-
- return 0;
-}
-
-/* Called from md_estimate_size_before_relax in tc-sh.c */
-
-static int
-shmedia_md_estimate_size_before_relax (fragS *fragP,
- segT segment_type ATTRIBUTE_UNUSED)
-{
- int old_fr_fix;
- expressionS *exp;
-
- /* For ELF, we can't relax externally visible symbols; see tc-i386.c. */
- bfd_boolean sym_relaxable
- = (fragP->fr_symbol
- && S_GET_SEGMENT (fragP->fr_symbol) == segment_type
- && ! S_IS_EXTERNAL (fragP->fr_symbol)
- && ! S_IS_WEAK (fragP->fr_symbol));
-
- old_fr_fix = fragP->fr_fix;
-
- switch (fragP->fr_subtype)
- {
- case C (SH64PCREL16_32, UNDEF_SH64PCREL):
- case C (SH64PCREL16PT_32, UNDEF_SH64PCREL):
- /* Used to be to somewhere which was unknown. */
- if (sym_relaxable)
- {
- int what = GET_WHAT (fragP->fr_subtype);
-
- /* In this segment, so head for shortest. */
- fragP->fr_subtype = C (what, SH64PCREL16);
- }
- else
- {
- int what = GET_WHAT (fragP->fr_subtype);
- /* We know the abs value, but we don't know where we will be
- linked, so we must make it the longest. Presumably we could
- switch to a non-pcrel representation, but having absolute
- values in PT operands should be rare enough not to be worth
- adding that code. */
- fragP->fr_subtype = C (what, SH64PCREL32);
- }
- fragP->fr_var = md_relax_table[fragP->fr_subtype].rlx_length;
- break;
-
- case C (SH64PCREL16_64, UNDEF_SH64PCREL):
- case C (SH64PCREL16PT_64, UNDEF_SH64PCREL):
- /* Used to be to somewhere which was unknown. */
- if (sym_relaxable)
- {
- int what = GET_WHAT (fragP->fr_subtype);
-
- /* In this segment, so head for shortest. */
- fragP->fr_subtype = C (what, SH64PCREL16);
- }
- else
- {
- int what = GET_WHAT (fragP->fr_subtype);
- /* We know the abs value, but we don't know where we will be
- linked, so we must make it the longest. Presumably we could
- switch to a non-pcrel representation, but having absolute
- values in PT operands should be rare enough not to be worth
- adding that code. */
- fragP->fr_subtype = C (what, SH64PCREL64);
- }
- fragP->fr_var = md_relax_table[fragP->fr_subtype].rlx_length;
- break;
-
- case C (MOVI_IMM_64, UNDEF_MOVI):
- case C (MOVI_IMM_32, UNDEF_MOVI):
- exp = NULL;
-
- /* Look inside the "symbol". If we find a PC-relative expression,
- change this to a PC-relative, relaxable expression. */
- if (fragP->fr_symbol != NULL
- && (exp = symbol_get_value_expression (fragP->fr_symbol)) != NULL
- && exp->X_op == O_subtract
- && exp->X_op_symbol != NULL
- && S_GET_SEGMENT (exp->X_op_symbol) == segment_type)
- {
- int what = GET_WHAT (fragP->fr_subtype);
- int what_high = what == MOVI_IMM_32 ? MOVI_32 : MOVI_64;
- expressionS *opexp
- = symbol_get_value_expression (exp->X_op_symbol);
- expressionS *addexp
- = symbol_get_value_expression (exp->X_add_symbol);
-
- /* Change the MOVI expression to the "X" in "X - Y" and subtract
- Y:s offset to this location from X. Note that we can only
- allow an Y which is offset from this frag. */
- if (opexp != NULL
- && addexp != NULL
- && opexp->X_op == O_constant
- && fragP == symbol_get_frag (exp->X_op_symbol))
- {
- /* At this point, before relaxing, the add-number of opexp
- is the offset from the fr_fix part. */
- fragP->fr_offset
- = (exp->X_add_number
- - (opexp->X_add_number - (fragP->fr_fix - 4)));
- fragP->fr_symbol = exp->X_add_symbol;
-
- what = what == MOVI_IMM_32
- ? MOVI_IMM_32_PCREL : MOVI_IMM_64_PCREL;
-
- /* Check the "X" symbol to estimate the size of this
- PC-relative expression. */
- if (S_GET_SEGMENT (exp->X_add_symbol) == segment_type
- && ! S_IS_EXTERNAL (exp->X_add_symbol)
- && ! S_IS_WEAK (exp->X_add_symbol))
- fragP->fr_subtype = C (what, MOVI_16);
- else
- fragP->fr_subtype = C (what, what_high);
-
- /* This is now a PC-relative expression, fit to be relaxed. */
- }
- else
- fragP->fr_subtype = C (what, what_high);
- }
- else if (fragP->fr_symbol == NULL
- || (S_GET_SEGMENT (fragP->fr_symbol) == absolute_section
- && exp->X_op == O_constant))
- {
- unsigned long insn
- = (target_big_endian
- ? bfd_getb32 (fragP->fr_opcode)
- : bfd_getl32 (fragP->fr_opcode));
- offsetT one = (offsetT) 1;
- offsetT value = fragP->fr_offset
- + (fragP->fr_symbol == NULL ? 0 : S_GET_VALUE (fragP->fr_symbol));
-
- if (value >= (-((offsetT) 1 << 15)) && value < ((offsetT) 1 << 15))
- {
- /* Fits in 16-bit signed number. */
- int what = GET_WHAT (fragP->fr_subtype);
- fragP->fr_subtype = C (what, MOVI_16);
-
- /* Just "or" in the value. */
- md_number_to_chars (fragP->fr_opcode,
- insn | ((value & ((1 << 16) - 1)) << 10),
- 4);
- }
- else if (value >= -(one << 31)
- && (value < (one << 31)
- || (sh64_abi == sh64_abi_32 && value < (one << 32))))
- {
- /* The value fits in a 32-bit signed number. */
- int reg = (insn >> 4) & 0x3f;
-
- /* Just "or" in the high bits of the value, making the first
- MOVI. */
- md_number_to_chars (fragP->fr_opcode,
- insn
- | (((value >> 16) & ((1 << 16) - 1)) << 10),
- 4);
-
- /* Add a SHORI with the low bits. Note that this insn lives
- in the variable fragment part. */
- md_number_to_chars (fragP->fr_literal + old_fr_fix,
- SHMEDIA_SHORI_OPC
- | (reg << 4)
- | ((value & ((1 << 16) - 1)) << 10),
- 4);
-
- /* We took a piece of the variable part. */
- fragP->fr_fix += 4;
- }
- else if (GET_WHAT (fragP->fr_subtype) == MOVI_IMM_32)
- {
- /* Value out of range. */
- as_bad_where (fragP->fr_file, fragP->fr_line,
- _("MOVI operand is not a 32-bit signed value: 0x%8x%08x"),
- ((unsigned int) (value >> 32)
- & (unsigned int) 0xffffffff),
- (unsigned int) value & (unsigned int) 0xffffffff);
-
- /* Must advance size, or we will get internal inconsistency
- and fall into an assert. */
- fragP->fr_fix += 4;
- }
- /* Now we know we are allowed to expand to 48- and 64-bit values. */
- else if (value >= -(one << 47) && value < (one << 47))
- {
- /* The value fits in a 48-bit signed number. */
- int reg = (insn >> 4) & 0x3f;
-
- /* Just "or" in the high bits of the value, making the first
- MOVI. */
- md_number_to_chars (fragP->fr_opcode,
- insn
- | (((value >> 32) & ((1 << 16) - 1)) << 10),
- 4);
-
- /* Add a SHORI with the middle bits. Note that this insn lives
- in the variable fragment part. */
- md_number_to_chars (fragP->fr_literal + old_fr_fix,
- SHMEDIA_SHORI_OPC
- | (reg << 4)
- | (((value >> 16) & ((1 << 16) - 1)) << 10),
- 4);
-
- /* Add a SHORI with the low bits. */
- md_number_to_chars (fragP->fr_literal + old_fr_fix + 4,
- SHMEDIA_SHORI_OPC
- | (reg << 4)
- | ((value & ((1 << 16) - 1)) << 10),
- 4);
-
- /* We took a piece of the variable part. */
- fragP->fr_fix += 8;
- }
- else
- {
- /* A 64-bit number. */
- int reg = (insn >> 4) & 0x3f;
-
- /* Just "or" in the high bits of the value, making the first
- MOVI. */
- md_number_to_chars (fragP->fr_opcode,
- insn
- | (((value >> 48) & ((1 << 16) - 1)) << 10),
- 4);
-
- /* Add a SHORI with the midhigh bits. Note that this insn lives
- in the variable fragment part. */
- md_number_to_chars (fragP->fr_literal + old_fr_fix,
- SHMEDIA_SHORI_OPC
- | (reg << 4)
- | (((value >> 32) & ((1 << 16) - 1)) << 10),
- 4);
-
- /* Add a SHORI with the midlow bits. */
- md_number_to_chars (fragP->fr_literal + old_fr_fix + 4,
- SHMEDIA_SHORI_OPC
- | (reg << 4)
- | (((value >> 16) & ((1 << 16) - 1)) << 10),
- 4);
-
- /* Add a SHORI with the low bits. */
- md_number_to_chars (fragP->fr_literal + old_fr_fix + 8,
- SHMEDIA_SHORI_OPC
- | (reg << 4)
- | ((value & ((1 << 16) - 1)) << 10), 4);
- /* We took all of the variable part. */
- fragP->fr_fix += 12;
- }
-
- /* MOVI expansions that get here have not been converted to
- PC-relative frags, but instead expanded by
- md_number_to_chars or by calling shmedia_md_convert_frag
- with final == FALSE. We must not have them around as
- frags anymore; symbols would be prematurely evaluated
- when relaxing. We will not need to have md_convert_frag
- called again with them; any further handling is through
- the already emitted fixups. */
- frag_wane (fragP);
- break;
- }
- fragP->fr_var = md_relax_table[fragP->fr_subtype].rlx_length;
- break;
-
- /* For relaxation states that remain unchanged, report the
- estimated length. */
- case C (SH64PCREL16_32, SH64PCREL16):
- case C (SH64PCREL16PT_32, SH64PCREL16):
- case C (SH64PCREL16_32, SH64PCREL32):
- case C (SH64PCREL16PT_32, SH64PCREL32):
- case C (SH64PCREL16_32, SH64PCRELPLT):
- case C (SH64PCREL16PT_32, SH64PCRELPLT):
- case C (SH64PCREL16_64, SH64PCREL16):
- case C (SH64PCREL16PT_64, SH64PCREL16):
- case C (SH64PCREL16_64, SH64PCREL32):
- case C (SH64PCREL16PT_64, SH64PCREL32):
- case C (SH64PCREL16_64, SH64PCREL48):
- case C (SH64PCREL16PT_64, SH64PCREL48):
- case C (SH64PCREL16_64, SH64PCREL64):
- case C (SH64PCREL16PT_64, SH64PCREL64):
- case C (SH64PCREL16_64, SH64PCRELPLT):
- case C (SH64PCREL16PT_64, SH64PCRELPLT):
- case C (MOVI_IMM_32, MOVI_16):
- case C (MOVI_IMM_32, MOVI_32):
- case C (MOVI_IMM_32, MOVI_GOTOFF):
- case C (MOVI_IMM_32_PCREL, MOVI_16):
- case C (MOVI_IMM_32_PCREL, MOVI_32):
- case C (MOVI_IMM_32_PCREL, MOVI_PLT):
- case C (MOVI_IMM_32_PCREL, MOVI_GOTPC):
- case C (MOVI_IMM_64, MOVI_16):
- case C (MOVI_IMM_64, MOVI_32):
- case C (MOVI_IMM_64, MOVI_48):
- case C (MOVI_IMM_64, MOVI_64):
- case C (MOVI_IMM_64, MOVI_GOTOFF):
- case C (MOVI_IMM_64_PCREL, MOVI_16):
- case C (MOVI_IMM_64_PCREL, MOVI_32):
- case C (MOVI_IMM_64_PCREL, MOVI_48):
- case C (MOVI_IMM_64_PCREL, MOVI_64):
- case C (MOVI_IMM_64_PCREL, MOVI_PLT):
- case C (MOVI_IMM_64_PCREL, MOVI_GOTPC):
- fragP->fr_var = md_relax_table[fragP->fr_subtype].rlx_length;
- break;
-
- default:
- abort ();
- }
-
- return fragP->fr_var + (fragP->fr_fix - old_fr_fix);
-}
-
-/* Parse an expression, SH64-style. Copied from tc-sh.c, but with
- datatypes adjusted. */
-
-static char *
-shmedia_parse_exp (char *s, shmedia_operand_info *op)
-{
- char *save;
- char *new_pointer;
-
- save = input_line_pointer;
- input_line_pointer = s;
- expression (&op->immediate);
- if (op->immediate.X_op == O_absent)
- as_bad (_("missing operand"));
- new_pointer = input_line_pointer;
- input_line_pointer = save;
- return new_pointer;
-}
-
-/* Parse an operand. Store pointer to next character in *PTR. */
-
-static void
-shmedia_get_operand (char **ptr, shmedia_operand_info *op,
- shmedia_arg_type argtype)
-{
- char *src = *ptr;
- shmedia_arg_type mode = (shmedia_arg_type) -1;
- unsigned int len;
-
- len = shmedia_parse_reg (src, &mode, &(op->reg), argtype);
- if (len)
- {
- *ptr = src + len;
- op->type = mode;
- }
- else
- {
- /* Not a reg, so it must be a displacement. */
- *ptr = shmedia_parse_exp (src, op);
- op->type = A_IMMM;
-
- /* This is just an initialization; shmedia_get_operands will change
- as needed. */
- op->reloctype = BFD_RELOC_NONE;
- }
-}
-
-/* Parse the operands for this insn; return NULL if invalid, else return
- how much text was consumed. */
-
-static char *
-shmedia_get_operands (shmedia_opcode_info *info, char *args,
- shmedia_operands_info *operands)
-{
- char *ptr = args;
- int i;
-
- if (*ptr == ' ')
- ptr++;
-
- for (i = 0; info->arg[i] != 0; i++)
- {
- memset (operands->operands + i, 0, sizeof (operands->operands[0]));
-
- /* No operand to get for these fields. */
- if (info->arg[i] == A_REUSE_PREV)
- continue;
-
- shmedia_get_operand (&ptr, &operands->operands[i], info->arg[i]);
-
- /* Check operands type match. */
- switch (info->arg[i])
- {
- case A_GREG_M:
- case A_GREG_N:
- case A_GREG_D:
- if (operands->operands[i].type != A_GREG_M)
- return NULL;
- break;
-
- case A_FREG_G:
- case A_FREG_H:
- case A_FREG_F:
- if (operands->operands[i].type != A_FREG_G)
- return NULL;
- break;
-
- case A_FVREG_G:
- case A_FVREG_H:
- case A_FVREG_F:
- if (operands->operands[i].type != A_FVREG_G)
- return NULL;
- break;
-
- case A_FMREG_G:
- case A_FMREG_H:
- case A_FMREG_F:
- if (operands->operands[i].type != A_FMREG_G)
- return NULL;
- break;
-
- case A_FPREG_G:
- case A_FPREG_H:
- case A_FPREG_F:
- if (operands->operands[i].type != A_FPREG_G)
- return NULL;
- break;
-
- case A_DREG_G:
- case A_DREG_H:
- case A_DREG_F:
- if (operands->operands[i].type != A_DREG_G)
- return NULL;
- break;
-
- case A_TREG_A:
- case A_TREG_B:
- if (operands->operands[i].type != A_TREG_B)
- return NULL;
- break;
-
- case A_CREG_J:
- case A_CREG_K:
- if (operands->operands[i].type != A_CREG_K)
- return NULL;
- break;
-
- case A_IMMS16:
- case A_IMMU16:
- /* Check for an expression that looks like S & 65535 or
- (S >> N) & 65535, where N = 0, 16, 32, 48.
-
- Get the S and put at operands->operands[i].immediate, and
- adjust operands->operands[i].reloctype. */
- {
- expressionS *imm_expr = &operands->operands[i].immediate;
- expressionS *right_expr;
-
- if (operands->operands[i].type == A_IMMM
- && imm_expr->X_op == O_bit_and
- && imm_expr->X_op_symbol != NULL
- && ((right_expr
- = symbol_get_value_expression (imm_expr->X_op_symbol))
- ->X_op == O_constant)
- && right_expr->X_add_number == 0xffff)
- {
- symbolS *inner = imm_expr->X_add_symbol;
- bfd_reloc_code_real_type reloctype = BFD_RELOC_SH_IMM_LOW16;
- expressionS *inner_expr
- = symbol_get_value_expression (inner);
-
- if (inner_expr->X_op == O_right_shift)
- {
- expressionS *inner_right;
-
- if (inner_expr->X_op_symbol != NULL
- && ((inner_right
- = symbol_get_value_expression (inner_expr
- ->X_op_symbol))
- ->X_op == O_constant))
- {
- offsetT addnum
- = inner_right->X_add_number;
-
- if (addnum == 0 || addnum == 16 || addnum == 32
- || addnum == 48)
- {
- reloctype
- = (addnum == 0
- ? BFD_RELOC_SH_IMM_LOW16
- : (addnum == 16
- ? BFD_RELOC_SH_IMM_MEDLOW16
- : (addnum == 32
- ? BFD_RELOC_SH_IMM_MEDHI16
- : BFD_RELOC_SH_IMM_HI16)));
-
- inner = inner_expr->X_add_symbol;
- inner_expr = symbol_get_value_expression (inner);
- }
- }
- }
-
- /* I'm not sure I understand the logic, but evidently the
- inner expression of a lone symbol is O_constant, with
- the actual symbol in expr_section. For a constant, the
- section would be absolute_section. For sym+offset,
- it's O_symbol as always. See expr.c:make_expr_symbol,
- first statements. */
-
- if (inner_expr->X_op == O_constant
- && S_GET_SEGMENT (inner) != absolute_section)
- {
- operands->operands[i].immediate.X_op = O_symbol;
- operands->operands[i].immediate.X_add_symbol = inner;
- operands->operands[i].immediate.X_add_number = 0;
- }
- else
- operands->operands[i].immediate
- = *symbol_get_value_expression (inner);
-
- operands->operands[i].reloctype = reloctype;
- }
- }
- /* Fall through. */
- case A_IMMS6:
- case A_IMMS6BY32:
- case A_IMMS10:
- case A_IMMS10BY1:
- case A_IMMS10BY2:
- case A_IMMS10BY4:
- case A_IMMS10BY8:
- case A_PCIMMS16BY4:
- case A_PCIMMS16BY4_PT:
- case A_IMMU5:
- case A_IMMU6:
- if (operands->operands[i].type != A_IMMM)
- return NULL;
-
- if (sh_check_fixup (&operands->operands[i].immediate,
- &operands->operands[i].reloctype))
- {
- as_bad (_("invalid PIC reference"));
- return NULL;
- }
-
- break;
-
- default:
- BAD_CASE (info->arg[i]);
- }
-
- if (*ptr == ',' && info->arg[i + 1])
- ptr++;
- }
- return ptr;
-}
-
-
-/* Find an opcode at the start of *STR_P in the hash table, and set
- *STR_P to the first character after the last one read. */
-
-static shmedia_opcode_info *
-shmedia_find_cooked_opcode (char **str_p)
-{
- char *str = *str_p;
- char *op_start;
- char *op_end;
- char name[20];
- unsigned int nlen = 0;
-
- /* Drop leading whitespace. */
- while (*str == ' ')
- str++;
-
- /* Find the op code end. */
- for (op_start = op_end = str;
- *op_end
- && nlen < sizeof (name) - 1
- && ! is_end_of_line[(unsigned char) *op_end]
- && ! ISSPACE ((unsigned char) *op_end);
- op_end++)
- {
- unsigned char c = op_start[nlen];
-
- /* The machine independent code will convert CMP/EQ into cmp/EQ
- because it thinks the '/' is the end of the symbol. Moreover,
- all but the first sub-insn is a parallel processing insn won't
- be capitalized. Instead of hacking up the machine independent
- code, we just deal with it here. */
- c = TOLOWER (c);
- name[nlen] = c;
- nlen++;
- }
-
- name[nlen] = 0;
- *str_p = op_end;
-
- if (nlen == 0)
- as_bad (_("can't find opcode"));
-
- return
- (shmedia_opcode_info *) hash_find (shmedia_opcode_hash_control, name);
-}
-
-/* Build up an instruction, including allocating the frag. */
-
-static int
-shmedia_build_Mytes (shmedia_opcode_info *opcode,
- shmedia_operands_info *operands)
-{
- unsigned long insn = opcode->opcode_base;
- int i, j;
- char *insn_loc = frag_more (4);
-
- /* The parameter to dwarf2_emit_insn is actually the offset to the start
- of the insn from the fix piece of instruction that was emitted.
- Since we want .debug_line addresses to record (address | 1) for
- SHmedia insns, we get the wanted effect by taking one off the size,
- knowing it's a multiple of 4. We count from the first fix piece of
- the insn. There must be no frags changes (frag_more or frag_var)
- calls in-between the frag_more call we account for, and this
- dwarf2_emit_insn call. */
- dwarf2_emit_insn (3);
-
- /* This is stored into any frag_var operand. */
- sh64_last_insn_frag = frag_now;
-
- /* Loop over opcode info, emit an instruction. */
- for (i = 0, j = 0; opcode->arg[i]; i++)
- {
- shmedia_arg_type argtype = opcode->arg[i];
- shmedia_operand_info *opjp = &operands->operands[j];
- switch (argtype)
- {
- case A_TREG_A:
- case A_TREG_B:
- case A_GREG_M:
- case A_GREG_N:
- case A_GREG_D:
- case A_FREG_G:
- case A_FREG_H:
- case A_FREG_F:
- case A_FVREG_G:
- case A_FVREG_H:
- case A_FVREG_F:
- case A_FMREG_G:
- case A_FMREG_H:
- case A_FMREG_F:
- case A_FPREG_G:
- case A_FPREG_H:
- case A_FPREG_F:
- case A_DREG_G:
- case A_DREG_H:
- case A_DREG_F:
- case A_CREG_J:
- case A_CREG_K:
- /* Six-bit register fields. They just get filled with the
- parsed register number. */
- insn |= (opjp->reg << opcode->nibbles[i]);
- j++;
- break;
-
- case A_REUSE_PREV:
- /* Copy the register for the previous operand to this position. */
- insn |= (operands->operands[j - 1].reg << opcode->nibbles[i]);
- j++;
- break;
-
- case A_IMMS6:
- insn |= shmedia_immediate_op (insn_loc, opjp, 0,
- BFD_RELOC_SH_IMMS6);
- j++;
- break;
-
- case A_IMMS6BY32:
- insn |= shmedia_immediate_op (insn_loc, opjp, 0,
- BFD_RELOC_SH_IMMS6BY32);
- j++;
- break;
-
- case A_IMMS10BY1:
- case A_IMMS10:
- insn |= shmedia_immediate_op (insn_loc, opjp, 0,
- BFD_RELOC_SH_IMMS10);
- j++;
- break;
-
- case A_IMMS10BY2:
- insn |= shmedia_immediate_op (insn_loc, opjp, 0,
- BFD_RELOC_SH_IMMS10BY2);
- j++;
- break;
-
- case A_IMMS10BY4:
- if (opjp->reloctype == BFD_RELOC_NONE)
- insn |= shmedia_immediate_op (insn_loc, opjp, 0,
- BFD_RELOC_SH_IMMS10BY4);
- else if (opjp->reloctype == BFD_RELOC_SH_GOTPLT32)
- insn |= shmedia_immediate_op (insn_loc, opjp, 0,
- BFD_RELOC_SH_GOTPLT10BY4);
- else if (opjp->reloctype == BFD_RELOC_32_GOT_PCREL)
- insn |= shmedia_immediate_op (insn_loc, opjp, 0,
- BFD_RELOC_SH_GOT10BY4);
- else
- as_bad (_("invalid PIC reference"));
- j++;
- break;
-
- case A_IMMS10BY8:
- if (opjp->reloctype == BFD_RELOC_NONE)
- insn |= shmedia_immediate_op (insn_loc, opjp, 0,
- BFD_RELOC_SH_IMMS10BY8);
- else if (opjp->reloctype == BFD_RELOC_SH_GOTPLT32)
- insn |= shmedia_immediate_op (insn_loc, opjp, 0,
- BFD_RELOC_SH_GOTPLT10BY8);
- else if (opjp->reloctype == BFD_RELOC_32_GOT_PCREL)
- insn |= shmedia_immediate_op (insn_loc, opjp, 0,
- BFD_RELOC_SH_GOT10BY8);
- else
- as_bad (_("invalid PIC reference"));
- j++;
- break;
-
- case A_IMMS16:
- /* Sneak a peek if this is the MOVI insn. If so, check if we
- should expand it. */
- if (opjp->reloctype == BFD_RELOC_32_GOT_PCREL)
- opjp->reloctype = BFD_RELOC_SH_GOT_LOW16;
- else if (opjp->reloctype == BFD_RELOC_SH_GOTPLT32)
- opjp->reloctype = BFD_RELOC_SH_GOTPLT_LOW16;
-
- if ((opjp->reloctype == BFD_RELOC_NONE
- || opjp->reloctype == BFD_RELOC_32_GOTOFF
- || opjp->reloctype == BFD_RELOC_32_PLT_PCREL
- || opjp->reloctype == BFD_RELOC_SH_GOTPC)
- && opcode->opcode_base == SHMEDIA_MOVI_OPC
- && (opjp->immediate.X_op != O_constant
- || opjp->immediate.X_add_number < -32768
- || opjp->immediate.X_add_number > 32767)
- && (sh64_expand
- || opjp->reloctype == BFD_RELOC_32_GOTOFF
- || opjp->reloctype == BFD_RELOC_32_PLT_PCREL
- || opjp->reloctype == BFD_RELOC_SH_GOTPC))
- {
- int what = sh64_abi == sh64_abi_64 ? MOVI_IMM_64 : MOVI_IMM_32;
- offsetT max = sh64_abi == sh64_abi_64 ? MOVI_64 : MOVI_32;
- offsetT min = MOVI_16;
- offsetT init = UNDEF_MOVI;
- valueT addvalue
- = opjp->immediate.X_op_symbol != NULL
- ? 0 : opjp->immediate.X_add_number;
- symbolS *sym
- = opjp->immediate.X_op_symbol != NULL
- ? make_expr_symbol (&opjp->immediate)
- : opjp->immediate.X_add_symbol;
-
- if (opjp->reloctype == BFD_RELOC_32_GOTOFF)
- init = max = min = MOVI_GOTOFF;
- else if (opjp->reloctype == BFD_RELOC_32_PLT_PCREL)
- {
- init = max = min = MOVI_PLT;
- what = (sh64_abi == sh64_abi_64
- ? MOVI_IMM_64_PCREL
- : MOVI_IMM_32_PCREL);
- }
- else if (opjp->reloctype == BFD_RELOC_SH_GOTPC)
- {
- init = max = min = MOVI_GOTPC;
- what = (sh64_abi == sh64_abi_64
- ? MOVI_IMM_64_PCREL
- : MOVI_IMM_32_PCREL);
- }
-
- frag_var (rs_machine_dependent,
- md_relax_table[C (what, max)].rlx_length,
- md_relax_table[C (what, min)].rlx_length,
- C (what, init), sym, addvalue, insn_loc);
- }
- else
- insn |= shmedia_immediate_op (insn_loc, opjp, 0,
- (opjp->reloctype
- == BFD_RELOC_NONE)
- ? BFD_RELOC_SH_IMMS16
- : opjp->reloctype);
- j++;
- break;
-
- case A_PCIMMS16BY4:
- {
- int what
- = ((sh64_abi == sh64_abi_64 && ! sh64_pt32)
- ? SH64PCREL16_64 : SH64PCREL16_32);
- offsetT max
- = ((sh64_abi == sh64_abi_64 && ! sh64_pt32)
- ? SH64PCREL64 : SH64PCREL32);
- offsetT min = SH64PCREL16;
- offsetT init = UNDEF_SH64PCREL;
-
- /* Don't allow complex expressions here. */
- if (opjp->immediate.X_op_symbol != NULL)
- {
- as_bad (_("invalid operand: expression in PT target"));
- return 0;
- }
-
- if (opjp->reloctype == BFD_RELOC_32_PLT_PCREL)
- init = max = min = SH64PCRELPLT;
-
- /* If we're not expanding, then just emit a fixup. */
- if (sh64_expand || opjp->reloctype != BFD_RELOC_NONE)
- frag_var (rs_machine_dependent,
- md_relax_table[C (what, max)].rlx_length,
- md_relax_table[C (what, min)].rlx_length,
- C (what, init),
- opjp->immediate.X_add_symbol,
- opjp->immediate.X_add_number,
- insn_loc);
- else
- insn |= shmedia_immediate_op (insn_loc, opjp, 1,
- opjp->reloctype == BFD_RELOC_NONE
- ? BFD_RELOC_SH_PT_16
- : opjp->reloctype);
-
- j++;
- break;
- }
-
- case A_PCIMMS16BY4_PT:
- {
- int what
- = ((sh64_abi == sh64_abi_64 && ! sh64_pt32)
- ? SH64PCREL16PT_64 : SH64PCREL16PT_32);
- offsetT max
- = ((sh64_abi == sh64_abi_64 && ! sh64_pt32)
- ? SH64PCREL64 : SH64PCREL32);
- offsetT min = SH64PCREL16;
- offsetT init = UNDEF_SH64PCREL;
-
- /* Don't allow complex expressions here. */
- if (opjp->immediate.X_op_symbol != NULL)
- {
- as_bad (_("invalid operand: expression in PT target"));
- return 0;
- }
-
- if (opjp->reloctype == BFD_RELOC_32_PLT_PCREL)
- init = max = min = SH64PCRELPLT;
-
- /* If we're not expanding, then just emit a fixup. */
- if (sh64_expand || opjp->reloctype != BFD_RELOC_NONE)
- frag_var (rs_machine_dependent,
- md_relax_table[C (what, max)].rlx_length,
- md_relax_table[C (what, min)].rlx_length,
- C (what, init),
- opjp->immediate.X_add_symbol,
- opjp->immediate.X_add_number,
- insn_loc);
- else
- /* This reloc-type is just temporary, so we can distinguish
- PTA from PT. It is changed in shmedia_md_apply_fix to
- BFD_RELOC_SH_PT_16. */
- insn |= shmedia_immediate_op (insn_loc, opjp, 1,
- opjp->reloctype == BFD_RELOC_NONE
- ? SHMEDIA_BFD_RELOC_PT
- : opjp->reloctype);
-
- j++;
- break;
- }
-
- case A_IMMU5:
- insn |= shmedia_immediate_op (insn_loc, opjp, 0,
- BFD_RELOC_SH_IMMU5);
- j++;
- break;
-
- case A_IMMU6:
- insn |= shmedia_immediate_op (insn_loc, opjp, 0,
- BFD_RELOC_SH_IMMU6);
- j++;
- break;
-
- case A_IMMU16:
- insn |= shmedia_immediate_op (insn_loc, opjp, 0,
- (opjp->reloctype
- == BFD_RELOC_NONE)
- ? BFD_RELOC_SH_IMMU16
- : opjp->reloctype);
- j++;
- break;
-
- default:
- BAD_CASE (argtype);
- }
- }
-
- md_number_to_chars (insn_loc, insn, 4);
- return 4;
-}
-
-/* Assemble a SHmedia instruction. */
-
-static void
-shmedia_md_assemble (char *str)
-{
- char *op_end;
- shmedia_opcode_info *opcode;
- shmedia_operands_info operands;
- int size;
-
- opcode = shmedia_find_cooked_opcode (&str);
- op_end = str;
-
- if (opcode == NULL)
- {
- as_bad (_("unknown opcode"));
- return;
- }
-
- /* Start a SHmedia code region, if there has been pseudoinsns or similar
- seen since the last one. */
- if (!seen_insn)
- {
- sh64_update_contents_mark (TRUE);
- sh64_set_contents_type (CRT_SH5_ISA32);
- seen_insn = TRUE;
- }
-
- op_end = shmedia_get_operands (opcode, op_end, &operands);
-
- if (op_end == NULL)
- {
- as_bad (_("invalid operands to %s"), opcode->name);
- return;
- }
-
- if (*op_end)
- {
- as_bad (_("excess operands to %s"), opcode->name);
- return;
- }
-
- size = shmedia_build_Mytes (opcode, &operands);
- if (size == 0)
- return;
-}
-
-/* Hook called from md_begin in tc-sh.c. */
-
-void
-shmedia_md_begin (void)
-{
- const shmedia_opcode_info *shmedia_opcode;
- shmedia_opcode_hash_control = hash_new ();
-
- /* Create opcode table for SHmedia mnemonics. */
- for (shmedia_opcode = shmedia_table;
- shmedia_opcode->name;
- shmedia_opcode++)
- hash_insert (shmedia_opcode_hash_control, shmedia_opcode->name,
- (char *) shmedia_opcode);
-}
-
-/* Switch instruction set. Only valid if one of the --isa or --abi
- options was specified. */
-
-static void
-s_sh64_mode (int ignore ATTRIBUTE_UNUSED)
-{
- char *name = input_line_pointer, ch;
-
- /* Make sure data up to this location is handled according to the
- previous ISA. */
- sh64_update_contents_mark (TRUE);
-
- while (!is_end_of_line[(unsigned char) *input_line_pointer])
- input_line_pointer++;
- ch = *input_line_pointer;
- *input_line_pointer = '\0';
-
- /* If the mode was not set before, explicitly or implicitly, then we're
- not emitting SH64 code, so this pseudo is invalid. */
- if (sh64_isa_mode == sh64_isa_unspecified)
- as_bad (_("The `.mode %s' directive is not valid with this architecture"),
- name);
-
- if (strcasecmp (name, "shcompact") == 0)
- sh64_isa_mode = sh64_isa_shcompact;
- else if (strcasecmp (name, "shmedia") == 0)
- sh64_isa_mode = sh64_isa_shmedia;
- else
- as_bad (_("Invalid argument to .mode: %s"), name);
-
- /* Make a new frag, marking it with the supposedly-changed ISA. */
- frag_wane (frag_now);
- frag_new (0);
-
- /* Contents type up to this new point is the same as before; don't add a
- data region just because the new frag we created. */
- sh64_update_contents_mark (FALSE);
-
- *input_line_pointer = ch;
- demand_empty_rest_of_line ();
-}
-
-/* Check that the right ABI is used. Only valid if one of the --isa or
- --abi options was specified. */
-
-static void
-s_sh64_abi (int ignore ATTRIBUTE_UNUSED)
-{
- char *name = input_line_pointer, ch;
-
- while (!is_end_of_line[(unsigned char) *input_line_pointer])
- input_line_pointer++;
- ch = *input_line_pointer;
- *input_line_pointer = '\0';
-
- /* If the mode was not set before, explicitly or implicitly, then we're
- not emitting SH64 code, so this pseudo is invalid. */
- if (sh64_abi == sh64_abi_unspecified)
- as_bad (_("The `.abi %s' directive is not valid with this architecture"),
- name);
-
- if (strcmp (name, "64") == 0)
- {
- if (sh64_abi != sh64_abi_64)
- as_bad (_("`.abi 64' but command-line options do not specify 64-bit ABI"));
- }
- else if (strcmp (name, "32") == 0)
- {
- if (sh64_abi != sh64_abi_32)
- as_bad (_("`.abi 32' but command-line options do not specify 32-bit ABI"));
- }
- else
- as_bad (_("Invalid argument to .abi: %s"), name);
-
- *input_line_pointer = ch;
- demand_empty_rest_of_line ();
-}
-
-/* This function is the first target-specific function called after
- parsing command-line options. Therefore we set default values from
- command-line options here and do some sanity checking we couldn't do
- when options were being parsed. */
-
-const char *
-sh64_target_format (void)
-{
-#ifdef TE_NetBSD
- /* For NetBSD, if the ISA is unspecified, always use SHmedia. */
- if (preset_target_arch == 0 && sh64_isa_mode == sh64_isa_unspecified)
- sh64_isa_mode = sh64_isa_shmedia;
-
- /* If the ABI is unspecified, select a default: based on how
- we were configured: sh64 == sh64_abi_64, else sh64_abi_32. */
- if (sh64_abi == sh64_abi_unspecified)
- {
- if (preset_target_arch != 0 || sh64_isa_mode == sh64_isa_shcompact)
- sh64_abi = sh64_abi_32;
- else if (strncmp (TARGET_CPU, "sh64", 4) == 0)
- sh64_abi = sh64_abi_64;
- else
- sh64_abi = sh64_abi_32;
- }
-#endif
-
-#ifdef TE_LINUX
- if (preset_target_arch == 0 && sh64_isa_mode == sh64_isa_unspecified)
- sh64_isa_mode = sh64_isa_shmedia;
-
- if (sh64_abi == sh64_abi_unspecified)
- sh64_abi = sh64_abi_32;
-#endif
-
- if (sh64_abi == sh64_abi_64 && sh64_isa_mode == sh64_isa_unspecified)
- sh64_isa_mode = sh64_isa_shmedia;
-
- if (sh64_abi == sh64_abi_32 && sh64_isa_mode == sh64_isa_unspecified)
- sh64_isa_mode = sh64_isa_shcompact;
-
- if (sh64_isa_mode == sh64_isa_shcompact
- && sh64_abi == sh64_abi_unspecified)
- sh64_abi = sh64_abi_32;
-
- if (sh64_isa_mode == sh64_isa_shmedia
- && sh64_abi == sh64_abi_unspecified)
- sh64_abi = sh64_abi_64;
-
- if (sh64_isa_mode == sh64_isa_unspecified && ! sh64_mix)
- as_bad (_("-no-mix is invalid without specifying SHcompact or SHmedia"));
-
- if ((sh64_isa_mode == sh64_isa_unspecified
- || sh64_isa_mode == sh64_isa_shmedia)
- && sh64_shcompact_const_crange)
- as_bad (_("-shcompact-const-crange is invalid without SHcompact"));
-
- if (sh64_pt32 && sh64_abi != sh64_abi_64)
- as_bad (_("-expand-pt32 only valid with -abi=64"));
-
- if (! sh64_expand && sh64_isa_mode == sh64_isa_unspecified)
- as_bad (_("-no-expand only valid with SHcompact or SHmedia"));
-
- if (sh64_pt32 && ! sh64_expand)
- as_bad (_("-expand-pt32 invalid together with -no-expand"));
-
-#ifdef TE_NetBSD
- if (sh64_abi == sh64_abi_64)
- return (target_big_endian ? "elf64-sh64-nbsd" : "elf64-sh64l-nbsd");
- else
- return (target_big_endian ? "elf32-sh64-nbsd" : "elf32-sh64l-nbsd");
-#elif defined (TE_LINUX)
- if (sh64_abi == sh64_abi_64)
- return (target_big_endian ? "elf64-sh64big-linux" : "elf64-sh64-linux");
- else
- return (target_big_endian ? "elf32-sh64big-linux" : "elf32-sh64-linux");
-#else
- /* When the ISA is not one of SHmedia or SHcompact, use the old SH
- object format. */
- if (sh64_isa_mode == sh64_isa_unspecified)
- return (target_big_endian ? "elf32-sh" : "elf32-shl");
- else if (sh64_abi == sh64_abi_64)
- return (target_big_endian ? "elf64-sh64" : "elf64-sh64l");
- else
- return (target_big_endian ? "elf32-sh64" : "elf32-sh64l");
-#endif
-}
-
-/* The worker function of TARGET_MACH. */
-
-int
-sh64_target_mach (void)
-{
- /* We need to explicitly set bfd_mach_sh5 instead of the default 0. But
- we only do this for the 64-bit ABI: if we do it for the 32-bit ABI,
- the SH5 info in the bfd_arch_info structure will be selected.
- However correct, as the machine has 64-bit addresses, functions
- expected to emit 32-bit data for addresses will start failing. For
- example, the dwarf2dbg.c functions will emit 64-bit debugging format,
- and we don't want that in the 32-bit ABI.
-
- We could have two bfd_arch_info structures for SH64; one for the
- 32-bit ABI and one for the rest (64-bit ABI). But that would be a
- bigger kludge: it's a flaw in the BFD design, and we need to just
- work around it by having the default machine set here in the
- assembler. For everything else but the assembler, the various bfd
- functions will set the machine type right to bfd_mach_sh5 from object
- file header flags regardless of the 0 here. */
-
- return (sh64_abi == sh64_abi_64) ? bfd_mach_sh5 : 0;
-}
-
-/* This is MD_PCREL_FROM_SECTION, we define so it is called instead of
- md_pcrel_from (in tc-sh.c). */
-
-valueT
-shmedia_md_pcrel_from_section (struct fix *fixP, segT sec ATTRIBUTE_UNUSED)
-{
- /* Use the ISA for the instruction to decide which offset to use. We
- can glean it from the fixup type. */
- switch (fixP->fx_r_type)
- {
- case BFD_RELOC_SH_IMM_LOW16:
- case BFD_RELOC_SH_IMM_MEDLOW16:
- case BFD_RELOC_SH_IMM_MEDHI16:
- case BFD_RELOC_SH_IMM_HI16:
- case BFD_RELOC_SH_IMM_LOW16_PCREL:
- case BFD_RELOC_SH_IMM_MEDLOW16_PCREL:
- case BFD_RELOC_SH_IMM_MEDHI16_PCREL:
- case BFD_RELOC_SH_IMM_HI16_PCREL:
- case BFD_RELOC_SH_IMMU5:
- case BFD_RELOC_SH_IMMU6:
- case BFD_RELOC_SH_IMMS6:
- case BFD_RELOC_SH_IMMS10:
- case BFD_RELOC_SH_IMMS10BY2:
- case BFD_RELOC_SH_IMMS10BY4:
- case BFD_RELOC_SH_IMMS10BY8:
- case BFD_RELOC_SH_IMMS16:
- case BFD_RELOC_SH_IMMU16:
- case BFD_RELOC_SH_PT_16:
- case SHMEDIA_BFD_RELOC_PT:
- /* PC-relative relocs are relative to the address of the last generated
- instruction, i.e. fx_size - 4. */
- return SHMEDIA_MD_PCREL_FROM_FIX (fixP);
-
- case BFD_RELOC_64:
- case BFD_RELOC_64_PCREL:
- /* Fall through. */
-
- default:
- /* If section was SHcompact, use its function. */
- return (valueT) md_pcrel_from_section (fixP, sec);
- }
-
- know (0 /* Shouldn't get here. */);
- return 0;
-}
-
-/* Create one .cranges descriptor from two symbols, STARTSYM marking begin
- and ENDSYM marking end, and CR_TYPE specifying the type. */
-
-static void
-sh64_emit_crange (symbolS *startsym, symbolS *endsym,
- enum sh64_elf_cr_type cr_type)
-{
- expressionS exp;
- segT current_seg = now_seg;
- subsegT current_subseg = now_subseg;
-
- asection *cranges
- = bfd_make_section_old_way (stdoutput,
- SH64_CRANGES_SECTION_NAME);
-
- /* Temporarily change to the .cranges section. */
- subseg_set (cranges, 0);
-
- /* Emit the cr_addr part. */
- exp.X_op = O_symbol;
- exp.X_add_number = 0;
- exp.X_op_symbol = NULL;
- exp.X_add_symbol = startsym;
- emit_expr (&exp, 4);
-
- /* Emit the cr_size part. */
- exp.X_op = O_subtract;
- exp.X_add_number = 0;
- exp.X_add_symbol = endsym;
- exp.X_op_symbol = startsym;
- emit_expr (&exp, 4);
-
- /* Emit the cr_size part. */
- exp.X_op = O_constant;
- exp.X_add_number = cr_type;
- exp.X_add_symbol = NULL;
- exp.X_op_symbol = NULL;
- emit_expr (&exp, 2);
-
- /* Now back to our regular program. */
- subseg_set (current_seg, current_subseg);
-}
-
-/* Called when the assembler is about to emit contents of some type into
- SEG, so it is *known* that the type of that new contents is in
- NEW_CONTENTS_TYPE. If just switching back and forth between different
- contents types (for example, with consecutive .mode pseudos), then this
- function isn't called. */
-
-static void
-sh64_set_contents_type (enum sh64_elf_cr_type new_contents_type)
-{
- segment_info_type *seginfo;
-
- /* We will not be called when emitting .cranges output, since callers
- stop that. Validize that assumption. */
- know (!emitting_crange);
-
- seginfo = seg_info (now_seg);
-
- if (seginfo)
- {
- symbolS *symp = seginfo->tc_segment_info_data.last_contents_mark;
-
- enum sh64_elf_cr_type contents_type
- = seginfo->tc_segment_info_data.contents_type;
-
- /* If it was just SHcompact switching between code and constant
- pool, don't change contents type. Just make sure we don't set
- the contents type to data, as that would join with a data-region
- in SHmedia mode. */
- if (sh64_isa_mode == sh64_isa_shcompact
- && ! sh64_shcompact_const_crange)
- new_contents_type = CRT_SH5_ISA16;
-
- /* If nothing changed, stop here. */
- if (contents_type == new_contents_type)
- return;
-
- /* If we're in 64-bit ABI mode, we do not emit .cranges, as it is
- only specified for 32-bit addresses. It could presumably be
- extended, but in 64-bit ABI mode we don't have SHcompact code, so
- we would only use it to mark code and data. */
- if (sh64_abi == sh64_abi_64)
- {
- /* Make the code type "sticky". We don't want to set the
- sections contents type to data if there's any code in it as
- we don't have .cranges in 64-bit mode to notice the
- difference. */
- seginfo->tc_segment_info_data.contents_type
- = (new_contents_type == CRT_SH5_ISA32
- || contents_type == CRT_SH5_ISA32)
- ? CRT_SH5_ISA32 : new_contents_type;
- return;
- }
-
- /* If none was marked, create a start symbol for this range and
- perhaps as a closing symbol for the old one. */
- if (symp == NULL)
- symp = symbol_new (FAKE_LABEL_NAME, now_seg, (valueT) frag_now_fix (),
- frag_now);
-
- /* We will use this symbol, so don't leave a pointer behind. */
- seginfo->tc_segment_info_data.last_contents_mark = NULL;
-
- /* We'll be making only datalabel references to it, if we emit a
- .cranges descriptor, so remove any code flag. */
- S_SET_OTHER (symp, S_GET_OTHER (symp) & ~STO_SH5_ISA32);
-
- /* If we have already marked the start of a range, we need to close
- and emit it before marking a new one, so emit a new .cranges
- descriptor into the .cranges section. */
- if (seginfo->tc_segment_info_data.mode_start_symbol)
- {
- /* If we're not supposed to emit mixed-mode sections, make it an
- error, but continue processing. */
- if (! sh64_mix
- && (new_contents_type == CRT_SH5_ISA32
- || contents_type == CRT_SH5_ISA32))
- as_bad (
-_("SHmedia code not allowed in same section as constants and SHcompact code"));
-
- emitting_crange = TRUE;
- sh64_emit_crange (seginfo->tc_segment_info_data.mode_start_symbol,
- symp, contents_type);
- emitting_crange = FALSE;
- seginfo->tc_segment_info_data.emitted_ranges++;
- }
-
- seginfo->tc_segment_info_data.mode_start_symbol = symp;
- seginfo->tc_segment_info_data.mode_start_subseg = now_subseg;
- seginfo->tc_segment_info_data.contents_type = new_contents_type;
-
- /* Always reset this, so the SHcompact code will emit a reloc when
- it prepares to relax. */
- seginfo->tc_segment_info_data.in_code = 0;
- }
- else
- as_bad (_("No segment info for current section"));
-}
-
-/* Hook when defining symbols and labels. We set the ST_OTHER field if
- the symbol is "shmedia" (with "bitor 1" automatically applied). Simple
- semantics for a label being "shmedia" : It was defined when .mode
- SHmedia was in effect, and it was defined in a code section. It
- doesn't matter whether or not an assembled opcode is nearby. */
-
-void
-sh64_frob_label (symbolS *symp)
-{
- segT seg = S_GET_SEGMENT (symp);
- static const symbolS *null = NULL;
-
- /* Reset the tc marker for all newly created symbols. */
- symbol_set_tc (symp, (symbolS **) &null);
-
- if (seg != NULL && sh64_isa_mode == sh64_isa_shmedia && subseg_text_p (seg))
- S_SET_OTHER (symp, S_GET_OTHER (symp) | STO_SH5_ISA32);
-}
-
-/* Handle the "datalabel" qualifier. We need to call "operand", but it's
- static, so a function pointer is passed here instead. FIXME: A target
- hook for qualifiers is needed; we currently use the md_parse_name
- symbol hook. */
-
-int
-sh64_consume_datalabel (const char *name, expressionS *exp,
- enum expr_mode mode, char *cp,
- segT (*operandf) (expressionS *, enum expr_mode))
-{
- static int parsing_datalabel = 0;
-
- if (strcasecmp (name, "datalabel") == 0)
- {
- int save_parsing_datalabel = parsing_datalabel;
-
- if (parsing_datalabel)
- as_bad (_("duplicate datalabel operator ignored"));
-
- *input_line_pointer = *cp;
- parsing_datalabel = 1;
- (*operandf) (exp, expr_normal);
- parsing_datalabel = save_parsing_datalabel;
-
- if (exp->X_op == O_symbol || exp->X_op == O_PIC_reloc)
- {
- symbolS *symp = exp->X_add_symbol;
- segT symseg = S_GET_SEGMENT (symp);
-
- /* If the symbol is defined to something that is already a
- datalabel, we don't need to bother with any special handling. */
- if (symseg != undefined_section
- && S_GET_OTHER (symp) != STO_SH5_ISA32)
- /* Do nothing. */
- ;
- else
- {
- symbolS *dl_symp;
- const char * sname = S_GET_NAME (symp);
- char *dl_name = concat (sname, DATALABEL_SUFFIX, (char *) NULL);
-
- /* Now we copy the datalabel-qualified symbol into a symbol
- with the same name, but with " DL" appended. We mark the
- symbol using the TC_SYMFIELD_TYPE field with a pointer to
- the main symbol, so we don't have to inspect all symbol
- names. Note that use of "datalabel" is not expected to
- be a common case. */
-
- /* A FAKE_LABEL_NAME marks "$" or ".". There can be any
- number of them and all have the same (faked) name; we
- must make a new one each time. */
- if (strcmp (sname, FAKE_LABEL_NAME) == 0)
- dl_symp = symbol_make (dl_name);
- else
- dl_symp = symbol_find_or_make (dl_name);
-
- free (dl_name);
- symbol_set_value_expression (dl_symp,
- symbol_get_value_expression (symp));
- S_SET_SEGMENT (dl_symp, symseg);
- symbol_set_frag (dl_symp, symbol_get_frag (symp));
- symbol_set_tc (dl_symp, &symp);
- copy_symbol_attributes (dl_symp, symp);
- exp->X_add_symbol = dl_symp;
-
- /* Unset the BranchTarget mark that can be set at symbol
- creation or attributes copying. */
- S_SET_OTHER (dl_symp, S_GET_OTHER (dl_symp) & ~STO_SH5_ISA32);
-
- /* The GLOBAL and WEAK attributes are not copied over by
- copy_symbol_attributes. Do it here. */
- if (S_IS_WEAK (symp))
- S_SET_WEAK (dl_symp);
- else if (S_IS_EXTERNAL (symp))
- S_SET_EXTERNAL (dl_symp);
- }
- }
- /* Complain about other types of operands than symbol, unless they
- have already been complained about. A constant is always a
- datalabel. Removing the low bit would therefore be wrong.
- Complaining about it would also be wrong. */
- else if (exp->X_op != O_illegal
- && exp->X_op != O_absent
- && exp->X_op != O_constant)
- as_bad (_("Invalid DataLabel expression"));
-
- *cp = *input_line_pointer;
-
- return 1;
- }
-
- return sh_parse_name (name, exp, mode, cp);
-}
-
-/* This function is called just before symbols are being output. It
- returns zero when a symbol must be output, non-zero otherwise.
- Datalabel references that were fully resolved to local symbols are not
- necessary to output. We also do not want to output undefined symbols
- that are not used in relocs. For symbols that are used in a reloc, it
- does not matter what we set here. If it is *not* used in a reloc, then
- it was probably the datalabel counterpart that was used in a reloc;
- then we need not output the main symbol. */
-
-int
-sh64_exclude_symbol (symbolS *symp)
-{
- symbolS *main_symbol = *symbol_get_tc (symp);
-
- return main_symbol != NULL || ! S_IS_DEFINED (symp);
-}
-
-/* If we haven't seen an insn since the last update, and location
- indicators have moved (a new frag, new location within frag) we have
- emitted data, so change contents type to data. Forget that we have
- seen a sequence of insns and store the current location so we can mark
- a new region if needed. */
-
-static void
-sh64_update_contents_mark (bfd_boolean update_type)
-{
- segment_info_type *seginfo;
- seginfo = seg_info (now_seg);
-
- if (seginfo != NULL)
- {
- symbolS *symp = seginfo->tc_segment_info_data.last_contents_mark;
-
- if (symp == NULL)
- {
- symp = symbol_new (FAKE_LABEL_NAME, now_seg,
- (valueT) frag_now_fix (), frag_now);
- seginfo->tc_segment_info_data.last_contents_mark = symp;
- }
- else
- {
- /* If we have moved location since last flush, we need to emit a
- data range. The previous contents type ended at the location
- of the last update. */
- if ((S_GET_VALUE (symp) != frag_now_fix ()
- || symbol_get_frag (symp) != frag_now))
- {
- enum sh64_elf_cr_type contents_type
- = seginfo->tc_segment_info_data.contents_type;
-
- if (update_type
- && contents_type != CRT_DATA
- && contents_type != CRT_NONE
- && ! seen_insn)
- {
- sh64_set_contents_type (CRT_DATA);
- symp = seginfo->tc_segment_info_data.last_contents_mark;
- }
-
- /* If the symbol wasn't used up to make up a new range
- descriptor, update it to this new location. */
- if (symp)
- {
- S_SET_VALUE (symp, (valueT) frag_now_fix ());
- symbol_set_frag (symp, frag_now);
- }
- }
- }
- }
-
- seen_insn = FALSE;
-}
-
-/* Called when the assembler is about to output some data, or maybe it's
- just switching segments. */
-
-void
-sh64_flush_pending_output (void)
-{
- sh64_update_contents_mark (TRUE);
- sh_flush_pending_output ();
-}
-
-/* Flush out the last crange descriptor after all insns have been emitted. */
-
-static void
-sh64_flush_last_crange (bfd *abfd ATTRIBUTE_UNUSED, asection *seg,
- void *countparg ATTRIBUTE_UNUSED)
-{
- segment_info_type *seginfo;
-
- seginfo = seg_info (seg);
-
- if (seginfo
- /* Only emit .cranges descriptors if we would make it more than one. */
- && seginfo->tc_segment_info_data.emitted_ranges != 0)
- {
- symbolS *symp;
-
- /* We need a closing symbol, so switch to the indicated section and
- emit it. */
-
- /* Change to the section we're about to handle. */
- subseg_set (seg, seginfo->tc_segment_info_data.mode_start_subseg);
-
- symp = symbol_new (FAKE_LABEL_NAME, now_seg, (valueT) frag_now_fix (),
- frag_now);
-
- /* We'll be making a datalabel reference to it, so remove any code
- flag. */
- S_SET_OTHER (symp, S_GET_OTHER (symp) & ~STO_SH5_ISA32);
-
- sh64_emit_crange (seginfo->tc_segment_info_data.mode_start_symbol,
- symp,
- seginfo->tc_segment_info_data.contents_type);
- }
-}
-
-/* If and only if we see a call to md_number_to_chars without flagging the
- start of an insn, we set the contents type to CRT_DATA, and only when
- in SHmedia mode. Note that by default we don't bother changing when
- going from SHcompact to data, as the constant pools in GCC-generated
- SHcompact code would create an inordinate amount of .cranges
- descriptors. */
-
-static void
-sh64_flag_output (void)
-{
- if (sh64_isa_mode != sh64_isa_unspecified
- && !seen_insn
- && !sh64_end_of_assembly
- && !emitting_crange)
- {
- md_flush_pending_output ();
- sh64_set_contents_type (CRT_DATA);
- }
-}
-
-/* Vtables don't need "datalabel" but we allow it by simply deleting
- any we find. */
-
-static char *
-strip_datalabels (void)
-{
- char *src, *dest, *start=input_line_pointer;
-
- for (src=input_line_pointer, dest=input_line_pointer; *src != '\n'; )
- {
- if (strncasecmp (src, "datalabel", 9) == 0
- && ISSPACE (src[9])
- && (src == start || !(ISALNUM (src[-1])) || src[-1] == '_'))
- src += 10;
- else
- *dest++ = *src++;
- }
-
- if (dest < src)
- *dest = '\n';
- return src + 1;
-}
-
-static void
-sh64_vtable_entry (int ignore ATTRIBUTE_UNUSED)
-{
- char *eol = strip_datalabels ();
-
- obj_elf_vtable_entry (0);
- input_line_pointer = eol;
-}
-
-static void
-sh64_vtable_inherit (int ignore ATTRIBUTE_UNUSED)
-{
- char *eol = strip_datalabels ();
-
- obj_elf_vtable_inherit (0);
- input_line_pointer = eol;
-}
-
-int
-sh64_fake_label (const char *name)
-{
- size_t len;
-
- if (strcmp (name, FAKE_LABEL_NAME) == 0)
- return 1;
-
- len = strlen (name);
- if (len >= (sizeof (DATALABEL_SUFFIX) - 1))
- return strcmp (&name [len - sizeof (DATALABEL_SUFFIX) + 1],
- DATALABEL_SUFFIX) == 0;
-
- return 0;
-}
diff --git a/gas/config/tc-sh64.h b/gas/config/tc-sh64.h
deleted file mode 100644
index 66b86f1..0000000
--- a/gas/config/tc-sh64.h
+++ /dev/null
@@ -1,226 +0,0 @@
-/* This file is tc-sh64.h
- Copyright (C) 2000-2018 Free Software Foundation, Inc.
-
- This file is part of GAS, the GNU Assembler.
-
- GAS is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- GAS is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-#define TC_SH64
-#include "config/tc-sh.h"
-#include "elf/sh.h"
-#include "elf32-sh64.h"
-
-/* We need to override the tc-sh.h settings of HANDLE_ALIGN and
- MAX_MEM_FOR_RS_ALIGN_CODE; we might need to put in SHmedia NOP:s, not
- SHcompact NOP:s. */
-#undef HANDLE_ALIGN
-#define HANDLE_ALIGN(frag) sh64_handle_align (frag)
-extern void sh64_handle_align (fragS *);
-
-#undef MAX_MEM_FOR_RS_ALIGN_CODE
-#define MAX_MEM_FOR_RS_ALIGN_CODE sh64_max_mem_for_rs_align_code ()
-extern int sh64_max_mem_for_rs_align_code (void);
-
-#undef LISTING_HEADER
-#define LISTING_HEADER \
- (target_big_endian ? \
- "SuperH SHcompact/SHmedia Big Endian GAS" \
- : "SuperH SHcompact/SHmedia Little Endian GAS")
-
-/* We need to record the new frag position after an .align. */
-extern void sh64_do_align (int, const char *, int, int);
-#define md_do_align(n, fill, len, max, l) \
- do { sh64_do_align (n, fill, len, max); goto l; } while (0)
-
-struct sh64_segment_info_type
-{
- /* The type of the section is initialized when the range_start_symbol
- member is non-NULL. */
- symbolS *mode_start_symbol;
- subsegT mode_start_subseg;
-
- /* A stored symbol indicating location of last call of
- "md_flush_pending_output". It is NULLed when we actually use it;
- otherwise the contents is just filled in with segment, frag and
- offset within frag. */
- symbolS *last_contents_mark;
-
- unsigned int emitted_ranges;
- enum sh64_elf_cr_type contents_type;
-
- /* This is used by the SH1-4 parts; we set it to 0 for SHmedia code and
- data. */
- unsigned int in_code : 1;
-};
-
-#undef TC_SEGMENT_INFO_TYPE
-#define TC_SEGMENT_INFO_TYPE struct sh64_segment_info_type
-
-#undef TARGET_FORMAT
-#define TARGET_FORMAT sh64_target_format ()
-extern const char *sh64_target_format (void);
-
-#define TARGET_MACH sh64_target_mach ()
-extern int sh64_target_mach (void);
-
-#undef TC_FORCE_RELOCATION_LOCAL
-#define TC_FORCE_RELOCATION_LOCAL(FIX) \
- (GENERIC_FORCE_RELOCATION_LOCAL (FIX) \
- || (FIX)->fx_r_type == BFD_RELOC_32_PLT_PCREL \
- || (FIX)->fx_r_type == BFD_RELOC_SH_PLT_LOW16 \
- || (FIX)->fx_r_type == BFD_RELOC_SH_PLT_MEDLOW16 \
- || (FIX)->fx_r_type == BFD_RELOC_SH_PLT_MEDHI16 \
- || (FIX)->fx_r_type == BFD_RELOC_SH_PLT_HI16 \
- || (FIX)->fx_r_type == BFD_RELOC_32_GOT_PCREL \
- || (FIX)->fx_r_type == BFD_RELOC_SH_GOT_LOW16 \
- || (FIX)->fx_r_type == BFD_RELOC_SH_GOT_MEDLOW16 \
- || (FIX)->fx_r_type == BFD_RELOC_SH_GOT_MEDHI16 \
- || (FIX)->fx_r_type == BFD_RELOC_SH_GOT_HI16 \
- || (FIX)->fx_r_type == BFD_RELOC_SH_GOT10BY4 \
- || (FIX)->fx_r_type == BFD_RELOC_SH_GOT10BY8 \
- || (FIX)->fx_r_type == BFD_RELOC_SH_GOTPLT32 \
- || (FIX)->fx_r_type == BFD_RELOC_SH_GOTPLT_LOW16 \
- || (FIX)->fx_r_type == BFD_RELOC_SH_GOTPLT_MEDLOW16 \
- || (FIX)->fx_r_type == BFD_RELOC_SH_GOTPLT_MEDHI16 \
- || (FIX)->fx_r_type == BFD_RELOC_SH_GOTPLT_HI16 \
- || (FIX)->fx_r_type == BFD_RELOC_SH_GOTPLT10BY4 \
- || (FIX)->fx_r_type == BFD_RELOC_SH_GOTPLT10BY8 \
- || (FIX)->fx_r_type == BFD_RELOC_SH_GOTPC \
- || (FIX)->fx_r_type == BFD_RELOC_SH_GOTPC_LOW16 \
- || (FIX)->fx_r_type == BFD_RELOC_SH_GOTPC_MEDLOW16 \
- || (FIX)->fx_r_type == BFD_RELOC_SH_GOTPC_MEDHI16 \
- || (FIX)->fx_r_type == BFD_RELOC_SH_GOTPC_HI16)
-
-#undef TC_FORCE_RELOCATION_SUB_SAME
-#define TC_FORCE_RELOCATION_SUB_SAME(FIX, SEC) \
- (GENERIC_FORCE_RELOCATION_SUB_SAME (FIX, SEC) \
- || TC_FORCE_RELOCATION (FIX) \
- || (sh_relax && SWITCH_TABLE (FIX)) \
- || *symbol_get_tc ((FIX)->fx_addsy) != NULL)
-
-/* Don't complain when we leave fx_subsy around. */
-#undef TC_VALIDATE_FIX_SUB
-#define TC_VALIDATE_FIX_SUB(FIX, SEG) \
- ((md_register_arithmetic || (SEG) != reg_section) \
- && ((FIX)->fx_r_type == BFD_RELOC_32_PLT_PCREL \
- || (sh_relax && SWITCH_TABLE (FIX)) \
- || *symbol_get_tc ((FIX)->fx_addsy) != NULL))
-
-/* Note the kludge: we want to put back C, and we also want to consume the
- expression, since we have handled it ourselves. FIXME: What we really
- need is a new GAS infrastructure feature: md_qualifier. */
-#undef md_parse_name
-#define md_parse_name(NAME, EXP, MODE, CP) \
- sh64_consume_datalabel (NAME, EXP, MODE, CP, operand)
-extern int sh64_consume_datalabel (const char *, expressionS *,
- enum expr_mode, char *,
- segT (*) (expressionS *, enum expr_mode));
-
-/* Saying "$" is the same as saying ".". */
-#define DOLLAR_DOT
-
-#undef MD_PCREL_FROM_SECTION
-#define MD_PCREL_FROM_SECTION(FIX, SEC) \
- shmedia_md_pcrel_from_section (FIX, SEC)
-
-extern valueT shmedia_md_pcrel_from_section (struct fix *, segT);
-
-/* We need to mark this symbol as a BranchTarget; setting st_other for it
- and adding 1 to its value (temporarily). */
-extern void sh64_frob_label (symbolS *);
-
-#undef tc_frob_label
-#define tc_frob_label(sym) \
- do { sh_frob_label (sym); sh64_frob_label (sym); } while (0)
-
-#define tc_symbol_new_hook(s) sh64_frob_label (s)
-
-/* We use this to mark our "datalabel" symbol copies. The "mark" is NULL
- for an ordinary symbol, and the pointer to the "ordinary" symbol for a
- datalabel symbol. */
-#define TC_SYMFIELD_TYPE symbolS *
-
-#define tc_frob_symbol(symp, punt) \
- do \
- { \
- punt = sh64_exclude_symbol (symp); \
- } \
- while (0)
-
-extern int sh64_exclude_symbol (symbolS *);
-
-extern void sh64_adjust_symtab (void);
-#define tc_adjust_symtab sh64_adjust_symtab
-
-#undef md_flush_pending_output
-#define md_flush_pending_output() sh64_flush_pending_output ()
-extern void sh64_flush_pending_output (void);
-
-/* Note that tc-sh.c has a sh_frob_section, but it's called from
- tc_frob_file_before_adjust. */
-#define tc_frob_section(sec) shmedia_frob_section_type (sec)
-extern void shmedia_frob_section_type (asection *);
-
-/* We need to emit fixups relative to the frag in which the instruction
- resides. Safest way without calculating max fragment growth or making
- it a fixed number is to provide a pointer to the opcode frag.
-
- We also need to emit the right NOP pattern in .align frags. This is
- done after the text-to-bits assembly pass, so we need to mark it with
- the ISA setting at the time the .align was assembled. */
-#define TC_FRAG_TYPE struct sh64_tc_frag_data
-
-enum sh64_isa_values
- {
- sh64_isa_unspecified,
- sh64_isa_shcompact,
- sh64_isa_shmedia,
-
- /* Special guard value used in contexts when we don't know which ISA it
- is, just that it's specified (not sh64_isa_unspecified). */
- sh64_isa_sh5_guard
- };
-
-struct sh64_tc_frag_data
-{
- fragS *opc_frag;
- enum sh64_isa_values isa;
-};
-
-extern enum sh64_isa_values sh64_isa_mode;
-
-#define TC_FRAG_INIT(FRAGP) \
- do \
- { \
- (FRAGP)->tc_frag_data.opc_frag = sh64_last_insn_frag; \
- (FRAGP)->tc_frag_data.isa = sh64_isa_mode; \
- } \
- while (0)
-
-/* This variable is set whenever we generate (or grow) a new opcode frag
- in shmedia_build_Mytes. */
-extern fragS *sh64_last_insn_frag;
-
-#define md_end() shmedia_md_end ()
-void shmedia_md_end (void);
-
-/* Because we make .debug_line hold the SHmedia instruction address | 1,
- we have to say we only have minimum byte-size insns. */
-#undef DWARF2_LINE_MIN_INSN_LENGTH
-#define DWARF2_LINE_MIN_INSN_LENGTH 1
-
-#define TC_FAKE_LABEL(NAME) sh64_fake_label(NAME)
-extern int sh64_fake_label (const char *);
diff --git a/gas/configure.tgt b/gas/configure.tgt
index c93f7b9..2992825 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -97,10 +97,6 @@ case ${cpu} in
s390*) cpu_type=s390 arch=s390 ;;
score*l) cpu_type=score endian=little ;;
score*) cpu_type=score endian=big ;;
- sh5le*) cpu_type=sh64 endian=little ;;
- sh5*) cpu_type=sh64 endian=big ;;
- sh64le*) cpu_type=sh64 endian=little ;;
- sh64*) cpu_type=sh64 endian=big ;;
sh*le) cpu_type=sh endian=little ;;
sh*) cpu_type=sh endian=big ;;
sparc64* | sparcv9*) cpu_type=sparc arch=v9-64 ;;
@@ -407,8 +403,6 @@ case ${generic_target} in
sh*eb) endian=big ;;
*) endian=little ;;
esac ;;
- sh5*-*-netbsd*) fmt=elf em=nbsd ;;
- sh64*-*-netbsd*) fmt=elf em=nbsd ;;
sh*-*-netbsdelf*) fmt=elf em=nbsd
case ${cpu} in
sh*l*) endian=little ;;
@@ -421,7 +415,6 @@ case ${generic_target} in
sh-*-pe*) fmt=coff em=pe bfd_gas=yes endian=little ;;
sh-*-kaos*) fmt=elf ;;
shle*-*-kaos*) fmt=elf ;;
- sh64-*-elf*) fmt=elf ;;
sparc-*-sunos4*) fmt=aout em=sun3 ;;
sparc-*-aout) fmt=aout em=sparcaout ;;
diff --git a/gas/doc/Makefile.am b/gas/doc/Makefile.am
index 79d646d..8089358 100644
--- a/gas/doc/Makefile.am
+++ b/gas/doc/Makefile.am
@@ -84,7 +84,6 @@ CPU_DOCS = \
c-s390.texi \
c-score.texi \
c-sh.texi \
- c-sh64.texi \
c-sparc.texi \
c-tic54x.texi \
c-tic6x.texi \
diff --git a/gas/doc/Makefile.in b/gas/doc/Makefile.in
index d4b0cf8..643df61 100644
--- a/gas/doc/Makefile.in
+++ b/gas/doc/Makefile.in
@@ -359,7 +359,6 @@ CPU_DOCS = \
c-s390.texi \
c-score.texi \
c-sh.texi \
- c-sh64.texi \
c-sparc.texi \
c-tic54x.texi \
c-tic6x.texi \
diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo
index 76ee990..e1ff851 100644
--- a/gas/doc/as.texinfo
+++ b/gas/doc/as.texinfo
@@ -7609,7 +7609,6 @@ subject, see the hardware manufacturer's manual.
@end ifset
@ifset SH
* SH-Dependent:: Renesas / SuperH SH Dependent Features
-* SH64-Dependent:: SuperH SH64 Dependent Features
@end ifset
@ifset SPARC
* Sparc-Dependent:: SPARC Dependent Features
@@ -7838,7 +7837,6 @@ family.
@ifset SH
@include c-sh.texi
-@include c-sh64.texi
@end ifset
@ifset SPARC
diff --git a/gas/doc/c-sh64.texi b/gas/doc/c-sh64.texi
deleted file mode 100644
index 30737a6..0000000
--- a/gas/doc/c-sh64.texi
+++ /dev/null
@@ -1,219 +0,0 @@
-@c Copyright (C) 2002-2018 Free Software Foundation, Inc.
-@c This is part of the GAS manual.
-@c For copying conditions, see the file as.texinfo.
-@page
-@node SH64-Dependent
-@chapter SuperH SH64 Dependent Features
-
-@cindex SH64 support
-@menu
-* SH64 Options:: Options
-* SH64 Syntax:: Syntax
-* SH64 Directives:: SH64 Machine Directives
-* SH64 Opcodes:: Opcodes
-@end menu
-
-@node SH64 Options
-@section Options
-
-@cindex SH64 options
-@cindex options, SH64
-@table @code
-
-@cindex SH64 ISA options
-@cindex ISA options, SH64
-@item -isa=sh4 | sh4a
-Specify the sh4 or sh4a instruction set.
-@item -isa=dsp
-Enable sh-dsp insns, and disable sh3e / sh4 insns.
-@item -isa=fp
-Enable sh2e, sh3e, sh4, and sh4a insn sets.
-@item -isa=all
-Enable sh1, sh2, sh2e, sh3, sh3e, sh4, sh4a, and sh-dsp insn sets.
-@item -isa=shmedia | -isa=shcompact
-Specify the default instruction set. @code{SHmedia} specifies the
-32-bit opcodes, and @code{SHcompact} specifies the 16-bit opcodes
-compatible with previous SH families. The default depends on the ABI
-selected; the default for the 64-bit ABI is SHmedia, and the default for
-the 32-bit ABI is SHcompact. If neither the ABI nor the ISA is
-specified, the default is 32-bit SHcompact.
-
-Note that the @code{.mode} pseudo-op is not permitted if the ISA is not
-specified on the command line.
-
-@cindex SH64 ABI options
-@cindex ABI options, SH64
-@item -abi=32 | -abi=64
-Specify the default ABI. If the ISA is specified and the ABI is not,
-the default ABI depends on the ISA, with SHmedia defaulting to 64-bit
-and SHcompact defaulting to 32-bit.
-
-Note that the @code{.abi} pseudo-op is not permitted if the ABI is not
-specified on the command line. When the ABI is specified on the command
-line, any @code{.abi} pseudo-ops in the source must match it.
-
-@item -shcompact-const-crange
-Emit code-range descriptors for constants in SHcompact code sections.
-
-@item -no-mix
-Disallow SHmedia code in the same section as constants and SHcompact
-code.
-
-@item -no-expand
-Do not expand MOVI, PT, PTA or PTB instructions.
-
-@item -expand-pt32
-With -abi=64, expand PT, PTA and PTB instructions to 32 bits only.
-
-@item -h-tick-hex
-Support H'00 style hex constants in addition to 0x00 style.
-
-@end table
-
-@node SH64 Syntax
-@section Syntax
-
-@menu
-* SH64-Chars:: Special Characters
-* SH64-Regs:: Register Names
-* SH64-Addressing:: Addressing Modes
-@end menu
-
-@node SH64-Chars
-@subsection Special Characters
-
-@cindex line comment character, SH64
-@cindex SH64 line comment character
-@samp{!} is the line comment character.
-
-If a @samp{#} appears as the first character of a line then the whole
-line is treated as a comment, but in this case the line could also be
-a logical line number directive (@pxref{Comments}) or a preprocessor
-control command (@pxref{Preprocessing}).
-
-@cindex line separator, SH64
-@cindex statement separator, SH64
-@cindex SH64 line separator
-You can use @samp{;} instead of a newline to separate statements.
-
-@cindex symbol names, @samp{$} in
-@cindex @code{$} in symbol names
-Since @samp{$} has no special meaning, you may use it in symbol names.
-
-@node SH64-Regs
-@subsection Register Names
-
-@cindex SH64 registers
-@cindex registers, SH64
-You can use the predefined symbols @samp{r0} through @samp{r63} to refer
-to the SH64 general registers, @samp{cr0} through @code{cr63} for
-control registers, @samp{tr0} through @samp{tr7} for target address
-registers, @samp{fr0} through @samp{fr63} for single-precision floating
-point registers, @samp{dr0} through @samp{dr62} (even numbered registers
-only) for double-precision floating point registers, @samp{fv0} through
-@samp{fv60} (multiples of four only) for single-precision floating point
-vectors, @samp{fp0} through @samp{fp62} (even numbered registers only)
-for single-precision floating point pairs, @samp{mtrx0} through
-@samp{mtrx48} (multiples of 16 only) for 4x4 matrices of
-single-precision floating point registers, @samp{pc} for the program
-counter, and @samp{fpscr} for the floating point status and control
-register.
-
-You can also refer to the control registers by the mnemonics @samp{sr},
-@samp{ssr}, @samp{pssr}, @samp{intevt}, @samp{expevt}, @samp{pexpevt},
-@samp{tra}, @samp{spc}, @samp{pspc}, @samp{resvec}, @samp{vbr},
-@samp{tea}, @samp{dcr}, @samp{kcr0}, @samp{kcr1}, @samp{ctc}, and
-@samp{usr}.
-
-@node SH64-Addressing
-@subsection Addressing Modes
-
-@cindex addressing modes, SH64
-@cindex SH64 addressing modes
-
-SH64 operands consist of either a register or immediate value. The
-immediate value can be a constant or label reference (or portion of a
-label reference), as in this example:
-
-@example
- movi 4,r2
- pt function, tr4
- movi (function >> 16) & 65535,r0
- shori function & 65535, r0
- ld.l r0,4,r0
-@end example
-
-@cindex datalabel, SH64
-Instruction label references can reference labels in either SHmedia or
-SHcompact. To differentiate between the two, labels in SHmedia sections
-will always have the least significant bit set (i.e. they will be odd),
-which SHcompact labels will have the least significant bit reset
-(i.e. they will be even). If you need to reference the actual address
-of a label, you can use the @code{datalabel} modifier, as in this
-example:
-
-@example
- .long function
- .long datalabel function
-@end example
-
-In that example, the first longword may or may not have the least
-significant bit set depending on whether the label is an SHmedia label
-or an SHcompact label. The second longword will be the actual address
-of the label, regardless of what type of label it is.
-
-@node SH64 Directives
-@section SH64 Machine Directives
-
-In addition to the SH directives, the SH64 provides the following
-directives:
-
-@cindex SH64 machine directives
-@cindex machine directives, SH64
-
-@table @code
-
-@item .mode [shmedia|shcompact]
-@itemx .isa [shmedia|shcompact]
-Specify the ISA for the following instructions (the two directives are
-equivalent). Note that programs such as @code{objdump} rely on symbolic
-labels to determine when such mode switches occur (by checking the least
-significant bit of the label's address), so such mode/isa changes should
-always be followed by a label (in practice, this is true anyway). Note
-that you cannot use these directives if you didn't specify an ISA on the
-command line.
-
-@item .abi [32|64]
-Specify the ABI for the following instructions. Note that you cannot use
-this directive unless you specified an ABI on the command line, and the
-ABIs specified must match.
-
-@end table
-
-@node SH64 Opcodes
-@section Opcodes
-
-@cindex SH64 opcode summary
-@cindex opcode summary, SH64
-@cindex mnemonics, SH64
-@cindex instruction summary, SH64
-For detailed information on the SH64 machine instruction set, see
-@cite{SuperH 64 bit RISC Series Architecture Manual} (SuperH, Inc.).
-
-@code{@value{AS}} implements all the standard SH64 opcodes. In
-addition, the following pseudo-opcodes may be expanded into one or more
-alternate opcodes:
-
-@table @code
-
-@item movi
-If the value doesn't fit into a standard @code{movi} opcode,
-@code{@value{AS}} will replace the @code{movi} with a sequence of
-@code{movi} and @code{shori} opcodes.
-
-@item pt
-This expands to a sequence of @code{movi} and @code{shori} opcode,
-followed by a @code{ptrel} opcode, or to a @code{pta} or @code{ptb}
-opcode, depending on the label referenced.
-
-@end table
diff --git a/gas/po/POTFILES.in b/gas/po/POTFILES.in
index a99a276..2290383 100644
--- a/gas/po/POTFILES.in
+++ b/gas/po/POTFILES.in
@@ -139,8 +139,6 @@ config/tc-score.c
config/tc-score.h
config/tc-sh.c
config/tc-sh.h
-config/tc-sh64.c
-config/tc-sh64.h
config/tc-sparc.c
config/tc-sparc.h
config/tc-spu.c
diff --git a/gas/testsuite/gas/cfi/cfi.exp b/gas/testsuite/gas/cfi/cfi.exp
index 588c5d5..b7f8c13 100644
--- a/gas/testsuite/gas/cfi/cfi.exp
+++ b/gas/testsuite/gas/cfi/cfi.exp
@@ -96,11 +96,7 @@ if { [istarget "i*86-*-*"] || [istarget "x86_64-*-*"] } then {
if { [istarget "*-pe" ] || [istarget "*-rtemscoff*"] } then {
return
}
-
- if { [istarget sh64*-*-*] || [istarget sh5*-*-*] } then {
- } else {
- run_dump_test "cfi-sh-1"
- }
+ run_dump_test "cfi-sh-1"
} elseif { [istarget sparc*-*-*] } then {
global NM
diff --git a/gas/testsuite/gas/sh/basic.exp b/gas/testsuite/gas/sh/basic.exp
index 9d3719d..7921cf5 100644
--- a/gas/testsuite/gas/sh/basic.exp
+++ b/gas/testsuite/gas/sh/basic.exp
@@ -23,12 +23,6 @@ if {[istarget "sh*-*-linux-*"] || [istarget "sh*l*-*-netbsdelf*"]} then {
global ASFLAGS
set ASFLAGS "$ASFLAGS -big"
}
-if {[istarget "sh64*-*-*"] || [istarget "sh5*-*-*"]} then {
- global ASFLAGS
-
- set old_ASFLAGS $ASFLAGS
- set ASFLAGS "$ASFLAGS --abi=32 --isa=SHcompact"
-}
proc do_fp {} {
set testname "fp.s: floating point tests (sh3e)"
@@ -132,7 +126,6 @@ if [istarget sh*-*-*] then {
run_dump_test "pcrel-coff"
} elseif {[istarget sh*-hms] } {
run_dump_test "pcrel-hms"
- } elseif {![istarget sh64*-*-*] && ![istarget sh5*-*-*] } {
# Test DSP instructions
run_dump_test "dsp"
@@ -142,16 +135,14 @@ if [istarget sh*-*-*] then {
}
if {[istarget sh*-*elf] || [istarget sh*-*linux*]} then {
- if {![istarget "sh64*-*-*"] && ![istarget "sh5*-*-*"]} then {
- run_dump_test "sh4a"
- run_dump_test "sh4a-fp"
+ run_dump_test "sh4a"
+ run_dump_test "sh4a-fp"
- run_dump_test "sh4a-dsp"
- run_dump_test "sh4al-dsp"
+ run_dump_test "sh4a-dsp"
+ run_dump_test "sh4al-dsp"
- run_dump_test "sh2a"
- run_dump_test "sh2a-pic"
- }
+ run_dump_test "sh2a"
+ run_dump_test "sh2a-pic"
run_dump_test "pic"
run_dump_test "fdpic"
diff --git a/gas/testsuite/gas/sh/sh64/abi-32.d b/gas/testsuite/gas/sh/sh64/abi-32.d
deleted file mode 100644
index b1cf4d9..0000000
--- a/gas/testsuite/gas/sh/sh64/abi-32.d
+++ /dev/null
@@ -1,10 +0,0 @@
-#as: --abi=32
-#objdump: -dr
-#name: Assertion .abi 32.
-
-.*: file format .*-sh64.*
-
-Disassembly of section \.text:
-[0]+ <start>:
-[ ]+0:[ ]+6ff0fff0[ ]+nop
-
diff --git a/gas/testsuite/gas/sh/sh64/abi-32.s b/gas/testsuite/gas/sh/sh64/abi-32.s
deleted file mode 100644
index 85d9807..0000000
--- a/gas/testsuite/gas/sh/sh64/abi-32.s
+++ /dev/null
@@ -1,7 +0,0 @@
-! Check successful .abi assertion for 32-bit ABI.
-
- .text
- .abi 32
- .mode SHmedia
-start:
- nop
diff --git a/gas/testsuite/gas/sh/sh64/abi-64.d b/gas/testsuite/gas/sh/sh64/abi-64.d
deleted file mode 100644
index 210e261..0000000
--- a/gas/testsuite/gas/sh/sh64/abi-64.d
+++ /dev/null
@@ -1,9 +0,0 @@
-#as: --abi=64
-#objdump: -dr
-#name: Assertion .abi 64.
-
-.*: file format .*-sh64.*
-
-Disassembly of section \.text:
-[0]+ <start>:
-[ ]+0:[ ]+6ff0fff0[ ]+nop
diff --git a/gas/testsuite/gas/sh/sh64/abi-64.s b/gas/testsuite/gas/sh/sh64/abi-64.s
deleted file mode 100644
index 8daa31b..0000000
--- a/gas/testsuite/gas/sh/sh64/abi-64.s
+++ /dev/null
@@ -1,7 +0,0 @@
-! Check successful .abi assertion for 64-bit ABI.
-
- .text
- .abi 64
-
-start:
- nop
diff --git a/gas/testsuite/gas/sh/sh64/basic-1.d b/gas/testsuite/gas/sh/sh64/basic-1.d
deleted file mode 100644
index f534c99c..0000000
--- a/gas/testsuite/gas/sh/sh64/basic-1.d
+++ /dev/null
@@ -1,234 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/basic-1.s b/gas/testsuite/gas/sh/sh64/basic-1.s
deleted file mode 100644
index 057667e..0000000
--- a/gas/testsuite/gas/sh/sh64/basic-1.s
+++ /dev/null
@@ -1,233 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/case-1.d b/gas/testsuite/gas/sh/sh64/case-1.d
deleted file mode 100644
index 8d1d009..0000000
--- a/gas/testsuite/gas/sh/sh64/case-1.d
+++ /dev/null
@@ -1,23 +0,0 @@
-#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-0x8
-[ ]+c:[ ]+c8000190[ ]+shori 0,r25
-[ ]+c:[ ]+R_SH_IMM_LOW16_PCREL foo-0x4
-[ ]+10:[ ]+6bf56440[ ]+ptrel/u r25,tr4
-[ ]+14:[ ]+cc000190[ ]+movi 0,r25
-[ ]+14:[ ]+R_SH_IMM_MEDLOW16_PCREL bar-0x8
-[ ]+18:[ ]+c8000190[ ]+shori 0,r25
-[ ]+18:[ ]+R_SH_IMM_LOW16_PCREL bar-0x4
-[ ]+1c:[ ]+6bf56630[ ]+ptrel/l r25,tr3
-[ ]+20:[ ]+cc00a820[ ]+movi 42,r2
-[ ]+24:[ ]+ebffde20[ ]+pta/l 0 <start>,tr2
diff --git a/gas/testsuite/gas/sh/sh64/case-1.s b/gas/testsuite/gas/sh/sh64/case-1.s
deleted file mode 100644
index b9757bc..0000000
--- a/gas/testsuite/gas/sh/sh64/case-1.s
+++ /dev/null
@@ -1,12 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/case-noexp-1.d b/gas/testsuite/gas/sh/sh64/case-noexp-1.d
deleted file mode 100644
index 589dd9d..0000000
--- a/gas/testsuite/gas/sh/sh64/case-noexp-1.d
+++ /dev/null
@@ -1,18 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/crange1-1.d b/gas/testsuite/gas/sh/sh64/crange1-1.d
deleted file mode 100644
index 3e97b9a..0000000
--- a/gas/testsuite/gas/sh/sh64/crange1-1.d
+++ /dev/null
@@ -1,104 +0,0 @@
-#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 \.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 0000001c 00010000 00080000 .*
- 0060 000c0001 00000018 0000000e 00020000 .*
- 0070 003c0000 00800002 0000017c 00000154 .*
- 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 000000b3 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 0000007e .*
-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 cc0112e0 .*
- 0160 6ff0fff0 00000000 00000000 00000000 .*
- 0170 00000000 00000000 00000044 0009e00e .*
- 0180 00090009 890a0009 00090009 00090009 .*
- 0190 00090009 00090009 00090009 00090000 .*
- 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 00000152 .*
diff --git a/gas/testsuite/gas/sh/sh64/crange1-2.d b/gas/testsuite/gas/sh/sh64/crange1-2.d
deleted file mode 100644
index 1bd8321..0000000
--- a/gas/testsuite/gas/sh/sh64/crange1-2.d
+++ /dev/null
@@ -1,108 +0,0 @@
-#as: --abi=32 --isa=SHcompact -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 \.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 0000001c 00010000 .*
- 0070 017c0000 00220002 00000008 0000000c .*
- 0080 00010000 00180000 000e0002 0000004e .*
- 0090 0000006e 00010000 019e0000 01320001 .*
-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 000000b3 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 0000007e .*
-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 cc0112e0 .*
- 0160 6ff0fff0 00000000 00000000 00000000 .*
- 0170 00000000 00000000 00000044 0009e00e .*
- 0180 00090009 890a0009 00090009 00090009 .*
- 0190 00090009 00090009 00090009 00090000 .*
- 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 00000152 .*
diff --git a/gas/testsuite/gas/sh/sh64/crange1.s b/gas/testsuite/gas/sh/sh64/crange1.s
deleted file mode 100644
index bbd4012..0000000
--- a/gas/testsuite/gas/sh/sh64/crange1.s
+++ /dev/null
@@ -1,210 +0,0 @@
-! 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 102,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 20,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 298,0
- .long 0
-mediapoollabel4:
- .long mediapoolend4-compact4
-mediapoolend4:
diff --git a/gas/testsuite/gas/sh/sh64/crange2-1.d b/gas/testsuite/gas/sh/sh64/crange2-1.d
deleted file mode 100644
index c60d7e0..0000000
--- a/gas/testsuite/gas/sh/sh64/crange2-1.d
+++ /dev/null
@@ -1,43 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/crange2-2.d b/gas/testsuite/gas/sh/sh64/crange2-2.d
deleted file mode 100644
index 89fc49c..0000000
--- a/gas/testsuite/gas/sh/sh64/crange2-2.d
+++ /dev/null
@@ -1,22 +0,0 @@
-#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 .cranges:
- 0000 00000000 00000010 00030000 00100000 .*
- 0010 00140002 00000024 0000000c 0003 .*
diff --git a/gas/testsuite/gas/sh/sh64/crange2-noexp-1.d b/gas/testsuite/gas/sh/sh64/crange2-noexp-1.d
deleted file mode 100644
index cad9f38..0000000
--- a/gas/testsuite/gas/sh/sh64/crange2-noexp-1.d
+++ /dev/null
@@ -1,43 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/crange2.s b/gas/testsuite/gas/sh/sh64/crange2.s
deleted file mode 100644
index 6fbebc3..0000000
--- a/gas/testsuite/gas/sh/sh64/crange2.s
+++ /dev/null
@@ -1,34 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/crange3-1.d b/gas/testsuite/gas/sh/sh64/crange3-1.d
deleted file mode 100644
index d7ddb0b..0000000
--- a/gas/testsuite/gas/sh/sh64/crange3-1.d
+++ /dev/null
@@ -1,24 +0,0 @@
-#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 \.rodata:
- 0000 abcdef01 12345678 .*
-Contents of section \.cranges:
- 0000 00000000 00000010 00030000 00100000 .*
- 0010 00100001 00000020 00000014 0003 .*
diff --git a/gas/testsuite/gas/sh/sh64/crange3.s b/gas/testsuite/gas/sh/sh64/crange3.s
deleted file mode 100644
index 23ef76e..0000000
--- a/gas/testsuite/gas/sh/sh64/crange3.s
+++ /dev/null
@@ -1,34 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/crange4-1.d b/gas/testsuite/gas/sh/sh64/crange4-1.d
deleted file mode 100644
index e31d530..0000000
--- a/gas/testsuite/gas/sh/sh64/crange4-1.d
+++ /dev/null
@@ -1,19 +0,0 @@
-#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 \.cranges:
- 0000 00000000 00000004 00030000 00040000 .*
- 0010 00140001 .*
diff --git a/gas/testsuite/gas/sh/sh64/crange4.s b/gas/testsuite/gas/sh/sh64/crange4.s
deleted file mode 100644
index 5eaeb79..0000000
--- a/gas/testsuite/gas/sh/sh64/crange4.s
+++ /dev/null
@@ -1,8 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/crange5-1.d b/gas/testsuite/gas/sh/sh64/crange5-1.d
deleted file mode 100644
index 1c58522..0000000
--- a/gas/testsuite/gas/sh/sh64/crange5-1.d
+++ /dev/null
@@ -1,12 +0,0 @@
-#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 .*
diff --git a/gas/testsuite/gas/sh/sh64/crange5.s b/gas/testsuite/gas/sh/sh64/crange5.s
deleted file mode 100644
index 7644f1c..0000000
--- a/gas/testsuite/gas/sh/sh64/crange5.s
+++ /dev/null
@@ -1,26 +0,0 @@
-! 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
-
diff --git a/gas/testsuite/gas/sh/sh64/creg-1.d b/gas/testsuite/gas/sh/sh64/creg-1.d
deleted file mode 100644
index 52fce6f..0000000
--- a/gas/testsuite/gas/sh/sh64/creg-1.d
+++ /dev/null
@@ -1,77 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/creg-1.s b/gas/testsuite/gas/sh/sh64/creg-1.s
deleted file mode 100644
index 775f211..0000000
--- a/gas/testsuite/gas/sh/sh64/creg-1.s
+++ /dev/null
@@ -1,79 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/creg-2.d b/gas/testsuite/gas/sh/sh64/creg-2.d
deleted file mode 100644
index 2de2735..0000000
--- a/gas/testsuite/gas/sh/sh64/creg-2.d
+++ /dev/null
@@ -1,17 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/creg-2.s b/gas/testsuite/gas/sh/sh64/creg-2.s
deleted file mode 100644
index fdfe46e..0000000
--- a/gas/testsuite/gas/sh/sh64/creg-2.s
+++ /dev/null
@@ -1,14 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/datal-1.s b/gas/testsuite/gas/sh/sh64/datal-1.s
deleted file mode 100644
index 074cf7a..0000000
--- a/gas/testsuite/gas/sh/sh64/datal-1.s
+++ /dev/null
@@ -1,41 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/datal-2.d b/gas/testsuite/gas/sh/sh64/datal-2.d
deleted file mode 100644
index ec9794d..0000000
--- a/gas/testsuite/gas/sh/sh64/datal-2.d
+++ /dev/null
@@ -1,44 +0,0 @@
-#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 .*
diff --git a/gas/testsuite/gas/sh/sh64/datal-2.s b/gas/testsuite/gas/sh/sh64/datal-2.s
deleted file mode 100644
index 4aeb25b..0000000
--- a/gas/testsuite/gas/sh/sh64/datal-2.s
+++ /dev/null
@@ -1,46 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/datal-3.s b/gas/testsuite/gas/sh/sh64/datal-3.s
deleted file mode 100644
index 2583a22..0000000
--- a/gas/testsuite/gas/sh/sh64/datal-3.s
+++ /dev/null
@@ -1,48 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/datal32-1.d b/gas/testsuite/gas/sh/sh64/datal32-1.d
deleted file mode 100644
index 2a546c3..0000000
--- a/gas/testsuite/gas/sh/sh64/datal32-1.d
+++ /dev/null
@@ -1,45 +0,0 @@
-#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 .*
diff --git a/gas/testsuite/gas/sh/sh64/datal32-3.d b/gas/testsuite/gas/sh/sh64/datal32-3.d
deleted file mode 100644
index a1e3a3c..0000000
--- a/gas/testsuite/gas/sh/sh64/datal32-3.d
+++ /dev/null
@@ -1,94 +0,0 @@
-#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\*\*2
- CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
-SYMBOL TABLE:
-0+ l d \.text 0+ (|\.text)
-0+ l d \.data 0+ (|\.data)
-0+ l d \.bss 0+ (|\.bss)
-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+ (|\.rodata)
-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 \.rodata:
- 0000 00000048 00000088 00000008 00000020 .*
diff --git a/gas/testsuite/gas/sh/sh64/datal64-1.d b/gas/testsuite/gas/sh/sh64/datal64-1.d
deleted file mode 100644
index 247ba80..0000000
--- a/gas/testsuite/gas/sh/sh64/datal64-1.d
+++ /dev/null
@@ -1,50 +0,0 @@
-#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 .*
diff --git a/gas/testsuite/gas/sh/sh64/datal64-3.d b/gas/testsuite/gas/sh/sh64/datal64-3.d
deleted file mode 100644
index a6e8129..0000000
--- a/gas/testsuite/gas/sh/sh64/datal64-3.d
+++ /dev/null
@@ -1,123 +0,0 @@
-#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\*\*2
- CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
-SYMBOL TABLE:
-0+ l d \.text 0+ (|\.text)
-0+ l d \.data 0+ (|\.data)
-0+ l d \.bss 0+ (|\.bss)
-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+ (|\.rodata)
-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 \.rodata:
- 0000 00000088 000000d0 00000008 00000020 .*
diff --git a/gas/testsuite/gas/sh/sh64/eh-1.d b/gas/testsuite/gas/sh/sh64/eh-1.d
deleted file mode 100644
index da267e3..0000000
--- a/gas/testsuite/gas/sh/sh64/eh-1.d
+++ /dev/null
@@ -1,14 +0,0 @@
-#as: --abi=32 --isa=shmedia
-#objdump: -sr
-#source: eh-1.s
-#name: PR gas/6043
-
-.*: file format .*-sh64.*
-
-RELOCATION RECORDS FOR \[\.eh_frame\]:
-OFFSET *TYPE *VALUE
-00000000 R_SH_64_PCREL \.text\+0x00000005
-
-
-Contents of section .eh_frame:
- 0000 00000000 00000000 .*
diff --git a/gas/testsuite/gas/sh/sh64/eh-1.s b/gas/testsuite/gas/sh/sh64/eh-1.s
deleted file mode 100644
index c1cc672..0000000
--- a/gas/testsuite/gas/sh/sh64/eh-1.s
+++ /dev/null
@@ -1,7 +0,0 @@
-! PR gas/6043
-
- .text
-.LFB1:
- .section .eh_frame,"a",@progbits
-.LASFDE1:
- .uaquad .LFB1-.
diff --git a/gas/testsuite/gas/sh/sh64/endian-1.d b/gas/testsuite/gas/sh/sh64/endian-1.d
deleted file mode 100644
index 3d2ca8e..0000000
--- a/gas/testsuite/gas/sh/sh64/endian-1.d
+++ /dev/null
@@ -1,9 +0,0 @@
-#as: --isa=shmedia --abi=64 --no-exp -little
-#objdump: -s
-#name: SH64 Little Endian
-
-.*: file format elf64-sh64.*
-
-Contents of section .text:
- 0000 00d048cc 78563412 34120000.*
-
diff --git a/gas/testsuite/gas/sh/sh64/endian-1.s b/gas/testsuite/gas/sh/sh64/endian-1.s
deleted file mode 100644
index 79bc9e4..0000000
--- a/gas/testsuite/gas/sh/sh64/endian-1.s
+++ /dev/null
@@ -1,7 +0,0 @@
- .text
- .mode shmedia
-start:
-
- movi 0x1234,r0
- .long 0x12345678
- .word 0x1234, 0
diff --git a/gas/testsuite/gas/sh/sh64/endian-2.d b/gas/testsuite/gas/sh/sh64/endian-2.d
deleted file mode 100644
index 7f6d265..0000000
--- a/gas/testsuite/gas/sh/sh64/endian-2.d
+++ /dev/null
@@ -1,10 +0,0 @@
-#as: --isa=shmedia --abi=64 --no-exp -big
-#objdump: -s
-#name: SH64 Big Endian
-
-.*: file format elf64-sh64.*
-
-Contents of section .text:
- 0000 cc48d000 12345678 12340000.*
-
-
diff --git a/gas/testsuite/gas/sh/sh64/endian-2.s b/gas/testsuite/gas/sh/sh64/endian-2.s
deleted file mode 100644
index 79bc9e4..0000000
--- a/gas/testsuite/gas/sh/sh64/endian-2.s
+++ /dev/null
@@ -1,7 +0,0 @@
- .text
- .mode shmedia
-start:
-
- movi 0x1234,r0
- .long 0x12345678
- .word 0x1234, 0
diff --git a/gas/testsuite/gas/sh/sh64/err-1.s b/gas/testsuite/gas/sh/sh64/err-1.s
deleted file mode 100644
index 4e23c4f..0000000
--- a/gas/testsuite/gas/sh/sh64/err-1.s
+++ /dev/null
@@ -1,47 +0,0 @@
-! { 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" }
diff --git a/gas/testsuite/gas/sh/sh64/err-2.s b/gas/testsuite/gas/sh/sh64/err-2.s
deleted file mode 100644
index 8078a3b..0000000
--- a/gas/testsuite/gas/sh/sh64/err-2.s
+++ /dev/null
@@ -1,16 +0,0 @@
-! { 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" }
-
diff --git a/gas/testsuite/gas/sh/sh64/err-3.s b/gas/testsuite/gas/sh/sh64/err-3.s
deleted file mode 100644
index dd1a88c..0000000
--- a/gas/testsuite/gas/sh/sh64/err-3.s
+++ /dev/null
@@ -1,36 +0,0 @@
-! { 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
diff --git a/gas/testsuite/gas/sh/sh64/err-4.s b/gas/testsuite/gas/sh/sh64/err-4.s
deleted file mode 100644
index 2bd72f1..0000000
--- a/gas/testsuite/gas/sh/sh64/err-4.s
+++ /dev/null
@@ -1,27 +0,0 @@
-! { 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
diff --git a/gas/testsuite/gas/sh/sh64/err-abi-32.s b/gas/testsuite/gas/sh/sh64/err-abi-32.s
deleted file mode 100644
index 400a262..0000000
--- a/gas/testsuite/gas/sh/sh64/err-abi-32.s
+++ /dev/null
@@ -1,10 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/err-abi-64.s b/gas/testsuite/gas/sh/sh64/err-abi-64.s
deleted file mode 100644
index 3e136d2..0000000
--- a/gas/testsuite/gas/sh/sh64/err-abi-64.s
+++ /dev/null
@@ -1,10 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/err-dsp.s b/gas/testsuite/gas/sh/sh64/err-dsp.s
deleted file mode 100644
index 3cee009..0000000
--- a/gas/testsuite/gas/sh/sh64/err-dsp.s
+++ /dev/null
@@ -1,15 +0,0 @@
-! 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 "opcode not valid for this cpu variant" }
- lds r4,a0 ! { dg-error "invalid operands" }
diff --git a/gas/testsuite/gas/sh/sh64/err-movi-noexp-1.s b/gas/testsuite/gas/sh/sh64/err-movi-noexp-1.s
deleted file mode 100644
index 50374f9..0000000
--- a/gas/testsuite/gas/sh/sh64/err-movi-noexp-1.s
+++ /dev/null
@@ -1,24 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/err-noexp-cmd1.s b/gas/testsuite/gas/sh/sh64/err-noexp-cmd1.s
deleted file mode 100644
index 20190c2..0000000
--- a/gas/testsuite/gas/sh/sh64/err-noexp-cmd1.s
+++ /dev/null
@@ -1,10 +0,0 @@
-! 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-*-elf* } 0 }
-
- .text
-start:
- nop
diff --git a/gas/testsuite/gas/sh/sh64/err-pt-1.s b/gas/testsuite/gas/sh/sh64/err-pt-1.s
deleted file mode 100644
index c8a50a8..0000000
--- a/gas/testsuite/gas/sh/sh64/err-pt-1.s
+++ /dev/null
@@ -1,18 +0,0 @@
-! 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" }
diff --git a/gas/testsuite/gas/sh/sh64/err-pt32-cmd1.s b/gas/testsuite/gas/sh/sh64/err-pt32-cmd1.s
deleted file mode 100644
index d92f62f..0000000
--- a/gas/testsuite/gas/sh/sh64/err-pt32-cmd1.s
+++ /dev/null
@@ -1,10 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/err-pt32-cmd2.s b/gas/testsuite/gas/sh/sh64/err-pt32-cmd2.s
deleted file mode 100644
index f75f3c8..0000000
--- a/gas/testsuite/gas/sh/sh64/err-pt32-cmd2.s
+++ /dev/null
@@ -1,10 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/err-pt32-cmd3.s b/gas/testsuite/gas/sh/sh64/err-pt32-cmd3.s
deleted file mode 100644
index d64cc44..0000000
--- a/gas/testsuite/gas/sh/sh64/err-pt32-cmd3.s
+++ /dev/null
@@ -1,10 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/err-ptb-1.s b/gas/testsuite/gas/sh/sh64/err-ptb-1.s
deleted file mode 100644
index 7c881bd..0000000
--- a/gas/testsuite/gas/sh/sh64/err-ptb-1.s
+++ /dev/null
@@ -1,34 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/err-ptb-2.s b/gas/testsuite/gas/sh/sh64/err-ptb-2.s
deleted file mode 100644
index 216e434..0000000
--- a/gas/testsuite/gas/sh/sh64/err-ptb-2.s
+++ /dev/null
@@ -1,34 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/err.exp b/gas/testsuite/gas/sh/sh64/err.exp
deleted file mode 100644
index 22a5251..0000000
--- a/gas/testsuite/gas/sh/sh64/err.exp
+++ /dev/null
@@ -1,9 +0,0 @@
-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
diff --git a/gas/testsuite/gas/sh/sh64/immexpr1.s b/gas/testsuite/gas/sh/sh64/immexpr1.s
deleted file mode 100644
index 31060a12d..0000000
--- a/gas/testsuite/gas/sh/sh64/immexpr1.s
+++ /dev/null
@@ -1,85 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/immexpr2.s b/gas/testsuite/gas/sh/sh64/immexpr2.s
deleted file mode 100644
index 2eeda98..0000000
--- a/gas/testsuite/gas/sh/sh64/immexpr2.s
+++ /dev/null
@@ -1,16 +0,0 @@
-! 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:
-
diff --git a/gas/testsuite/gas/sh/sh64/immexpr32-1.d b/gas/testsuite/gas/sh/sh64/immexpr32-1.d
deleted file mode 100644
index f27b602..0000000
--- a/gas/testsuite/gas/sh/sh64/immexpr32-1.d
+++ /dev/null
@@ -1,67 +0,0 @@
-#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
-[ ]\.\.\.
diff --git a/gas/testsuite/gas/sh/sh64/immexpr32-2.d b/gas/testsuite/gas/sh/sh64/immexpr32-2.d
deleted file mode 100644
index 3073ae9..0000000
--- a/gas/testsuite/gas/sh/sh64/immexpr32-2.d
+++ /dev/null
@@ -1,11 +0,0 @@
-#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 .*
diff --git a/gas/testsuite/gas/sh/sh64/immexpr64-1.d b/gas/testsuite/gas/sh/sh64/immexpr64-1.d
deleted file mode 100644
index 118bf02..0000000
--- a/gas/testsuite/gas/sh/sh64/immexpr64-1.d
+++ /dev/null
@@ -1,68 +0,0 @@
-#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
-[ ]\.\.\.
-
diff --git a/gas/testsuite/gas/sh/sh64/immexpr64-2.d b/gas/testsuite/gas/sh/sh64/immexpr64-2.d
deleted file mode 100644
index eff3faa..0000000
--- a/gas/testsuite/gas/sh/sh64/immexpr64-2.d
+++ /dev/null
@@ -1,11 +0,0 @@
-#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 .*
diff --git a/gas/testsuite/gas/sh/sh64/lineno.d b/gas/testsuite/gas/sh/sh64/lineno.d
deleted file mode 100644
index f2bb155..0000000
--- a/gas/testsuite/gas/sh/sh64/lineno.d
+++ /dev/null
@@ -1,19 +0,0 @@
-#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[ ]*
diff --git a/gas/testsuite/gas/sh/sh64/lineno.s b/gas/testsuite/gas/sh/sh64/lineno.s
deleted file mode 100644
index 3804976..0000000
--- a/gas/testsuite/gas/sh/sh64/lineno.s
+++ /dev/null
@@ -1,7 +0,0 @@
- .text
-
-start:
- movi 1,r1
- movi 100000,r1
- nop
- nop
diff --git a/gas/testsuite/gas/sh/sh64/localcom-1.d b/gas/testsuite/gas/sh/sh64/localcom-1.d
deleted file mode 100644
index 83a91b0..0000000
--- a/gas/testsuite/gas/sh/sh64/localcom-1.d
+++ /dev/null
@@ -1,30 +0,0 @@
-#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+ (|\.text)
-0+0 l d \.data 0+ (|\.data)
-0+0 l d \.bss 0+ (|\.bss)
-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 12340009 .*
-
diff --git a/gas/testsuite/gas/sh/sh64/localcom-1.s b/gas/testsuite/gas/sh/sh64/localcom-1.s
deleted file mode 100644
index 53295d6..0000000
--- a/gas/testsuite/gas/sh/sh64/localcom-1.s
+++ /dev/null
@@ -1,26 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/mix-1.d b/gas/testsuite/gas/sh/sh64/mix-1.d
deleted file mode 100644
index 45fbefb..0000000
--- a/gas/testsuite/gas/sh/sh64/mix-1.d
+++ /dev/null
@@ -1,42 +0,0 @@
-#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-0x2
-[ ]+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-0x4
-[ ]+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
diff --git a/gas/testsuite/gas/sh/sh64/mix-1.s b/gas/testsuite/gas/sh/sh64/mix-1.s
deleted file mode 100644
index 03b96eb..0000000
--- a/gas/testsuite/gas/sh/sh64/mix-1.s
+++ /dev/null
@@ -1,21 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/mix-noexp-1.d b/gas/testsuite/gas/sh/sh64/mix-noexp-1.d
deleted file mode 100644
index 9759f66..0000000
--- a/gas/testsuite/gas/sh/sh64/mix-noexp-1.d
+++ /dev/null
@@ -1,33 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/movi-1.s b/gas/testsuite/gas/sh/sh64/movi-1.s
deleted file mode 100644
index 7268548..0000000
--- a/gas/testsuite/gas/sh/sh64/movi-1.s
+++ /dev/null
@@ -1,20 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/movi-2.s b/gas/testsuite/gas/sh/sh64/movi-2.s
deleted file mode 100644
index 222cec6..0000000
--- a/gas/testsuite/gas/sh/sh64/movi-2.s
+++ /dev/null
@@ -1,28 +0,0 @@
-! 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
-
diff --git a/gas/testsuite/gas/sh/sh64/movi-3.d b/gas/testsuite/gas/sh/sh64/movi-3.d
deleted file mode 100644
index 2cd4a71..0000000
--- a/gas/testsuite/gas/sh/sh64/movi-3.d
+++ /dev/null
@@ -1,18 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/movi-3.s b/gas/testsuite/gas/sh/sh64/movi-3.s
deleted file mode 100644
index b301001..0000000
--- a/gas/testsuite/gas/sh/sh64/movi-3.s
+++ /dev/null
@@ -1,10 +0,0 @@
-! 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:
diff --git a/gas/testsuite/gas/sh/sh64/movi32-1.d b/gas/testsuite/gas/sh/sh64/movi32-1.d
deleted file mode 100644
index df515c5..0000000
--- a/gas/testsuite/gas/sh/sh64/movi32-1.d
+++ /dev/null
@@ -1,35 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/movi32-2.d b/gas/testsuite/gas/sh/sh64/movi32-2.d
deleted file mode 100644
index a539c23..0000000
--- a/gas/testsuite/gas/sh/sh64/movi32-2.d
+++ /dev/null
@@ -1,36 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/movi32-noexp-2.d b/gas/testsuite/gas/sh/sh64/movi32-noexp-2.d
deleted file mode 100644
index 1771bca..0000000
--- a/gas/testsuite/gas/sh/sh64/movi32-noexp-2.d
+++ /dev/null
@@ -1,28 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/movi64-1.d b/gas/testsuite/gas/sh/sh64/movi64-1.d
deleted file mode 100644
index 680b803..0000000
--- a/gas/testsuite/gas/sh/sh64/movi64-1.d
+++ /dev/null
@@ -1,44 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/movi64-2.d b/gas/testsuite/gas/sh/sh64/movi64-2.d
deleted file mode 100644
index 980abfa..0000000
--- a/gas/testsuite/gas/sh/sh64/movi64-2.d
+++ /dev/null
@@ -1,30 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/movi64-2.s b/gas/testsuite/gas/sh/sh64/movi64-2.s
deleted file mode 100644
index 607e17f..0000000
--- a/gas/testsuite/gas/sh/sh64/movi64-2.s
+++ /dev/null
@@ -1,10 +0,0 @@
-! 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?
-
diff --git a/gas/testsuite/gas/sh/sh64/movi64-3.d b/gas/testsuite/gas/sh/sh64/movi64-3.d
deleted file mode 100644
index 94236ec..0000000
--- a/gas/testsuite/gas/sh/sh64/movi64-3.d
+++ /dev/null
@@ -1,52 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/movi64-noexp-2.d b/gas/testsuite/gas/sh/sh64/movi64-noexp-2.d
deleted file mode 100644
index 62fc24e..0000000
--- a/gas/testsuite/gas/sh/sh64/movi64-noexp-2.d
+++ /dev/null
@@ -1,28 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/pt-1.d b/gas/testsuite/gas/sh/sh64/pt-1.d
deleted file mode 100644
index 1040f8b..0000000
--- a/gas/testsuite/gas/sh/sh64/pt-1.d
+++ /dev/null
@@ -1,26 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/pt-1.s b/gas/testsuite/gas/sh/sh64/pt-1.s
deleted file mode 100644
index cf5cd70..0000000
--- a/gas/testsuite/gas/sh/sh64/pt-1.s
+++ /dev/null
@@ -1,17 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/pt-2.s b/gas/testsuite/gas/sh/sh64/pt-2.s
deleted file mode 100644
index b9b6597..0000000
--- a/gas/testsuite/gas/sh/sh64/pt-2.s
+++ /dev/null
@@ -1,22 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/pt-noexp-1.d b/gas/testsuite/gas/sh/sh64/pt-noexp-1.d
deleted file mode 100644
index 5050763..0000000
--- a/gas/testsuite/gas/sh/sh64/pt-noexp-1.d
+++ /dev/null
@@ -1,27 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/pt32-1.d b/gas/testsuite/gas/sh/sh64/pt32-1.d
deleted file mode 100644
index 0b738a7..0000000
--- a/gas/testsuite/gas/sh/sh64/pt32-1.d
+++ /dev/null
@@ -1,39 +0,0 @@
-#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-0x3
-[ ]+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
diff --git a/gas/testsuite/gas/sh/sh64/pt32-noexp-2.d b/gas/testsuite/gas/sh/sh64/pt32-noexp-2.d
deleted file mode 100644
index 54bf4c9..0000000
--- a/gas/testsuite/gas/sh/sh64/pt32-noexp-2.d
+++ /dev/null
@@ -1,34 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/pt64-1.d b/gas/testsuite/gas/sh/sh64/pt64-1.d
deleted file mode 100644
index b0b61ca..0000000
--- a/gas/testsuite/gas/sh/sh64/pt64-1.d
+++ /dev/null
@@ -1,47 +0,0 @@
-#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-0xb
-[ ]+14:[ ]+c8000190[ ]+shori 0,r25
-[ ]+14:[ ]+R_SH_IMM_MEDHI16_PCREL \.text\.other-0x7
-[ ]+18:[ ]+c8000190[ ]+shori 0,r25
-[ ]+18:[ ]+R_SH_IMM_MEDLOW16_PCREL \.text\.other-0x3
-[ ]+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-0x7
-[ ]+10:[ ]+c8000190[ ]+shori 0,r25
-[ ]+10:[ ]+R_SH_IMM_MEDHI16_PCREL \.text-0x3
-[ ]+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
diff --git a/gas/testsuite/gas/sh/sh64/pt64-32-1.d b/gas/testsuite/gas/sh/sh64/pt64-32-1.d
deleted file mode 100644
index 1094516..0000000
--- a/gas/testsuite/gas/sh/sh64/pt64-32-1.d
+++ /dev/null
@@ -1,27 +0,0 @@
-#as: --isa=shmedia --abi=64 -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
diff --git a/gas/testsuite/gas/sh/sh64/pt64-32-2.d b/gas/testsuite/gas/sh/sh64/pt64-32-2.d
deleted file mode 100644
index 096f4eb..0000000
--- a/gas/testsuite/gas/sh/sh64/pt64-32-2.d
+++ /dev/null
@@ -1,39 +0,0 @@
-#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-0x3
-[ ]+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
diff --git a/gas/testsuite/gas/sh/sh64/pt64-noexp-2.d b/gas/testsuite/gas/sh/sh64/pt64-noexp-2.d
deleted file mode 100644
index 7a8d1d5..0000000
--- a/gas/testsuite/gas/sh/sh64/pt64-noexp-2.d
+++ /dev/null
@@ -1,34 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/ptc-1.s b/gas/testsuite/gas/sh/sh64/ptc-1.s
deleted file mode 100644
index d6199fd..0000000
--- a/gas/testsuite/gas/sh/sh64/ptc-1.s
+++ /dev/null
@@ -1,5 +0,0 @@
-! Check that simple constants get expected results.
- .mode SHmedia
- .text
-start:
- pta 0x100, tr1
diff --git a/gas/testsuite/gas/sh/sh64/ptc32-1.d b/gas/testsuite/gas/sh/sh64/ptc32-1.d
deleted file mode 100644
index 579fadb..0000000
--- a/gas/testsuite/gas/sh/sh64/ptc32-1.d
+++ /dev/null
@@ -1,15 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/ptc32-noexp-1.d b/gas/testsuite/gas/sh/sh64/ptc32-noexp-1.d
deleted file mode 100644
index 977277d..0000000
--- a/gas/testsuite/gas/sh/sh64/ptc32-noexp-1.d
+++ /dev/null
@@ -1,12 +0,0 @@
-#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 <start\+0x4>,tr1
-[ ]+0:[ ]+R_SH_PT_16 \*ABS\*\+0x100
diff --git a/gas/testsuite/gas/sh/sh64/ptc64-1.d b/gas/testsuite/gas/sh/sh64/ptc64-1.d
deleted file mode 100644
index 0ba58cc..0000000
--- a/gas/testsuite/gas/sh/sh64/ptc64-1.d
+++ /dev/null
@@ -1,19 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/ptc64-32-1.d b/gas/testsuite/gas/sh/sh64/ptc64-32-1.d
deleted file mode 100644
index 1337cd4..0000000
--- a/gas/testsuite/gas/sh/sh64/ptc64-32-1.d
+++ /dev/null
@@ -1,15 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/ptc64-noexp-1.d b/gas/testsuite/gas/sh/sh64/ptc64-noexp-1.d
deleted file mode 100644
index 325e57c..0000000
--- a/gas/testsuite/gas/sh/sh64/ptc64-noexp-1.d
+++ /dev/null
@@ -1,13 +0,0 @@
-#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 <start\+0x4>,tr1
-[ ]+0:[ ]+R_SH_PT_16 \*ABS\*\+0x100
-
diff --git a/gas/testsuite/gas/sh/sh64/ptext-1.s b/gas/testsuite/gas/sh/sh64/ptext-1.s
deleted file mode 100644
index 794d0f5..0000000
--- a/gas/testsuite/gas/sh/sh64/ptext-1.s
+++ /dev/null
@@ -1,8 +0,0 @@
-! 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
diff --git a/gas/testsuite/gas/sh/sh64/ptext32-1.d b/gas/testsuite/gas/sh/sh64/ptext32-1.d
deleted file mode 100644
index 834e9cd..0000000
--- a/gas/testsuite/gas/sh/sh64/ptext32-1.d
+++ /dev/null
@@ -1,40 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/ptext32-noexp-1.d b/gas/testsuite/gas/sh/sh64/ptext32-noexp-1.d
deleted file mode 100644
index a5dbdf4..0000000
--- a/gas/testsuite/gas/sh/sh64/ptext32-noexp-1.d
+++ /dev/null
@@ -1,22 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/ptext64-1.d b/gas/testsuite/gas/sh/sh64/ptext64-1.d
deleted file mode 100644
index 8b99d5d..0000000
--- a/gas/testsuite/gas/sh/sh64/ptext64-1.d
+++ /dev/null
@@ -1,64 +0,0 @@
-#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
diff --git a/gas/testsuite/gas/sh/sh64/ptext64-32-1.d b/gas/testsuite/gas/sh/sh64/ptext64-32-1.d
deleted file mode 100644
index d4d17e2..0000000
--- a/gas/testsuite/gas/sh/sh64/ptext64-32-1.d
+++ /dev/null
@@ -1,40 +0,0 @@
-#as: --isa=shmedia --abi=64 -expand-pt32
-#source: ptext-1.s
-#objdump: -dr
-#name: PT, PTA, PTB expansion for external symbols, 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 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
diff --git a/gas/testsuite/gas/sh/sh64/ptext64-noexp-1.d b/gas/testsuite/gas/sh/sh64/ptext64-noexp-1.d
deleted file mode 100644
index 8a8daab..0000000
--- a/gas/testsuite/gas/sh/sh64/ptext64-noexp-1.d
+++ /dev/null
@@ -1,22 +0,0 @@
-#as: --isa=shmedia --abi=64 -no-expand
-#source: ptext-1.s
-#objdump: -dr
-#name: PT, PTA, PTB non-expansion for external symbols, 64-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
diff --git a/gas/testsuite/gas/sh/sh64/rel-1.s b/gas/testsuite/gas/sh/sh64/rel-1.s
deleted file mode 100644
index c402ecd..0000000
--- a/gas/testsuite/gas/sh/sh64/rel-1.s
+++ /dev/null
@@ -1,137 +0,0 @@
-! Test pc-relative relocations in MOVI and MOVI expansion.
-
- .mode SHmedia
- .text
-start:
- movi data1 - datalabel $,r10
- movi (data2 - datalabel $) & 65535,r10
- movi ((data3 - datalabel $) >> 0) & 65535,r10
- movi ((data4 - datalabel $) >> 16) & 65535,r10
- movi data5 + 8 - datalabel $,r10
- movi (data6 + 16 - datalabel $) & 65535,r10
- movi ((data7 + 12 - datalabel $) >> 0) & 65535,r10
- movi ((data8 + 4 - datalabel $) >> 16) & 65535,r10
-
- movi othertext1 - datalabel $,r10
- movi (othertext2 - datalabel $) & 65535,r10
- movi ((othertext3 - datalabel $) >> 0) & 65535,r10
- movi ((othertext4 - datalabel $) >> 16) & 65535,r10
- movi othertext5 + 8 - datalabel $,r10
- movi (othertext6 + 16 - datalabel $) & 65535,r10
- movi ((othertext7 + 12 - datalabel $) >> 0) & 65535,r10
- movi ((othertext8 + 4 - datalabel $) >> 16) & 65535,r10
-
- movi extern1 - datalabel $,r10
- movi (extern2 - datalabel $) & 65535,r10
- movi ((extern3 - datalabel $) >> 0) & 65535,r10
- movi ((extern4 - datalabel $) >> 16) & 65535,r10
- movi extern5 + 8 - datalabel $,r10
- movi (extern6 + 16 - datalabel $) & 65535,r10
- movi ((extern7 + 12 - datalabel $) >> 0) & 65535,r10
- movi ((extern8 + 4 - datalabel $) >> 16) & 65535,r10
-
- movi gdata1 - datalabel $,r10
- movi (gdata2 - datalabel $) & 65535,r10
- movi ((gdata3 - datalabel $) >> 0) & 65535,r10
- movi ((gdata4 - datalabel $) >> 16) & 65535,r10
- movi gdata5 + 8 - datalabel $,r10
- movi (gdata6 + 16 - datalabel $) & 65535,r10
- movi ((gdata7 + 12 - datalabel $) >> 0) & 65535,r10
- movi ((gdata8 + 4 - datalabel $) >> 16) & 65535,r10
-
- movi gothertext1 - datalabel $,r10
- movi (gothertext2 - datalabel $) & 65535,r10
- movi ((gothertext3 - datalabel $) >> 0) & 65535,r10
- movi ((gothertext4 - datalabel $) >> 16) & 65535,r10
- movi gothertext5 + 8 - datalabel $,r10
- movi (gothertext6 + 16 - datalabel $) & 65535,r10
- movi ((gothertext7 + 12 - datalabel $) >> 0) & 65535,r10
- movi ((gothertext8 + 4 - datalabel $) >> 16) & 65535,r10
-
- .section .othertext,"ax"
-x:
- nop
-othertext1:
- nop
-othertext2:
- nop
-othertext3:
- nop
-othertext4:
- nop
-othertext5:
- nop
-othertext6:
- nop
-othertext7:
- nop
-othertext8:
- nop
- .global gothertext1
-gothertext1:
- nop
- .global gothertext2
-gothertext2:
- nop
- .global gothertext3
-gothertext3:
- nop
- .global gothertext4
-gothertext4:
- nop
- .global gothertext5
-gothertext5:
- nop
- .global gothertext6
-gothertext6:
- nop
- .global gothertext7
-gothertext7:
- nop
- .global gothertext8
-gothertext8:
- nop
-
- .data
-y:
- .long 0
-data1:
- .long 0
-data2:
- .long 0
-data3:
- .long 0
-data4:
- .long 0
-data5:
- .long 0
-data6:
- .long 0
-data7:
- .long 0
-data8:
- .long 0
- .global gdata1
-gdata1:
- .long 0
- .global gdata2
-gdata2:
- .long 0
- .global gdata3
-gdata3:
- .long 0
- .global gdata4
-gdata4:
- .long 0
- .global gdata5
-gdata5:
- .long 0
- .global gdata6
-gdata6:
- .long 0
- .global gdata7
-gdata7:
- .long 0
- .global gdata8
-gdata8:
- .long 0
diff --git a/gas/testsuite/gas/sh/sh64/rel-2.s b/gas/testsuite/gas/sh/sh64/rel-2.s
deleted file mode 100644
index 798cf41..0000000
--- a/gas/testsuite/gas/sh/sh64/rel-2.s
+++ /dev/null
@@ -1,138 +0,0 @@
-! Like rel-1.s, but using "$", not "datalabel $" as self expression. It's
-! not as useful, but should emit the obvious output.
-
- .mode SHmedia
- .text
-start:
- movi data1 - $,r10
- movi (data2 - $) & 65535,r10
- movi ((data3 - $) >> 0) & 65535,r10
- movi ((data4 - $) >> 16) & 65535,r10
- movi data5 + 8 - $,r10
- movi (data6 + 16 - $) & 65535,r10
- movi ((data7 + 12 - $) >> 0) & 65535,r10
- movi ((data8 + 4 - $) >> 16) & 65535,r10
-
- movi othertext1 - $,r10
- movi (othertext2 - $) & 65535,r10
- movi ((othertext3 - $) >> 0) & 65535,r10
- movi ((othertext4 - $) >> 16) & 65535,r10
- movi othertext5 + 8 - $,r10
- movi (othertext6 + 16 - $) & 65535,r10
- movi ((othertext7 + 12 - $) >> 0) & 65535,r10
- movi ((othertext8 + 4 - $) >> 16) & 65535,r10
-
- movi extern1 - $,r10
- movi (extern2 - $) & 65535,r10
- movi ((extern3 - $) >> 0) & 65535,r10
- movi ((extern4 - $) >> 16) & 65535,r10
- movi extern5 + 8 - $,r10
- movi (extern6 + 16 - $) & 65535,r10
- movi ((extern7 + 12 - $) >> 0) & 65535,r10
- movi ((extern8 + 4 - $) >> 16) & 65535,r10
-
- movi gdata1 - $,r10
- movi (gdata2 - $) & 65535,r10
- movi ((gdata3 - $) >> 0) & 65535,r10
- movi ((gdata4 - $) >> 16) & 65535,r10
- movi gdata5 + 8 - $,r10
- movi (gdata6 + 16 - $) & 65535,r10
- movi ((gdata7 + 12 - $) >> 0) & 65535,r10
- movi ((gdata8 + 4 - $) >> 16) & 65535,r10
-
- movi gothertext1 - $,r10
- movi (gothertext2 - $) & 65535,r10
- movi ((gothertext3 - $) >> 0) & 65535,r10
- movi ((gothertext4 - $) >> 16) & 65535,r10
- movi gothertext5 + 8 - $,r10
- movi (gothertext6 + 16 - $) & 65535,r10
- movi ((gothertext7 + 12 - $) >> 0) & 65535,r10
- movi ((gothertext8 + 4 - $) >> 16) & 65535,r10
-
- .section .othertext,"ax"
-x:
- nop
-othertext1:
- nop
-othertext2:
- nop
-othertext3:
- nop
-othertext4:
- nop
-othertext5:
- nop
-othertext6:
- nop
-othertext7:
- nop
-othertext8:
- nop
- .global gothertext1
-gothertext1:
- nop
- .global gothertext2
-gothertext2:
- nop
- .global gothertext3
-gothertext3:
- nop
- .global gothertext4
-gothertext4:
- nop
- .global gothertext5
-gothertext5:
- nop
- .global gothertext6
-gothertext6:
- nop
- .global gothertext7
-gothertext7:
- nop
- .global gothertext8
-gothertext8:
- nop
-
- .data
-y:
- .long 0
-data1:
- .long 0
-data2:
- .long 0
-data3:
- .long 0
-data4:
- .long 0
-data5:
- .long 0
-data6:
- .long 0
-data7:
- .long 0
-data8:
- .long 0
- .global gdata1
-gdata1:
- .long 0
- .global gdata2
-gdata2:
- .long 0
- .global gdata3
-gdata3:
- .long 0
- .global gdata4
-gdata4:
- .long 0
- .global gdata5
-gdata5:
- .long 0
- .global gdata6
-gdata6:
- .long 0
- .global gdata7
-gdata7:
- .long 0
- .global gdata8
-gdata8:
- .long 0
diff --git a/gas/testsuite/gas/sh/sh64/rel-3.s b/gas/testsuite/gas/sh/sh64/rel-3.s
deleted file mode 100644
index de60beb..0000000
--- a/gas/testsuite/gas/sh/sh64/rel-3.s
+++ /dev/null
@@ -1,137 +0,0 @@
-! Like rel-1, but references are marked "datalabel".
-
- .mode SHmedia
- .text
-start:
- movi datalabel data1 - datalabel $,r10
- movi (datalabel data2 - datalabel $) & 65535,r10
- movi ((datalabel data3 - datalabel $) >> 0) & 65535,r10
- movi ((datalabel data4 - datalabel $) >> 16) & 65535,r10
- movi datalabel data5 + 8 - datalabel $,r10
- movi (datalabel data6 + 16 - datalabel $) & 65535,r10
- movi ((datalabel data7 + 12 - datalabel $) >> 0) & 65535,r10
- movi ((datalabel data8 + 4 - datalabel $) >> 16) & 65535,r10
-
- movi datalabel othertext1 - datalabel $,r10
- movi (datalabel othertext2 - datalabel $) & 65535,r10
- movi ((datalabel othertext3 - datalabel $) >> 0) & 65535,r10
- movi ((datalabel othertext4 - datalabel $) >> 16) & 65535,r10
- movi datalabel othertext5 + 8 - datalabel $,r10
- movi (datalabel othertext6 + 16 - datalabel $) & 65535,r10
- movi ((datalabel othertext7 + 12 - datalabel $) >> 0) & 65535,r10
- movi ((datalabel othertext8 + 4 - datalabel $) >> 16) & 65535,r10
-
- movi datalabel extern1 - datalabel $,r10
- movi (datalabel extern2 - datalabel $) & 65535,r10
- movi ((datalabel extern3 - datalabel $) >> 0) & 65535,r10
- movi ((datalabel extern4 - datalabel $) >> 16) & 65535,r10
- movi datalabel extern5 + 8 - datalabel $,r10
- movi (datalabel extern6 + 16 - datalabel $) & 65535,r10
- movi ((datalabel extern7 + 12 - datalabel $) >> 0) & 65535,r10
- movi ((datalabel extern8 + 4 - datalabel $) >> 16) & 65535,r10
-
- movi datalabel gdata1 - datalabel $,r10
- movi (datalabel gdata2 - datalabel $) & 65535,r10
- movi ((datalabel gdata3 - datalabel $) >> 0) & 65535,r10
- movi ((datalabel gdata4 - datalabel $) >> 16) & 65535,r10
- movi datalabel gdata5 + 8 - datalabel $,r10
- movi (datalabel gdata6 + 16 - datalabel $) & 65535,r10
- movi ((datalabel gdata7 + 12 - datalabel $) >> 0) & 65535,r10
- movi ((datalabel gdata8 + 4 - datalabel $) >> 16) & 65535,r10
-
- movi datalabel gothertext1 - datalabel $,r10
- movi (datalabel gothertext2 - datalabel $) & 65535,r10
- movi ((datalabel gothertext3 - datalabel $) >> 0) & 65535,r10
- movi ((datalabel gothertext4 - datalabel $) >> 16) & 65535,r10
- movi datalabel gothertext5 + 8 - datalabel $,r10
- movi (datalabel gothertext6 + 16 - datalabel $) & 65535,r10
- movi ((datalabel gothertext7 + 12 - datalabel $) >> 0) & 65535,r10
- movi ((datalabel gothertext8 + 4 - datalabel $) >> 16) & 65535,r10
-
- .section .othertext,"ax"
-x:
- nop
-othertext1:
- nop
-othertext2:
- nop
-othertext3:
- nop
-othertext4:
- nop
-othertext5:
- nop
-othertext6:
- nop
-othertext7:
- nop
-othertext8:
- nop
- .global gothertext1
-gothertext1:
- nop
- .global gothertext2
-gothertext2:
- nop
- .global gothertext3
-gothertext3:
- nop
- .global gothertext4
-gothertext4:
- nop
- .global gothertext5
-gothertext5:
- nop
- .global gothertext6
-gothertext6:
- nop
- .global gothertext7
-gothertext7:
- nop
- .global gothertext8
-gothertext8:
- nop
-
- .data
-y:
- .long 0
-data1:
- .long 0
-data2:
- .long 0
-data3:
- .long 0
-data4:
- .long 0
-data5:
- .long 0
-data6:
- .long 0
-data7:
- .long 0
-data8:
- .long 0
- .global gdata1
-gdata1:
- .long 0
- .global gdata2
-gdata2:
- .long 0
- .global gdata3
-gdata3:
- .long 0
- .global gdata4
-gdata4:
- .long 0
- .global gdata5
-gdata5:
- .long 0
- .global gdata6
-gdata6:
- .long 0
- .global gdata7
-gdata7:
- .long 0
- .global gdata8
-gdata8:
- .long 0
diff --git a/gas/testsuite/gas/sh/sh64/rel-4.s b/gas/testsuite/gas/sh/sh64/rel-4.s
deleted file mode 100644
index 411cb0a..0000000
--- a/gas/testsuite/gas/sh/sh64/rel-4.s
+++ /dev/null
@@ -1,138 +0,0 @@
-! Like rel-3.s, but as with rel-2 vs. rel-1, using "$", not "datalabel $"
-! as self expression.
-
- .mode SHmedia
- .text
-start:
- movi datalabel data1 - $,r10
- movi (datalabel data2 - $) & 65535,r10
- movi ((datalabel data3 - $) >> 0) & 65535,r10
- movi ((datalabel data4 - $) >> 16) & 65535,r10
- movi datalabel data5 + 8 - $,r10
- movi (datalabel data6 + 16 - $) & 65535,r10
- movi ((datalabel data7 + 12 - $) >> 0) & 65535,r10
- movi ((datalabel data8 + 4 - $) >> 16) & 65535,r10
-
- movi datalabel othertext1 - $,r10
- movi (datalabel othertext2 - $) & 65535,r10
- movi ((datalabel othertext3 - $) >> 0) & 65535,r10
- movi ((datalabel othertext4 - $) >> 16) & 65535,r10
- movi datalabel othertext5 + 8 - $,r10
- movi (datalabel othertext6 + 16 - $) & 65535,r10
- movi ((datalabel othertext7 + 12 - $) >> 0) & 65535,r10
- movi ((datalabel othertext8 + 4 - $) >> 16) & 65535,r10
-
- movi datalabel extern1 - $,r10
- movi (datalabel extern2 - $) & 65535,r10
- movi ((datalabel extern3 - $) >> 0) & 65535,r10
- movi ((datalabel extern4 - $) >> 16) & 65535,r10
- movi datalabel extern5 + 8 - $,r10
- movi (datalabel extern6 + 16 - $) & 65535,r10
- movi ((datalabel extern7 + 12 - $) >> 0) & 65535,r10
- movi ((datalabel extern8 + 4 - $) >> 16) & 65535,r10
-
- movi datalabel gdata1 - $,r10
- movi (datalabel gdata2 - $) & 65535,r10
- movi ((datalabel gdata3 - $) >> 0) & 65535,r10
- movi ((datalabel gdata4 - $) >> 16) & 65535,r10
- movi datalabel gdata5 + 8 - $,r10
- movi (datalabel gdata6 + 16 - $) & 65535,r10
- movi ((datalabel gdata7 + 12 - $) >> 0) & 65535,r10
- movi ((datalabel gdata8 + 4 - $) >> 16) & 65535,r10
-
- movi datalabel gothertext1 - $,r10
- movi (datalabel gothertext2 - $) & 65535,r10
- movi ((datalabel gothertext3 - $) >> 0) & 65535,r10
- movi ((datalabel gothertext4 - $) >> 16) & 65535,r10
- movi datalabel gothertext5 + 8 - $,r10
- movi (datalabel gothertext6 + 16 - $) & 65535,r10
- movi ((datalabel gothertext7 + 12 - $) >> 0) & 65535,r10
- movi ((datalabel gothertext8 + 4 - $) >> 16) & 65535,r10
-
- .section .othertext,"ax"
-x:
- nop
-othertext1:
- nop
-othertext2:
- nop
-othertext3:
- nop
-othertext4:
- nop
-othertext5:
- nop
-othertext6:
- nop
-othertext7:
- nop
-othertext8:
- nop
- .global gothertext1
-gothertext1:
- nop
- .global gothertext2
-gothertext2:
- nop
- .global gothertext3
-gothertext3:
- nop
- .global gothertext4
-gothertext4:
- nop
- .global gothertext5
-gothertext5:
- nop
- .global gothertext6
-gothertext6:
- nop
- .global gothertext7
-gothertext7:
- nop
- .global gothertext8
-gothertext8:
- nop
-
- .data
-y:
- .long 0
-data1:
- .long 0
-data2:
- .long 0
-data3:
- .long 0
-data4:
- .long 0
-data5:
- .long 0
-data6:
- .long 0
-data7:
- .long 0
-data8:
- .long 0
- .global gdata1
-gdata1:
- .long 0
- .global gdata2
-gdata2:
- .long 0
- .global gdata3
-gdata3:
- .long 0
- .global gdata4
-gdata4:
- .long 0
- .global gdata5
-gdata5:
- .long 0
- .global gdata6
-gdata6:
- .long 0
- .global gdata7
-gdata7:
- .long 0
- .global gdata8
-gdata8:
- .long 0
diff --git a/gas/testsuite/gas/sh/sh64/rel-5.s b/gas/testsuite/gas/sh/sh64/rel-5.s
deleted file mode 100644
index 053c237..0000000
--- a/gas/testsuite/gas/sh/sh64/rel-5.s
+++ /dev/null
@@ -1,48 +0,0 @@
-! Test MOVI pc-relative expansion within text section.
-
- .text
- .mode SHmedia
-start:
- nop
- movi start2+8 - datalabel $,r30
- movi start3+4 - $,r30
- movi datalabel start4 + 8 - datalabel $,r30
- movi datalabel start5 + 12 - $,r30
- movi (datalabel start6 + 24 - datalabel $) & 65535,r40
- movi ((datalabel start7 + 32 - datalabel $) >> 16) & 65535,r50
- movi gstart2+8 - datalabel $,r30
- movi gstart3+4 - $,r30
- movi datalabel gstart4 + 8 - datalabel $,r30
- movi datalabel gstart5 + 12 - $,r30
- movi (datalabel gstart6 + 24 - datalabel $) & 65535,r40
- movi ((datalabel gstart7 + 32 - datalabel $) >> 16) & 65535,r50
-start2:
- nop
-start3:
- nop
-start4:
- nop
-start5:
- nop
-start6:
- nop
-start7:
- nop
- .global gstart2
-gstart2:
- nop
- .global gstart3
-gstart3:
- nop
- .global gstart4
-gstart4:
- nop
- .global gstart5
-gstart5:
- nop
- .global gstart6
-gstart6:
- nop
- .global gstart7
-gstart7:
- nop
diff --git a/gas/testsuite/gas/sh/sh64/rel32-1.d b/gas/testsuite/gas/sh/sh64/rel32-1.d
deleted file mode 100644
index 68ecc22..0000000
--- a/gas/testsuite/gas/sh/sh64/rel32-1.d
+++ /dev/null
@@ -1,86 +0,0 @@
-#as: --abi=32
-#objdump: -sr
-#source: rel-1.s
-#name: MOVI: PC-relative relocs, 32-bit ABI.
-
-.*: file format .*-sh64.*
-
-RELOCATION RECORDS FOR \[\.text\]:
-OFFSET *TYPE *VALUE
-0+08 R_SH_IMM_LOW16_PCREL \.data\+0x0+8
-0+0c R_SH_IMM_LOW16_PCREL \.data\+0x0+c
-0+10 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+10
-0+1c R_SH_IMM_LOW16_PCREL \.data\+0x0+28
-0+20 R_SH_IMM_LOW16_PCREL \.data\+0x0+28
-0+24 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+24
-0+30 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+9
-0+34 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+d
-0+38 R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+11
-0+44 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+29
-0+48 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+29
-0+4c R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+25
-0+58 R_SH_IMM_LOW16_PCREL extern2
-0+5c R_SH_IMM_LOW16_PCREL extern3
-0+60 R_SH_IMM_MEDLOW16_PCREL extern4
-0+6c R_SH_IMM_LOW16_PCREL extern6\+0x0+10
-0+70 R_SH_IMM_LOW16_PCREL extern7\+0x0+c
-0+74 R_SH_IMM_MEDLOW16_PCREL extern8\+0x0+4
-0+80 R_SH_IMM_LOW16_PCREL gdata2
-0+84 R_SH_IMM_LOW16_PCREL gdata3
-0+88 R_SH_IMM_MEDLOW16_PCREL gdata4
-0+94 R_SH_IMM_LOW16_PCREL gdata6\+0x0+10
-0+98 R_SH_IMM_LOW16_PCREL gdata7\+0x0+c
-0+9c R_SH_IMM_MEDLOW16_PCREL gdata8\+0x0+4
-0+a8 R_SH_IMM_LOW16_PCREL gothertext2
-0+ac R_SH_IMM_LOW16_PCREL gothertext3
-0+b0 R_SH_IMM_MEDLOW16_PCREL gothertext4
-0+bc R_SH_IMM_LOW16_PCREL gothertext6\+0x0+10
-0+c0 R_SH_IMM_LOW16_PCREL gothertext7\+0x0+c
-0+c4 R_SH_IMM_MEDLOW16_PCREL gothertext8\+0x0+4
-0+00 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+4
-0+04 R_SH_IMM_LOW16_PCREL \.data\+0x0+8
-0+14 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+1c
-0+18 R_SH_IMM_LOW16_PCREL \.data\+0x0+20
-0+28 R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+5
-0+2c R_SH_IMM_LOW16_PCREL \.othertext\+0x0+9
-0+3c R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+1d
-0+40 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+21
-0+50 R_SH_IMM_MEDLOW16_PCREL extern1
-0+54 R_SH_IMM_LOW16_PCREL extern1\+0x0+4
-0+64 R_SH_IMM_MEDLOW16_PCREL extern5\+0x0+8
-0+68 R_SH_IMM_LOW16_PCREL extern5\+0x0+c
-0+78 R_SH_IMM_MEDLOW16_PCREL gdata1
-0+7c R_SH_IMM_LOW16_PCREL gdata1\+0x0+4
-0+8c R_SH_IMM_MEDLOW16_PCREL gdata5\+0x0+8
-0+90 R_SH_IMM_LOW16_PCREL gdata5\+0x0+c
-0+a0 R_SH_IMM_MEDLOW16_PCREL gothertext1
-0+a4 R_SH_IMM_LOW16_PCREL gothertext1\+0x0+4
-0+b4 R_SH_IMM_MEDLOW16_PCREL gothertext5\+0x0+8
-0+b8 R_SH_IMM_LOW16_PCREL gothertext5\+0x0+c
-
-Contents of section \.text:
- 0000 cc0000a0 c80000a0 cc0000a0 cc0000a0 .*
- 0010 cc0000a0 cc0000a0 c80000a0 cc0000a0 .*
- 0020 cc0000a0 cc0000a0 cc0000a0 c80000a0 .*
- 0030 cc0000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0040 c80000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0050 cc0000a0 c80000a0 cc0000a0 cc0000a0 .*
- 0060 cc0000a0 cc0000a0 c80000a0 cc0000a0 .*
- 0070 cc0000a0 cc0000a0 cc0000a0 c80000a0 .*
- 0080 cc0000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0090 c80000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 00a0 cc0000a0 c80000a0 cc0000a0 cc0000a0 .*
- 00b0 cc0000a0 cc0000a0 c80000a0 cc0000a0 .*
- 00c0 cc0000a0 cc0000a0 .*
-Contents of section \.data:
- 0000 00000000 00000000 00000000 00000000 .*
- 0010 00000000 00000000 00000000 00000000 .*
- 0020 00000000 00000000 00000000 00000000 .*
- 0030 00000000 00000000 00000000 00000000 .*
- 0040 00000000 .*
-Contents of section \.othertext:
- 0000 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0010 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0020 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0030 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0040 6ff0fff0 .*
diff --git a/gas/testsuite/gas/sh/sh64/rel32-2.d b/gas/testsuite/gas/sh/sh64/rel32-2.d
deleted file mode 100644
index 314f2ca..0000000
--- a/gas/testsuite/gas/sh/sh64/rel32-2.d
+++ /dev/null
@@ -1,86 +0,0 @@
-#as: --abi=32
-#objdump: -sr
-#source: rel-2.s
-#name: MOVI: PC+1-relative relocs, 32-bit ABI.
-
-.*: file format .*-sh64.*
-
-RELOCATION RECORDS FOR \[\.text\]:
-OFFSET *TYPE *VALUE
-0+8 R_SH_IMM_LOW16_PCREL \.data\+0x0+7
-0+c R_SH_IMM_LOW16_PCREL \.data\+0x0+b
-0+10 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+f
-0+1c R_SH_IMM_LOW16_PCREL \.data\+0x0+27
-0+20 R_SH_IMM_LOW16_PCREL \.data\+0x0+27
-0+24 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+23
-0+30 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+8
-0+34 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+c
-0+38 R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+10
-0+44 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+28
-0+48 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+28
-0+4c R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+24
-0+58 R_SH_IMM_LOW16_PCREL extern2-0x0+1
-0+5c R_SH_IMM_LOW16_PCREL extern3-0x0+1
-0+60 R_SH_IMM_MEDLOW16_PCREL extern4-0x0+1
-0+6c R_SH_IMM_LOW16_PCREL extern6\+0x0+f
-0+70 R_SH_IMM_LOW16_PCREL extern7\+0x0+b
-0+74 R_SH_IMM_MEDLOW16_PCREL extern8\+0x0+3
-0+80 R_SH_IMM_LOW16_PCREL gdata2-0x0+1
-0+84 R_SH_IMM_LOW16_PCREL gdata3-0x0+1
-0+88 R_SH_IMM_MEDLOW16_PCREL gdata4-0x0+1
-0+94 R_SH_IMM_LOW16_PCREL gdata6\+0x0+f
-0+98 R_SH_IMM_LOW16_PCREL gdata7\+0x0+b
-0+9c R_SH_IMM_MEDLOW16_PCREL gdata8\+0x0+3
-0+a8 R_SH_IMM_LOW16_PCREL gothertext2-0x0+1
-0+ac R_SH_IMM_LOW16_PCREL gothertext3-0x0+1
-0+b0 R_SH_IMM_MEDLOW16_PCREL gothertext4-0x0+1
-0+bc R_SH_IMM_LOW16_PCREL gothertext6\+0x0+f
-0+c0 R_SH_IMM_LOW16_PCREL gothertext7\+0x0+b
-0+c4 R_SH_IMM_MEDLOW16_PCREL gothertext8\+0x0+3
-0+ R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+3
-0+4 R_SH_IMM_LOW16_PCREL \.data\+0x0+7
-0+14 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+1b
-0+18 R_SH_IMM_LOW16_PCREL \.data\+0x0+1f
-0+28 R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+4
-0+2c R_SH_IMM_LOW16_PCREL \.othertext\+0x0+8
-0+3c R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+1c
-0+40 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+20
-0+50 R_SH_IMM_MEDLOW16_PCREL extern1-0x0+1
-0+54 R_SH_IMM_LOW16_PCREL extern1\+0x0+3
-0+64 R_SH_IMM_MEDLOW16_PCREL extern5\+0x0+7
-0+68 R_SH_IMM_LOW16_PCREL extern5\+0x0+b
-0+78 R_SH_IMM_MEDLOW16_PCREL gdata1-0x0+1
-0+7c R_SH_IMM_LOW16_PCREL gdata1\+0x0+3
-0+8c R_SH_IMM_MEDLOW16_PCREL gdata5\+0x0+7
-0+90 R_SH_IMM_LOW16_PCREL gdata5\+0x0+b
-0+a0 R_SH_IMM_MEDLOW16_PCREL gothertext1-0x0+1
-0+a4 R_SH_IMM_LOW16_PCREL gothertext1\+0x0+3
-0+b4 R_SH_IMM_MEDLOW16_PCREL gothertext5\+0x0+7
-0+b8 R_SH_IMM_LOW16_PCREL gothertext5\+0x0+b
-
-Contents of section \.text:
- 0000 cc0000a0 c80000a0 cc0000a0 cc0000a0 .*
- 0010 cc0000a0 cc0000a0 c80000a0 cc0000a0 .*
- 0020 cc0000a0 cc0000a0 cc0000a0 c80000a0 .*
- 0030 cc0000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0040 c80000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0050 cc0000a0 c80000a0 cc0000a0 cc0000a0 .*
- 0060 cc0000a0 cc0000a0 c80000a0 cc0000a0 .*
- 0070 cc0000a0 cc0000a0 cc0000a0 c80000a0 .*
- 0080 cc0000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0090 c80000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 00a0 cc0000a0 c80000a0 cc0000a0 cc0000a0 .*
- 00b0 cc0000a0 cc0000a0 c80000a0 cc0000a0 .*
- 00c0 cc0000a0 cc0000a0 .*
-Contents of section \.data:
- 0000 00000000 00000000 00000000 00000000 .*
- 0010 00000000 00000000 00000000 00000000 .*
- 0020 00000000 00000000 00000000 00000000 .*
- 0030 00000000 00000000 00000000 00000000 .*
- 0040 00000000 .*
-Contents of section \.othertext:
- 0000 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0010 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0020 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0030 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0040 6ff0fff0 .*
diff --git a/gas/testsuite/gas/sh/sh64/rel32-3.d b/gas/testsuite/gas/sh/sh64/rel32-3.d
deleted file mode 100644
index aba5683..0000000
--- a/gas/testsuite/gas/sh/sh64/rel32-3.d
+++ /dev/null
@@ -1,86 +0,0 @@
-#as: --abi=32
-#objdump: -sr
-#source: rel-3.s
-#name: MOVI: PC-relative datalabel relocs, 32-bit ABI.
-
-.*: file format .*-sh64.*
-
-RELOCATION RECORDS FOR \[\.text\]:
-OFFSET *TYPE *VALUE
-0+8 R_SH_IMM_LOW16_PCREL \.data\+0x0+8
-0+c R_SH_IMM_LOW16_PCREL \.data\+0x0+c
-0+10 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+10
-0+1c R_SH_IMM_LOW16_PCREL \.data\+0x0+28
-0+20 R_SH_IMM_LOW16_PCREL \.data\+0x0+28
-0+24 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+24
-0+30 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+8
-0+34 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+c
-0+38 R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+10
-0+44 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+28
-0+48 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+28
-0+4c R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+24
-0+58 R_SH_IMM_LOW16_PCREL extern2
-0+5c R_SH_IMM_LOW16_PCREL extern3
-0+60 R_SH_IMM_MEDLOW16_PCREL extern4
-0+6c R_SH_IMM_LOW16_PCREL extern6\+0x0+10
-0+70 R_SH_IMM_LOW16_PCREL extern7\+0x0+c
-0+74 R_SH_IMM_MEDLOW16_PCREL extern8\+0x0+4
-0+80 R_SH_IMM_LOW16_PCREL gdata2
-0+84 R_SH_IMM_LOW16_PCREL gdata3
-0+88 R_SH_IMM_MEDLOW16_PCREL gdata4
-0+94 R_SH_IMM_LOW16_PCREL gdata6\+0x0+10
-0+98 R_SH_IMM_LOW16_PCREL gdata7\+0x0+c
-0+9c R_SH_IMM_MEDLOW16_PCREL gdata8\+0x0+4
-0+a8 R_SH_IMM_LOW16_PCREL gothertext2
-0+ac R_SH_IMM_LOW16_PCREL gothertext3
-0+b0 R_SH_IMM_MEDLOW16_PCREL gothertext4
-0+bc R_SH_IMM_LOW16_PCREL gothertext6\+0x0+10
-0+c0 R_SH_IMM_LOW16_PCREL gothertext7\+0x0+c
-0+c4 R_SH_IMM_MEDLOW16_PCREL gothertext8\+0x0+4
-0+ R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+4
-0+4 R_SH_IMM_LOW16_PCREL \.data\+0x0+8
-0+14 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+1c
-0+18 R_SH_IMM_LOW16_PCREL \.data\+0x0+20
-0+28 R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+4
-0+2c R_SH_IMM_LOW16_PCREL \.othertext\+0x0+8
-0+3c R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+1c
-0+40 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+20
-0+50 R_SH_IMM_MEDLOW16_PCREL extern1
-0+54 R_SH_IMM_LOW16_PCREL extern1\+0x0+4
-0+64 R_SH_IMM_MEDLOW16_PCREL extern5\+0x0+8
-0+68 R_SH_IMM_LOW16_PCREL extern5\+0x0+c
-0+78 R_SH_IMM_MEDLOW16_PCREL gdata1
-0+7c R_SH_IMM_LOW16_PCREL gdata1\+0x0+4
-0+8c R_SH_IMM_MEDLOW16_PCREL gdata5\+0x0+8
-0+90 R_SH_IMM_LOW16_PCREL gdata5\+0x0+c
-0+a0 R_SH_IMM_MEDLOW16_PCREL gothertext1
-0+a4 R_SH_IMM_LOW16_PCREL gothertext1\+0x0+4
-0+b4 R_SH_IMM_MEDLOW16_PCREL gothertext5\+0x0+8
-0+b8 R_SH_IMM_LOW16_PCREL gothertext5\+0x0+c
-
-Contents of section \.text:
- 0000 cc0000a0 c80000a0 cc0000a0 cc0000a0 .*
- 0010 cc0000a0 cc0000a0 c80000a0 cc0000a0 .*
- 0020 cc0000a0 cc0000a0 cc0000a0 c80000a0 .*
- 0030 cc0000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0040 c80000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0050 cc0000a0 c80000a0 cc0000a0 cc0000a0 .*
- 0060 cc0000a0 cc0000a0 c80000a0 cc0000a0 .*
- 0070 cc0000a0 cc0000a0 cc0000a0 c80000a0 .*
- 0080 cc0000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0090 c80000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 00a0 cc0000a0 c80000a0 cc0000a0 cc0000a0 .*
- 00b0 cc0000a0 cc0000a0 c80000a0 cc0000a0 .*
- 00c0 cc0000a0 cc0000a0 .*
-Contents of section \.data:
- 0000 00000000 00000000 00000000 00000000 .*
- 0010 00000000 00000000 00000000 00000000 .*
- 0020 00000000 00000000 00000000 00000000 .*
- 0030 00000000 00000000 00000000 00000000 .*
- 0040 00000000 .*
-Contents of section \.othertext:
- 0000 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0010 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0020 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0030 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0040 6ff0fff0 .*
diff --git a/gas/testsuite/gas/sh/sh64/rel32-4.d b/gas/testsuite/gas/sh/sh64/rel32-4.d
deleted file mode 100644
index 29d716a..0000000
--- a/gas/testsuite/gas/sh/sh64/rel32-4.d
+++ /dev/null
@@ -1,86 +0,0 @@
-#as: --abi=32
-#objdump: -sr
-#source: rel-4.s
-#name: MOVI: PC+1-relative datalabel relocs, 32-bit ABI.
-
-.*: file format .*-sh64.*
-
-RELOCATION RECORDS FOR \[\.text\]:
-OFFSET *TYPE *VALUE
-0+8 R_SH_IMM_LOW16_PCREL \.data\+0x0+7
-0+c R_SH_IMM_LOW16_PCREL \.data\+0x0+b
-0+10 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+f
-0+1c R_SH_IMM_LOW16_PCREL \.data\+0x0+27
-0+20 R_SH_IMM_LOW16_PCREL \.data\+0x0+27
-0+24 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+23
-0+30 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+7
-0+34 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+b
-0+38 R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+f
-0+44 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+27
-0+48 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+27
-0+4c R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+23
-0+58 R_SH_IMM_LOW16_PCREL extern2-0x0+1
-0+5c R_SH_IMM_LOW16_PCREL extern3-0x0+1
-0+60 R_SH_IMM_MEDLOW16_PCREL extern4-0x0+1
-0+6c R_SH_IMM_LOW16_PCREL extern6\+0x0+f
-0+70 R_SH_IMM_LOW16_PCREL extern7\+0x0+b
-0+74 R_SH_IMM_MEDLOW16_PCREL extern8\+0x0+3
-0+80 R_SH_IMM_LOW16_PCREL gdata2-0x0+1
-0+84 R_SH_IMM_LOW16_PCREL gdata3-0x0+1
-0+88 R_SH_IMM_MEDLOW16_PCREL gdata4-0x0+1
-0+94 R_SH_IMM_LOW16_PCREL gdata6\+0x0+f
-0+98 R_SH_IMM_LOW16_PCREL gdata7\+0x0+b
-0+9c R_SH_IMM_MEDLOW16_PCREL gdata8\+0x0+3
-0+a8 R_SH_IMM_LOW16_PCREL gothertext2-0x0+1
-0+ac R_SH_IMM_LOW16_PCREL gothertext3-0x0+1
-0+b0 R_SH_IMM_MEDLOW16_PCREL gothertext4-0x0+1
-0+bc R_SH_IMM_LOW16_PCREL gothertext6\+0x0+f
-0+c0 R_SH_IMM_LOW16_PCREL gothertext7\+0x0+b
-0+c4 R_SH_IMM_MEDLOW16_PCREL gothertext8\+0x0+3
-0+ R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+3
-0+4 R_SH_IMM_LOW16_PCREL \.data\+0x0+7
-0+14 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+1b
-0+18 R_SH_IMM_LOW16_PCREL \.data\+0x0+1f
-0+28 R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+3
-0+2c R_SH_IMM_LOW16_PCREL \.othertext\+0x0+7
-0+3c R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+1b
-0+40 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+1f
-0+50 R_SH_IMM_MEDLOW16_PCREL extern1-0x0+1
-0+54 R_SH_IMM_LOW16_PCREL extern1\+0x0+3
-0+64 R_SH_IMM_MEDLOW16_PCREL extern5\+0x0+7
-0+68 R_SH_IMM_LOW16_PCREL extern5\+0x0+b
-0+78 R_SH_IMM_MEDLOW16_PCREL gdata1-0x0+1
-0+7c R_SH_IMM_LOW16_PCREL gdata1\+0x0+3
-0+8c R_SH_IMM_MEDLOW16_PCREL gdata5\+0x0+7
-0+90 R_SH_IMM_LOW16_PCREL gdata5\+0x0+b
-0+a0 R_SH_IMM_MEDLOW16_PCREL gothertext1-0x0+1
-0+a4 R_SH_IMM_LOW16_PCREL gothertext1\+0x0+3
-0+b4 R_SH_IMM_MEDLOW16_PCREL gothertext5\+0x0+7
-0+b8 R_SH_IMM_LOW16_PCREL gothertext5\+0x0+b
-
-Contents of section \.text:
- 0000 cc0000a0 c80000a0 cc0000a0 cc0000a0 .*
- 0010 cc0000a0 cc0000a0 c80000a0 cc0000a0 .*
- 0020 cc0000a0 cc0000a0 cc0000a0 c80000a0 .*
- 0030 cc0000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0040 c80000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0050 cc0000a0 c80000a0 cc0000a0 cc0000a0 .*
- 0060 cc0000a0 cc0000a0 c80000a0 cc0000a0 .*
- 0070 cc0000a0 cc0000a0 cc0000a0 c80000a0 .*
- 0080 cc0000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0090 c80000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 00a0 cc0000a0 c80000a0 cc0000a0 cc0000a0 .*
- 00b0 cc0000a0 cc0000a0 c80000a0 cc0000a0 .*
- 00c0 cc0000a0 cc0000a0 .*
-Contents of section \.data:
- 0000 00000000 00000000 00000000 00000000 .*
- 0010 00000000 00000000 00000000 00000000 .*
- 0020 00000000 00000000 00000000 00000000 .*
- 0030 00000000 00000000 00000000 00000000 .*
- 0040 00000000 .*
-Contents of section \.othertext:
- 0000 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0010 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0020 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0030 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0040 6ff0fff0 .*
diff --git a/gas/testsuite/gas/sh/sh64/rel32-5.d b/gas/testsuite/gas/sh/sh64/rel32-5.d
deleted file mode 100644
index 7472013..0000000
--- a/gas/testsuite/gas/sh/sh64/rel32-5.d
+++ /dev/null
@@ -1,30 +0,0 @@
-#as: --abi=32
-#objdump: -sr
-#source: rel-5.s
-#name: MOVI: PC-relative reloc within .text, 32-bit ABI.
-
-.*: file format .*-sh64.*
-
-RELOCATION RECORDS FOR \[\.text\]:
-OFFSET *TYPE *VALUE
-0+3c R_SH_IMM_LOW16_PCREL gstart6\+0x0+18
-0+40 R_SH_IMM_MEDLOW16_PCREL gstart7\+0x0+20
-0+1c R_SH_IMM_MEDLOW16_PCREL gstart2\+0x0+8
-0+20 R_SH_IMM_LOW16_PCREL gstart2\+0x0+c
-0+24 R_SH_IMM_MEDLOW16_PCREL gstart3\+0x0+3
-0+28 R_SH_IMM_LOW16_PCREL gstart3\+0x0+7
-0+2c R_SH_IMM_MEDLOW16_PCREL gstart4\+0x0+8
-0+30 R_SH_IMM_LOW16_PCREL gstart4\+0x0+c
-0+34 R_SH_IMM_MEDLOW16_PCREL gstart5\+0x0+b
-0+38 R_SH_IMM_LOW16_PCREL gstart5\+0x0+f
-
-Contents of section \.text:
- 0000 6ff0fff0 cc0125e0 cc0111e0 cc0121e0 .*
- 0010 cc012de0 cc016280 cc000320 cc0001e0 .*
- 0020 c80001e0 cc0001e0 c80001e0 cc0001e0 .*
- 0030 c80001e0 cc0001e0 c80001e0 cc000280 .*
- 0040 cc000320 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0050 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0060 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0070 6ff0fff0 .*
-
diff --git a/gas/testsuite/gas/sh/sh64/rel64-1.d b/gas/testsuite/gas/sh/sh64/rel64-1.d
deleted file mode 100644
index 7e9b638..0000000
--- a/gas/testsuite/gas/sh/sh64/rel64-1.d
+++ /dev/null
@@ -1,111 +0,0 @@
-#as: --abi=64
-#objdump: -sr
-#source: rel-1.s
-#name: MOVI: PC-relative relocs, 64-bit ABI.
-
-.*: file format .*-sh64.*
-
-RELOCATION RECORDS FOR \[\.text\]:
-OFFSET TYPE VALUE
-0+10 R_SH_IMM_LOW16_PCREL \.data\+0x0+8
-0+14 R_SH_IMM_LOW16_PCREL \.data\+0x0+c
-0+18 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+10
-0+2c R_SH_IMM_LOW16_PCREL \.data\+0x0+28
-0+30 R_SH_IMM_LOW16_PCREL \.data\+0x0+28
-0+34 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+24
-0+48 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+9
-0+4c R_SH_IMM_LOW16_PCREL \.othertext\+0x0+d
-0+50 R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+11
-0+64 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+29
-0+68 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+29
-0+6c R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+25
-0+80 R_SH_IMM_LOW16_PCREL extern2
-0+84 R_SH_IMM_LOW16_PCREL extern3
-0+88 R_SH_IMM_MEDLOW16_PCREL extern4
-0+9c R_SH_IMM_LOW16_PCREL extern6\+0x0+10
-0+a0 R_SH_IMM_LOW16_PCREL extern7\+0x0+c
-0+a4 R_SH_IMM_MEDLOW16_PCREL extern8\+0x0+4
-0+b8 R_SH_IMM_LOW16_PCREL gdata2
-0+bc R_SH_IMM_LOW16_PCREL gdata3
-0+c0 R_SH_IMM_MEDLOW16_PCREL gdata4
-0+d4 R_SH_IMM_LOW16_PCREL gdata6\+0x0+10
-0+d8 R_SH_IMM_LOW16_PCREL gdata7\+0x0+c
-0+dc R_SH_IMM_MEDLOW16_PCREL gdata8\+0x0+4
-0+f0 R_SH_IMM_LOW16_PCREL gothertext2
-0+f4 R_SH_IMM_LOW16_PCREL gothertext3
-0+f8 R_SH_IMM_MEDLOW16_PCREL gothertext4
-0+10c R_SH_IMM_LOW16_PCREL gothertext6\+0x0+10
-0+110 R_SH_IMM_LOW16_PCREL gothertext7\+0x0+c
-0+114 R_SH_IMM_MEDLOW16_PCREL gothertext8\+0x0+4
-0+ R_SH_IMM_HI16_PCREL \.data\+0x0+4
-0+4 R_SH_IMM_MEDHI16_PCREL \.data\+0x0+8
-0+8 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+c
-0+c R_SH_IMM_LOW16_PCREL \.data\+0x0+10
-0+1c R_SH_IMM_HI16_PCREL \.data\+0x0+1c
-0+20 R_SH_IMM_MEDHI16_PCREL \.data\+0x0+20
-0+24 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+24
-0+28 R_SH_IMM_LOW16_PCREL \.data\+0x0+28
-0+38 R_SH_IMM_HI16_PCREL \.othertext\+0x0+5
-0+3c R_SH_IMM_MEDHI16_PCREL \.othertext\+0x0+9
-0+40 R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+d
-0+44 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+11
-0+54 R_SH_IMM_HI16_PCREL \.othertext\+0x0+1d
-0+58 R_SH_IMM_MEDHI16_PCREL \.othertext\+0x0+21
-0+5c R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+25
-0+60 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+29
-0+70 R_SH_IMM_HI16_PCREL extern1
-0+74 R_SH_IMM_MEDHI16_PCREL extern1\+0x0+4
-0+78 R_SH_IMM_MEDLOW16_PCREL extern1\+0x0+8
-0+7c R_SH_IMM_LOW16_PCREL extern1\+0x0+c
-0+8c R_SH_IMM_HI16_PCREL extern5\+0x0+8
-0+90 R_SH_IMM_MEDHI16_PCREL extern5\+0x0+c
-0+94 R_SH_IMM_MEDLOW16_PCREL extern5\+0x0+10
-0+98 R_SH_IMM_LOW16_PCREL extern5\+0x0+14
-0+a8 R_SH_IMM_HI16_PCREL gdata1
-0+ac R_SH_IMM_MEDHI16_PCREL gdata1\+0x0+4
-0+b0 R_SH_IMM_MEDLOW16_PCREL gdata1\+0x0+8
-0+b4 R_SH_IMM_LOW16_PCREL gdata1\+0x0+c
-0+c4 R_SH_IMM_HI16_PCREL gdata5\+0x0+8
-0+c8 R_SH_IMM_MEDHI16_PCREL gdata5\+0x0+c
-0+cc R_SH_IMM_MEDLOW16_PCREL gdata5\+0x0+10
-0+d0 R_SH_IMM_LOW16_PCREL gdata5\+0x0+14
-0+e0 R_SH_IMM_HI16_PCREL gothertext1
-0+e4 R_SH_IMM_MEDHI16_PCREL gothertext1\+0x0+4
-0+e8 R_SH_IMM_MEDLOW16_PCREL gothertext1\+0x0+8
-0+ec R_SH_IMM_LOW16_PCREL gothertext1\+0x0+c
-0+fc R_SH_IMM_HI16_PCREL gothertext5\+0x0+8
-0+100 R_SH_IMM_MEDHI16_PCREL gothertext5\+0x0+c
-0+104 R_SH_IMM_MEDLOW16_PCREL gothertext5\+0x0+10
-0+108 R_SH_IMM_LOW16_PCREL gothertext5\+0x0+14
-
-Contents of section \.text:
- 0000 cc0000a0 c80000a0 c80000a0 c80000a0 .*
- 0010 cc0000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0020 c80000a0 c80000a0 c80000a0 cc0000a0 .*
- 0030 cc0000a0 cc0000a0 cc0000a0 c80000a0 .*
- 0040 c80000a0 c80000a0 cc0000a0 cc0000a0 .*
- 0050 cc0000a0 cc0000a0 c80000a0 c80000a0 .*
- 0060 c80000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0070 cc0000a0 c80000a0 c80000a0 c80000a0 .*
- 0080 cc0000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0090 c80000a0 c80000a0 c80000a0 cc0000a0 .*
- 00a0 cc0000a0 cc0000a0 cc0000a0 c80000a0 .*
- 00b0 c80000a0 c80000a0 cc0000a0 cc0000a0 .*
- 00c0 cc0000a0 cc0000a0 c80000a0 c80000a0 .*
- 00d0 c80000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 00e0 cc0000a0 c80000a0 c80000a0 c80000a0 .*
- 00f0 cc0000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0100 c80000a0 c80000a0 c80000a0 cc0000a0 .*
- 0110 cc0000a0 cc0000a0 .*
-Contents of section \.data:
- 0000 00000000 00000000 00000000 00000000 .*
- 0010 00000000 00000000 00000000 00000000 .*
- 0020 00000000 00000000 00000000 00000000 .*
- 0030 00000000 00000000 00000000 00000000 .*
- 0040 00000000 .*
-Contents of section \.othertext:
- 0000 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0010 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0020 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0030 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0040 6ff0fff0 .*
diff --git a/gas/testsuite/gas/sh/sh64/rel64-2.d b/gas/testsuite/gas/sh/sh64/rel64-2.d
deleted file mode 100644
index 7d5ca54..0000000
--- a/gas/testsuite/gas/sh/sh64/rel64-2.d
+++ /dev/null
@@ -1,111 +0,0 @@
-#as: --abi=64
-#objdump: -sr
-#source: rel-2.s
-#name: MOVI: PC+1-relative relocs, 64-bit ABI.
-
-.*: file format .*-sh64.*
-
-RELOCATION RECORDS FOR \[\.text\]:
-OFFSET TYPE VALUE
-0+10 R_SH_IMM_LOW16_PCREL \.data\+0x0+7
-0+14 R_SH_IMM_LOW16_PCREL \.data\+0x0+b
-0+18 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+f
-0+2c R_SH_IMM_LOW16_PCREL \.data\+0x0+27
-0+30 R_SH_IMM_LOW16_PCREL \.data\+0x0+27
-0+34 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+23
-0+48 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+8
-0+4c R_SH_IMM_LOW16_PCREL \.othertext\+0x0+c
-0+50 R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+10
-0+64 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+28
-0+68 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+28
-0+6c R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+24
-0+80 R_SH_IMM_LOW16_PCREL extern2-0x0+1
-0+84 R_SH_IMM_LOW16_PCREL extern3-0x0+1
-0+88 R_SH_IMM_MEDLOW16_PCREL extern4-0x0+1
-0+9c R_SH_IMM_LOW16_PCREL extern6\+0x0+f
-0+a0 R_SH_IMM_LOW16_PCREL extern7\+0x0+b
-0+a4 R_SH_IMM_MEDLOW16_PCREL extern8\+0x0+3
-0+b8 R_SH_IMM_LOW16_PCREL gdata2-0x0+1
-0+bc R_SH_IMM_LOW16_PCREL gdata3-0x0+1
-0+c0 R_SH_IMM_MEDLOW16_PCREL gdata4-0x0+1
-0+d4 R_SH_IMM_LOW16_PCREL gdata6\+0x0+f
-0+d8 R_SH_IMM_LOW16_PCREL gdata7\+0x0+b
-0+dc R_SH_IMM_MEDLOW16_PCREL gdata8\+0x0+3
-0+f0 R_SH_IMM_LOW16_PCREL gothertext2-0x0+1
-0+f4 R_SH_IMM_LOW16_PCREL gothertext3-0x0+1
-0+f8 R_SH_IMM_MEDLOW16_PCREL gothertext4-0x0+1
-0+10c R_SH_IMM_LOW16_PCREL gothertext6\+0x0+f
-0+110 R_SH_IMM_LOW16_PCREL gothertext7\+0x0+b
-0+114 R_SH_IMM_MEDLOW16_PCREL gothertext8\+0x0+3
-0+ R_SH_IMM_HI16_PCREL \.data\+0x0+3
-0+4 R_SH_IMM_MEDHI16_PCREL \.data\+0x0+7
-0+8 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+b
-0+c R_SH_IMM_LOW16_PCREL \.data\+0x0+f
-0+1c R_SH_IMM_HI16_PCREL \.data\+0x0+1b
-0+20 R_SH_IMM_MEDHI16_PCREL \.data\+0x0+1f
-0+24 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+23
-0+28 R_SH_IMM_LOW16_PCREL \.data\+0x0+27
-0+38 R_SH_IMM_HI16_PCREL \.othertext\+0x0+4
-0+3c R_SH_IMM_MEDHI16_PCREL \.othertext\+0x0+8
-0+40 R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+c
-0+44 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+10
-0+54 R_SH_IMM_HI16_PCREL \.othertext\+0x0+1c
-0+58 R_SH_IMM_MEDHI16_PCREL \.othertext\+0x0+20
-0+5c R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+24
-0+60 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+28
-0+70 R_SH_IMM_HI16_PCREL extern1-0x0+1
-0+74 R_SH_IMM_MEDHI16_PCREL extern1\+0x0+3
-0+78 R_SH_IMM_MEDLOW16_PCREL extern1\+0x0+7
-0+7c R_SH_IMM_LOW16_PCREL extern1\+0x0+b
-0+8c R_SH_IMM_HI16_PCREL extern5\+0x0+7
-0+90 R_SH_IMM_MEDHI16_PCREL extern5\+0x0+b
-0+94 R_SH_IMM_MEDLOW16_PCREL extern5\+0x0+f
-0+98 R_SH_IMM_LOW16_PCREL extern5\+0x0+13
-0+a8 R_SH_IMM_HI16_PCREL gdata1-0x0+1
-0+ac R_SH_IMM_MEDHI16_PCREL gdata1\+0x0+3
-0+b0 R_SH_IMM_MEDLOW16_PCREL gdata1\+0x0+7
-0+b4 R_SH_IMM_LOW16_PCREL gdata1\+0x0+b
-0+c4 R_SH_IMM_HI16_PCREL gdata5\+0x0+7
-0+c8 R_SH_IMM_MEDHI16_PCREL gdata5\+0x0+b
-0+cc R_SH_IMM_MEDLOW16_PCREL gdata5\+0x0+f
-0+d0 R_SH_IMM_LOW16_PCREL gdata5\+0x0+13
-0+e0 R_SH_IMM_HI16_PCREL gothertext1-0x0+1
-0+e4 R_SH_IMM_MEDHI16_PCREL gothertext1\+0x0+3
-0+e8 R_SH_IMM_MEDLOW16_PCREL gothertext1\+0x0+7
-0+ec R_SH_IMM_LOW16_PCREL gothertext1\+0x0+b
-0+fc R_SH_IMM_HI16_PCREL gothertext5\+0x0+7
-0+100 R_SH_IMM_MEDHI16_PCREL gothertext5\+0x0+b
-0+104 R_SH_IMM_MEDLOW16_PCREL gothertext5\+0x0+f
-0+108 R_SH_IMM_LOW16_PCREL gothertext5\+0x0+13
-
-Contents of section \.text:
- 0000 cc0000a0 c80000a0 c80000a0 c80000a0 .*
- 0010 cc0000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0020 c80000a0 c80000a0 c80000a0 cc0000a0 .*
- 0030 cc0000a0 cc0000a0 cc0000a0 c80000a0 .*
- 0040 c80000a0 c80000a0 cc0000a0 cc0000a0 .*
- 0050 cc0000a0 cc0000a0 c80000a0 c80000a0 .*
- 0060 c80000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0070 cc0000a0 c80000a0 c80000a0 c80000a0 .*
- 0080 cc0000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0090 c80000a0 c80000a0 c80000a0 cc0000a0 .*
- 00a0 cc0000a0 cc0000a0 cc0000a0 c80000a0 .*
- 00b0 c80000a0 c80000a0 cc0000a0 cc0000a0 .*
- 00c0 cc0000a0 cc0000a0 c80000a0 c80000a0 .*
- 00d0 c80000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 00e0 cc0000a0 c80000a0 c80000a0 c80000a0 .*
- 00f0 cc0000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0100 c80000a0 c80000a0 c80000a0 cc0000a0 .*
- 0110 cc0000a0 cc0000a0 .*
-Contents of section \.data:
- 0000 00000000 00000000 00000000 00000000 .*
- 0010 00000000 00000000 00000000 00000000 .*
- 0020 00000000 00000000 00000000 00000000 .*
- 0030 00000000 00000000 00000000 00000000 .*
- 0040 00000000 .*
-Contents of section \.othertext:
- 0000 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0010 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0020 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0030 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0040 6ff0fff0 .*
diff --git a/gas/testsuite/gas/sh/sh64/rel64-3.d b/gas/testsuite/gas/sh/sh64/rel64-3.d
deleted file mode 100644
index 986054d..0000000
--- a/gas/testsuite/gas/sh/sh64/rel64-3.d
+++ /dev/null
@@ -1,111 +0,0 @@
-#as: --abi=64
-#objdump: -sr
-#source: rel-3.s
-#name: MOVI: PC-relative datalabel relocs, 64-bit ABI.
-
-.*: file format .*-sh64.*
-
-RELOCATION RECORDS FOR \[\.text\]:
-OFFSET TYPE VALUE
-0+10 R_SH_IMM_LOW16_PCREL \.data\+0x0+8
-0+14 R_SH_IMM_LOW16_PCREL \.data\+0x0+c
-0+18 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+10
-0+2c R_SH_IMM_LOW16_PCREL \.data\+0x0+28
-0+30 R_SH_IMM_LOW16_PCREL \.data\+0x0+28
-0+34 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+24
-0+48 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+8
-0+4c R_SH_IMM_LOW16_PCREL \.othertext\+0x0+c
-0+50 R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+10
-0+64 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+28
-0+68 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+28
-0+6c R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+24
-0+80 R_SH_IMM_LOW16_PCREL extern2
-0+84 R_SH_IMM_LOW16_PCREL extern3
-0+88 R_SH_IMM_MEDLOW16_PCREL extern4
-0+9c R_SH_IMM_LOW16_PCREL extern6\+0x0+10
-0+a0 R_SH_IMM_LOW16_PCREL extern7\+0x0+c
-0+a4 R_SH_IMM_MEDLOW16_PCREL extern8\+0x0+4
-0+b8 R_SH_IMM_LOW16_PCREL gdata2
-0+bc R_SH_IMM_LOW16_PCREL gdata3
-0+c0 R_SH_IMM_MEDLOW16_PCREL gdata4
-0+d4 R_SH_IMM_LOW16_PCREL gdata6\+0x0+10
-0+d8 R_SH_IMM_LOW16_PCREL gdata7\+0x0+c
-0+dc R_SH_IMM_MEDLOW16_PCREL gdata8\+0x0+4
-0+f0 R_SH_IMM_LOW16_PCREL gothertext2
-0+f4 R_SH_IMM_LOW16_PCREL gothertext3
-0+f8 R_SH_IMM_MEDLOW16_PCREL gothertext4
-0+10c R_SH_IMM_LOW16_PCREL gothertext6\+0x0+10
-0+110 R_SH_IMM_LOW16_PCREL gothertext7\+0x0+c
-0+114 R_SH_IMM_MEDLOW16_PCREL gothertext8\+0x0+4
-0+ R_SH_IMM_HI16_PCREL \.data\+0x0+4
-0+4 R_SH_IMM_MEDHI16_PCREL \.data\+0x0+8
-0+8 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+c
-0+c R_SH_IMM_LOW16_PCREL \.data\+0x0+10
-0+1c R_SH_IMM_HI16_PCREL \.data\+0x0+1c
-0+20 R_SH_IMM_MEDHI16_PCREL \.data\+0x0+20
-0+24 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+24
-0+28 R_SH_IMM_LOW16_PCREL \.data\+0x0+28
-0+38 R_SH_IMM_HI16_PCREL \.othertext\+0x0+4
-0+3c R_SH_IMM_MEDHI16_PCREL \.othertext\+0x0+8
-0+40 R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+c
-0+44 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+10
-0+54 R_SH_IMM_HI16_PCREL \.othertext\+0x0+1c
-0+58 R_SH_IMM_MEDHI16_PCREL \.othertext\+0x0+20
-0+5c R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+24
-0+60 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+28
-0+70 R_SH_IMM_HI16_PCREL extern1
-0+74 R_SH_IMM_MEDHI16_PCREL extern1\+0x0+4
-0+78 R_SH_IMM_MEDLOW16_PCREL extern1\+0x0+8
-0+7c R_SH_IMM_LOW16_PCREL extern1\+0x0+c
-0+8c R_SH_IMM_HI16_PCREL extern5\+0x0+8
-0+90 R_SH_IMM_MEDHI16_PCREL extern5\+0x0+c
-0+94 R_SH_IMM_MEDLOW16_PCREL extern5\+0x0+10
-0+98 R_SH_IMM_LOW16_PCREL extern5\+0x0+14
-0+a8 R_SH_IMM_HI16_PCREL gdata1
-0+ac R_SH_IMM_MEDHI16_PCREL gdata1\+0x0+4
-0+b0 R_SH_IMM_MEDLOW16_PCREL gdata1\+0x0+8
-0+b4 R_SH_IMM_LOW16_PCREL gdata1\+0x0+c
-0+c4 R_SH_IMM_HI16_PCREL gdata5\+0x0+8
-0+c8 R_SH_IMM_MEDHI16_PCREL gdata5\+0x0+c
-0+cc R_SH_IMM_MEDLOW16_PCREL gdata5\+0x0+10
-0+d0 R_SH_IMM_LOW16_PCREL gdata5\+0x0+14
-0+e0 R_SH_IMM_HI16_PCREL gothertext1
-0+e4 R_SH_IMM_MEDHI16_PCREL gothertext1\+0x0+4
-0+e8 R_SH_IMM_MEDLOW16_PCREL gothertext1\+0x0+8
-0+ec R_SH_IMM_LOW16_PCREL gothertext1\+0x0+c
-0+fc R_SH_IMM_HI16_PCREL gothertext5\+0x0+8
-0+100 R_SH_IMM_MEDHI16_PCREL gothertext5\+0x0+c
-0+104 R_SH_IMM_MEDLOW16_PCREL gothertext5\+0x0+10
-0+108 R_SH_IMM_LOW16_PCREL gothertext5\+0x0+14
-
-Contents of section \.text:
- 0000 cc0000a0 c80000a0 c80000a0 c80000a0 .*
- 0010 cc0000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0020 c80000a0 c80000a0 c80000a0 cc0000a0 .*
- 0030 cc0000a0 cc0000a0 cc0000a0 c80000a0 .*
- 0040 c80000a0 c80000a0 cc0000a0 cc0000a0 .*
- 0050 cc0000a0 cc0000a0 c80000a0 c80000a0 .*
- 0060 c80000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0070 cc0000a0 c80000a0 c80000a0 c80000a0 .*
- 0080 cc0000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0090 c80000a0 c80000a0 c80000a0 cc0000a0 .*
- 00a0 cc0000a0 cc0000a0 cc0000a0 c80000a0 .*
- 00b0 c80000a0 c80000a0 cc0000a0 cc0000a0 .*
- 00c0 cc0000a0 cc0000a0 c80000a0 c80000a0 .*
- 00d0 c80000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 00e0 cc0000a0 c80000a0 c80000a0 c80000a0 .*
- 00f0 cc0000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0100 c80000a0 c80000a0 c80000a0 cc0000a0 .*
- 0110 cc0000a0 cc0000a0 .*
-Contents of section \.data:
- 0000 00000000 00000000 00000000 00000000 .*
- 0010 00000000 00000000 00000000 00000000 .*
- 0020 00000000 00000000 00000000 00000000 .*
- 0030 00000000 00000000 00000000 00000000 .*
- 0040 00000000 .*
-Contents of section \.othertext:
- 0000 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0010 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0020 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0030 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0040 6ff0fff0 .*
diff --git a/gas/testsuite/gas/sh/sh64/rel64-4.d b/gas/testsuite/gas/sh/sh64/rel64-4.d
deleted file mode 100644
index 0a3e48e..0000000
--- a/gas/testsuite/gas/sh/sh64/rel64-4.d
+++ /dev/null
@@ -1,111 +0,0 @@
-#as: --abi=64
-#objdump: -sr
-#source: rel-4.s
-#name: MOVI: PC+1-relative datalabel relocs, 64-bit ABI.
-
-.*: file format .*-sh64.*
-
-RELOCATION RECORDS FOR \[\.text\]:
-OFFSET TYPE VALUE
-0+10 R_SH_IMM_LOW16_PCREL \.data\+0x0+7
-0+14 R_SH_IMM_LOW16_PCREL \.data\+0x0+b
-0+18 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+f
-0+2c R_SH_IMM_LOW16_PCREL \.data\+0x0+27
-0+30 R_SH_IMM_LOW16_PCREL \.data\+0x0+27
-0+34 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+23
-0+48 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+7
-0+4c R_SH_IMM_LOW16_PCREL \.othertext\+0x0+b
-0+50 R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+f
-0+64 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+27
-0+68 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+27
-0+6c R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+23
-0+80 R_SH_IMM_LOW16_PCREL extern2-0x0+1
-0+84 R_SH_IMM_LOW16_PCREL extern3-0x0+1
-0+88 R_SH_IMM_MEDLOW16_PCREL extern4-0x0+1
-0+9c R_SH_IMM_LOW16_PCREL extern6\+0x0+f
-0+a0 R_SH_IMM_LOW16_PCREL extern7\+0x0+b
-0+a4 R_SH_IMM_MEDLOW16_PCREL extern8\+0x0+3
-0+b8 R_SH_IMM_LOW16_PCREL gdata2-0x0+1
-0+bc R_SH_IMM_LOW16_PCREL gdata3-0x0+1
-0+c0 R_SH_IMM_MEDLOW16_PCREL gdata4-0x0+1
-0+d4 R_SH_IMM_LOW16_PCREL gdata6\+0x0+f
-0+d8 R_SH_IMM_LOW16_PCREL gdata7\+0x0+b
-0+dc R_SH_IMM_MEDLOW16_PCREL gdata8\+0x0+3
-0+f0 R_SH_IMM_LOW16_PCREL gothertext2-0x0+1
-0+f4 R_SH_IMM_LOW16_PCREL gothertext3-0x0+1
-0+f8 R_SH_IMM_MEDLOW16_PCREL gothertext4-0x0+1
-0+10c R_SH_IMM_LOW16_PCREL gothertext6\+0x0+f
-0+110 R_SH_IMM_LOW16_PCREL gothertext7\+0x0+b
-0+114 R_SH_IMM_MEDLOW16_PCREL gothertext8\+0x0+3
-0+ R_SH_IMM_HI16_PCREL \.data\+0x0+3
-0+4 R_SH_IMM_MEDHI16_PCREL \.data\+0x0+7
-0+8 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+b
-0+c R_SH_IMM_LOW16_PCREL \.data\+0x0+f
-0+1c R_SH_IMM_HI16_PCREL \.data\+0x0+1b
-0+20 R_SH_IMM_MEDHI16_PCREL \.data\+0x0+1f
-0+24 R_SH_IMM_MEDLOW16_PCREL \.data\+0x0+23
-0+28 R_SH_IMM_LOW16_PCREL \.data\+0x0+27
-0+38 R_SH_IMM_HI16_PCREL \.othertext\+0x0+3
-0+3c R_SH_IMM_MEDHI16_PCREL \.othertext\+0x0+7
-0+40 R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+b
-0+44 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+f
-0+54 R_SH_IMM_HI16_PCREL \.othertext\+0x0+1b
-0+58 R_SH_IMM_MEDHI16_PCREL \.othertext\+0x0+1f
-0+5c R_SH_IMM_MEDLOW16_PCREL \.othertext\+0x0+23
-0+60 R_SH_IMM_LOW16_PCREL \.othertext\+0x0+27
-0+70 R_SH_IMM_HI16_PCREL extern1-0x0+1
-0+74 R_SH_IMM_MEDHI16_PCREL extern1\+0x0+3
-0+78 R_SH_IMM_MEDLOW16_PCREL extern1\+0x0+7
-0+7c R_SH_IMM_LOW16_PCREL extern1\+0x0+b
-0+8c R_SH_IMM_HI16_PCREL extern5\+0x0+7
-0+90 R_SH_IMM_MEDHI16_PCREL extern5\+0x0+b
-0+94 R_SH_IMM_MEDLOW16_PCREL extern5\+0x0+f
-0+98 R_SH_IMM_LOW16_PCREL extern5\+0x0+13
-0+a8 R_SH_IMM_HI16_PCREL gdata1-0x0+1
-0+ac R_SH_IMM_MEDHI16_PCREL gdata1\+0x0+3
-0+b0 R_SH_IMM_MEDLOW16_PCREL gdata1\+0x0+7
-0+b4 R_SH_IMM_LOW16_PCREL gdata1\+0x0+b
-0+c4 R_SH_IMM_HI16_PCREL gdata5\+0x0+7
-0+c8 R_SH_IMM_MEDHI16_PCREL gdata5\+0x0+b
-0+cc R_SH_IMM_MEDLOW16_PCREL gdata5\+0x0+f
-0+d0 R_SH_IMM_LOW16_PCREL gdata5\+0x0+13
-0+e0 R_SH_IMM_HI16_PCREL gothertext1-0x0+1
-0+e4 R_SH_IMM_MEDHI16_PCREL gothertext1\+0x0+3
-0+e8 R_SH_IMM_MEDLOW16_PCREL gothertext1\+0x0+7
-0+ec R_SH_IMM_LOW16_PCREL gothertext1\+0x0+b
-0+fc R_SH_IMM_HI16_PCREL gothertext5\+0x0+7
-0+100 R_SH_IMM_MEDHI16_PCREL gothertext5\+0x0+b
-0+104 R_SH_IMM_MEDLOW16_PCREL gothertext5\+0x0+f
-0+108 R_SH_IMM_LOW16_PCREL gothertext5\+0x0+13
-
-Contents of section \.text:
- 0000 cc0000a0 c80000a0 c80000a0 c80000a0 .*
- 0010 cc0000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0020 c80000a0 c80000a0 c80000a0 cc0000a0 .*
- 0030 cc0000a0 cc0000a0 cc0000a0 c80000a0 .*
- 0040 c80000a0 c80000a0 cc0000a0 cc0000a0 .*
- 0050 cc0000a0 cc0000a0 c80000a0 c80000a0 .*
- 0060 c80000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0070 cc0000a0 c80000a0 c80000a0 c80000a0 .*
- 0080 cc0000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0090 c80000a0 c80000a0 c80000a0 cc0000a0 .*
- 00a0 cc0000a0 cc0000a0 cc0000a0 c80000a0 .*
- 00b0 c80000a0 c80000a0 cc0000a0 cc0000a0 .*
- 00c0 cc0000a0 cc0000a0 c80000a0 c80000a0 .*
- 00d0 c80000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 00e0 cc0000a0 c80000a0 c80000a0 c80000a0 .*
- 00f0 cc0000a0 cc0000a0 cc0000a0 cc0000a0 .*
- 0100 c80000a0 c80000a0 c80000a0 cc0000a0 .*
- 0110 cc0000a0 cc0000a0 .*
-Contents of section \.data:
- 0000 00000000 00000000 00000000 00000000 .*
- 0010 00000000 00000000 00000000 00000000 .*
- 0020 00000000 00000000 00000000 00000000 .*
- 0030 00000000 00000000 00000000 00000000 .*
- 0040 00000000 .*
-Contents of section \.othertext:
- 0000 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0010 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0020 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0030 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0040 6ff0fff0 .*
diff --git a/gas/testsuite/gas/sh/sh64/rel64-5.d b/gas/testsuite/gas/sh/sh64/rel64-5.d
deleted file mode 100644
index cd7b927..0000000
--- a/gas/testsuite/gas/sh/sh64/rel64-5.d
+++ /dev/null
@@ -1,40 +0,0 @@
-#as: --abi=64
-#objdump: -sr
-#source: rel-5.s
-#name: MOVI: PC-relative reloc within .text, 64-bit ABI.
-
-.*: file format .*-sh64.*
-
-RELOCATION RECORDS FOR \[\.text\]:
-OFFSET TYPE VALUE
-0+5c R_SH_IMM_LOW16_PCREL gstart6\+0x0+18
-0+60 R_SH_IMM_MEDLOW16_PCREL gstart7\+0x0+20
-0+1c R_SH_IMM_HI16_PCREL gstart2\+0x0+8
-0+20 R_SH_IMM_MEDHI16_PCREL gstart2\+0x0+c
-0+24 R_SH_IMM_MEDLOW16_PCREL gstart2\+0x0+10
-0+28 R_SH_IMM_LOW16_PCREL gstart2\+0x0+14
-0+2c R_SH_IMM_HI16_PCREL gstart3\+0x0+3
-0+30 R_SH_IMM_MEDHI16_PCREL gstart3\+0x0+7
-0+34 R_SH_IMM_MEDLOW16_PCREL gstart3\+0x0+b
-0+38 R_SH_IMM_LOW16_PCREL gstart3\+0x0+f
-0+3c R_SH_IMM_HI16_PCREL gstart4\+0x0+8
-0+40 R_SH_IMM_MEDHI16_PCREL gstart4\+0x0+c
-0+44 R_SH_IMM_MEDLOW16_PCREL gstart4\+0x0+10
-0+48 R_SH_IMM_LOW16_PCREL gstart4\+0x0+14
-0+4c R_SH_IMM_HI16_PCREL gstart5\+0x0+b
-0+50 R_SH_IMM_MEDHI16_PCREL gstart5\+0x0+f
-0+54 R_SH_IMM_MEDLOW16_PCREL gstart5\+0x0+13
-0+58 R_SH_IMM_LOW16_PCREL gstart5\+0x0+17
-
-Contents of section \.text:
- 0000 6ff0fff0 cc01a5e0 cc0191e0 cc01a1e0 .*
- 0010 cc01ade0 cc01e280 cc000320 cc0001e0 .*
- 0020 c80001e0 c80001e0 c80001e0 cc0001e0 .*
- 0030 c80001e0 c80001e0 c80001e0 cc0001e0 .*
- 0040 c80001e0 c80001e0 c80001e0 cc0001e0 .*
- 0050 c80001e0 c80001e0 c80001e0 cc000280 .*
- 0060 cc000320 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0070 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0080 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0090 6ff0fff0 .*
-
diff --git a/gas/testsuite/gas/sh/sh64/relax-1.d b/gas/testsuite/gas/sh/sh64/relax-1.d
deleted file mode 100644
index 82fb4c6..0000000
--- a/gas/testsuite/gas/sh/sh64/relax-1.d
+++ /dev/null
@@ -1,30 +0,0 @@
-#as: --abi=64
-#objdump: -dr
-#source: relax-1.s
-#name: Assembler PT relaxation limit, from first to second state.
-
-.*: file format .*-sh64.*
-
-Disassembly of section \.text:
-
-[0]+ <start>:
-[ ]+0:[ ]+6ff0fff0[ ]+nop
-
-0+4 <start2>:
-[ ]+4:[ ]+cc000990[ ]+movi 2,r25
-[ ]+8:[ ]+c8000590[ ]+shori 1,r25
-[ ]+c:[ ]+6bf56630[ ]+ptrel/l r25,tr3
-
-0+10 <x1>:
-[ ]+10:[ ]+e9fffe40[ ]+pta/l 2000c <x0>,tr4
-[ ]+\.\.\.
-
-0+2000c <x0>:
-[ ]+2000c:[ ]+ea000650[ ]+pta/l 10 <x1>,tr5
-[ ]+20010:[ ]+ea000260[ ]+pta/l 10 <x1>,tr6
-[ ]+20014:[ ]+cffff590[ ]+movi -3,r25
-[ ]+20018:[ ]+cbffd590[ ]+shori 65525,r25
-[ ]+2001c:[ ]+6bf56660[ ]+ptrel/l r25,tr6
-[ ]+20020:[ ]+cffff590[ ]+movi -3,r25
-[ ]+20024:[ ]+cbffa590[ ]+shori 65513,r25
-[ ]+20028:[ ]+6bf56670[ ]+ptrel/l r25,tr7
diff --git a/gas/testsuite/gas/sh/sh64/relax-1.s b/gas/testsuite/gas/sh/sh64/relax-1.s
deleted file mode 100644
index 807b236..0000000
--- a/gas/testsuite/gas/sh/sh64/relax-1.s
+++ /dev/null
@@ -1,18 +0,0 @@
-! Check limits of PT assembler relaxation states. Unfortunately, we can't
-! check the 32 and 48 bit limit on a host with 32-bit longs, so we just
-! check the first state. This also checks that a PT expansion without a
-! relocation to 32 bits works.
-
- .mode SHmedia
-start:
- nop
-start2:
- pt x0,tr3
-x1:
- pt x0,tr4
- .space 32767*4-4,0
-x0:
- pt x1,tr5
- pt x1,tr6
- pt x1,tr6
- pt x1,tr7
diff --git a/gas/testsuite/gas/sh/sh64/relax-2.d b/gas/testsuite/gas/sh/sh64/relax-2.d
deleted file mode 100644
index c954dd4..0000000
--- a/gas/testsuite/gas/sh/sh64/relax-2.d
+++ /dev/null
@@ -1,30 +0,0 @@
-#as: --abi=64
-#objdump: -dr
-#source: relax-2.s
-#name: Assembler PTB relaxation limit, from first to second state.
-
-.*: file format .*-sh64.*
-
-Disassembly of section \.text:
-
-[0]+ <start>:
-[ ]+0:[ ]+6ff0fff0[ ]+nop
-
-0+4 <start2>:
-[ ]+4:[ ]+cc000990[ ]+movi 2,r25
-[ ]+8:[ ]+c8000190[ ]+shori 0,r25
-[ ]+c:[ ]+6bf56630[ ]+ptrel/l r25,tr3
-
-0+10 <[ax]1>:
-[ ]+10:[ ]+edfffe40[ ]+ptb/l 2000c <[ax]0>,tr4
-[ ]+\.\.\.
-
-0+2000c <[ax]0>:
-[ ]+2000c:[ ]+ee000650[ ]+ptb/l 10 <[ax]1>,tr5
-[ ]+20010:[ ]+ee000260[ ]+ptb/l 10 <[ax]1>,tr6
-[ ]+20014:[ ]+cffff590[ ]+movi -3,r25
-[ ]+20018:[ ]+cbffd190[ ]+shori 65524,r25
-[ ]+2001c:[ ]+6bf56660[ ]+ptrel/l r25,tr6
-[ ]+20020:[ ]+cffff590[ ]+movi -3,r25
-[ ]+20024:[ ]+cbffa190[ ]+shori 65512,r25
-[ ]+20028:[ ]+6bf56670[ ]+ptrel/l r25,tr7
diff --git a/gas/testsuite/gas/sh/sh64/relax-2.s b/gas/testsuite/gas/sh/sh64/relax-2.s
deleted file mode 100644
index 9d3a323..0000000
--- a/gas/testsuite/gas/sh/sh64/relax-2.s
+++ /dev/null
@@ -1,23 +0,0 @@
-! Check relaxation for PTB. This is like relax-1.s, but presumably we can
-! have bugs in the slight differences in limit-checking compared to PT and
-! PTA.
-
- .mode SHmedia
-start:
- nop
-start2:
- ptb x0,tr3
- .mode SHcompact
-x1:
- .mode SHmedia
-a1:
- ptb x0,tr4
- .space 32767*4-4,0
- .mode SHcompact
-x0:
- .mode SHmedia
-a0:
- ptb x1,tr5
- ptb x1,tr6
- ptb x1,tr6
- ptb x1,tr7
diff --git a/gas/testsuite/gas/sh/sh64/relax-3.d b/gas/testsuite/gas/sh/sh64/relax-3.d
deleted file mode 100644
index 80dd1ae..0000000
--- a/gas/testsuite/gas/sh/sh64/relax-3.d
+++ /dev/null
@@ -1,43 +0,0 @@
-#as: --abi=64
-#objdump: -dr
-#source: relax-3.s
-#name: Assembler PC-rel MOVI relaxation limit, from first to second state.
-
-.*: file format .*-sh64.*
-
-Disassembly of section \.text:
-
-[0]+ <start>:
-[ ]+0:[ ]+6ff0fff0[ ]+nop
-
-0+4 <start2>:
-[ ]+4:[ ]+cc000030[ ]+movi 0,r3
-[ ]+8:[ ]+ca001030[ ]+shori 32772,r3
-
-0+c <x1>:
-[ ]+c:[ ]+cdfffc40[ ]+movi 32767,r4
-[ ]+\.\.\.
-
-0+800c <x0>:
-[ ]+800c:[ ]+ce000050[ ]+movi -32768,r5
-[ ]+8010:[ ]+cffffc60[ ]+movi -1,r6
-[ ]+8014:[ ]+c9fffc60[ ]+shori 32767,r6
-[ ]+8018:[ ]+cffffc70[ ]+movi -1,r7
-[ ]+801c:[ ]+cbfffc70[ ]+shori 65535,r7
-[ ]+8020:[ ]+cbfffc70[ ]+shori 65535,r7
-[ ]+8024:[ ]+ca000070[ ]+shori 32768,r7
-[ ]+8028:[ ]+cc000080[ ]+movi 0,r8
-[ ]+802c:[ ]+c8000080[ ]+shori 0,r8
-[ ]+8030:[ ]+c8000080[ ]+shori 0,r8
-[ ]+8034:[ ]+c9fffc80[ ]+shori 32767,r8
-[ ]+8038:[ ]+cc000080[ ]+movi 0,r8
-[ ]+803c:[ ]+c8000080[ ]+shori 0,r8
-[ ]+8040:[ ]+c8000080[ ]+shori 0,r8
-[ ]+8044:[ ]+c8004080[ ]+shori 16,r8
-Disassembly of section \.text\.another:
-
-0+ <y0>:
-[ ]+0:[ ]+cc000090[ ]+movi 0,r9
-[ ]+4:[ ]+c8000090[ ]+shori 0,r9
-[ ]+8:[ ]+c8000090[ ]+shori 0,r9
-[ ]+c:[ ]+c8002090[ ]+shori 8,r9
diff --git a/gas/testsuite/gas/sh/sh64/relax-3.s b/gas/testsuite/gas/sh/sh64/relax-3.s
deleted file mode 100644
index b2ec30a..0000000
--- a/gas/testsuite/gas/sh/sh64/relax-3.s
+++ /dev/null
@@ -1,32 +0,0 @@
-! Check relaxation for MOVI PC-relative expansions. Unfortunately, we
-! can't check the 32 and 48 bit limit on a host with 32-bit longs, so we
-! just check going from first state to the second state.
-
- .mode SHmedia
- .text
-start:
- nop
-start2:
- movi (x0-4-$),r3
-x1:
- movi (x0-1-$),r4
- .space 32768-4,0
-x0:
- movi (x1-$),r5
- movi (x1+3-$),r6
-
-! These PC-relative expressions are here because of past bugs leading to
-! premature symbol evaluation and assignment when they were exposed to
-! relaxation.
-! The expected result may need future tweaking if advances are done in
-! relaxation. At the time of this writing the expressions are not
-! relaxed although the numbers will be in the right range finally.
-
- movi (x1-x0),r7
- movi (x0-1-x1),r8
- movi (y1-y0),r8
-
- .section .text.another,"ax"
-y0:
- movi (x1-start2),r9
-y1:
diff --git a/gas/testsuite/gas/sh/sh64/sh64.exp b/gas/testsuite/gas/sh/sh64/sh64.exp
deleted file mode 100644
index 4f19eb1..0000000
--- a/gas/testsuite/gas/sh/sh64/sh64.exp
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (C) 2000-2018 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# dejagnu@gnu.org
-
-if [istarget sh64-*-*] then {
- set rd_test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
- foreach rdtest $rd_test_list {
- # We need to strip the ".d", but can leave the dirname.
- verbose [file rootname $rdtest]
- run_dump_test [file rootname $rdtest]
- }
-}
diff --git a/gas/testsuite/gas/sh/sh64/shift-1.s b/gas/testsuite/gas/sh/sh64/shift-1.s
deleted file mode 100644
index b4967c7..0000000
--- a/gas/testsuite/gas/sh/sh64/shift-1.s
+++ /dev/null
@@ -1,42 +0,0 @@
-! Check that shift expressions translate to the proper reloc for MOVI and
-! SHORI for local and external symbols. This is the 32-bit subset.
- .text
- .mode SHmedia
-start:
- movi localsym & 65535,r4
- movi (localsym >> 0) & 65535,r4
- movi (localsym >> 16) & 65535,r4
-
- movi externsym & 65535,r4
- movi (externsym >> 0) & 65535,r4
- movi (externsym >> 16) & 65535,r4
-
- shori localsym & 65535,r4
- shori (localsym >> 0) & 65535,r4
- shori (localsym >> 16) & 65535,r4
-
- shori externsym & 65535,r4
- shori (externsym >> 0) & 65535,r4
- shori (externsym >> 16) & 65535,r4
-
- movi (localsym + 42) & 65535,r4
- movi ((localsym + 43) >> 0) & 65535,r4
- movi ((localsym + 44) >> 16) & 65535,r4
-
- movi (externsym + 45) & 65535,r4
- movi ((externsym + 46) >> 0) & 65535,r4
- movi ((externsym + 47) >> 16) & 65535,r4
-
- shori (localsym + 42) & 65535,r4
- shori ((localsym + 43) >> 0) & 65535,r4
- shori ((localsym + 44) >> 16) & 65535,r4
-
- shori (externsym + 45) & 65535,r4
- shori ((externsym + 46) >> 0) & 65535,r4
- shori ((externsym + 47) >> 16) & 65535,r4
-
- .data
-! Just make localsym have a non-zero offset into .data.
- .long 0
-localsym:
- .long 0
diff --git a/gas/testsuite/gas/sh/sh64/shift-2.s b/gas/testsuite/gas/sh/sh64/shift-2.s
deleted file mode 100644
index 082ea37..0000000
--- a/gas/testsuite/gas/sh/sh64/shift-2.s
+++ /dev/null
@@ -1,34 +0,0 @@
-! Check that shift expressions translate to the proper reloc for MOVI and
-! SHORI for local and external symbols. This is the 64-bit subset.
- .text
- .mode SHmedia
-start:
- movi (localsym >> 32) & 65535,r4
- movi (localsym >> 48) & 65535,r4
-
- movi ((localsym + 44) >> 32) & 65535,r4
- movi ((localsym + 43) >> 48) & 65535,r4
-
- movi (externsym >> 32) & 65535,r4
- movi (externsym >> 48) & 65535,r4
-
- movi ((externsym + 41) >> 32) & 65535,r4
- movi ((externsym + 42) >> 48) & 65535,r4
-
- shori (localsym >> 32) & 65535,r4
- shori (localsym >> 48) & 65535,r4
-
- shori ((localsym + 44) >> 32) & 65535,r4
- shori ((localsym + 43) >> 48) & 65535,r4
-
- shori (externsym >> 32) & 65535,r4
- shori (externsym >> 48) & 65535,r4
-
- shori ((externsym + 41) >> 32) & 65535,r4
- shori ((externsym + 42) >> 48) & 65535,r4
-
- .data
-! Just make localsym have a non-zero offset into .data.
- .long 0
-localsym:
- .long 0
diff --git a/gas/testsuite/gas/sh/sh64/shift-3.s b/gas/testsuite/gas/sh/sh64/shift-3.s
deleted file mode 100644
index 6d9bff3..0000000
--- a/gas/testsuite/gas/sh/sh64/shift-3.s
+++ /dev/null
@@ -1,7 +0,0 @@
-! This should not get an internal error and it should emit the expected
-! relocs, even though the symbol looks local and is undefined.
- .text
- .mode SHmedia
-start:
- movi .LC0 & 65535, r1
- movi (.LC0 >> 16) & 65535, r3
diff --git a/gas/testsuite/gas/sh/sh64/shift32-1.d b/gas/testsuite/gas/sh/sh64/shift32-1.d
deleted file mode 100644
index 7e14c21..0000000
--- a/gas/testsuite/gas/sh/sh64/shift32-1.d
+++ /dev/null
@@ -1,58 +0,0 @@
-#as: --abi=32
-#objdump: -dr
-#source: shift-1.s
-#name: Shift expressions, 32-bit ABI.
-
-.*: file format .*-sh64.*
-
-Disassembly of section \.text:
-
-[0]+ <start>:
-[ ]+0:[ ]+cc000040[ ]+movi 0,r4
-[ ]+0:[ ]+R_SH_IMM_LOW16 \.data\+0x4
-[ ]+4:[ ]+cc000040[ ]+movi 0,r4
-[ ]+4:[ ]+R_SH_IMM_LOW16 \.data\+0x4
-[ ]+8:[ ]+cc000040[ ]+movi 0,r4
-[ ]+8:[ ]+R_SH_IMM_MEDLOW16 \.data\+0x4
-[ ]+c:[ ]+cc000040[ ]+movi 0,r4
-[ ]+c:[ ]+R_SH_IMM_LOW16 externsym
-[ ]+10:[ ]+cc000040[ ]+movi 0,r4
-[ ]+10:[ ]+R_SH_IMM_LOW16 externsym
-[ ]+14:[ ]+cc000040[ ]+movi 0,r4
-[ ]+14:[ ]+R_SH_IMM_MEDLOW16 externsym
-[ ]+18:[ ]+c8000040[ ]+shori 0,r4
-[ ]+18:[ ]+R_SH_IMM_LOW16 \.data\+0x4
-[ ]+1c:[ ]+c8000040[ ]+shori 0,r4
-[ ]+1c:[ ]+R_SH_IMM_LOW16 \.data\+0x4
-[ ]+20:[ ]+c8000040[ ]+shori 0,r4
-[ ]+20:[ ]+R_SH_IMM_MEDLOW16 \.data\+0x4
-[ ]+24:[ ]+c8000040[ ]+shori 0,r4
-[ ]+24:[ ]+R_SH_IMM_LOW16 externsym
-[ ]+28:[ ]+c8000040[ ]+shori 0,r4
-[ ]+28:[ ]+R_SH_IMM_LOW16 externsym
-[ ]+2c:[ ]+c8000040[ ]+shori 0,r4
-[ ]+2c:[ ]+R_SH_IMM_MEDLOW16 externsym
-[ ]+30:[ ]+cc000040[ ]+movi 0,r4
-[ ]+30:[ ]+R_SH_IMM_LOW16 \.data\+0x2e
-[ ]+34:[ ]+cc000040[ ]+movi 0,r4
-[ ]+34:[ ]+R_SH_IMM_LOW16 \.data\+0x2f
-[ ]+38:[ ]+cc000040[ ]+movi 0,r4
-[ ]+38:[ ]+R_SH_IMM_MEDLOW16 \.data\+0x30
-[ ]+3c:[ ]+cc000040[ ]+movi 0,r4
-[ ]+3c:[ ]+R_SH_IMM_LOW16 externsym\+0x2d
-[ ]+40:[ ]+cc000040[ ]+movi 0,r4
-[ ]+40:[ ]+R_SH_IMM_LOW16 externsym\+0x2e
-[ ]+44:[ ]+cc000040[ ]+movi 0,r4
-[ ]+44:[ ]+R_SH_IMM_MEDLOW16 externsym\+0x2f
-[ ]+48:[ ]+c8000040[ ]+shori 0,r4
-[ ]+48:[ ]+R_SH_IMM_LOW16 \.data\+0x2e
-[ ]+4c:[ ]+c8000040[ ]+shori 0,r4
-[ ]+4c:[ ]+R_SH_IMM_LOW16 \.data\+0x2f
-[ ]+50:[ ]+c8000040[ ]+shori 0,r4
-[ ]+50:[ ]+R_SH_IMM_MEDLOW16 \.data\+0x30
-[ ]+54:[ ]+c8000040[ ]+shori 0,r4
-[ ]+54:[ ]+R_SH_IMM_LOW16 externsym\+0x2d
-[ ]+58:[ ]+c8000040[ ]+shori 0,r4
-[ ]+58:[ ]+R_SH_IMM_LOW16 externsym\+0x2e
-[ ]+5c:[ ]+c8000040[ ]+shori 0,r4
-[ ]+5c:[ ]+R_SH_IMM_MEDLOW16 externsym\+0x2f
diff --git a/gas/testsuite/gas/sh/sh64/shift32-3.d b/gas/testsuite/gas/sh/sh64/shift32-3.d
deleted file mode 100644
index 01a0c53..0000000
--- a/gas/testsuite/gas/sh/sh64/shift32-3.d
+++ /dev/null
@@ -1,14 +0,0 @@
-#as: --abi=32
-#objdump: -dr
-#source: shift-3.s
-#name: Shift expression, local but undefined symbol, 32-bit ABI.
-
-.*: file format .*-sh64.*
-
-Disassembly of section \.text:
-
-[0]+ <start>:
-[ ]+0:[ ]+cc000010[ ]+movi 0,r1
-[ ]+0:[ ]+R_SH_IMM_LOW16 \.LC0
-[ ]+4:[ ]+cc000030[ ]+movi 0,r3
-[ ]+4:[ ]+R_SH_IMM_MEDLOW16 \.LC0
diff --git a/gas/testsuite/gas/sh/sh64/shift32-noexp-3.d b/gas/testsuite/gas/sh/sh64/shift32-noexp-3.d
deleted file mode 100644
index 3d8c34b..0000000
--- a/gas/testsuite/gas/sh/sh64/shift32-noexp-3.d
+++ /dev/null
@@ -1,14 +0,0 @@
-#as: --abi=32 -no-expand
-#objdump: -dr
-#source: shift-3.s
-#name: Shift expression, local but undefined symbol, 32-bit ABI with -no-expand.
-
-.*: file format .*-sh64.*
-
-Disassembly of section \.text:
-
-[0]+ <start>:
-[ ]+0:[ ]+cc000010[ ]+movi 0,r1
-[ ]+0:[ ]+R_SH_IMM_LOW16 \.LC0
-[ ]+4:[ ]+cc000030[ ]+movi 0,r3
-[ ]+4:[ ]+R_SH_IMM_MEDLOW16 \.LC0
diff --git a/gas/testsuite/gas/sh/sh64/shift64-1.d b/gas/testsuite/gas/sh/sh64/shift64-1.d
deleted file mode 100644
index a19ed35..0000000
--- a/gas/testsuite/gas/sh/sh64/shift64-1.d
+++ /dev/null
@@ -1,58 +0,0 @@
-#as: --abi=64
-#objdump: -dr
-#source: shift-1.s
-#name: Shift expressions, 64-bit ABI, 32-bit subset.
-
-.*: file format .*-sh64.*
-
-Disassembly of section \.text:
-
-[0]+ <start>:
-[ ]+0:[ ]+cc000040[ ]+movi 0,r4
-[ ]+0:[ ]+R_SH_IMM_LOW16 \.data\+0x4
-[ ]+4:[ ]+cc000040[ ]+movi 0,r4
-[ ]+4:[ ]+R_SH_IMM_LOW16 \.data\+0x4
-[ ]+8:[ ]+cc000040[ ]+movi 0,r4
-[ ]+8:[ ]+R_SH_IMM_MEDLOW16 \.data\+0x4
-[ ]+c:[ ]+cc000040[ ]+movi 0,r4
-[ ]+c:[ ]+R_SH_IMM_LOW16 externsym
-[ ]+10:[ ]+cc000040[ ]+movi 0,r4
-[ ]+10:[ ]+R_SH_IMM_LOW16 externsym
-[ ]+14:[ ]+cc000040[ ]+movi 0,r4
-[ ]+14:[ ]+R_SH_IMM_MEDLOW16 externsym
-[ ]+18:[ ]+c8000040[ ]+shori 0,r4
-[ ]+18:[ ]+R_SH_IMM_LOW16 \.data\+0x4
-[ ]+1c:[ ]+c8000040[ ]+shori 0,r4
-[ ]+1c:[ ]+R_SH_IMM_LOW16 \.data\+0x4
-[ ]+20:[ ]+c8000040[ ]+shori 0,r4
-[ ]+20:[ ]+R_SH_IMM_MEDLOW16 \.data\+0x4
-[ ]+24:[ ]+c8000040[ ]+shori 0,r4
-[ ]+24:[ ]+R_SH_IMM_LOW16 externsym
-[ ]+28:[ ]+c8000040[ ]+shori 0,r4
-[ ]+28:[ ]+R_SH_IMM_LOW16 externsym
-[ ]+2c:[ ]+c8000040[ ]+shori 0,r4
-[ ]+2c:[ ]+R_SH_IMM_MEDLOW16 externsym
-[ ]+30:[ ]+cc000040[ ]+movi 0,r4
-[ ]+30:[ ]+R_SH_IMM_LOW16 \.data\+0x2e
-[ ]+34:[ ]+cc000040[ ]+movi 0,r4
-[ ]+34:[ ]+R_SH_IMM_LOW16 \.data\+0x2f
-[ ]+38:[ ]+cc000040[ ]+movi 0,r4
-[ ]+38:[ ]+R_SH_IMM_MEDLOW16 \.data\+0x30
-[ ]+3c:[ ]+cc000040[ ]+movi 0,r4
-[ ]+3c:[ ]+R_SH_IMM_LOW16 externsym\+0x2d
-[ ]+40:[ ]+cc000040[ ]+movi 0,r4
-[ ]+40:[ ]+R_SH_IMM_LOW16 externsym\+0x2e
-[ ]+44:[ ]+cc000040[ ]+movi 0,r4
-[ ]+44:[ ]+R_SH_IMM_MEDLOW16 externsym\+0x2f
-[ ]+48:[ ]+c8000040[ ]+shori 0,r4
-[ ]+48:[ ]+R_SH_IMM_LOW16 \.data\+0x2e
-[ ]+4c:[ ]+c8000040[ ]+shori 0,r4
-[ ]+4c:[ ]+R_SH_IMM_LOW16 \.data\+0x2f
-[ ]+50:[ ]+c8000040[ ]+shori 0,r4
-[ ]+50:[ ]+R_SH_IMM_MEDLOW16 \.data\+0x30
-[ ]+54:[ ]+c8000040[ ]+shori 0,r4
-[ ]+54:[ ]+R_SH_IMM_LOW16 externsym\+0x2d
-[ ]+58:[ ]+c8000040[ ]+shori 0,r4
-[ ]+58:[ ]+R_SH_IMM_LOW16 externsym\+0x2e
-[ ]+5c:[ ]+c8000040[ ]+shori 0,r4
-[ ]+5c:[ ]+R_SH_IMM_MEDLOW16 externsym\+0x2f
diff --git a/gas/testsuite/gas/sh/sh64/shift64-2.d b/gas/testsuite/gas/sh/sh64/shift64-2.d
deleted file mode 100644
index 51528c2..0000000
--- a/gas/testsuite/gas/sh/sh64/shift64-2.d
+++ /dev/null
@@ -1,42 +0,0 @@
-#as: --abi=64
-#objdump: -dr
-#source: shift-2.s
-#name: Shift expressions, 64-bit ABI, 64-bit subset.
-
-.*: file format .*-sh64.*
-
-Disassembly of section \.text:
-
-[0]+ <start>:
-[ ]+0:[ ]+cc000040[ ]+movi 0,r4
-[ ]+0:[ ]+R_SH_IMM_MEDHI16 \.data\+0x4
-[ ]+4:[ ]+cc000040[ ]+movi 0,r4
-[ ]+4:[ ]+R_SH_IMM_HI16 \.data\+0x4
-[ ]+8:[ ]+cc000040[ ]+movi 0,r4
-[ ]+8:[ ]+R_SH_IMM_MEDHI16 \.data\+0x30
-[ ]+c:[ ]+cc000040[ ]+movi 0,r4
-[ ]+c:[ ]+R_SH_IMM_HI16 \.data\+0x2f
-[ ]+10:[ ]+cc000040[ ]+movi 0,r4
-[ ]+10:[ ]+R_SH_IMM_MEDHI16 externsym
-[ ]+14:[ ]+cc000040[ ]+movi 0,r4
-[ ]+14:[ ]+R_SH_IMM_HI16 externsym
-[ ]+18:[ ]+cc000040[ ]+movi 0,r4
-[ ]+18:[ ]+R_SH_IMM_MEDHI16 externsym\+0x29
-[ ]+1c:[ ]+cc000040[ ]+movi 0,r4
-[ ]+1c:[ ]+R_SH_IMM_HI16 externsym\+0x2a
-[ ]+20:[ ]+c8000040[ ]+shori 0,r4
-[ ]+20:[ ]+R_SH_IMM_MEDHI16 \.data\+0x4
-[ ]+24:[ ]+c8000040[ ]+shori 0,r4
-[ ]+24:[ ]+R_SH_IMM_HI16 \.data\+0x4
-[ ]+28:[ ]+c8000040[ ]+shori 0,r4
-[ ]+28:[ ]+R_SH_IMM_MEDHI16 \.data\+0x30
-[ ]+2c:[ ]+c8000040[ ]+shori 0,r4
-[ ]+2c:[ ]+R_SH_IMM_HI16 \.data\+0x2f
-[ ]+30:[ ]+c8000040[ ]+shori 0,r4
-[ ]+30:[ ]+R_SH_IMM_MEDHI16 externsym
-[ ]+34:[ ]+c8000040[ ]+shori 0,r4
-[ ]+34:[ ]+R_SH_IMM_HI16 externsym
-[ ]+38:[ ]+c8000040[ ]+shori 0,r4
-[ ]+38:[ ]+R_SH_IMM_MEDHI16 externsym\+0x29
-[ ]+3c:[ ]+c8000040[ ]+shori 0,r4
-[ ]+3c:[ ]+R_SH_IMM_HI16 externsym\+0x2a
diff --git a/gas/testsuite/gas/sh/sh64/shift64-3.d b/gas/testsuite/gas/sh/sh64/shift64-3.d
deleted file mode 100644
index 8d3d950..0000000
--- a/gas/testsuite/gas/sh/sh64/shift64-3.d
+++ /dev/null
@@ -1,14 +0,0 @@
-#as: --abi=64
-#objdump: -dr
-#source: shift-3.s
-#name: Shift expression, local but undefined symbol, 64-bit ABI.
-
-.*: file format .*-sh64.*
-
-Disassembly of section \.text:
-
-[0]+ <start>:
-[ ]+0:[ ]+cc000010[ ]+movi 0,r1
-[ ]+0:[ ]+R_SH_IMM_LOW16 \.LC0
-[ ]+4:[ ]+cc000030[ ]+movi 0,r3
-[ ]+4:[ ]+R_SH_IMM_MEDLOW16 \.LC0
diff --git a/gas/testsuite/gas/sh/sh64/shift64-noexp-3.d b/gas/testsuite/gas/sh/sh64/shift64-noexp-3.d
deleted file mode 100644
index 70ec8c5..0000000
--- a/gas/testsuite/gas/sh/sh64/shift64-noexp-3.d
+++ /dev/null
@@ -1,14 +0,0 @@
-#as: --abi=64 -no-expand
-#objdump: -dr
-#source: shift-3.s
-#name: Shift expression, local but undefined symbol, 64-bit ABI with -no-expand.
-
-.*: file format .*-sh64.*
-
-Disassembly of section \.text:
-
-[0]+ <start>:
-[ ]+0:[ ]+cc000010[ ]+movi 0,r1
-[ ]+0:[ ]+R_SH_IMM_LOW16 \.LC0
-[ ]+4:[ ]+cc000030[ ]+movi 0,r3
-[ ]+4:[ ]+R_SH_IMM_MEDLOW16 \.LC0
diff --git a/gas/testsuite/gas/sh/sh64/syntax-1.d b/gas/testsuite/gas/sh/sh64/syntax-1.d
deleted file mode 100644
index b483293..0000000
--- a/gas/testsuite/gas/sh/sh64/syntax-1.d
+++ /dev/null
@@ -1,157 +0,0 @@
-#as: --isa=shmedia --abi=64 --no-exp
-#objdump: -d
-#name: Minimum SH64 Syntax Support.
-
-.*: file format elf64-sh64.*
-
-Disassembly of section .text:
-
-0000000000000000 <.*>:
- 0: 88100410 ld.l r1,4,r1
- 4: 88100410 ld.l r1,4,r1
- 8: e8003a00 pta/l 40 <.*>,tr0
- c: e8003600 pta/l 40 <.*>,tr0
- 10: e8003000 pta/u 40 <.*>,tr0
- 14: e8002c00 pta/u 40 <.*>,tr0
- 18: e8002a00 pta/l 40 <.*>,tr0
- 1c: e8002600 pta/l 40 <.*>,tr0
- 20: ec002000 ptb/u 40 <.*>,tr0
- 24: ec001c00 ptb/u 40 <.*>,tr0
- 28: ec001a00 ptb/l 40 <.*>,tr0
- 2c: ec001600 ptb/l 40 <.*>,tr0
- 30: e8001200 pta/l 40 <.*>,tr0
- 34: e8000e00 pta/l 40 <.*>,tr0
- 38: ec000a00 ptb/l 40 <.*>,tr0
- 3c: ec000600 ptb/l 40 <.*>,tr0
- 40: 040983f0 or r0,r32,r63
- 44: 240ffc00 getcon sr,r0
- 48: 27fffc00 getcon usr,r0
- 4c: 4405fc00 gettr tr0,r0
- 50: 4475fc00 gettr tr7,r0
- 54: 380003f0 fmov.s fr0,fr63
- 58: 380103e0 fmov.d dr0,dr62
- 5c: 140e0000 ftrv.s mtrx0,fv0,fv0
- 60: 170ef3c0 ftrv.s mtrx48,fv60,fv60
- 64: 240ffc00 getcon sr,r0
- 68: 241ffc00 getcon ssr,r0
- 6c: 242ffc00 getcon pssr,r0
- 70: 244ffc00 getcon intevt,r0
- 74: 245ffc00 getcon expevt,r0
- 78: 246ffc00 getcon pexpevt,r0
- 7c: 247ffc00 getcon tra,r0
- 80: 248ffc00 getcon spc,r0
- 84: 249ffc00 getcon pspc,r0
- 88: 24affc00 getcon resvec,r0
- 8c: 24bffc00 getcon vbr,r0
- 90: 24dffc00 getcon tea,r0
- 94: 250ffc00 getcon dcr,r0
- 98: 251ffc00 getcon kcr0,r0
- 9c: 252ffc00 getcon kcr1,r0
- a0: 27effc00 getcon ctc,r0
- a4: 27fffc00 getcon usr,r0
-
-00000000000000a8 <.*>:
- a8: e0 04 mov #4,r0
- aa: 00 09 nop
-
-00000000000000ac <.*>:
- ac: cc001000 movi 4,r0
-
-00000000000000b0 <.*>:
- b0: 50 02 mov.l @\(8,r0\),r0
- b2: 00 09 nop
-
-00000000000000b4 <.*>:
- b4: b0000400 ld.uw r0,2,r0
- b8: 84000400 ld.w r0,2,r0
- bc: a4000400 st.w r0,2,r0
- c0: 88000400 ld.l r0,4,r0
- c4: a8000400 st.l r0,4,r0
- c8: 94000400 fld.s r0,4,fr0
- cc: b4000400 fst.s r0,4,fr0
- d0: e8000600 pta/l d4 <.*>,tr0
- d4: ec000a00 ptb/l dc <.*>,tr0
- d8: 8c000400 ld.q r0,8,r0
- dc: ac000400 st.q r0,8,r0
- e0: 9c000400 fld.d r0,8,dr0
- e4: bc000400 fst.d r0,8,dr0
- e8: 98000400 fld.p r0,8,fp0
- ec: b8000400 fst.p r0,8,fp0
- f0: e00407f0 alloco r0,32
- f4: e00507f0 icbi r0,32
- f8: e00907f0 ocbi r0,32
- fc: e00807f0 ocbp r0,32
- 100: e00c07f0 ocbwb r0,32
- 104: e00107f0 prefi r0,32
-
-0000000000000108 <.*>:
- 108: 90 01 mov.w 10e <.*>,r0 ! 8101
- 10a: 85 01 mov.w @\(2,r0\),r0
- 10c: c5 01 mov.w @\(2,gbr\),r0
- 10e: 81 01 mov.w r0,@\(2,r0\)
- 110: c1 01 mov.w r0,@\(2,gbr\)
- 112: 8b 01 bf 118 <.*>
- 114: 89 01 bt 11a <.*>
- 116: a0 01 bra 11c <.*>
- 118: b0 01 bsr 11e <.*>
- 11a: d0 00 mov.l 11c <.*>,r0 ! 5001c601
- 11c: 50 01 mov.l @\(4,r0\),r0
- 11e: c6 01 mov.l @\(4,gbr\),r0
- 120: c7 01 mova 128 <.*>,r0
- 122: 10 01 mov.l r0,@\(4,r0\)
- 124: c2 01 mov.l r0,@\(4,gbr\)
- 126: 00 09 nop
-
-0000000000000128 <.*>:
- 128: 00000139 .long 0x00000139
- 12c: 0000013d .long 0x0000013d
- 130: 00000138 .long 0x00000138
- 134: 00000138 .long 0x00000138
-
-0000000000000138 <.*>:
- 138: 00 00 .word 0x0000
- 13a: 01 40 .word 0x0140
- 13c: 00 00 .word 0x0000
- 13e: 01 61 .word 0x0161
-
-0000000000000140 <.*>:
- 140: cc000000 movi 0,r0
- 144: c8000000 shori 0,r0
- 148: 6bf10200 ptabs/l r0,tr0
- 14c: 4401fd20 blink tr0,r18
- 150: cc000000 movi 0,r0
- 154: c8000000 shori 0,r0
- 158: 6bf10200 ptabs/l r0,tr0
- 15c: 4401fd20 blink tr0,r18
- 160: cfff7000 movi -36,r0
- 164: cfffe400 movi -7,r0
- 168: ebfffa00 pta/l 160 <.*>,tr0
-
-000000000000016c <.*>:
- 16c: 0000016d .long 0x0000016d
-
-0000000000000170 <.*>:
- 170: 00000171 .long 0x00000171
- 174: cfffd000 movi -12,r0
- 178: cfffc000 movi -16,r0
-
-000000000000017c <.*>:
- 17c: c7 01 mova 184 <.*>,r0
- 17e: 60 12 mov.l @r1,r0
- 180: 30 1c add r1,r0
- 182: 00 03 bsrf r0
-
-0000000000000184 <.*>:
- 184: 00 00 .word 0x0000
- 186: 00 05 mov.w r0,@\(r0,r0\)
-
-0000000000000188 <.*>:
- 188: cc002400 movi 9,r0
- 18c: cc001c00 movi 7,r0
- 190: cc004000 movi 16,r0
- 194: cc001000 movi 4,r0
- 198: cffff800 movi -2,r0
- 19c: cc000400 movi 1,r0
- 1a0: cc002400 movi 9,r0
- 1a4: cc006000 movi 24,r0
- 1a8: cc002000 movi 8,r0
diff --git a/gas/testsuite/gas/sh/sh64/syntax-1.s b/gas/testsuite/gas/sh/sh64/syntax-1.s
deleted file mode 100644
index 43b1dd6..0000000
--- a/gas/testsuite/gas/sh/sh64/syntax-1.s
+++ /dev/null
@@ -1,199 +0,0 @@
-! Verify that minimum support is provided as per SH-5/ST50-047-02.
-
- .text
- .mode shmedia
-start:
-
-! Both all-upper and all-lower must be supported. PTA/PTB without /L
-! or /U is equivalent to with /L
-
- ld.l r1,4,r1
- LD.L r1,4,r1
- pta/l .L1,tr0
- PTA/L .L1,tr0
- pta/u .L1,tr0
- PTA/U .L1,tr0
- pta/l .L1,tr0
- PTA/L .L1,tr0
- ptb/u .L2,tr0
- PTB/U .L2,tr0
- ptb/l .L2,tr0
- PTB/L .L2,tr0
- pta .L1,tr0
- PTA .L1,tr0
- ptb .L2,tr0
- PTB .L2,tr0
-.L1:
- .mode shcompact
-.L2:
- .align 2
- .mode shmedia
-
-! All register names accepted, either case.
-
- or r0,r32,r63
- GETCON CR0,R0
- getcon cr63,r0
- GETTR TR0,R0
- gettr tr7,r0
- FMOV.S FR0,FR63
- fmov.d dr0,dr62
- FTRV.S MTRX0,FV0,fv0
- ftrv.s mtrx48,FV60,FV60
-
-! All control register names
-
- getcon sr,r0
- getcon ssr,r0
- getcon pssr,r0
- getcon intevt,r0
- getcon expevt,r0
- getcon pexpevt,r0
- getcon tra,r0
- getcon spc,r0
- getcon pspc,r0
- getcon resvec,r0
- getcon vbr,r0
- getcon tea,r0
- getcon dcr,r0
- getcon kcr0,r0
- getcon kcr1,r0
- getcon ctc,r0
- getcon usr,r0
-
-! immediates
-
- .mode shcompact
-s1:
- mov #4,r0
-
- .align 2
- .mode shmedia
-s2:
- movi 4,r0
-
-! Scaled operands - user gives scaled value
-
- .mode shcompact
-s3:
- mov.l @(8,r0),r0
-
- .align 2
- .mode shmedia
-s4:
- ld.uw r0,2,r0
- ld.w r0,2,r0
- st.w r0,2,r0
- ld.l r0,4,r0
- st.l r0,4,r0
- fld.s r0,4,fr0
- fst.s r0,4,fr0
- pta .+4,tr0
- ptb .+7,tr0
- ld.q r0,8,r0
- st.q r0,8,r0
- fld.d r0,8,dr0
- fst.d r0,8,dr0
- fld.p r0,8,fp0
- fst.p r0,8,fp0
- alloco r0,32
- icbi r0,32
- ocbi r0,32
- ocbp r0,32
- ocbwb r0,32
- prefi r0,32
-
- .mode shcompact
-s5:
- mov.w @(6,pc),r0
- mov.w @(2,r0),r0
- mov.w @(2,gbr),r0
- mov.w r0,@(2,r0)
- mov.w r0,@(2,gbr)
- bf .+6
- bt .+6
- bra .+6
- bsr .+6
- mov.l @(2,pc),r0
- mov.l @(4,r0),r0
- mov.l @(4,gbr),r0
- mova @(8,pc),r0
- mov.l r0,@(4,r0)
- mov.l r0,@(4,gbr)
-
-! branchlabel vs datalabel
-
- .align 2
- .mode shmedia
-s6:
- .long .L3
- .long .L3 + 4
- .long datalabel .L3
- .long DATALABEL .L3
-.L3:
- .mode shcompact
-
-s7:
- .long .L4
- .long .L5
-.L4:
-
- .align 2
- .mode shmedia
-s8:
-
- movi (.L4 >> 16) & 65535,r0
- shori .L4 & 65535, r0
- ptabs r0,tr0
- blink tr0,r18
-
- movi (.L5 >> 16) & 65535,r0
- shori .L5 & 65535, r0
- ptabs r0,tr0
- blink tr0,r18
-.L5:
-
- movi (.L4-DATALABEL .L6), r0
-.L6:
- movi (.L5-DATALABEL .L7), r0
-.L7:
-
- pt .L5,tr0
-
-! Expressions
-
-! Symbols
-
-abcdefghijklmnopqrstuvwxyz0123456789_:
- .long abcdefghijklmnopqrstuvwxyz0123456789_
-_x:
- .long _x
-
-! program counter
-
- movi .L7-$,r0
-.L8: movi .L7-.L8,r0
-
- .mode shcompact
-s9:
- mova @(litpool-$,pc), r0
- mov.l @r1,r0
- add r1,r0
- bsrf r0
-litpool:
- .long s10 - DATALABEL $
-
-! operators
-
- .align 2
- .mode shmedia
-s10:
- movi 8+1,r0
- movi 8-1,r0
- movi 8<<1,r0
- movi 8>>1,r0
- movi ~1,r0
- movi 5&3,r0
- movi 8|1,r0
- movi 8*3,r0
- movi 24/3,r0
diff --git a/gas/testsuite/gas/sh/sh64/syntax-2.d b/gas/testsuite/gas/sh/sh64/syntax-2.d
deleted file mode 100644
index da90e5e..0000000
--- a/gas/testsuite/gas/sh/sh64/syntax-2.d
+++ /dev/null
@@ -1,11 +0,0 @@
-#as: --isa=shmedia --abi=64
-#objdump: -d
-#name: Minimum SH64 Syntax Support - Pseudos.
-
-dump.o: file format elf64-sh64.*
-
-Disassembly of section .text:
-
-0000000000000000 <.*>:
- 0: e8000a00 pta/l 8 <.*>,tr0
- 4: ec000600 ptb/l 8 <.*>,tr0
diff --git a/gas/testsuite/gas/sh/sh64/syntax-2.s b/gas/testsuite/gas/sh/sh64/syntax-2.s
deleted file mode 100644
index 3140daa..0000000
--- a/gas/testsuite/gas/sh/sh64/syntax-2.s
+++ /dev/null
@@ -1,10 +0,0 @@
- .text
-start:
-
-! pseudo-ops
-
- pt .L4,tr0
- pt .L5,tr0
-.L4:
- .mode shcompact
-.L5:
diff --git a/gas/testsuite/gas/sh/sh64/ua-1.s b/gas/testsuite/gas/sh/sh64/ua-1.s
deleted file mode 100644
index 2a2b63e..0000000
--- a/gas/testsuite/gas/sh/sh64/ua-1.s
+++ /dev/null
@@ -1,16 +0,0 @@
-! Check that unaligned pseudos emit the expected relocs and contents
-! whether aligned or not.
-
- .section .rodata,"a"
-start:
- .uaquad 0x123456789abcdef
- .byte 42
- .uaword 0x4a21
- .ualong 0x43b1abcd
- .ualong externsym0 + 3
- .uaquad 0x12c456d89ab1d0f
- .uaquad externsym1 + 41
- .byte 2
- .uaquad 0x1a34b67c9ab0d4f
- .ualong externsym2 + 42
- .uaquad externsym3 + 43
diff --git a/gas/testsuite/gas/sh/sh64/ua32-1.d b/gas/testsuite/gas/sh/sh64/ua32-1.d
deleted file mode 100644
index 879209d..0000000
--- a/gas/testsuite/gas/sh/sh64/ua32-1.d
+++ /dev/null
@@ -1,23 +0,0 @@
-#as: --abi=32
-#objdump: -sr
-#source: ua-1.s
-#name: Unaligned pseudos, 32-bit ABI.
-
-# Note that the relocs for externsym0 + 3 and externsym2 + 42 are
-# partial-in-place, i.e. REL-like, and are not displayed correctly.
-
-.*: file format .*-sh64.*
-
-RELOCATION RECORDS FOR \[\.rodata\]:
-OFFSET *TYPE *VALUE
-0+0f R_SH_DIR32 externsym0
-0+1b R_SH_64 externsym1\+0x0+29
-0+2c R_SH_DIR32 externsym2
-0+30 R_SH_64 externsym3\+0x0+2b
-
-
-Contents of section \.rodata:
- 0000 01234567 89abcdef 2a4a2143 b1abcd00 .*
- 0010 00000301 2c456d89 ab1d0f00 00000000 .*
- 0020 00000002 01a34b67 c9ab0d4f 0000002a .*
- 0030 00000000 00000000 .*
diff --git a/gas/testsuite/gas/sh/sh64/ua64-1.d b/gas/testsuite/gas/sh/sh64/ua64-1.d
deleted file mode 100644
index cfe3dbb..0000000
--- a/gas/testsuite/gas/sh/sh64/ua64-1.d
+++ /dev/null
@@ -1,23 +0,0 @@
-#as: --abi=64
-#objdump: -sr
-#name: Unaligned pseudos, 64-bit ABI.
-#source: ua-1.s
-
-# Note that the relocs for externsym0 + 3 and externsym2 + 42 are
-# partial-in-place, i.e. REL-like, and are not displayed correctly.
-
-.*: file format .*-sh64.*
-
-RELOCATION RECORDS FOR \[\.rodata\]:
-OFFSET TYPE VALUE
-0+0f R_SH_DIR32 externsym0
-0+1b R_SH_64 externsym1\+0x0000000000000029
-0+2c R_SH_DIR32 externsym2
-0+30 R_SH_64 externsym3\+0x000000000000002b
-
-
-Contents of section \.rodata:
- 0000 01234567 89abcdef 2a4a2143 b1abcd00 .*
- 0010 00000301 2c456d89 ab1d0f00 00000000 .*
- 0020 00000002 01a34b67 c9ab0d4f 0000002a .*
- 0030 00000000 00000000 .*
diff --git a/include/ChangeLog b/include/ChangeLog
index 204a512..6d2172c 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,5 +1,9 @@
2018-04-16 Alan Modra <amodra@gmail.com>
+ * dis-asm.h: Remove sh5 and sh64 support.
+
+2018-04-16 Alan Modra <amodra@gmail.com>
+
* coff/internal.h: Remove w65 support.
* coff/w65.h: Delete.
diff --git a/include/dis-asm.h b/include/dis-asm.h
index eebdaf8..760ed3e 100644
--- a/include/dis-asm.h
+++ b/include/dis-asm.h
@@ -241,7 +241,6 @@ typedef int (*disassembler_ftype) (bfd_vma, disassemble_info *);
extern int print_insn_m32c (bfd_vma, disassemble_info *);
extern int print_insn_mep (bfd_vma, disassemble_info *);
extern int print_insn_sh (bfd_vma, disassemble_info *);
-extern int print_insn_sh64x_media (bfd_vma, disassemble_info *);
extern int print_insn_sparc (bfd_vma, disassemble_info *);
extern int print_insn_rx (bfd_vma, disassemble_info *);
extern int print_insn_rl78 (bfd_vma, disassemble_info *);
diff --git a/ld/ChangeLog b/ld/ChangeLog
index d62ca5e..136c378 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,112 @@
2018-04-16 Alan Modra <amodra@gmail.com>
+ * Makefile.am: Remove sh5 and sh64 support.
+ * configure.tgt: Likewise.
+ * ldlang.c: Likewise.
+ * testsuite/ld-elfcomm/elfcomm.exp: Likewise.
+ * testsuite/ld-gc/gc.exp: Likewise.
+ * testsuite/ld-gc/pr13683.d: Likewise.
+ * testsuite/ld-scripts/crossref.exp: Likewise.
+ * testsuite/ld-selective/selective.exp: Likewise.
+ * testsuite/ld-sh/ld-r-1.d: Likewise.
+ * testsuite/ld-sh/rd-sh.exp: Likewise.
+ * testsuite/ld-sh/sh.exp: Likewise.
+ * testsuite/ld-srec/srec.exp: Likewise.
+ * testsuite/ld-undefined/undefined.exp: Likewise.
+ * emulparams/shelf32.sh: Delete.
+ * emulparams/shelf32_linux.sh: Delete.
+ * emulparams/shelf32_nbsd.sh: Delete.
+ * emulparams/shelf64.sh: Delete.
+ * emulparams/shelf64_nbsd.sh: Delete.
+ * emulparams/shlelf32.sh: Delete.
+ * emulparams/shlelf32_linux.sh: Delete.
+ * emulparams/shlelf32_nbsd.sh: Delete.
+ * emulparams/shlelf64.sh: Delete.
+ * emulparams/shlelf64_nbsd.sh: Delete.
+ * emultempl/sh64elf.em: Delete.
+ * testsuite/ld-sh/sh64/abi32.sd: Delete.
+ * testsuite/ld-sh/sh64/abi32.xd: Delete.
+ * testsuite/ld-sh/sh64/abi64.sd: Delete.
+ * testsuite/ld-sh/sh64/abi64.xd: Delete.
+ * testsuite/ld-sh/sh64/abixx-noexp.sd: Delete.
+ * testsuite/ld-sh/sh64/cmpct1.sd: Delete.
+ * testsuite/ld-sh/sh64/cmpct1.xd: Delete.
+ * testsuite/ld-sh/sh64/crange-1.s: Delete.
+ * testsuite/ld-sh/sh64/crange-2a.s: Delete.
+ * testsuite/ld-sh/sh64/crange-2b.s: Delete.
+ * testsuite/ld-sh/sh64/crange-2c.s: Delete.
+ * testsuite/ld-sh/sh64/crange-2d.s: Delete.
+ * testsuite/ld-sh/sh64/crange-2e.s: Delete.
+ * testsuite/ld-sh/sh64/crange-2f.s: Delete.
+ * testsuite/ld-sh/sh64/crange-2g.s: Delete.
+ * testsuite/ld-sh/sh64/crange-2h.s: Delete.
+ * testsuite/ld-sh/sh64/crange-2i.s: Delete.
+ * testsuite/ld-sh/sh64/crange1.rd: Delete.
+ * testsuite/ld-sh/sh64/crange2.rd: Delete.
+ * testsuite/ld-sh/sh64/crange3-cmpct.rd: Delete.
+ * testsuite/ld-sh/sh64/crange3-media.rd: Delete.
+ * testsuite/ld-sh/sh64/crange3.dd: Delete.
+ * testsuite/ld-sh/sh64/crange3.rd: Delete.
+ * testsuite/ld-sh/sh64/crangerel1.rd: Delete.
+ * testsuite/ld-sh/sh64/crangerel2.rd: Delete.
+ * testsuite/ld-sh/sh64/dlsection-1.s: Delete.
+ * testsuite/ld-sh/sh64/dlsection.sd: Delete.
+ * testsuite/ld-sh/sh64/endian.dbd: Delete.
+ * testsuite/ld-sh/sh64/endian.dld: Delete.
+ * testsuite/ld-sh/sh64/endian.ld: Delete.
+ * testsuite/ld-sh/sh64/endian.s: Delete.
+ * testsuite/ld-sh/sh64/endian.sbd: Delete.
+ * testsuite/ld-sh/sh64/endian.sld: Delete.
+ * testsuite/ld-sh/sh64/gotplt.d: Delete.
+ * testsuite/ld-sh/sh64/gotplt.map: Delete.
+ * testsuite/ld-sh/sh64/gotplt.s: Delete.
+ * testsuite/ld-sh/sh64/init-cmpct.d: Delete.
+ * testsuite/ld-sh/sh64/init-media.d: Delete.
+ * testsuite/ld-sh/sh64/init.s: Delete.
+ * testsuite/ld-sh/sh64/init64.d: Delete.
+ * testsuite/ld-sh/sh64/mix1-noexp.sd: Delete.
+ * testsuite/ld-sh/sh64/mix1.sd: Delete.
+ * testsuite/ld-sh/sh64/mix1.xd: Delete.
+ * testsuite/ld-sh/sh64/mix2-noexp.sd: Delete.
+ * testsuite/ld-sh/sh64/mix2.sd: Delete.
+ * testsuite/ld-sh/sh64/mix2.xd: Delete.
+ * testsuite/ld-sh/sh64/rd-sh64.exp: Delete.
+ * testsuite/ld-sh/sh64/rel-1.s: Delete.
+ * testsuite/ld-sh/sh64/rel-2.s: Delete.
+ * testsuite/ld-sh/sh64/rel32.xd: Delete.
+ * testsuite/ld-sh/sh64/rel64.xd: Delete.
+ * testsuite/ld-sh/sh64/relax.exp: Delete.
+ * testsuite/ld-sh/sh64/relax1.s: Delete.
+ * testsuite/ld-sh/sh64/relax2.s: Delete.
+ * testsuite/ld-sh/sh64/relax3.s: Delete.
+ * testsuite/ld-sh/sh64/relax4.s: Delete.
+ * testsuite/ld-sh/sh64/reldl-1.s: Delete.
+ * testsuite/ld-sh/sh64/reldl-2.s: Delete.
+ * testsuite/ld-sh/sh64/reldl32.rd: Delete.
+ * testsuite/ld-sh/sh64/reldl64.rd: Delete.
+ * testsuite/ld-sh/sh64/relfail.exp: Delete.
+ * testsuite/ld-sh/sh64/relfail.s: Delete.
+ * testsuite/ld-sh/sh64/sh64-1.s: Delete.
+ * testsuite/ld-sh/sh64/sh64-2.s: Delete.
+ * testsuite/ld-sh/sh64/sh64.exp: Delete.
+ * testsuite/ld-sh/sh64/shcmp-1.s: Delete.
+ * testsuite/ld-sh/sh64/shdl-1.s: Delete.
+ * testsuite/ld-sh/sh64/shdl-2.s: Delete.
+ * testsuite/ld-sh/sh64/shdl32.xd: Delete.
+ * testsuite/ld-sh/sh64/shdl64.sd: Delete.
+ * testsuite/ld-sh/sh64/shdl64.xd: Delete.
+ * testsuite/ld-sh/sh64/shmix-1.s: Delete.
+ * testsuite/ld-sh/sh64/shmix-2.s: Delete.
+ * testsuite/ld-sh/sh64/shmix-3.s: Delete.
+ * testsuite/ld-sh/sh64/stobin-0-dso.d: Delete.
+ * testsuite/ld-sh/sh64/stobin-1.d: Delete.
+ * testsuite/ld-sh/sh64/stobin.s: Delete.
+ * testsuite/ld-sh/sh64/stolib.s: Delete.
+ * Makefile.in: Regenerate.
+ * po/BLD-POTFILES.in: Regenerate.
+
+2018-04-16 Alan Modra <amodra@gmail.com>
+
* Makefile.am: Remove sh-symbianelf support.
* configure.tgt: Likewise.
* emulparams/shlsymbian.sh: Delete.
diff --git a/ld/Makefile.am b/ld/Makefile.am
index c09cd3c..848a736 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -368,9 +368,6 @@ ALL_EMULATION_SOURCES = \
escore7_elf.c \
esh.c \
eshelf.c \
- eshelf32.c \
- eshelf32_linux.c \
- eshelf32_nbsd.c \
eshelf_fd.c \
eshelf_linux.c \
eshelf_nbsd.c \
@@ -379,9 +376,6 @@ ALL_EMULATION_SOURCES = \
eshelf_vxworks.c \
eshl.c \
eshlelf.c \
- eshlelf32.c \
- eshlelf32_linux.c \
- eshlelf32_nbsd.c \
eshlelf_fd.c \
eshlelf_linux.c \
eshlelf_nbsd.c \
@@ -485,11 +479,7 @@ ALL_64_EMULATION_SOURCES = \
eelf_x86_64_sol2.c \
ehppa64linux.c \
ei386pep.c \
- emmo.c \
- eshelf64.c \
- eshelf64_nbsd.c \
- eshlelf64.c \
- eshlelf64_nbsd.c
+ emmo.c
ALL_64_EMULATIONS = $(ALL_64_EMULATION_SOURCES:.c=.@OBJEXT@)
@@ -1652,23 +1642,6 @@ esh.c: $(srcdir)/emulparams/sh.sh \
eshelf.c: $(srcdir)/emulparams/shelf.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-eshelf32.c: $(srcdir)/emulparams/shelf32.sh \
- $(INCDIR)/libiberty.h \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshelf32_linux.c: $(srcdir)/emulparams/shelf32_linux.sh \
- $(srcdir)/emulparams/shelf32.sh \
- $(INCDIR)/libiberty.h \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshelf32_nbsd.c: $(srcdir)/emulparams/shelf32_nbsd.sh \
- $(srcdir)/emulparams/shelf32.sh \
- $(INCDIR)/libiberty.h \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
eshelf_fd.c: $(srcdir)/emulparams/shelf_fd.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@@ -1698,23 +1671,6 @@ eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
$(srcdir)/emulparams/shelf.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-eshlelf32.c: $(srcdir)/emulparams/shlelf32.sh \
- $(INCDIR)/libiberty.h $(srcdir)/emulparams/shelf32.sh \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshlelf32_linux.c: $(srcdir)/emulparams/shlelf32_linux.sh \
- $(srcdir)/emulparams/shelf32_linux.sh $(srcdir)/emulparams/shelf32.sh \
- $(INCDIR)/libiberty.h \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshlelf32_nbsd.c: $(srcdir)/emulparams/shlelf32_nbsd.sh \
- $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
- $(INCDIR)/libiberty.h \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
eshlelf_fd.c: $(srcdir)/emulparams/shlelf_fd.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@@ -1970,22 +1926,6 @@ emmo.c: $(srcdir)/emulparams/mmo.sh $(srcdir)/emultempl/mmix-elfnmmo.em \
$(srcdir)/emultempl/mmo.em $(srcdir)/scripttempl/DWARF.sc \
$(srcdir)/scripttempl/mmo.sc ${GEN_DEPENDS}
-eshelf64.c: $(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshelf64_nbsd.c: $(srcdir)/emulparams/shelf64_nbsd.sh \
- $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshlelf64.c: $(srcdir)/emulparams/shlelf64.sh \
- $(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshlelf64_nbsd.c: $(srcdir)/emulparams/shlelf64_nbsd.sh \
- $(srcdir)/emulparams/shelf64_nbsd.sh \
- $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
# We need this for automake to use YLWRAP.
EXTRA_ld_new_SOURCES = deffilep.y ldlex.l
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 4d9023b..59d848d 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -737,9 +737,6 @@ ALL_EMULATION_SOURCES = \
escore7_elf.c \
esh.c \
eshelf.c \
- eshelf32.c \
- eshelf32_linux.c \
- eshelf32_nbsd.c \
eshelf_fd.c \
eshelf_linux.c \
eshelf_nbsd.c \
@@ -748,9 +745,6 @@ ALL_EMULATION_SOURCES = \
eshelf_vxworks.c \
eshl.c \
eshlelf.c \
- eshlelf32.c \
- eshlelf32_linux.c \
- eshlelf32_nbsd.c \
eshlelf_fd.c \
eshlelf_linux.c \
eshlelf_nbsd.c \
@@ -853,11 +847,7 @@ ALL_64_EMULATION_SOURCES = \
eelf_x86_64_sol2.c \
ehppa64linux.c \
ei386pep.c \
- emmo.c \
- eshelf64.c \
- eshelf64_nbsd.c \
- eshlelf64.c \
- eshlelf64_nbsd.c
+ emmo.c
ALL_64_EMULATIONS = $(ALL_64_EMULATION_SOURCES:.c=.@OBJEXT@)
ALL_EMUL_EXTRA_OFILES = \
@@ -1381,11 +1371,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/escore7_elf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esh.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshelf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshelf32.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshelf32_linux.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshelf32_nbsd.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshelf64.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshelf64_nbsd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshelf_fd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshelf_linux.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshelf_nbsd.Po@am__quote@
@@ -1394,11 +1379,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshelf_vxworks.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshlelf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshlelf32.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshlelf32_linux.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshlelf32_nbsd.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshlelf64.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshlelf64_nbsd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshlelf_fd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshlelf_linux.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshlelf_nbsd.Po@am__quote@
@@ -3189,23 +3169,6 @@ esh.c: $(srcdir)/emulparams/sh.sh \
eshelf.c: $(srcdir)/emulparams/shelf.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-eshelf32.c: $(srcdir)/emulparams/shelf32.sh \
- $(INCDIR)/libiberty.h \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshelf32_linux.c: $(srcdir)/emulparams/shelf32_linux.sh \
- $(srcdir)/emulparams/shelf32.sh \
- $(INCDIR)/libiberty.h \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshelf32_nbsd.c: $(srcdir)/emulparams/shelf32_nbsd.sh \
- $(srcdir)/emulparams/shelf32.sh \
- $(INCDIR)/libiberty.h \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
eshelf_fd.c: $(srcdir)/emulparams/shelf_fd.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@@ -3235,23 +3198,6 @@ eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
$(srcdir)/emulparams/shelf.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-eshlelf32.c: $(srcdir)/emulparams/shlelf32.sh \
- $(INCDIR)/libiberty.h $(srcdir)/emulparams/shelf32.sh \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshlelf32_linux.c: $(srcdir)/emulparams/shlelf32_linux.sh \
- $(srcdir)/emulparams/shelf32_linux.sh $(srcdir)/emulparams/shelf32.sh \
- $(INCDIR)/libiberty.h \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshlelf32_nbsd.c: $(srcdir)/emulparams/shlelf32_nbsd.sh \
- $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
- $(INCDIR)/libiberty.h \
- $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
eshlelf_fd.c: $(srcdir)/emulparams/shlelf_fd.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@@ -3507,22 +3453,6 @@ emmo.c: $(srcdir)/emulparams/mmo.sh $(srcdir)/emultempl/mmix-elfnmmo.em \
$(srcdir)/emultempl/mmo.em $(srcdir)/scripttempl/DWARF.sc \
$(srcdir)/scripttempl/mmo.sc ${GEN_DEPENDS}
-eshelf64.c: $(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshelf64_nbsd.c: $(srcdir)/emulparams/shelf64_nbsd.sh \
- $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshlelf64.c: $(srcdir)/emulparams/shlelf64.sh \
- $(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshlelf64_nbsd.c: $(srcdir)/emulparams/shlelf64_nbsd.sh \
- $(srcdir)/emulparams/shelf64_nbsd.sh \
- $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
- $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
check-DEJAGNU: site.exp
srcroot=`cd $(srcdir) && pwd`; export srcroot; \
r=`pwd`; export r; \
diff --git a/ld/configure.tgt b/ld/configure.tgt
index 96e3f44..1322468 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -703,23 +703,10 @@ score-*-elf) targ_emul=score7_elf
sh-*-linux*) targ_emul=shlelf_linux
targ_extra_emuls="shelf_linux shlelf_fd shelf_fd"
targ_extra_libpath=shelf_linux ;;
-sh64eb-*-linux*) targ_emul=shelf32_linux
- targ_extra_emuls="shlelf32_linux" ;;
-sh64-*-linux*) targ_emul=shlelf32_linux
- targ_extra_emuls="shelf32_linux"
- targ_extra_libpath=shelf32_linux ;;
sh*eb-*-linux*) targ_emul=shelf_linux
targ_extra_emuls="shelf_fd" ;;
sh*-*-linux*) targ_emul=shlelf_linux
targ_extra_emuls="shlelf_fd" ;;
-sh5le-*-netbsd*) targ_emul=shlelf32_nbsd
- targ_extra_emuls="shelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd" ;;
-sh5-*-netbsd*) targ_emul=shelf32_nbsd
- targ_extra_emuls="shlelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd" ;;
-sh64le-*-netbsd*) targ_emul=shlelf64_nbsd
- targ_extra_emuls="shelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd" ;;
-sh64-*-netbsd*) targ_emul=shelf64_nbsd
- targ_extra_emuls="shlelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd" ;;
sh*l*-*-netbsdelf*) targ_emul=shlelf_nbsd
targ_extra_emuls=shelf_nbsd ;;
sh*-*-netbsdelf*) targ_emul=shelf_nbsd
@@ -740,12 +727,6 @@ sh-*-nto*) targ_emul=shelf_nto
sh-*-pe) targ_emul=shpe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
sh-*-*) targ_emul=sh; targ_extra_emuls=shl ;;
-sh64le-*-elf*) targ_emul=shlelf
- targ_extra_emuls="shelf shlelf32 shelf32 shlelf64 shelf64"
- targ_extra_libpath=$targ_extra_emuls ;;
-sh64-*-elf*) targ_emul=shelf
- targ_extra_emuls="shlelf shelf32 shlelf32 shelf64 shlelf64"
- targ_extra_libpath=$targ_extra_emuls ;;
sparc64-*-aout*) targ_emul=sparcaout ;;
sparc64-*-elf* | sparc64-*-rtems*)
targ_emul=elf64_sparc ;;
diff --git a/ld/emulparams/shelf32.sh b/ld/emulparams/shelf32.sh
deleted file mode 100644
index 3fc9a3e..0000000
--- a/ld/emulparams/shelf32.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-# Note: this parameter script is sourced by the other
-# sh[l]elf(32|64).sh parameter scripts.
-SCRIPT_NAME=elf
-OUTPUT_FORMAT=${OUTPUT_FORMAT-"elf32-sh64"}
-NO_REL_RELOCS=yes
-TEXT_START_ADDR=0x1000
-MAXPAGESIZE=128
-ARCH=sh
-MACHINE=sh5
-ALIGNMENT=8
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-EMBEDDED=yes
-
-DATA_START_SYMBOLS='PROVIDE (___data = .);'
-
-# If data is located right after .text (not explicitly specified),
-# then we need to align it to an 8-byte boundary.
-OTHER_READONLY_SECTIONS='
-PROVIDE (___rodata = DEFINED (.rodata) ? .rodata : 0);
-. = ALIGN (8);
-'
-
-# Make _edata and .bss aligned by smuggling in an alignment directive.
-OTHER_GOT_SECTIONS='. = ALIGN (8);'
-
-# These are for compatibility with the COFF toolchain.
-ENTRY=start
-CTOR_START='___ctors = .;'
-CTOR_END='___ctors_end = .;'
-DTOR_START='___dtors = .;'
-DTOR_END='___dtors_end = .;'
-
-STACK_ADDR="(DEFINED(_stack) ? _stack : ALIGN (0x40000) + 0x80000)"
-STACK_SENTINEL="LONG(0xdeaddead)"
-# We do not need .stack for shared library.
-test -n "$CREATE_SHLIB" && unset STACK_ADDR
-
-OTHER_SECTIONS=".cranges 0 : { *(.cranges) }"
-
-# We need to adjust sizes in the .cranges section after relaxation, so
-# we need an after_allocation function, and it goes in this file.
-EXTRA_EM_FILE=${EXTRA_EM_FILE-sh64elf}
diff --git a/ld/emulparams/shelf32_linux.sh b/ld/emulparams/shelf32_linux.sh
deleted file mode 100644
index a51e22f..0000000
--- a/ld/emulparams/shelf32_linux.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-. ${srcdir}/emulparams/shlelf32_linux.sh
-OUTPUT_FORMAT="elf32-sh64big-linux"
diff --git a/ld/emulparams/shelf32_nbsd.sh b/ld/emulparams/shelf32_nbsd.sh
deleted file mode 100644
index 63aee8f..0000000
--- a/ld/emulparams/shelf32_nbsd.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-# If you change this file, please alsolook at files which source this one:
-# shlelf32_nbsd.sh
-
-. ${srcdir}/emulparams/shelf32.sh
-
-OUTPUT_FORMAT="elf32-sh64-nbsd"
-TEXT_START_ADDR=0x400000
-MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-
-ENTRY=__start
-
-unset EMBEDDED
-unset STACK_ADDR
-unset OTHER_SECTIONS
-OTHER_SECTIONS="
- .cranges 0 : { *(.cranges) }
-"
diff --git a/ld/emulparams/shelf64.sh b/ld/emulparams/shelf64.sh
deleted file mode 100644
index 5ddcc8d..0000000
--- a/ld/emulparams/shelf64.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-# Note: this is sourced in turn by shlelf64.sh
-OUTPUT_FORMAT=${OUTPUT_FORMAT-"elf64-sh64"}
-ELFSIZE=64
-
-EXTRA_EM_FILE=
-. ${srcdir}/emulparams/shelf32.sh
-
-# We do not need .cranges
-unset OTHER_SECTIONS
diff --git a/ld/emulparams/shelf64_nbsd.sh b/ld/emulparams/shelf64_nbsd.sh
deleted file mode 100644
index 7a3ff21..0000000
--- a/ld/emulparams/shelf64_nbsd.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-. ${srcdir}/emulparams/shelf32_nbsd.sh
-
-OUTPUT_FORMAT="elf64-sh64-nbsd"
-ELFSIZE=64
-
-# We do not need .cranges
-OTHER_SECTIONS=''
-EXTRA_EM_FILE=
diff --git a/ld/emulparams/shlelf32.sh b/ld/emulparams/shlelf32.sh
deleted file mode 100644
index 68c85dd..0000000
--- a/ld/emulparams/shlelf32.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-OUTPUT_FORMAT="elf32-sh64l"
-. ${srcdir}/emulparams/shelf32.sh
diff --git a/ld/emulparams/shlelf32_linux.sh b/ld/emulparams/shlelf32_linux.sh
deleted file mode 100644
index 03f6d9a..0000000
--- a/ld/emulparams/shlelf32_linux.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-# If you change this file, please also look at files which source this one:
-# shelf32_linux.sh
-
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-sh64-linux"
-NO_REL_RELOCS=yes
-TEXT_START_ADDR=0x400000
-MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-ARCH=sh
-MACHINE=sh5
-ALIGNMENT=8
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-GENERATE_PIE_SCRIPT=yes
-
-DATA_START_SYMBOLS='PROVIDE (___data = .);'
-
-# If data is located right after .text (not explicitly specified),
-# then we need to align it to an 8-byte boundary.
-OTHER_READONLY_SECTIONS='
-PROVIDE (___rodata = DEFINED (.rodata) ? .rodata : 0);
-. = ALIGN (8);
-'
-
-# Make _edata and .bss aligned by smuggling in an alignment directive.
-OTHER_GOT_SECTIONS='. = ALIGN (8);'
-
-CTOR_START='___ctors = .;'
-CTOR_END='___ctors_end = .;'
-DTOR_START='___dtors = .;'
-DTOR_END='___dtors_end = .;'
-
-# Do not use the varname=${varname-'string'} construct here; there are
-# problems with that on some shells (e.g. on Solaris) where there is a bug
-# that trigs when $varname contains a "}".
-test -z "$OTHER_RELOCATING_SECTIONS" && OTHER_RELOCATING_SECTIONS='
- .cranges 0 : { *(.cranges) }
-'
-
-# We need to adjust sizes in the .cranges section after relaxation, so
-# we need an after_allocation function, and it goes in this file.
-EXTRA_EM_FILE=${EXTRA_EM_FILE-sh64elf}
diff --git a/ld/emulparams/shlelf32_nbsd.sh b/ld/emulparams/shlelf32_nbsd.sh
deleted file mode 100644
index c4abe6b..0000000
--- a/ld/emulparams/shlelf32_nbsd.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-. ${srcdir}/emulparams/shelf32_nbsd.sh
-
-OUTPUT_FORMAT="elf32-sh64l-nbsd"
diff --git a/ld/emulparams/shlelf64.sh b/ld/emulparams/shlelf64.sh
deleted file mode 100644
index 874b00c..0000000
--- a/ld/emulparams/shlelf64.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-OUTPUT_FORMAT="elf64-sh64l"
-. ${srcdir}/emulparams/shelf64.sh
diff --git a/ld/emulparams/shlelf64_nbsd.sh b/ld/emulparams/shlelf64_nbsd.sh
deleted file mode 100644
index 5b693c3..0000000
--- a/ld/emulparams/shlelf64_nbsd.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-. ${srcdir}/emulparams/shelf64_nbsd.sh
-
-OUTPUT_FORMAT="elf64-sh64l-nbsd"
diff --git a/ld/emultempl/sh64elf.em b/ld/emultempl/sh64elf.em
deleted file mode 100644
index 1fe94da..0000000
--- a/ld/emultempl/sh64elf.em
+++ /dev/null
@@ -1,563 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# Copyright (C) 2000-2018 Free Software Foundation, Inc.
-#
-# This file is part of the GNU Binutils.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
-# MA 02110-1301, USA.
-#
-
-# This file is sourced from elf32.em, and defines extra sh64
-# specific routines.
-#
-
-LDEMUL_AFTER_ALLOCATION=sh64_elf_${EMULATION_NAME}_after_allocation
-LDEMUL_BEFORE_ALLOCATION=sh64_elf_${EMULATION_NAME}_before_allocation
-
-fragment <<EOF
-
-#include "libiberty.h"
-#include "elf-bfd.h"
-#include "elf/sh.h"
-#include "elf32-sh64.h"
-
-/* Check if we need a .cranges section and create it if it's not in any
- input file. It might seem better to always create it and if unneeded,
- discard it, but I don't find a simple way to discard it totally from
- the output.
-
- Putting it here instead of as a elf_backend_always_size_sections hook
- in elf32-sh64.c, means that we have access to linker command line
- options here, and we can access input sections in the order in which
- they will be linked. */
-
-static void
-sh64_elf_${EMULATION_NAME}_before_allocation (void)
-{
- asection *cranges;
- asection *osec;
-
- /* Call main function; we're just extending it. */
- gld${EMULATION_NAME}_before_allocation ();
-
- cranges = bfd_get_section_by_name (link_info.output_bfd,
- SH64_CRANGES_SECTION_NAME);
-
- if (cranges != NULL)
- {
- if (RELAXATION_ENABLED)
- {
- /* FIXME: Look through incoming sections with .cranges
- descriptors, build up some kind of descriptors that the
- relaxing function will pick up and adjust, or perhaps make it
- find and adjust an associated .cranges descriptor. We could
- also look through incoming relocs and kill the ones marking
- relaxation areas, but that wouldn't be TRT. */
- einfo
- (_("%P: sorry, turning off relaxing: .cranges section in input\n"));
- einfo (_(" A .cranges section is present in:\n"));
-
- {
- LANG_FOR_EACH_INPUT_STATEMENT (f)
- {
- asection *input_cranges
- = bfd_get_section_by_name (f->the_bfd,
- SH64_CRANGES_SECTION_NAME);
- if (input_cranges != NULL)
- einfo (" %pI\n", f);
- }
- }
-
- DISABLE_RELAXATION;
- }
-
- /* We wouldn't need to do anything when there's already a .cranges
- section (and have a return here), except that we need to set the
- section flags right for output sections that *don't* need a
- .cranges section. */
- }
-
- if (RELAXATION_ENABLED)
- {
- LANG_FOR_EACH_INPUT_STATEMENT (f)
- {
- if (bfd_get_flavour (f->the_bfd) == bfd_target_elf_flavour)
- {
- asection *isec;
-
- for (isec = f->the_bfd->sections;
- isec != NULL;
- isec = isec->next)
- {
- if (elf_section_data (isec)->this_hdr.sh_flags
- & (SHF_SH5_ISA32 | SHF_SH5_ISA32_MIXED))
- {
- einfo (_("%P: sorry, turning off relaxing: SHmedia sections present\n"));
- einfo (" %pI\n", f);
- DISABLE_RELAXATION;
- goto done_scanning_shmedia_sections;
- }
- }
- }
- }
- }
- done_scanning_shmedia_sections:
-
- /* For each non-empty input section in each output section, check if it
- has the same SH64-specific flags. If some input section differs, we
- need a .cranges section. */
- for (osec = link_info.output_bfd->sections;
- osec != NULL;
- osec = osec->next)
- {
- struct sh64_section_data *sh64_sec_data;
- bfd_vma oflags_isa = 0;
- bfd_vma iflags_isa = 0;
-
- if (bfd_get_flavour (link_info.output_bfd) != bfd_target_elf_flavour)
- einfo (_("%F%P: error: non-ELF output formats are not supported by this target's linker\n"));
-
- sh64_sec_data = sh64_elf_section_data (osec)->sh64_info;
-
- /* Omit excluded or garbage-collected sections. */
- if (bfd_get_section_flags (link_info.output_bfd, osec) & SEC_EXCLUDE)
- continue;
-
- /* Make sure we have the target section data initialized. */
- if (sh64_sec_data == NULL)
- {
- sh64_sec_data = xcalloc (1, sizeof (struct sh64_section_data));
- sh64_elf_section_data (osec)->sh64_info = sh64_sec_data;
- }
-
- /* First find an input section so we have flags to compare with; the
- flags in the output section are not valid. */
- {
- LANG_FOR_EACH_INPUT_STATEMENT (f)
- {
- asection *isec;
-
- for (isec = f->the_bfd->sections;
- isec != NULL;
- isec = isec->next)
- {
- if (isec->output_section == osec
- && isec->size != 0
- && (bfd_get_section_flags (isec->owner, isec)
- & SEC_EXCLUDE) == 0)
- {
- oflags_isa
- = (elf_section_data (isec)->this_hdr.sh_flags
- & (SHF_SH5_ISA32 | SHF_SH5_ISA32_MIXED));
- goto break_1;
- }
- }
- }
- }
-
- break_1:
-
- /* Check that all input sections have the same contents-type flags
- as the first input section. */
- {
- LANG_FOR_EACH_INPUT_STATEMENT (f)
- {
- asection *isec;
-
- for (isec = f->the_bfd->sections;
- isec != NULL;
- isec = isec->next)
- {
- if (isec->output_section == osec
- && isec->size != 0
- && (bfd_get_section_flags (isec->owner, isec)
- & SEC_EXCLUDE) == 0)
- {
- iflags_isa
- = (elf_section_data (isec)->this_hdr.sh_flags
- & (SHF_SH5_ISA32 | SHF_SH5_ISA32_MIXED));
-
- /* If flags don't agree, we need a .cranges section.
- Create it here if it did not exist through input
- sections. */
- if (iflags_isa != oflags_isa)
- {
- if (cranges == NULL)
- {
- /* This section will be *appended* to
- sections, so the outer iteration will reach
- it in due time and set
- sh64_elf_section_data; no need to set it
- specifically here. */
- cranges
- = bfd_make_section_with_flags (link_info.output_bfd,
- SH64_CRANGES_SECTION_NAME,
- SEC_LINKER_CREATED
- | SEC_KEEP
- | SEC_HAS_CONTENTS
- | SEC_DEBUGGING);
- if (cranges == NULL)
- einfo
- (_("%F%P: can't make .cranges section: %E\n"));
- }
-
- /* We don't need to look at more input sections,
- and we know this section will have mixed
- contents. */
- goto break_2;
- }
- }
- }
- }
- }
-
- /* If we got here, then all input sections in this output section
- have the same contents flag. Put that where we expect to see
- contents flags. We don't need to do this for sections that will
- need additional, linker-generated .cranges entries. */
- sh64_sec_data->contents_flags = iflags_isa;
-
- break_2:
- ;
- }
-}
-
-/* Size up and extend the .cranges section, merging generated entries. */
-
-static void
-sh64_elf_${EMULATION_NAME}_after_allocation (void)
-{
- bfd_vma new_cranges = 0;
- bfd_vma cranges_growth = 0;
- asection *osec;
- bfd_byte *crangesp;
- asection *cranges;
-
- gld${EMULATION_NAME}_after_allocation ();
-
- /* Needed, since we create link_orders here. */
- lang_clear_os_map ();
-
- cranges = bfd_get_section_by_name (link_info.output_bfd,
- SH64_CRANGES_SECTION_NAME);
-
- /* If there is no .cranges section, it is because it was seen earlier on
- that none was needed. Otherwise it must have been created then, or
- be present in input. */
- if (cranges == NULL)
- return;
-
- /* First, we set the ISA flags for each output section according to the
- first non-discarded section. For each input section in osec, we
- check if it has the same flags. If it does not, we set flags to mark
- a mixed section (and exit the loop early). */
- for (osec = link_info.output_bfd->sections;
- osec != NULL;
- osec = osec->next)
- {
- bfd_vma oflags_isa = 0;
- bfd_boolean need_check_cranges = FALSE;
-
- /* Omit excluded or garbage-collected sections. */
- if (bfd_get_section_flags (link_info.output_bfd, osec) & SEC_EXCLUDE)
- continue;
-
- /* First find an input section so we have flags to compare with; the
- flags in the output section are not valid. */
- {
- LANG_FOR_EACH_INPUT_STATEMENT (f)
- {
- asection *isec;
-
- for (isec = f->the_bfd->sections;
- isec != NULL;
- isec = isec->next)
- {
- if (isec->output_section == osec
- && isec->size != 0
- && (bfd_get_section_flags (isec->owner, isec)
- & SEC_EXCLUDE) == 0)
- {
- oflags_isa
- = (elf_section_data (isec)->this_hdr.sh_flags
- & (SHF_SH5_ISA32 | SHF_SH5_ISA32_MIXED));
- goto break_1;
- }
- }
- }
- }
-
- break_1:
-
- /* Check that all input sections have the same contents-type flags
- as the first input section. */
- {
- LANG_FOR_EACH_INPUT_STATEMENT (f)
- {
- asection *isec;
-
- for (isec = f->the_bfd->sections;
- isec != NULL;
- isec = isec->next)
- {
- if (isec->output_section == osec
- && isec->size != 0
- && (bfd_get_section_flags (isec->owner, isec)
- & SEC_EXCLUDE) == 0)
- {
- bfd_vma iflags_isa
- = (elf_section_data (isec)->this_hdr.sh_flags
- & (SHF_SH5_ISA32 | SHF_SH5_ISA32_MIXED));
-
- /* If flags don't agree, set the target-specific data
- of the section to mark that this section needs to
- be have .cranges section entries added. Don't
- bother setting ELF section flags in output section;
- they will be cleared later and will have to be
- re-initialized before the linked file is written. */
- if (iflags_isa != oflags_isa)
- {
- oflags_isa = SHF_SH5_ISA32_MIXED;
-
- ASSERT (sh64_elf_section_data (osec)->sh64_info);
-
- sh64_elf_section_data (osec)->sh64_info->contents_flags
- = SHF_SH5_ISA32_MIXED;
- need_check_cranges = TRUE;
- goto break_2;
- }
- }
- }
- }
- }
-
- break_2:
-
- /* If there were no new ranges for this output section, we don't
- need to iterate over the input sections to check how many are
- needed. */
- if (! need_check_cranges)
- continue;
-
- /* If we found a section with differing contents type, we need more
- ranges to mark the sections that are not mixed (and already have
- .cranges descriptors). Calculate the maximum number of new
- entries here. We may merge some of them, so that number is not
- final; it can shrink. */
- {
- LANG_FOR_EACH_INPUT_STATEMENT (f)
- {
- asection *isec;
-
- for (isec = f->the_bfd->sections;
- isec != NULL;
- isec = isec->next)
- {
- if (isec->output_section == osec
- && isec->size != 0
- && (bfd_get_section_flags (isec->owner, isec)
- & SEC_EXCLUDE) == 0
- && ((elf_section_data (isec)->this_hdr.sh_flags
- & (SHF_SH5_ISA32 | SHF_SH5_ISA32_MIXED))
- != SHF_SH5_ISA32_MIXED))
- new_cranges++;
- }
- }
- }
- }
-
- if (cranges->contents != NULL)
- free (cranges->contents);
-
- ASSERT (sh64_elf_section_data (cranges)->sh64_info != NULL);
-
- /* Make sure we have .cranges in memory even if there were only
- assembler-generated .cranges. */
- cranges_growth = new_cranges * SH64_CRANGE_SIZE;
- cranges->contents = xcalloc (cranges->size + cranges_growth, 1);
- bfd_set_section_flags (cranges->owner, cranges,
- bfd_get_section_flags (cranges->owner, cranges)
- | SEC_IN_MEMORY);
-
- /* If we don't need to grow the .cranges section beyond what was in the
- input sections, we have nothing more to do here. We then only got
- here because there was a .cranges section coming from input. Zero
- out the number of generated .cranges. */
- if (new_cranges == 0)
- {
- sh64_elf_section_data (cranges)->sh64_info->cranges_growth = 0;
- return;
- }
-
- crangesp = cranges->contents + cranges->size;
-
- /* Now pass over the sections again, and make reloc orders for the new
- .cranges entries. Constants are set as we go. */
- for (osec = link_info.output_bfd->sections;
- osec != NULL;
- osec = osec->next)
- {
- struct bfd_link_order *cr_addr_order = NULL;
- enum sh64_elf_cr_type last_cr_type = CRT_NONE;
- bfd_vma last_cr_size = 0;
- bfd_vma continuation_vma = 0;
-
- /* Omit excluded or garbage-collected sections, and output sections
- which were not marked as needing further processing. */
- if ((bfd_get_section_flags (link_info.output_bfd, osec) & SEC_EXCLUDE) != 0
- || (sh64_elf_section_data (osec)->sh64_info->contents_flags
- != SHF_SH5_ISA32_MIXED))
- continue;
-
- {
- LANG_FOR_EACH_INPUT_STATEMENT (f)
- {
- asection *isec;
-
- for (isec = f->the_bfd->sections;
- isec != NULL;
- isec = isec->next)
- {
- /* Allow only sections that have (at least initially) a
- non-zero size, and are not excluded, and are not marked
- as containing mixed data, thus already having .cranges
- entries. */
- if (isec->output_section == osec
- && isec->size != 0
- && (bfd_get_section_flags (isec->owner, isec)
- & SEC_EXCLUDE) == 0
- && ((elf_section_data (isec)->this_hdr.sh_flags
- & (SHF_SH5_ISA32 | SHF_SH5_ISA32_MIXED))
- != SHF_SH5_ISA32_MIXED))
- {
- enum sh64_elf_cr_type cr_type;
- bfd_vma cr_size;
- bfd_vma isa_flags
- = (elf_section_data (isec)->this_hdr.sh_flags
- & (SHF_SH5_ISA32 | SHF_SH5_ISA32_MIXED));
-
- if (isa_flags == SHF_SH5_ISA32)
- cr_type = CRT_SH5_ISA32;
- else if ((bfd_get_section_flags (isec->owner, isec)
- & SEC_CODE) == 0)
- cr_type = CRT_DATA;
- else
- cr_type = CRT_SH5_ISA16;
-
- cr_size = isec->size;
-
- /* Sections can be empty, like .text in a file that
- only contains other sections. Ranges shouldn't be
- emitted for them. This can presumably happen after
- relaxing and is not be caught at the "raw size"
- test above. */
- if (cr_size == 0)
- continue;
-
- /* See if this is a continuation of the previous range
- for the same output section. If so, just change
- the size of the last range and continue. */
- if (cr_type == last_cr_type
- && (continuation_vma
- == osec->vma + isec->output_offset))
- {
- last_cr_size += cr_size;
- bfd_put_32 (link_info.output_bfd, last_cr_size,
- crangesp - SH64_CRANGE_SIZE
- + SH64_CRANGE_CR_SIZE_OFFSET);
-
- continuation_vma += cr_size;
- continue;
- }
-
- /* If we emit relocatable contents, we need a
- relocation for the start address. */
- if (bfd_link_relocatable (&link_info)
- || link_info.emitrelocations)
- {
- /* FIXME: We could perhaps use lang_add_reloc and
- friends here, but I'm not really sure that
- would leave us free to do some optimizations
- later. */
- cr_addr_order
- = bfd_new_link_order (link_info.output_bfd, cranges);
-
- if (cr_addr_order == NULL)
- {
- einfo (_("%F%P: bfd_new_link_order failed\n"));
- return;
- }
-
- cr_addr_order->type = bfd_section_reloc_link_order;
- cr_addr_order->offset
- = (cranges->output_offset
- + crangesp + SH64_CRANGE_CR_ADDR_OFFSET
- - cranges->contents);
- cr_addr_order->size = 4;
- cr_addr_order->u.reloc.p
- = xmalloc (sizeof (struct bfd_link_order_reloc));
-
- cr_addr_order->u.reloc.p->reloc = BFD_RELOC_32;
- cr_addr_order->u.reloc.p->u.section = osec;
-
- /* Since SH, unlike normal RELA-targets, uses a
- "partial inplace" REL-like relocation for this,
- we put the addend in the contents and specify 0
- for the reloc. */
- bfd_put_32 (link_info.output_bfd, isec->output_offset,
- crangesp + SH64_CRANGE_CR_ADDR_OFFSET);
- cr_addr_order->u.reloc.p->addend = 0;
- }
- else
- bfd_put_32 (link_info.output_bfd,
- osec->vma + isec->output_offset,
- crangesp + SH64_CRANGE_CR_ADDR_OFFSET);
-
- /* If we could make a reloc for cr_size we would do
- it, but we would have to have a symbol for the size
- of the _input_ section and there's no way to
- generate that. */
- bfd_put_32 (link_info.output_bfd, cr_size,
- crangesp + SH64_CRANGE_CR_SIZE_OFFSET);
-
- bfd_put_16 (link_info.output_bfd, cr_type,
- crangesp + SH64_CRANGE_CR_TYPE_OFFSET);
-
- last_cr_type = cr_type;
- last_cr_size = cr_size;
- continuation_vma
- = osec->vma + isec->output_offset + cr_size;
- crangesp += SH64_CRANGE_SIZE;
- }
- }
- }
- }
- }
-
- /* The .cranges section will have this size, no larger or smaller.
- Since relocs (if relocatable linking) will be emitted into the
- "extended" size, we must set the raw size to the total. We have to
- keep track of the number of new .cranges entries.
-
- Sorting before writing is done by sh64_elf_final_write_processing. */
-
- sh64_elf_section_data (cranges)->sh64_info->cranges_growth
- = crangesp - cranges->contents - cranges->size;
- cranges->size = crangesp - cranges->contents;
- cranges->rawsize = cranges->size;
-}
-EOF
-
-
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 35e4f1e..21ef9be 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -3945,9 +3945,7 @@ strip_excluded_output_sections (void)
}
/* Called from ldwrite to clear out asection.map_head and
- asection.map_tail for use as link_orders in ldwrite.
- FIXME: Except for sh64elf.em which starts creating link_orders in
- its after_allocation routine so needs to call it early. */
+ asection.map_tail for use as link_orders in ldwrite. */
void
lang_clear_os_map (void)
diff --git a/ld/po/BLD-POTFILES.in b/ld/po/BLD-POTFILES.in
index 4ba06cf..8d12e43 100644
--- a/ld/po/BLD-POTFILES.in
+++ b/ld/po/BLD-POTFILES.in
@@ -286,11 +286,6 @@ escore3_elf.c
escore7_elf.c
esh.c
eshelf.c
-eshelf32.c
-eshelf32_linux.c
-eshelf32_nbsd.c
-eshelf64.c
-eshelf64_nbsd.c
eshelf_fd.c
eshelf_linux.c
eshelf_nbsd.c
@@ -299,11 +294,6 @@ eshelf_uclinux.c
eshelf_vxworks.c
eshl.c
eshlelf.c
-eshlelf32.c
-eshlelf32_linux.c
-eshlelf32_nbsd.c
-eshlelf64.c
-eshlelf64_nbsd.c
eshlelf_fd.c
eshlelf_linux.c
eshlelf_nbsd.c
diff --git a/ld/testsuite/ld-elfcomm/elfcomm.exp b/ld/testsuite/ld-elfcomm/elfcomm.exp
index 7aafd82..52b5cd2 100644
--- a/ld/testsuite/ld-elfcomm/elfcomm.exp
+++ b/ld/testsuite/ld-elfcomm/elfcomm.exp
@@ -182,15 +182,6 @@ global link_output
set options "-r tmpdir/common1a.o tmpdir/common1b.o"
-# SH64 targets needs an extra ld option for this test.
-if [istarget sh64*-*-*] {
- if [istarget sh64*l*-*-*] {
- set options "-mshlelf32 $options"
- } else {
- set options "-mshelf32 $options"
- }
-}
-
if { [ld_link $ld tmpdir/common1.o $options] } {
unresolved $test1w1
return
@@ -219,15 +210,6 @@ if { [dump_common1 $test1c1] } {
set options "-r tmpdir/common1b.o tmpdir/common1a.o"
-# SH64 targets needs an extra ld option for this test.
-if [istarget sh64*-*-*] {
- if [istarget sh64*l*-*-*] {
- set options "-mshlelf32 $options"
- } else {
- set options "-mshelf32 $options"
- }
-}
-
if { [ld_link $ld tmpdir/common1.o $options] } {
unresolved $test1w2
return
diff --git a/ld/testsuite/ld-gc/gc.exp b/ld/testsuite/ld-gc/gc.exp
index 75d5714..9b044f0 100644
--- a/ld/testsuite/ld-gc/gc.exp
+++ b/ld/testsuite/ld-gc/gc.exp
@@ -59,15 +59,6 @@ proc test_gc { testname filename linker ldflags} {
set options "-L$srcdir/$subdir"
append options " " $ldflags " " [ld_link_defsyms] " " $objfile
- # SH64 targets needs an extra ld option for this test.
- if [istarget sh64*-*-*] {
- if [istarget sh64*l*-*-*] {
- set options "-mshlelf32 $options"
- } else {
- set options "-mshelf32 $options"
- }
- }
-
if ![ld_link $linker $outfile $options] {
fail $testname
return
diff --git a/ld/testsuite/ld-gc/pr13683.d b/ld/testsuite/ld-gc/pr13683.d
index b38b9d1..5561484 100644
--- a/ld/testsuite/ld-gc/pr13683.d
+++ b/ld/testsuite/ld-gc/pr13683.d
@@ -2,7 +2,7 @@
#source: dummy.s
#ld: --gc-sections -e main --defsym foo=foo2 tmpdir/pr13683.o
#nm: --format=bsd
-#xfail: sh64*-*-* iq2000-*-* lm32-*-* epiphany-*-* mips64vr-*-* frv-*-* m32c-*-* rl78-*-* rx-*-* sh-*-* powerpc*-*-eabivle msp430-*-*
+#xfail: iq2000-*-* lm32-*-* epiphany-*-* mips64vr-*-* frv-*-* m32c-*-* rl78-*-* rx-*-* sh-*-* powerpc*-*-eabivle msp430-*-*
# Note - look for both "foo" and "foo2" being defined, non-zero function symbols
diff --git a/ld/testsuite/ld-scripts/crossref.exp b/ld/testsuite/ld-scripts/crossref.exp
index a68de7c..2066ade 100644
--- a/ld/testsuite/ld-scripts/crossref.exp
+++ b/ld/testsuite/ld-scripts/crossref.exp
@@ -76,11 +76,6 @@ if { ![ld_compile $CC "$srcdir/$subdir/cross1.c" tmpdir/cross1.o] \
set flags [big_or_little_endian]
-if [istarget sh64*-*-elf] {
- # This is what gcc passes to ld by default.
- set flags "-mshelf32"
-}
-
# arc-elf32 requires the symbol __SDATA_BEGIN__ to always be present.
if [istarget arc*-*-elf32] {
set flags "$flags --defsym=__SDATA_BEGIN__=0"
diff --git a/ld/testsuite/ld-selective/selective.exp b/ld/testsuite/ld-selective/selective.exp
index 63e1975..d486461 100644
--- a/ld/testsuite/ld-selective/selective.exp
+++ b/ld/testsuite/ld-selective/selective.exp
@@ -57,13 +57,6 @@ if [istarget mips*-*] {
set ldflags "-e _start $ldflags"
}
-if [istarget sh64*-*-elf] {
- # This is what gcc passes to ld by default, plus switch to the
- # "usual" ELF _start (shelf32 normally uses just `start' for COFF
- # compatibility)
- set ldflags "-e _start -mshelf32 $ldflags"
-}
-
if [istarget avr-*-*] {
# Make .text start at a non-zero address, as some tests expect
# valid symbols to have non-zero values.
diff --git a/ld/testsuite/ld-sh/ld-r-1.d b/ld/testsuite/ld-sh/ld-r-1.d
index 830ad91..d76030b 100644
--- a/ld/testsuite/ld-sh/ld-r-1.d
+++ b/ld/testsuite/ld-sh/ld-r-1.d
@@ -4,7 +4,6 @@
#ld: -r -EL
#readelf: -r -x1 -x2
#target: sh*-*-elf sh*-*-linux*
-#notarget: sh64*-*-linux*
# Make sure relocations against global and local symbols with relative and
# absolute 32-bit relocs don't come out wrong after ld -r. Remember that
diff --git a/ld/testsuite/ld-sh/rd-sh.exp b/ld/testsuite/ld-sh/rd-sh.exp
index 9360c1e..3203a8d 100644
--- a/ld/testsuite/ld-sh/rd-sh.exp
+++ b/ld/testsuite/ld-sh/rd-sh.exp
@@ -36,17 +36,6 @@ global LDFLAGS
set asflags_save "$ASFLAGS"
set ldflags_save "$LDFLAGS"
-if {[istarget sh64*-*-*] || [istarget sh5*-*-*]} then {
- set ASFLAGS "$ASFLAGS -isa=SHcompact"
- if [istarget sh64*-*-linux*] {
- set LDFLAGS "$LDFLAGS -mshlelf32_linux"
- } elseif { [istarget sh64*-*-netbsd*] || [istarget sh5*-*-netbsd*] } {
- set LDFLAGS "$LDFLAGS -mshlelf32_nbsd -e_start"
- } else {
- set LDFLAGS "$LDFLAGS -mshlelf32"
- }
-}
-
set rd_test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
foreach shtest $rd_test_list {
# We need to strip the ".d", but can leave the dirname.
diff --git a/ld/testsuite/ld-sh/sh.exp b/ld/testsuite/ld-sh/sh.exp
index b6762aa..909e649 100644
--- a/ld/testsuite/ld-sh/sh.exp
+++ b/ld/testsuite/ld-sh/sh.exp
@@ -28,11 +28,6 @@ if ![istarget sh*-*-*] {
return
}
-if { ([istarget sh64*-*-*] || [istarget sh5*-*-*])} {
- # relaxing not supported on sh64 yet.
- return
-}
-
set testsimple "SH simple relaxing"
if ![ld_assemble $as "-relax $srcdir/$subdir/sh1.s" tmpdir/sh1.o] {
diff --git a/ld/testsuite/ld-sh/sh64/abi32.sd b/ld/testsuite/ld-sh/sh64/abi32.sd
deleted file mode 100644
index 8b22e46..0000000
--- a/ld/testsuite/ld-sh/sh64/abi32.sd
+++ /dev/null
@@ -1,16 +0,0 @@
-
-.*: file format .*-sh64.*
-
-Contents of section \.text:
- 1000 cc000190 c8015590 6bf56630 6ff0fff0 .*
- 1010 cc000210 c8400610 cc000150 c8403550 .*
- 1020 cffffd90 cbff9590 6bf56630 cc0002b0 .*
- 1030 c843e2b0 cc000350 c843c350 cc000040 .*
- 1040 c843f040 cc000190 c8004590 6bf56650 .*
- 1050 cc000190 c8002590 6bf56410 6ff0fff0 .*
- 1060 6ff0fff0 .*
-Contents of section \.data:
- 10e8 000010f4 0000100d 0000105d 000010e8 .*
- 10f8 000010e8 0000100d .*
-Contents of section \.stack:
- 80000 deaddead .*
diff --git a/ld/testsuite/ld-sh/sh64/abi32.xd b/ld/testsuite/ld-sh/sh64/abi32.xd
deleted file mode 100644
index 695ea4e..0000000
--- a/ld/testsuite/ld-sh/sh64/abi32.xd
+++ /dev/null
@@ -1,47 +0,0 @@
-
-.*: file format .*-sh64
-.*
-architecture: sh5, flags 0x00000112:
-EXEC_P, HAS_SYMS, D_PAGED
-start address 0x0+1011
-
-Program Header:
- LOAD off 0x0+100 vaddr 0x0+1000 paddr 0x0+1000 align 2\*\*7
- filesz 0x0+64 memsz 0x0+64 flags r-x
- LOAD off 0x0+168 vaddr 0x0+10e8 paddr 0x0+10e8 align 2\*\*7
- filesz 0x0+18 memsz 0x0+18 flags rw-
- LOAD off 0x0+180 vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*7
- filesz 0x0+4 memsz 0x0+4 flags rw-
-
-Sections:
-Idx Name Size VMA LMA File off Algn
- 0 \.text 00000064 0+1000 0+1000 00000100 2\*\*0
- CONTENTS, ALLOC, LOAD, READONLY, CODE
- 1 \.data 00000018 0+10e8 0+10e8 00000168 2\*\*2
- CONTENTS, ALLOC, LOAD, DATA
- 2 \.stack 00000004 0+80000 0+80000 00000180 2\*\*0
- CONTENTS, ALLOC, LOAD, DATA
-SYMBOL TABLE:
-0+1000 l d \.text 0+ (|\.text)
-0+10e8 l d \.data 0+ (|\.data)
-0+80000 l d \.stack 0+ (|\.stack)
-0+ l df \*ABS\* 0+ .*
-0+10f4 l \.data 0+ foobar
-0+ l df \*ABS\* 0+ .*
-0+10fc l \.data 0+ foobar2
-0+1060 l \.text 0+ 0x04 plugh
-0+10f8 g \.data 0+ foobar
-0+10e8 g \.data 0+ baz
-0+10e8 g .* 0+ ___dtors
-0+105c g \.text 0+ 0x04 xyzzy
-0+1100 g \.data 0+ __bss_start
-0+10e8 g .* 0+ ___ctors_end
-0+10f0 g \.data 0+ baz2
-0+10e8 g .* 0+ ___ctors
-0+1000 g \.text 0+ 0x04 foo
-0+1100 g \.data 0+ _edata
-0+1100 g \.data 0+ _end
-0+1010 g \.text 0+ 0x04 start
-0+100c g \.text 0+ 0x04 bar
-0+80000 g \.stack 0+ _stack
-0+10e8 g .* 0+ ___dtors_end
diff --git a/ld/testsuite/ld-sh/sh64/abi64.sd b/ld/testsuite/ld-sh/sh64/abi64.sd
deleted file mode 100644
index ff26740..0000000
--- a/ld/testsuite/ld-sh/sh64/abi64.sd
+++ /dev/null
@@ -1,20 +0,0 @@
-
-.*: file format .*-sh64
-
-Contents of section \.text:
- 1000 cc000190 c8000190 c8000190 c8025590 .*
- 1010 6bf56630 6ff0fff0 cc000210 c8000210 .*
- 1020 c8000210 c8400610 cc000150 c8000150 .*
- 1030 c8000150 c8405550 cffffd90 cbfffd90 .*
- 1040 cbfffd90 cbff3590 6bf56630 cc0002b0 .*
- 1050 c80002b0 c80002b0 c84502b0 cc000350 .*
- 1060 c8000350 c8000350 c844e350 cc000040 .*
- 1070 c8000040 c8000040 c8451040 cc000190 .*
- 1080 c8000190 c8000190 c8006590 6bf56650 .*
- 1090 cc000190 c8000190 c8000190 c8002590 .*
- 10a0 6bf56410 6ff0fff0 6ff0fff0 .*
-Contents of section \.data:
- 1130 0000113c 00001015 000010a5 00001130 .*
- 1140 00001130 00001015 .*
-Contents of section \.stack:
- 80000 deaddead .*
diff --git a/ld/testsuite/ld-sh/sh64/abi64.xd b/ld/testsuite/ld-sh/sh64/abi64.xd
deleted file mode 100644
index 13bb333..0000000
--- a/ld/testsuite/ld-sh/sh64/abi64.xd
+++ /dev/null
@@ -1,46 +0,0 @@
-.*: file format .*-sh64
-.*
-architecture: sh5, flags 0x00000112:
-EXEC_P, HAS_SYMS, D_PAGED
-start address 0x0000000000001019
-
-Program Header:
- LOAD off 0x0000000000000100 vaddr 0x0000000000001000 paddr 0x0000000000001000 align 2\*\*7
- filesz 0x00000000000000ac memsz 0x00000000000000ac flags r-x
- LOAD off 0x00000000000001b0 vaddr 0x0000000000001130 paddr 0x0000000000001130 align 2\*\*7
- filesz 0x0000000000000018 memsz 0x0000000000000018 flags rw-
- LOAD off 0x0000000000000200 vaddr 0x0000000000080000 paddr 0x0000000000080000 align 2\*\*7
- filesz 0x0000000000000004 memsz 0x0000000000000004 flags rw-
-
-Sections:
-Idx Name Size VMA LMA File off Algn
- 0 \.text 000000ac 0000000000001000 0000000000001000 00000100 2\*\*0
- CONTENTS, ALLOC, LOAD, READONLY, CODE
- 1 \.data 00000018 0000000000001130 0000000000001130 000001b0 2\*\*2
- CONTENTS, ALLOC, LOAD, DATA
- 2 \.stack 00000004 0000000000080000 0000000000080000 00000200 2\*\*0
- CONTENTS, ALLOC, LOAD, DATA
-SYMBOL TABLE:
-0000000000001000 l d \.text 0000000000000000 (|\.text)
-0000000000001130 l d \.data 0000000000000000 (|\.data)
-0000000000080000 l d \.stack 0000000000000000 (|\.stack)
-0000000000000000 l df \*ABS\* 0000000000000000 .*
-000000000000113c l \.data 0000000000000000 foobar
-0000000000000000 l df \*ABS\* 0000000000000000 .*
-0000000000001144 l \.data 0000000000000000 foobar2
-00000000000010a8 l \.text 0000000000000000 0x04 plugh
-0000000000001140 g \.data 0000000000000000 foobar
-0000000000001130 g \.data 0000000000000000 baz
-0000000000001130 g .* 0000000000000000 ___dtors
-00000000000010a4 g \.text 0000000000000000 0x04 xyzzy
-0000000000001148 g \.data 0000000000000000 __bss_start
-0000000000001130 g .* 0000000000000000 ___ctors_end
-0000000000001138 g \.data 0000000000000000 baz2
-0000000000001130 g .* 0000000000000000 ___ctors
-0000000000001000 g \.text 0000000000000000 0x04 foo
-0000000000001148 g \.data 0000000000000000 _edata
-0000000000001148 g \.data 0000000000000000 _end
-0000000000001018 g \.text 0000000000000000 0x04 start
-0000000000001014 g \.text 0000000000000000 0x04 bar
-0000000000080000 g \.stack 0000000000000000 _stack
-0000000000001130 g .* 0000000000000000 ___dtors_end
diff --git a/ld/testsuite/ld-sh/sh64/abixx-noexp.sd b/ld/testsuite/ld-sh/sh64/abixx-noexp.sd
deleted file mode 100644
index ce11156..0000000
--- a/ld/testsuite/ld-sh/sh64/abixx-noexp.sd
+++ /dev/null
@@ -1,12 +0,0 @@
-
-.*: file format .*-sh64
-
-Contents of section \.text:
- 1000 e8002a30 6ff0fff0 cc400610 cc401550 .*
- 1010 ebfff630 cc4302b0 cc42e350 cc431040 .*
- 1020 e8000a50 e8000810 6ff0fff0 6ff0fff0 .*
-Contents of section \.data:
- 10b0 000010bc 00001005 00001029 000010b0 .*
- 10c0 000010b0 00001005 .*
-Contents of section \.stack:
- 80000 deaddead .*
diff --git a/ld/testsuite/ld-sh/sh64/cmpct1.sd b/ld/testsuite/ld-sh/sh64/cmpct1.sd
deleted file mode 100644
index 1f7e8a1..0000000
--- a/ld/testsuite/ld-sh/sh64/cmpct1.sd
+++ /dev/null
@@ -1,9 +0,0 @@
-
-.*: file format elf32-sh64
-
-Contents of section \.text:
- 1000 c7000009 0009ea2a .*
-Contents of section \.rodata:
- 1008 00001000 0000100c 00001004 .*
-Contents of section \.stack:
- 80000 deaddead .*
diff --git a/ld/testsuite/ld-sh/sh64/cmpct1.xd b/ld/testsuite/ld-sh/sh64/cmpct1.xd
deleted file mode 100644
index 77e6e84..0000000
--- a/ld/testsuite/ld-sh/sh64/cmpct1.xd
+++ /dev/null
@@ -1,37 +0,0 @@
-
-.*: file format .*-sh64
-.*
-architecture: sh5, flags 0x00000112:
-EXEC_P, HAS_SYMS, D_PAGED
-start address 0x0+1000
-
-Program Header:
- LOAD off 0x0+80 vaddr 0x0+1000 paddr 0x0+1000 align 2\*\*7
- filesz 0x0+14 memsz 0x0+14 flags r-x
- LOAD off 0x0+100 vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*7
- filesz 0x00000004 memsz 0x00000004 flags rw-
-
-Sections:
-Idx Name Size VMA LMA File off Algn
- 0 \.text 00000008 0+1000 0+1000 00000080 2\*\*0
- CONTENTS, ALLOC, LOAD, READONLY, CODE
- 1 \.rodata 0000000c 0+1008 0+1008 00000088 2\*\*2
- CONTENTS, ALLOC, LOAD, READONLY, DATA
- 2 \.stack 00000004 0+80000 0+80000 00000100 2\*\*0
- CONTENTS, ALLOC, LOAD, DATA
-SYMBOL TABLE:
-0+1000 l d \.text 0+ (|\.text)
-0+1008 l d \.rodata 0+ (|\.rodata)
-0+80000 l d \.stack 0+ (|\.stack)
-0+ l df \*ABS\* 0+ .*
-0+1004 l \.text 0+ next
-0+100c l \.rodata 0+ here
-0+1098 g .* 0+ ___dtors
-0+1098 g \.rodata 0+ __bss_start
-0+1098 g .* 0+ ___ctors_end
-0+1098 g .* 0+ ___ctors
-0+1098 g \.rodata 0+ _edata
-0+1098 g \.rodata 0+ _end
-0+1000 g \.text 0+ start
-0+80000 g \.stack 0+ _stack
-0+1098 g .* 0+ ___dtors_end
diff --git a/ld/testsuite/ld-sh/sh64/crange-1.s b/ld/testsuite/ld-sh/sh64/crange-1.s
deleted file mode 100644
index 5dfae88..0000000
--- a/ld/testsuite/ld-sh/sh64/crange-1.s
+++ /dev/null
@@ -1,8 +0,0 @@
-! Support file for .cranges tests to resolve all references for
-! non-partial-link tests.
- .section .init,"ax"
- .mode SHmedia
- .global start
- .align 2
-start:
- nop
diff --git a/ld/testsuite/ld-sh/sh64/crange-2a.s b/ld/testsuite/ld-sh/sh64/crange-2a.s
deleted file mode 100644
index 9af6bbe..0000000
--- a/ld/testsuite/ld-sh/sh64/crange-2a.s
+++ /dev/null
@@ -1,22 +0,0 @@
-! Simple example with assembler-generated .cranges that do not need more
-! .cranges added by the linker: A single section with SHmedia, constants
-! and SHcompact.
- .section .text.mixed,"ax"
- .align 2
-! Make sure this symbol does not have the expected type.
- .mode SHcompact
- .global diversion2
-diversion2:
-
- .mode SHmedia
-start2:
- nop
- nop
- nop
-
- .long 42
- .long 43
-
- .mode SHcompact
- nop
- nop
diff --git a/ld/testsuite/ld-sh/sh64/crange-2b.s b/ld/testsuite/ld-sh/sh64/crange-2b.s
deleted file mode 100644
index 670a448..0000000
--- a/ld/testsuite/ld-sh/sh64/crange-2b.s
+++ /dev/null
@@ -1,39 +0,0 @@
-! Initially three separate sections, one with SHmedia and constants, one with
-! SHcompact, and yet another with SHmedia. Two .cranges sections
-! generated by the assembler; two more needed at link time, as they will be
-! consolidated into the same section, and mixed with a file with
-! assembler-generated .cranges only and one without any .cranges.
-
- .section .text.shmedia,"ax"
- .mode SHmedia
- .align 2
-sec1:
- nop
- nop
- nop
- nop
-sec2:
- .long 41
- .long 43
- .long 42
- .long 43
- .long 42
-
- .section .text.shcompact,"ax"
- .align 1
- .mode SHcompact
-sec3:
- nop
- nop
- nop
-
- .section .text.shmedia2,"ax"
- .align 2
-sec4:
- .mode SHmedia
- nop
- nop
- nop
- nop
- nop
- nop
diff --git a/ld/testsuite/ld-sh/sh64/crange-2c.s b/ld/testsuite/ld-sh/sh64/crange-2c.s
deleted file mode 100644
index fcc350d..0000000
--- a/ld/testsuite/ld-sh/sh64/crange-2c.s
+++ /dev/null
@@ -1,16 +0,0 @@
-! First part of crange-2b.s, but in section .text.mixed.
-
- .section .text.mixed,"ax"
- .mode SHmedia
- .align 2
-sec1:
- nop
- nop
- nop
- nop
-sec2:
- .long 41
- .long 43
- .long 42
- .long 43
- .long 42
diff --git a/ld/testsuite/ld-sh/sh64/crange-2d.s b/ld/testsuite/ld-sh/sh64/crange-2d.s
deleted file mode 100644
index 11f3d5b..0000000
--- a/ld/testsuite/ld-sh/sh64/crange-2d.s
+++ /dev/null
@@ -1,9 +0,0 @@
-! Second part of crange-2b.s, but in section .text.mixed.
-
- .section .text.mixed,"ax"
- .align 1
- .mode SHcompact
-sec3:
- nop
- nop
- nop
diff --git a/ld/testsuite/ld-sh/sh64/crange-2e.s b/ld/testsuite/ld-sh/sh64/crange-2e.s
deleted file mode 100644
index 3d7c997..0000000
--- a/ld/testsuite/ld-sh/sh64/crange-2e.s
+++ /dev/null
@@ -1,12 +0,0 @@
-! Third part of crange-2b.s, but in section .text.mixed.
-
- .section .text.mixed,"ax"
- .align 2
-sec4:
- .mode SHmedia
- nop
- nop
- nop
- nop
- nop
- nop
diff --git a/ld/testsuite/ld-sh/sh64/crange-2f.s b/ld/testsuite/ld-sh/sh64/crange-2f.s
deleted file mode 100644
index a8479c9..0000000
--- a/ld/testsuite/ld-sh/sh64/crange-2f.s
+++ /dev/null
@@ -1,21 +0,0 @@
-! Section with SHmedia in unique section. Note the absence of a symbol to
-! key an ISA type.
-
- .section .text.2f,"ax"
- .align 2
-
- .mode SHmedia
- movi 0x2f,r20
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- movi 0x2f,r21
diff --git a/ld/testsuite/ld-sh/sh64/crange-2g.s b/ld/testsuite/ld-sh/sh64/crange-2g.s
deleted file mode 100644
index ac7aacb..0000000
--- a/ld/testsuite/ld-sh/sh64/crange-2g.s
+++ /dev/null
@@ -1,26 +0,0 @@
-! Section with SHmedia in unique section, similar to crange-2f.s
-
- .section .text.2g,"ax"
- .align 2
-
- .mode SHmedia
- movi 0x21,r12
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- movi 0x21,r13
diff --git a/ld/testsuite/ld-sh/sh64/crange-2h.s b/ld/testsuite/ld-sh/sh64/crange-2h.s
deleted file mode 100644
index 99c6146..0000000
--- a/ld/testsuite/ld-sh/sh64/crange-2h.s
+++ /dev/null
@@ -1,17 +0,0 @@
-! SHcompact in .text, similar to crange-2f.s and crange-2g.s
- .section .text,"ax"
- .align 2
-
- .mode SHcompact
- mov #0xf,r1
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- nop
- mov #0xe,r1
diff --git a/ld/testsuite/ld-sh/sh64/crange-2i.s b/ld/testsuite/ld-sh/sh64/crange-2i.s
deleted file mode 100644
index 78c1ce9..0000000
--- a/ld/testsuite/ld-sh/sh64/crange-2i.s
+++ /dev/null
@@ -1,8 +0,0 @@
-! If this file comes before a file with a SHcompact .text section but with
-! no symbols, we will have a symbol of the "wrong kind" before the
-! SHcompact insns.
- .section .text,"ax"
- .mode SHmedia
- .align 2
- .global diversion
-diversion:
diff --git a/ld/testsuite/ld-sh/sh64/crange1.rd b/ld/testsuite/ld-sh/sh64/crange1.rd
deleted file mode 100644
index 83c1e9b..0000000
--- a/ld/testsuite/ld-sh/sh64/crange1.rd
+++ /dev/null
@@ -1,47 +0,0 @@
-.*
-
-Section Headers:
- +\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al
- +\[ 0\] +NULL +00000000 000000 000000 00 +0 +0 +0
- +\[ 1\] \.init +PROGBITS +00001000 000080 000004 00 AXp +0 +0 +4
- +\[ 2\] \.text +PROGBITS +00001004 000084 000018 00 AXp +0 +0 +4
- +\[ 3\] \.stack +PROGBITS +00080000 000100 000004 00 +WA +0 +0 +1
- +\[ 4\] \.cranges +LOUSER\+1 +00000000 000104 00001e 00 +W +0 +0 +1
- +\[ 5\] \.symtab +SYMTAB +.*
- +\[ 6\] \.strtab +STRTAB +.*
- +\[ 7\] \.shstrtab +STRTAB +.*
-Key to Flags:
-#...
-
-There are no relocations in this file\.
-
-Symbol table '\.symtab' contains [0-9]+ entries:
- +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
-.*: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND
-.*: 00001000 +0 +SECTION +LOCAL +DEFAULT +1
-.*: 00001004 +0 +SECTION +LOCAL +DEFAULT +2
-.*: 00080000 +0 +SECTION +LOCAL +DEFAULT +3
-.*: 00000000 +0 +SECTION +LOCAL +DEFAULT +4
-.* FILE +LOCAL +DEFAULT +ABS .*
-.*: 00001004 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 start2
-.*: 000010a0 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors
-.*: 000010a0 +0 +NOTYPE +GLOBAL +DEFAULT +2 __bss_start
-.*: 000010a0 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors_end
-.*: 00001004 +0 +NOTYPE +GLOBAL +DEFAULT +2 diversion2
-.*: 000010a0 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors
-.*: 000010a0 +0 +NOTYPE +GLOBAL +DEFAULT +2 _edata
-.*: 000010a0 +0 +NOTYPE +GLOBAL +DEFAULT +2 _end
-.*: 00001000 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 start
-.*: 00080000 +0 +NOTYPE +GLOBAL +DEFAULT +3 _stack
-.*: 000010a0 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors_end
-
-Hex dump of section '\.init':
- 0x00001000 6ff0fff0 .*
-
-Hex dump of section '\.text':
- 0x00001004 6ff0fff0 6ff0fff0 6ff0fff0 0000002a .*
- 0x00001014 0000002b 00090009 .*
-
-Hex dump of section '\.cranges':
- 0x00000000 00001004 0000000c 00030000 10100000 .*
- 0x00000010 00080001 00001018 00000004 0002 .*
diff --git a/ld/testsuite/ld-sh/sh64/crange2.rd b/ld/testsuite/ld-sh/sh64/crange2.rd
deleted file mode 100644
index e7416e1..0000000
--- a/ld/testsuite/ld-sh/sh64/crange2.rd
+++ /dev/null
@@ -1,56 +0,0 @@
-.*
-
-Section Headers:
- +\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al
- +\[ 0\] +NULL +00000000 000000 000000 00 +0 +0 +0
- +\[ 1\] \.init +PROGBITS +00001000 000080 000004 00 AXp +0 +0 +4
- +\[ 2\] \.text +PROGBITS +00001004 000084 00005c 00 AXp +0 +0 +4
- +\[ 3\] \.stack +PROGBITS +00080000 000100 000004 00 +WA +0 +0 +1
- +\[ 4\] \.cranges +LOUSER\+1 +00000000 000104 000046 00 +W +0 +0 +1
- +\[ 5\] \.symtab +SYMTAB +.*
- +\[ 6\] \.strtab +STRTAB +.*
- +\[ 7\] \.shstrtab +STRTAB +.*
-Key to Flags:
-#...
-
-There are no relocations in this file\.
-
-Symbol table '\.symtab' contains [0-9]+ entries:
- +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
-.*: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND
-.*: 00001000 +0 +SECTION +LOCAL +DEFAULT +1
-.*: 00001004 +0 +SECTION +LOCAL +DEFAULT +2
-.*: 00080000 +0 +SECTION +LOCAL +DEFAULT +3
-.*: 00000000 +0 +SECTION +LOCAL +DEFAULT +4
-.* FILE +LOCAL +DEFAULT +ABS .*
-.*: 00001004 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 start2
-.* FILE +LOCAL +DEFAULT +ABS .*
-.*: 0000101c +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 sec1
-.*: 0000102c +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 sec2
-.*: 00001040 +0 +NOTYPE +LOCAL +DEFAULT +2 sec3
-.*: 00001048 +0 +NOTYPE +LOCAL +DEFAULT +2 sec4
-.*: 000010e0 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors
-.*: 000010e0 +0 +NOTYPE +GLOBAL +DEFAULT +2 __bss_start
-.*: 000010e0 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors_end
-.*: 00001004 +0 +NOTYPE +GLOBAL +DEFAULT +2 diversion2
-.*: 000010e0 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors
-.*: 000010e0 +0 +NOTYPE +GLOBAL +DEFAULT +2 _edata
-.*: 000010e0 +0 +NOTYPE +GLOBAL +DEFAULT +2 _end
-.*: 00001000 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 start
-.*: 00080000 +0 +NOTYPE +GLOBAL +DEFAULT +3 _stack
-.*: 000010e0 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors_end
-
-Hex dump of section '\.text':
- 0x00001004 6ff0fff0 6ff0fff0 6ff0fff0 0000002a .*
- 0x00001014 0000002b 00090009 6ff0fff0 6ff0fff0 .*
- 0x00001024 6ff0fff0 6ff0fff0 00000029 0000002b .*
- 0x00001034 0000002a 0000002b 0000002a 00090009 .*
- 0x00001044 00090000 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001054 6ff0fff0 6ff0fff0 6ff0fff0 .*
-
-Hex dump of section '\.cranges':
- 0x00000000 00001004 0000000c 00030000 10100000 .*
- 0x00000010 00080001 00001018 00000004 00020000 .*
- 0x00000020 101c0000 00100003 0000102c 00000014 .*
- 0x00000030 00010000 10400000 00060002 00001048 .*
- 0x00000040 00000018 0003 .*
diff --git a/ld/testsuite/ld-sh/sh64/crange3-cmpct.rd b/ld/testsuite/ld-sh/sh64/crange3-cmpct.rd
deleted file mode 100644
index 9f5f595..0000000
--- a/ld/testsuite/ld-sh/sh64/crange3-cmpct.rd
+++ /dev/null
@@ -1,80 +0,0 @@
-ELF Header:
- +Magic: +7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
- +Class: +ELF32
- +Data: +2's complement, big endian
- +Version: +1 \(current\)
- +OS/ABI: +UNIX - System V
- +ABI Version: +0
- +Type: +EXEC \(Executable file\)
- +Machine: +Renesas / SuperH SH
- +Version: +0x1
- +Entry point address: +0x10c4
- +Start of program headers: +52 \(bytes into file\)
- +Start of section headers: .*
- +Flags: +0xa, sh5
- +Size of this header: +52 \(bytes\)
- +Size of program headers: +32 \(bytes\)
- +Number of program headers: +2
- +Size of section headers: +40 \(bytes\)
- +Number of section headers: +8
- +Section header string table index: 7
-
-Section Headers:
- +\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al
- +\[ 0\] +NULL +00000000 000000 000000 00 +0 +0 +0
- +\[ 1\] \.init +PROGBITS +00001000 000080 000004 00 AXp +0 +0 +4
- +\[ 2\] \.text +PROGBITS +00001004 000084 0000d8 00 AXp +0 +0 +4
- +\[ 3\] \.stack +PROGBITS +00080000 000180 000004 00 +WA +0 +0 +1
- +\[ 4\] \.cranges +LOUSER\+1 +00000000 000184 00003c 00 +W +0 +0 +1
- +\[ 5\] \.symtab +SYMTAB +.*
- +\[ 6\] \.strtab +STRTAB +.*
- +\[ 7\] \.shstrtab +STRTAB +.*
-Key to Flags:
-#...
-
-Symbol table '\.symtab' contains [0-9]+ entries:
- +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
-.*: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND
-.*: 00001000 +0 +SECTION +LOCAL +DEFAULT +1
-.*: 00001004 +0 +SECTION +LOCAL +DEFAULT +2
-.*: 00080000 +0 +SECTION +LOCAL +DEFAULT +3
-.*: 00000000 +0 +SECTION +LOCAL +DEFAULT +4
-.*: 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
-.*: 00001004 +0 +NOTYPE +LOCAL +DEFAULT +2 sec4
-.*: 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
-.*: 000010a4 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 start2
-.*: 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
-.*: 000010bc +0 +NOTYPE +LOCAL +DEFAULT +2 sec3
-.*: 000010c4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +2 diversion
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +2 __bss_start
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors_end
-.*: 000010a4 +0 +NOTYPE +GLOBAL +DEFAULT +2 diversion2
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +2 _edata
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +2 _end
-.*: 00001000 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 start
-.*: 00080000 +0 +NOTYPE +GLOBAL +DEFAULT +3 _stack
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors_end
-
-Hex dump of section '\.text':
- 0x00001004 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001014 6ff0fff0 6ff0fff0 cc00bd40 6ff0fff0 .*
- 0x00001024 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001034 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001044 6ff0fff0 6ff0fff0 6ff0fff0 cc00bd50 .*
- 0x00001054 cc0084c0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001064 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001074 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001084 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001094 6ff0fff0 6ff0fff0 6ff0fff0 cc0084d0 .*
- 0x000010a4 6ff0fff0 6ff0fff0 6ff0fff0 0000002a .*
- 0x000010b4 0000002b 00090009 00090009 00090000 .*
- 0x000010c4 e10f0009 00090009 00090009 00090009 .*
- 0x000010d4 00090009 0009e10e .*
-
-Hex dump of section '\.cranges':
- 0x00000000 00001004 000000a0 00030000 10a40000 .*
- 0x00000010 000c0003 000010b0 00000008 00010000 .*
- 0x00000020 10b80000 00040002 000010bc 00000006 .*
- 0x00000030 00020000 10c40000 00180002 .*
diff --git a/ld/testsuite/ld-sh/sh64/crange3-media.rd b/ld/testsuite/ld-sh/sh64/crange3-media.rd
deleted file mode 100644
index 926925c..0000000
--- a/ld/testsuite/ld-sh/sh64/crange3-media.rd
+++ /dev/null
@@ -1,80 +0,0 @@
-ELF Header:
- +Magic: +7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
- +Class: +ELF32
- +Data: +2's complement, big endian
- +Version: +1 \(current\)
- +OS/ABI: +UNIX - System V
- +ABI Version: +0
- +Type: +EXEC \(Executable file\)
- +Machine: +Renesas / SuperH SH
- +Version: +0x1
- +Entry point address: +0x10a5
- +Start of program headers: +52 \(bytes into file\)
- +Start of section headers: .*
- +Flags: +0xa, sh5
- +Size of this header: +52 \(bytes\)
- +Size of program headers: +32 \(bytes\)
- +Number of program headers: +2
- +Size of section headers: +40 \(bytes\)
- +Number of section headers: +8
- +Section header string table index: 7
-
-Section Headers:
- +\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al
- +\[ 0\] +NULL +00000000 000000 000000 00 +0 +0 +0
- +\[ 1\] \.init +PROGBITS +00001000 000080 000004 00 AXp +0 +0 +4
- +\[ 2\] \.text +PROGBITS +00001004 000084 0000d8 00 AXp +0 +0 +4
- +\[ 3\] \.stack +PROGBITS +00080000 000180 000004 00 +WA +0 +0 +1
- +\[ 4\] \.cranges +LOUSER\+1 +00000000 000184 00003c 00 +W +0 +0 +1
- +\[ 5\] \.symtab +SYMTAB +.*
- +\[ 6\] \.strtab +STRTAB +.*
- +\[ 7\] \.shstrtab +STRTAB +.*
-Key to Flags:
-#...
-
-Symbol table '\.symtab' contains [0-9]+ entries:
- +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
-.*: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND
-.*: 00001000 +0 +SECTION +LOCAL +DEFAULT +1
-.*: 00001004 +0 +SECTION +LOCAL +DEFAULT +2
-.*: 00080000 +0 +SECTION +LOCAL +DEFAULT +3
-.*: 00000000 +0 +SECTION +LOCAL +DEFAULT +4
-.*: 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
-.*: 00001004 +0 +NOTYPE +LOCAL +DEFAULT +2 sec4
-.*: 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
-.*: 000010a4 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 start2
-.*: 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
-.*: 000010bc +0 +NOTYPE +LOCAL +DEFAULT +2 sec3
-.*: 000010c4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +2 diversion
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +2 __bss_start
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors_end
-.*: 000010a4 +0 +NOTYPE +GLOBAL +DEFAULT +2 diversion2
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +2 _edata
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +2 _end
-.*: 00001000 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 start
-.*: 00080000 +0 +NOTYPE +GLOBAL +DEFAULT +3 _stack
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors_end
-
-Hex dump of section '\.text':
- 0x00001004 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001014 6ff0fff0 6ff0fff0 cc00bd40 6ff0fff0 .*
- 0x00001024 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001034 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001044 6ff0fff0 6ff0fff0 6ff0fff0 cc00bd50 .*
- 0x00001054 cc0084c0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001064 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001074 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001084 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001094 6ff0fff0 6ff0fff0 6ff0fff0 cc0084d0 .*
- 0x000010a4 6ff0fff0 6ff0fff0 6ff0fff0 0000002a .*
- 0x000010b4 0000002b 00090009 00090009 00090000 .*
- 0x000010c4 e10f0009 00090009 00090009 00090009 .*
- 0x000010d4 00090009 0009e10e .*
-
-Hex dump of section '\.cranges':
- 0x00000000 00001004 000000a0 00030000 10a40000 .*
- 0x00000010 000c0003 000010b0 00000008 00010000 .*
- 0x00000020 10b80000 00040002 000010bc 00000006 .*
- 0x00000030 00020000 10c40000 00180002 .*
diff --git a/ld/testsuite/ld-sh/sh64/crange3.dd b/ld/testsuite/ld-sh/sh64/crange3.dd
deleted file mode 100644
index 135f1c9..0000000
--- a/ld/testsuite/ld-sh/sh64/crange3.dd
+++ /dev/null
@@ -1,80 +0,0 @@
-
-.*: file format elf32-sh64
-
-Disassembly of section .init:
-
-00001000 <start>:
- 1000: 6ff0fff0 nop
-Disassembly of section .text:
-
-00001004 <sec4>:
- 1004: 6ff0fff0 nop
- 1008: 6ff0fff0 nop
- 100c: 6ff0fff0 nop
- 1010: 6ff0fff0 nop
- 1014: 6ff0fff0 nop
- 1018: 6ff0fff0 nop
- 101c: cc00bd40 movi 47,r20
- 1020: 6ff0fff0 nop
- 1024: 6ff0fff0 nop
- 1028: 6ff0fff0 nop
- 102c: 6ff0fff0 nop
- 1030: 6ff0fff0 nop
- 1034: 6ff0fff0 nop
- 1038: 6ff0fff0 nop
- 103c: 6ff0fff0 nop
- 1040: 6ff0fff0 nop
- 1044: 6ff0fff0 nop
- 1048: 6ff0fff0 nop
- 104c: 6ff0fff0 nop
- 1050: cc00bd50 movi 47,r21
- 1054: cc0084c0 movi 33,r12
- 1058: 6ff0fff0 nop
- 105c: 6ff0fff0 nop
- 1060: 6ff0fff0 nop
- 1064: 6ff0fff0 nop
- 1068: 6ff0fff0 nop
- 106c: 6ff0fff0 nop
- 1070: 6ff0fff0 nop
- 1074: 6ff0fff0 nop
- 1078: 6ff0fff0 nop
- 107c: 6ff0fff0 nop
- 1080: 6ff0fff0 nop
- 1084: 6ff0fff0 nop
- 1088: 6ff0fff0 nop
- 108c: 6ff0fff0 nop
- 1090: 6ff0fff0 nop
- 1094: 6ff0fff0 nop
- 1098: 6ff0fff0 nop
- 109c: 6ff0fff0 nop
- 10a0: cc0084d0 movi 33,r13
-
-000010a4 <diversion2>:
- 10a4: 6ff0fff0 nop
- 10a8: 6ff0fff0 nop
- 10ac: 6ff0fff0 nop
- 10b0: 00 00 00 2a \.long 0x0000002a
- 10b4: 00 00 00 2b \.long 0x0000002b
- 10b8: 00 09 nop
- 10ba: 00 09 nop
-
-000010bc <sec3>:
- 10bc: 00 09 nop
- 10be: 00 09 nop
- 10c0: 00 09 nop
- \.\.\.
-
-000010c4 <diversion>:
- 10c4: e1 0f mov #15,r1
- 10c6: 00 09 nop
- 10c8: 00 09 nop
- 10ca: 00 09 nop
- 10cc: 00 09 nop
- 10ce: 00 09 nop
- 10d0: 00 09 nop
- 10d2: 00 09 nop
- 10d4: 00 09 nop
- 10d6: 00 09 nop
- 10d8: 00 09 nop
- 10da: e1 0e mov #14,r1
-
diff --git a/ld/testsuite/ld-sh/sh64/crange3.rd b/ld/testsuite/ld-sh/sh64/crange3.rd
deleted file mode 100644
index 8870e0b..0000000
--- a/ld/testsuite/ld-sh/sh64/crange3.rd
+++ /dev/null
@@ -1,61 +0,0 @@
-.*
-
-Section Headers:
- +\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al
- +\[ 0\] +NULL +00000000 000000 000000 00 +0 +0 +0
- +\[ 1\] \.init +PROGBITS +00001000 000080 000004 00 AXp +0 +0 +4
- +\[ 2\] \.text +PROGBITS +00001004 000084 0000d8 00 AXp +0 +0 +4
- +\[ 3\] \.stack +PROGBITS +00080000 000180 000004 00 +WA +0 +0 +1
- +\[ 4\] \.cranges +LOUSER\+1 +00000000 000184 00003c 00 +W +0 +0 +1
- +\[ 5\] \.symtab +SYMTAB +.*
- +\[ 6\] \.strtab +STRTAB +.*
- +\[ 7\] \.shstrtab +STRTAB +.*
-Key to Flags:
-#...
-
-Symbol table '\.symtab' contains [0-9]+ entries:
- +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
-.*: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND
-.*: 00001000 +0 +SECTION +LOCAL +DEFAULT +1
-.*: 00001004 +0 +SECTION +LOCAL +DEFAULT +2
-.*: 00080000 +0 +SECTION +LOCAL +DEFAULT +3
-.*: 00000000 +0 +SECTION +LOCAL +DEFAULT +4
-.*: 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
-.*: 00001004 +0 +NOTYPE +LOCAL +DEFAULT +2 sec4
-.*: 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
-.*: 000010a4 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 start2
-.*: 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
-.*: 000010bc +0 +NOTYPE +LOCAL +DEFAULT +2 sec3
-.*: 000010c4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +2 diversion
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +2 __bss_start
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors_end
-.*: 000010a4 +0 +NOTYPE +GLOBAL +DEFAULT +2 diversion2
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +2 _edata
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +2 _end
-.*: 00001000 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 start
-.*: 00080000 +0 +NOTYPE +GLOBAL +DEFAULT +3 _stack
-.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors_end
-
-Hex dump of section '\.text':
- 0x00001004 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001014 6ff0fff0 6ff0fff0 cc00bd40 6ff0fff0 .*
- 0x00001024 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001034 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001044 6ff0fff0 6ff0fff0 6ff0fff0 cc00bd50 .*
- 0x00001054 cc0084c0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001064 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001074 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001084 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00001094 6ff0fff0 6ff0fff0 6ff0fff0 cc0084d0 .*
- 0x000010a4 6ff0fff0 6ff0fff0 6ff0fff0 0000002a .*
- 0x000010b4 0000002b 00090009 00090009 00090000 .*
- 0x000010c4 e10f0009 00090009 00090009 00090009 .*
- 0x000010d4 00090009 0009e10e .*
-
-Hex dump of section '\.cranges':
- 0x00000000 00001004 000000a0 00030000 10a40000 .*
- 0x00000010 000c0003 000010b0 00000008 00010000 .*
- 0x00000020 10b80000 00040002 000010bc 00000006 .*
- 0x00000030 00020000 10c40000 00180002 .*
diff --git a/ld/testsuite/ld-sh/sh64/crangerel1.rd b/ld/testsuite/ld-sh/sh64/crangerel1.rd
deleted file mode 100644
index 3443f2a..0000000
--- a/ld/testsuite/ld-sh/sh64/crangerel1.rd
+++ /dev/null
@@ -1,45 +0,0 @@
-There are 11 section headers, starting at offset .*:
-
-Section Headers:
- +\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al
- +\[ 0\] +NULL +00000000 000000 000000 00 +0 +0 +0
- +\[ 1\] \.text +PROGBITS +00000000 000034 000000 00 +AX +0 +0 +1
- +\[ 2\] \.text\.mixed +PROGBITS +00000000 000034 000018 00 AXp +0 +0 +4
- +\[ 3\] \.data +PROGBITS +00000000 00004c 000000 00 +WA +0 +0 +1
- +\[ 4\] \.bss +NOBITS +00000000 00004c 000000 00 +WA +0 +0 +1
- +\[ 5\] \.stack +PROGBITS +00000000 00004c 000004 00 +WA +0 +0 +1
- +\[ 6\] \.cranges +PROGBITS +00000000 000050 00001e 00 +W +0 +0 +1
- +\[ 7\] \.rela\.cranges +RELA +00000000 [0-9a-f]+ 000024 0c +I +9 +6 +4
- +\[ 8\] \.symtab +SYMTAB .*
- +\[ 9\] \.strtab +STRTAB .*
- +\[10\] \.shstrtab +STRTAB +00000000 [0-9a-f]+ 00004d 00 +0 +0 +1
-Key to Flags:
-#...
-
-Relocation section '\.rela\.cranges' at offset 0x[0-9a-f]+ contains 3 entries:
-.*
-0*00000000 +0+0201 R_SH_DIR32 +00000000 +\.text\.mixed +\+ 0
-0*0000000a +0+0201 R_SH_DIR32 +00000000 +\.text\.mixed +\+ 0
-0*00000014 +0+0201 R_SH_DIR32 +00000000 +\.text\.mixed +\+ 0
-
-Symbol table '\.symtab' contains [0-9]+ entries:
- +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
-.* 00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND
-.* 00000000 +0 +SECTION +LOCAL +DEFAULT +1
-.* 00000000 +0 +SECTION +LOCAL +DEFAULT +2
-.* 00000000 +0 +SECTION +LOCAL +DEFAULT +3
-.* 00000000 +0 +SECTION +LOCAL +DEFAULT +4
-.* 00000000 +0 +SECTION +LOCAL +DEFAULT +5
-.* 00000000 +0 +SECTION +LOCAL +DEFAULT +6
-.* 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
-.* 00000000 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 start2
-.* 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +2 diversion2
-
-Hex dump of section '\.text\.mixed':
- 0x00000000 6ff0fff0 6ff0fff0 6ff0fff0 0000002a .*
- 0x00000010 0000002b 00090009 .*
-
-Hex dump of section '\.cranges':
-.*
- 0x00000000 00000000 0000000c 00030000 000c0000 .*
- 0x00000010 00080001 00000014 00000004 0002 .*
diff --git a/ld/testsuite/ld-sh/sh64/crangerel2.rd b/ld/testsuite/ld-sh/sh64/crangerel2.rd
deleted file mode 100644
index a1674b5..0000000
--- a/ld/testsuite/ld-sh/sh64/crangerel2.rd
+++ /dev/null
@@ -1,63 +0,0 @@
-There are 11 section headers, starting at offset .*:
-
-Section Headers:
- +\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al
- +\[ 0\] +NULL +00000000 000000 000000 00 +0 +0 +0
- +\[ 1\] \.text +PROGBITS +00000000 000034 000000 00 +AX +0 +0 +1
- +\[ 2\] \.text\.mixed +PROGBITS +00000000 000034 00005c 00 AXp +0 +0 +4
- +\[ 3\] \.data +PROGBITS +00000000 000090 000000 00 +WA +0 +0 +1
- +\[ 4\] \.bss +NOBITS +00000000 000090 000000 00 +WA +0 +0 +1
- +\[ 5\] \.stack +PROGBITS +00000000 000090 000004 00 +WA +0 +0 +1
- +\[ 6\] \.cranges +PROGBITS +00000000 000094 000046 00 +W +0 +0 +1
- +\[ 7\] \.rela\.cranges +RELA +00000000 [0-9a-f]+ 000054 0c +I +9 +6 +4
- +\[ 8\] \.symtab +SYMTAB +00000000 [0-9a-f]+ [0-9a-f]+ 10 +8 +[0-9]+ +4
- +\[ 9\] \.strtab +STRTAB +00000000 [0-9a-f]+ [0-9a-f]+ 00 +0 +0 +1
- +\[10\] \.shstrtab +STRTAB +00000000 [0-9a-f]+ 00004d 00 +0 +0 +1
-Key to Flags:
-#...
-
-Relocation section '\.rela\.cranges' at offset 0x[0-9a-f]+ contains 7 entries:
-.*
-0*00000000 +0+0201 R_SH_DIR32 +00000000 +\.text\.mixed +\+ 0
-0*0000000a +0+0201 R_SH_DIR32 +00000000 +\.text\.mixed +\+ 0
-0*00000014 +0+0201 R_SH_DIR32 +00000000 +\.text\.mixed +\+ 0
-0*0000001e +0+0201 R_SH_DIR32 +00000000 +\.text\.mixed +\+ 0
-0*00000028 +0+0201 R_SH_DIR32 +00000000 +\.text\.mixed +\+ 0
-0*00000032 +0+0201 R_SH_DIR32 +00000000 +\.text\.mixed +\+ 0
-0*0000003c +0+0201 R_SH_DIR32 +00000000 +\.text\.mixed +\+ 0
-
-Symbol table '\.symtab' contains [0-9]+ entries:
- +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
-.* 00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND
-.* 00000000 +0 +SECTION +LOCAL +DEFAULT +1
-.* 00000000 +0 +SECTION +LOCAL +DEFAULT +2
-.* 00000000 +0 +SECTION +LOCAL +DEFAULT +3
-.* 00000000 +0 +SECTION +LOCAL +DEFAULT +4
-.* 00000000 +0 +SECTION +LOCAL +DEFAULT +5
-.* 00000000 +0 +SECTION +LOCAL +DEFAULT +6
-.* 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
-.* 00000000 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 start2
-.* 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
-.* 00000018 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 sec1
-.* 00000028 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 sec2
-.* 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
-.* 0000003c +0 +NOTYPE +LOCAL +DEFAULT +2 sec3
-.* 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
-.* 00000044 +0 +NOTYPE +LOCAL +DEFAULT +2 sec4
-.* 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +2 diversion2
-
-Hex dump of section '\.text\.mixed':
- 0x00000000 6ff0fff0 6ff0fff0 6ff0fff0 0000002a .*
- 0x00000010 0000002b 00090009 6ff0fff0 6ff0fff0 .*
- 0x00000020 6ff0fff0 6ff0fff0 00000029 0000002b .*
- 0x00000030 0000002a 0000002b 0000002a 00090009 .*
- 0x00000040 00090000 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00000050 6ff0fff0 6ff0fff0 6ff0fff0 .*
-
-Hex dump of section '\.cranges':
-.*
- 0x00000000 00000000 0000000c 00030000 000c0000 .*
- 0x00000010 00080001 00000014 00000004 00020000 .*
- 0x00000020 00180000 00100003 00000028 00000014 .*
- 0x00000030 00010000 003c0000 00060002 00000044 .*
- 0x00000040 00000018 0003 .*
diff --git a/ld/testsuite/ld-sh/sh64/dlsection-1.s b/ld/testsuite/ld-sh/sh64/dlsection-1.s
deleted file mode 100644
index d83e6e1..0000000
--- a/ld/testsuite/ld-sh/sh64/dlsection-1.s
+++ /dev/null
@@ -1,17 +0,0 @@
-! Test gc-sections and datalabel references.
-!
-! Datalabel reference to symbol in section .text2 should
-! prevent .text2 from being discarded.
-! Section .spurious can be discarded.
- .mode SHmedia
-
- .text
- .global start
- .global foo
-start: .long datalabel foo
-
- .section .text2,"ax"
-foo: .long 23
-
- .section .spurious,"ax"
- .long 17
diff --git a/ld/testsuite/ld-sh/sh64/dlsection.sd b/ld/testsuite/ld-sh/sh64/dlsection.sd
deleted file mode 100644
index 58bf965..0000000
--- a/ld/testsuite/ld-sh/sh64/dlsection.sd
+++ /dev/null
@@ -1,9 +0,0 @@
-
-.*: file format elf.*-sh64
-
-Contents of section \.text:
- 1000 00001004 .*
-Contents of section \.text2:
- 1004 00000017 .*
-Contents of section \.stack:
- 80000 deaddead .*
diff --git a/ld/testsuite/ld-sh/sh64/endian.dbd b/ld/testsuite/ld-sh/sh64/endian.dbd
deleted file mode 100644
index 0369cbc..0000000
--- a/ld/testsuite/ld-sh/sh64/endian.dbd
+++ /dev/null
@@ -1,11 +0,0 @@
-
-.*:[ ]*file[ ]*format[ ]*elf64-sh64
-
-Disassembly[ ]*of[ ]*section[ ]*.text:
-
-0000000000000000[ ]*<start>:
-[ ]*0:[ ]*cc48d000[ ]*movi[ ]*4660,r0
-[ ]*4:[ ]*12345678[ ]*.long[ ]*0x12345678
-[ ]*8:[ ]*12340000[ ]*.long[ ]*0x12340000
-[ ]*c:[ ]*12345678[ ]*.long[ ]*0x12345678
-
diff --git a/ld/testsuite/ld-sh/sh64/endian.dld b/ld/testsuite/ld-sh/sh64/endian.dld
deleted file mode 100644
index f3c5bd5..0000000
--- a/ld/testsuite/ld-sh/sh64/endian.dld
+++ /dev/null
@@ -1,11 +0,0 @@
-
-.*:[ ]*file[ ]*format[ ]*elf64-sh64l
-
-Disassembly[ ]*of[ ]*section[ ]*.text:
-
-0000000000000000[ ]*<start>:
-[ ]*0:[ ]*cc48d000[ ]*movi[ ]*4660,r0
-[ ]*4:[ ]*12345678[ ]*.long[ ]*0x12345678
-[ ]*8:[ ]*00001234[ ]*.long[ ]*0x00001234
-[ ]*c:[ ]*12345678[ ]*.long[ ]*0x12345678
-
diff --git a/ld/testsuite/ld-sh/sh64/endian.ld b/ld/testsuite/ld-sh/sh64/endian.ld
deleted file mode 100644
index e9635e1..0000000
--- a/ld/testsuite/ld-sh/sh64/endian.ld
+++ /dev/null
@@ -1,6 +0,0 @@
-SECTIONS {
- .text : {
- *(.text)
- LONG(0x12345678);
- }
-}
diff --git a/ld/testsuite/ld-sh/sh64/endian.s b/ld/testsuite/ld-sh/sh64/endian.s
deleted file mode 100644
index 79bc9e4..0000000
--- a/ld/testsuite/ld-sh/sh64/endian.s
+++ /dev/null
@@ -1,7 +0,0 @@
- .text
- .mode shmedia
-start:
-
- movi 0x1234,r0
- .long 0x12345678
- .word 0x1234, 0
diff --git a/ld/testsuite/ld-sh/sh64/endian.sbd b/ld/testsuite/ld-sh/sh64/endian.sbd
deleted file mode 100644
index 462f66d..0000000
--- a/ld/testsuite/ld-sh/sh64/endian.sbd
+++ /dev/null
@@ -1,5 +0,0 @@
-
-.*: file format elf64-sh64
-
-Contents of section .text:
- 0000 cc48d000 12345678 12340000 12345678.*
diff --git a/ld/testsuite/ld-sh/sh64/endian.sld b/ld/testsuite/ld-sh/sh64/endian.sld
deleted file mode 100644
index 00975cb..0000000
--- a/ld/testsuite/ld-sh/sh64/endian.sld
+++ /dev/null
@@ -1,6 +0,0 @@
-
-.*: file format elf64-sh64l
-
-Contents of section .text:
- 0000 00d048cc 78563412 34120000 78563412.*
-
diff --git a/ld/testsuite/ld-sh/sh64/gotplt.d b/ld/testsuite/ld-sh/sh64/gotplt.d
deleted file mode 100644
index cf80eb0..0000000
--- a/ld/testsuite/ld-sh/sh64/gotplt.d
+++ /dev/null
@@ -1,12 +0,0 @@
-#source: gotplt.s
-#as: --abi=32 --isa=SHmedia
-#ld: -shared -mshelf32 --version-script=$srcdir/$subdir/gotplt.map
-#readelf: -r
-#target: sh64-*-elf
-
-# Make sure that gotplt relocations of forced local symbols
-# use the GOT.
-
-Relocation section '\.rela\.dyn' at offset .* contains 1 entry:
- Offset Info Type Sym\.Value Sym\. Name \+ Addend
-[0-9a-f ]+R_SH_RELATIVE[0-9a-f ]+
diff --git a/ld/testsuite/ld-sh/sh64/gotplt.map b/ld/testsuite/ld-sh/sh64/gotplt.map
deleted file mode 100644
index a27c22c..0000000
--- a/ld/testsuite/ld-sh/sh64/gotplt.map
+++ /dev/null
@@ -1,4 +0,0 @@
-GLIBC_2.2 {
- local:
- xxx;
-};
diff --git a/ld/testsuite/ld-sh/sh64/gotplt.s b/ld/testsuite/ld-sh/sh64/gotplt.s
deleted file mode 100644
index 45ed0b2..0000000
--- a/ld/testsuite/ld-sh/sh64/gotplt.s
+++ /dev/null
@@ -1,8 +0,0 @@
- .text
- .global xxx
-xxx:
- ptabs r18, tr0
- blink tr0, r63
- .global yyy
-yyy:
- movi ((xxx@GOTPLT) & 65535), r1
diff --git a/ld/testsuite/ld-sh/sh64/init-cmpct.d b/ld/testsuite/ld-sh/sh64/init-cmpct.d
deleted file mode 100644
index 6f64bc4..0000000
--- a/ld/testsuite/ld-sh/sh64/init-cmpct.d
+++ /dev/null
@@ -1,14 +0,0 @@
-#source: init.s
-#as: --abi=32 --isa=SHcompact
-#ld: -shared -mshelf32
-#readelf: -d
-#target: sh64-*-elf
-
-# Make sure that the lsb of DT_INIT and DT_FINI entries is not set
-# when _init and _fini are SHcompact code.
-
-Dynamic section at offset .* contains 8 entries:
- Tag Type Name/Value
- 0x0000000c \(INIT\) .*[02468ace]
- 0x0000000d \(FINI\) .*[02468ace]
-#pass
diff --git a/ld/testsuite/ld-sh/sh64/init-media.d b/ld/testsuite/ld-sh/sh64/init-media.d
deleted file mode 100644
index 56c6c19..0000000
--- a/ld/testsuite/ld-sh/sh64/init-media.d
+++ /dev/null
@@ -1,14 +0,0 @@
-#source: init.s
-#as: --abi=32 --isa=SHmedia
-#ld: -shared -mshelf32
-#readelf: -d
-#target: sh64-*-elf
-
-# Make sure that the lsb of DT_INIT and DT_FINI entries is set
-# when _init and _fini are SHmedia code.
-
-.*
- Tag Type Name/Value
- 0x0000000c \(INIT\) .*[13579bdf]
- 0x0000000d \(FINI\) .*[13579bdf]
-#pass
diff --git a/ld/testsuite/ld-sh/sh64/init.s b/ld/testsuite/ld-sh/sh64/init.s
deleted file mode 100644
index 900e764..0000000
--- a/ld/testsuite/ld-sh/sh64/init.s
+++ /dev/null
@@ -1,18 +0,0 @@
- .section .text,"ax"
- .global _init
- .type _init,@function
- .align 1
-_init:
- nop
- nop
- nop
- nop
-
- .global _fini
- .type _fini,@function
- .align 1
-_fini:
- nop
- nop
- nop
- nop
diff --git a/ld/testsuite/ld-sh/sh64/init64.d b/ld/testsuite/ld-sh/sh64/init64.d
deleted file mode 100644
index 01c8e97..0000000
--- a/ld/testsuite/ld-sh/sh64/init64.d
+++ /dev/null
@@ -1,14 +0,0 @@
-#source: init.s
-#as: --abi=64
-#ld: -shared -mshelf64
-#readelf: -d
-#target: sh64-*-elf
-
-# Make sure that the lsb of DT_INIT and DT_FINI entries is set
-# when _init and _fini are SHmedia code.
-
-.*
- Tag Type Name/Value
- 0x000000000000000c \(INIT\) .*[13579bdf]
- 0x000000000000000d \(FINI\) .*[13579bdf]
-#pass
diff --git a/ld/testsuite/ld-sh/sh64/mix1-noexp.sd b/ld/testsuite/ld-sh/sh64/mix1-noexp.sd
deleted file mode 100644
index fe73136..0000000
--- a/ld/testsuite/ld-sh/sh64/mix1-noexp.sd
+++ /dev/null
@@ -1,14 +0,0 @@
-
-.*: file format .*-sh64
-
-Contents of section \.text:
- 1000 8902c700 00090009 00090009 0000100c .*
- 1010 00001004 00001021 effff240 efffea50 .*
- 1020 cc401360 cc4086d0 ebfffa70 6ff0fff0 .*
-Contents of section \.data:
- 10b0 000010b0 00001004 00001021 .*
-Contents of section \.stack:
- 80000 deaddead .*
-Contents of section \.cranges:
- 0000 00001000 00000018 00020000 10180000 .*
- 0010 00180003 .*
diff --git a/ld/testsuite/ld-sh/sh64/mix1.sd b/ld/testsuite/ld-sh/sh64/mix1.sd
deleted file mode 100644
index c5cc4b1..0000000
--- a/ld/testsuite/ld-sh/sh64/mix1.sd
+++ /dev/null
@@ -1,16 +0,0 @@
-
-.*: file format .*-sh64
-
-Contents of section \.text:
- 1000 8902c700 00090009 00090009 0000100c .*
- 1010 00001004 00001031 cffffd90 cbffa190 .*
- 1020 6bf56640 cffffd90 cbff6190 6bf56650 .*
- 1030 cc000360 c8401360 cc0002d0 c840c6d0 .*
- 1040 ebfff270 6ff0fff0 .*
-Contents of section \.data:
- 10c8 000010c8 00001004 00001031 .*
-Contents of section \.stack:
- 80000 deaddead .*
-Contents of section \.cranges:
- 0000 00001000 00000018 00020000 10180000 .*
- 0010 00300003 .*
diff --git a/ld/testsuite/ld-sh/sh64/mix1.xd b/ld/testsuite/ld-sh/sh64/mix1.xd
deleted file mode 100644
index 479ff3e..0000000
--- a/ld/testsuite/ld-sh/sh64/mix1.xd
+++ /dev/null
@@ -1,43 +0,0 @@
-
-.*: file format .*-sh64
-.*
-architecture: sh5, flags 0x00000112:
-EXEC_P, HAS_SYMS, D_PAGED
-start address 0x0+1000
-
-Program Header:
- LOAD off 0x0+100 vaddr 0x0+1000 paddr 0x0+1000 align 2\*\*7
- filesz 0x0+48 memsz 0x0+48 flags r-x
- LOAD off 0x0+148 vaddr 0x0+10c8 paddr 0x0+10c8 align 2\*\*7
- filesz 0x0+c memsz 0x0+c flags rw-
- LOAD off 0x0+180 vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*7
- filesz 0x0+4 memsz 0x0+4 flags rw-
-Sections:
-Idx Name Size VMA LMA File off Algn
- 0 \.text 00000048 0+1000 0+1000 00000100 2\*\*2
- CONTENTS, ALLOC, LOAD, READONLY, CODE
- 1 \.data 0000000c 0+10c8 0+10c8 00000148 2\*\*2
- CONTENTS, ALLOC, LOAD, DATA
- 2 \.stack 00000004 0+80000 0+80000 00000180 2\*\*0
- CONTENTS, ALLOC, LOAD, DATA
- 3 \.cranges 00000014 0+ 0+ 00000184 2\*\*0
- CONTENTS, DEBUGGING, SORT_ENTRIES
-SYMBOL TABLE:
-0+1000 l d \.text 0+ (|\.text)
-0+10c8 l d \.data 0+ (|\.data)
-0+80000 l d \.stack 0+ (|\.stack)
-0+ l d \.cranges 0+ (|\.cranges)
-0+ l df \*ABS\* 0+ .*
-0+1008 l \.text 0+ forw
-0+1004 l \.text 0+ start2
-0+1030 l \.text 0+ 0x04 mediacode2
-0+1018 l \.text 0+ 0x04 mediacode
-0+10c8 g .* 0+ ___dtors
-0+10d8 g \.data 0+ __bss_start
-0+10c8 g .* 0+ ___ctors_end
-0+10c8 g .* 0+ ___ctors
-0+10d8 g \.data 0+ _edata
-0+10d8 g \.data 0+ _end
-0+1000 g \.text 0+ start
-0+80000 g \.stack 0+ _stack
-0+10c8 g .* 0+ ___dtors_end
diff --git a/ld/testsuite/ld-sh/sh64/mix2-noexp.sd b/ld/testsuite/ld-sh/sh64/mix2-noexp.sd
deleted file mode 100644
index 9112cfc..0000000
--- a/ld/testsuite/ld-sh/sh64/mix2-noexp.sd
+++ /dev/null
@@ -1,16 +0,0 @@
-
-.*: file format .*-sh64
-
-Contents of section \.text:
- 1000 cc4048e0 cc40c0e0 ec000e60 6ff0fff0 .*
- 1010 0009c700 c7000009 00090009 00001009 .*
- 1020 000010bc .*
-Contents of section \.rodata:
- 1024 00001018 000010c4 0000100d 00001028 .*
-Contents of section \.data:
- 10b8 00000000 00001014 00000000 000010bc .*
-Contents of section \.stack:
- 80000 deaddead .*
-Contents of section \.cranges:
- 0000 00001000 00000010 00030000 10100000 .*
- 0010 00140002 .*
diff --git a/ld/testsuite/ld-sh/sh64/mix2.sd b/ld/testsuite/ld-sh/sh64/mix2.sd
deleted file mode 100644
index 122a472..0000000
--- a/ld/testsuite/ld-sh/sh64/mix2.sd
+++ /dev/null
@@ -1,17 +0,0 @@
-
-.*: file format .*-sh64
-
-Contents of section \.text:
- 1000 cc0000e0 c84088e0 cc0000e0 c84100e0 .*
- 1010 cc000190 c8003190 6bf56660 6ff0fff0 .*
- 1020 0009c700 c7000009 00090009 00001011 .*
- 1030 000010cc .*
-Contents of section \.rodata:
- 1034 00001028 000010d4 0000101d 00001038 .*
-Contents of section \.data:
- 10c8 00000000 00001024 00000000 000010cc .*
-Contents of section \.stack:
- 80000 deaddead .*
-Contents of section \.cranges:
- 0000 00001000 00000020 00030000 10200000 .*
- 0010 00140002 .*
diff --git a/ld/testsuite/ld-sh/sh64/mix2.xd b/ld/testsuite/ld-sh/sh64/mix2.xd
deleted file mode 100644
index 518e67e..0000000
--- a/ld/testsuite/ld-sh/sh64/mix2.xd
+++ /dev/null
@@ -1,53 +0,0 @@
-
-.*: file format .*-sh64
-.*
-architecture: sh5, flags 0x00000112:
-EXEC_P, HAS_SYMS, D_PAGED
-start address 0x0+1001
-
-Program Header:
- LOAD off 0x0+100 vaddr 0x0+1000 paddr 0x0+1000 align 2\*\*7
- filesz 0x0+44 memsz 0x0+44 flags r-x
- LOAD off 0x0+148 vaddr 0x0+10c8 paddr 0x0+10c8 align 2\*\*7
- filesz 0x0+10 memsz 0x0+10 flags rw-
- LOAD off 0x0+180 vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*7
- filesz 0x0+4 memsz 0x0+4 flags rw-
-
-Sections:
-Idx Name Size VMA LMA File off Algn
- 0 \.text 00000034 0+1000 0+1000 00000100 2\*\*2
- CONTENTS, ALLOC, LOAD, READONLY, CODE
- 1 \.rodata 00000010 0+1034 0+1034 00000134 2\*\*2
- CONTENTS, ALLOC, LOAD, READONLY, DATA
- 2 \.data 00000010 0+10c8 0+10c8 00000148 2\*\*2
- CONTENTS, ALLOC, LOAD, DATA
- 3 \.stack 00000004 0+80000 0+80000 00000180 2\*\*0
- CONTENTS, ALLOC, LOAD, DATA
- 4 \.cranges 00000014 0+ 0+ 00000184 2\*\*0
- CONTENTS, DEBUGGING, SORT_ENTRIES
-SYMBOL TABLE:
-0+1000 l d \.text 0+ (|\.text)
-0+1034 l d \.rodata 0+ (|\.rodata)
-0+10c8 l d \.data 0+ (|\.data)
-0+80000 l d \.stack 0+ (|\.stack)
-0+ l d \.cranges 0+ (|\.cranges)
-0+ l df \*ABS\* 0+ .*
-0+1020 l \.text 0+ locallabel
-0+1040 g \.rodata 0+ compactlabel4
-0+101c g \.text 0+ 0x04 medialabel2
-0+1038 g \.rodata 0+ medialabel3
-0+1022 g \.text 0+ compactlabel1
-0+1024 g \.text 0+ compactlabel2
-0+1028 g \.text 0+ compactlabel3
-0+1010 g \.text 0+ 0x04 medialabel1
-0+10c8 g .* 0+ ___dtors
-0+10cc g \.data 0+ medialabel4
-0+10d8 g \.data 0+ __bss_start
-0+10c8 g .* 0+ ___ctors_end
-0+10d4 g \.data 0+ compactlabel5
-0+10c8 g .* 0+ ___ctors
-0+10d8 g \.data 0+ _edata
-0+10d8 g \.data 0+ _end
-0+1000 g \.text 0+ 0x04 start
-0+80000 g \.stack 0+ _stack
-0+10c8 g .* 0+ ___dtors_end
diff --git a/ld/testsuite/ld-sh/sh64/rd-sh64.exp b/ld/testsuite/ld-sh/sh64/rd-sh64.exp
deleted file mode 100644
index 1639a88..0000000
--- a/ld/testsuite/ld-sh/sh64/rd-sh64.exp
+++ /dev/null
@@ -1,44 +0,0 @@
-# Expect script for run_dump_test based ld-sh/sh64 tests.
-# Copyright (C) 2002-2018 Free Software Foundation, Inc.
-#
-# This file is part of the GNU Binutils.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
-# MA 02110-1301, USA.
-#
-# Written by Stephen Clarke (stephen.clarke@superh.com)
-#
-
-if ![istarget sh64-*-*] {
- return
-}
-
-set rd_test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
-foreach sh64test $rd_test_list {
- # We need to strip the ".d", but can leave the dirname.
- verbose [file rootname $sh64test]
- run_dump_test [file rootname $sh64test]
- if [string match $srcdir/$subdir/*-dso.d $sh64test] {
- # Copy the output of the DSO-createing test to .so file.
- # Notice that a DSO-creating test must precede the tests
- # which need that DSO in sort-order by name.
- set cmd "cp tmpdir/dump \
- tmpdir/[file rootname [file tail $sh64test]].so"
- send_log "$cmd\n"
- set cmdret [catch "exec $cmd" comp_output]
- send_log "$comp_output\n"
- # FIXME: What if it fails? Need we do something?
- }
-}
diff --git a/ld/testsuite/ld-sh/sh64/rel-1.s b/ld/testsuite/ld-sh/sh64/rel-1.s
deleted file mode 100644
index 6cf18ca..0000000
--- a/ld/testsuite/ld-sh/sh64/rel-1.s
+++ /dev/null
@@ -1,48 +0,0 @@
-! Relative linking, simple files with global symbols but nothing really
-! strange. Reference from same and other file to .text and .data in
-! different combinations.
-
-! fileFsectionN, with F in rel-F.s, and N in:
-! 1 - Same file and section.
-! 2 - Same file, different section.
-! 3 - Other file, same section.
-! 4 - Other file, other section.
-
- .mode SHmedia
- .text
- .global start
-start:
- nop
- .global file1text1
-file1text1:
- nop
- movi file1text1 & 65535,r10
- .global file1text2
-file1text2:
- movi file1data2 & 65535,r20
- .global file1text3
-file1text3:
- movi file2text3 & 65535,r20
- .global file1text4
-file1text4:
- movi file2data4 & 65535,r20
- movi unresolved1 & 65535,r40
- movi unresolved6 & 65535,r30
-
- .data
- .long 0
- .global file1data1
-file1data1:
- .long 0
- .long file1data1
- .global file1data2
-file1data2:
- .long file1text2
- .global file1data3
-file1data3:
- .long file2data3
- .global file1data4
-file1data4:
- .long file2text4
- .long unresolved2
- .long unresolved5
diff --git a/ld/testsuite/ld-sh/sh64/rel-2.s b/ld/testsuite/ld-sh/sh64/rel-2.s
deleted file mode 100644
index b1931b5..0000000
--- a/ld/testsuite/ld-sh/sh64/rel-2.s
+++ /dev/null
@@ -1,46 +0,0 @@
-! Relative linking, second file.
-
-! fileFsectionN, with F in rel-F.s, and N in:
-! 1 - Same file and section.
-! 2 - Same file, different section.
-! 3 - Other file, same section.
-! 4 - Other file, other section.
-
- .mode SHmedia
- .text
- .global start2
-start2:
- nop
- .global file2text1
-file2text1:
- nop
- movi file2text1 & 65535,r10
- .global file2text2
-file2text2:
- movi file2data2 & 65535,r20
- .global file2text3
-file2text3:
- movi file1text3 & 65535,r20
- .global file2text4
-file2text4:
- movi file1data4 & 65535,r20
- movi unresolved1 & 65535,r30
- movi unresolved3 & 65535,r30
-
- .data
- .long 0
- .global file2data1
-file2data1:
- .long 0
- .long file2data1
- .global file2data2
-file2data2:
- .long file2text2
- .global file2data3
-file2data3:
- .long file1data3
- .global file2data4
-file2data4:
- .long file1text4
- .long unresolved2
- .long unresolved4
diff --git a/ld/testsuite/ld-sh/sh64/rel32.xd b/ld/testsuite/ld-sh/sh64/rel32.xd
deleted file mode 100644
index 65c00ac..0000000
--- a/ld/testsuite/ld-sh/sh64/rel32.xd
+++ /dev/null
@@ -1,92 +0,0 @@
-
-.*: 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+40 0+ 0+ 0+34 2\*\*0
- CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
- 1 \.data 0+40 0+ 0+ 0+74 2\*\*2
- CONTENTS, ALLOC, LOAD, RELOC, DATA
- 2 \.bss 0+ 0+ 0+ 0+b4 2\*\*0
- ALLOC
- 3 \.stack 0+4 0+ 0+ 0+b4 2\*\*0
- CONTENTS, ALLOC, LOAD, DATA
-SYMBOL TABLE:
-0+ l d \.text 0+ (|.text)
-0+ l d \.data 0+ (|.data)
-0+ l d \.bss 0+ (|.bss)
-0+ l d \.stack 0+ (|.stack)
-0+ \*UND\* 0+ unresolved5
-0+c g \.text 0+ 0x04 file1text2
-0+24 g \.text 0+ 0x04 file2text1
-0+4 g \.data 0+ file1data1
-0+34 g \.data 0+ file2data4
-0+10 g \.text 0+ 0x04 file1text3
-0+2c g \.data 0+ file2data2
-0+c g \.data 0+ file1data2
-0+30 g \.text 0+ 0x04 file2text3
-0+20 g \.text 0+ 0x04 start2
-0+ \*UND\* 0+ unresolved1
-0+ \*UND\* 0+ unresolved6
-0+4 g \.text 0+ 0x04 file1text1
-0+2c g \.text 0+ 0x04 file2text2
-0+ \*UND\* 0+ unresolved3
-0+34 g \.text 0+ 0x04 file2text4
-0+ \*UND\* 0+ unresolved2
-0+ g \.text 0+ 0x04 start
-0+14 g \.text 0+ 0x04 file1text4
-0+30 g \.data 0+ file2data3
-0+ \*UND\* 0+ unresolved4
-0+24 g \.data 0+ file2data1
-0+10 g \.data 0+ file1data3
-0+14 g \.data 0+ file1data4
-
-
-RELOCATION RECORDS FOR \[\.text\]:
-OFFSET *TYPE *VALUE
-0+8 R_SH_IMM_LOW16 file1text1
-0+c R_SH_IMM_LOW16 file1data2
-0+10 R_SH_IMM_LOW16 file2text3
-0+14 R_SH_IMM_LOW16 file2data4
-0+18 R_SH_IMM_LOW16 unresolved1
-0+1c R_SH_IMM_LOW16 unresolved6
-0+28 R_SH_IMM_LOW16 file2text1
-0+2c R_SH_IMM_LOW16 file2data2
-0+30 R_SH_IMM_LOW16 file1text3
-0+34 R_SH_IMM_LOW16 file1data4
-0+38 R_SH_IMM_LOW16 unresolved1
-0+3c R_SH_IMM_LOW16 unresolved3
-
-
-RELOCATION RECORDS FOR \[\.data\]:
-OFFSET *TYPE *VALUE
-0+8 R_SH_DIR32 file1data1
-0+c R_SH_DIR32 file1text2
-0+10 R_SH_DIR32 file2data3
-0+14 R_SH_DIR32 file2text4
-0+18 R_SH_DIR32 unresolved2
-0+1c R_SH_DIR32 unresolved5
-0+28 R_SH_DIR32 file2data1
-0+2c R_SH_DIR32 file2text2
-0+30 R_SH_DIR32 file1data3
-0+34 R_SH_DIR32 file1text4
-0+38 R_SH_DIR32 unresolved2
-0+3c R_SH_DIR32 unresolved4
-
-
-Contents of section \.text:
- 0000 6ff0fff0 6ff0fff0 cc0000a0 cc000140 .*
- 0010 cc000140 cc000140 cc000280 cc0001e0 .*
- 0020 6ff0fff0 6ff0fff0 cc0000a0 cc000140 .*
- 0030 cc000140 cc000140 cc0001e0 cc0001e0 .*
-Contents of section \.data:
- 0000 00000000 00000000 00000000 00000000 .*
- 0010 00000000 00000000 00000000 00000000 .*
- 0020 00000000 00000000 00000000 00000000 .*
- 0030 00000000 00000000 00000000 00000000 .*
-Contents of section .stack:
- 0000 deaddead .*
diff --git a/ld/testsuite/ld-sh/sh64/rel64.xd b/ld/testsuite/ld-sh/sh64/rel64.xd
deleted file mode 100644
index 986e013..0000000
--- a/ld/testsuite/ld-sh/sh64/rel64.xd
+++ /dev/null
@@ -1,92 +0,0 @@
-
-.*: 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+40 0+ 0+ 0+40 2\*\*0
- CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
- 1 \.data 0+40 0+ 0+ 0+80 2\*\*2
- CONTENTS, ALLOC, LOAD, RELOC, DATA
- 2 \.bss 0+ 0+ 0+ 0+c0 2\*\*0
- ALLOC
- 3 \.stack 0+4 0+ 0+ 0+c0 2\*\*0
- CONTENTS, ALLOC, LOAD, DATA
-SYMBOL TABLE:
-0+ l d \.text 0+ (|.text)
-0+ l d \.data 0+ (|.data)
-0+ l d \.bss 0+ (|.bss)
-0+ l d \.stack 0+ (|.stack)
-0+ \*UND\* 0+ unresolved5
-0+c g \.text 0+ 0x04 file1text2
-0+24 g \.text 0+ 0x04 file2text1
-0+4 g \.data 0+ file1data1
-0+34 g \.data 0+ file2data4
-0+10 g \.text 0+ 0x04 file1text3
-0+2c g \.data 0+ file2data2
-0+c g \.data 0+ file1data2
-0+30 g \.text 0+ 0x04 file2text3
-0+20 g \.text 0+ 0x04 start2
-0+ \*UND\* 0+ unresolved1
-0+ \*UND\* 0+ unresolved6
-0+4 g \.text 0+ 0x04 file1text1
-0+2c g \.text 0+ 0x04 file2text2
-0+ \*UND\* 0+ unresolved3
-0+34 g \.text 0+ 0x04 file2text4
-0+ \*UND\* 0+ unresolved2
-0+ g \.text 0+ 0x04 start
-0+14 g \.text 0+ 0x04 file1text4
-0+30 g \.data 0+ file2data3
-0+ \*UND\* 0+ unresolved4
-0+24 g \.data 0+ file2data1
-0+10 g \.data 0+ file1data3
-0+14 g \.data 0+ file1data4
-
-
-RELOCATION RECORDS FOR \[\.text\]:
-OFFSET TYPE VALUE
-0+8 R_SH_IMM_LOW16 file1text1
-0+c R_SH_IMM_LOW16 file1data2
-0+10 R_SH_IMM_LOW16 file2text3
-0+14 R_SH_IMM_LOW16 file2data4
-0+18 R_SH_IMM_LOW16 unresolved1
-0+1c R_SH_IMM_LOW16 unresolved6
-0+28 R_SH_IMM_LOW16 file2text1
-0+2c R_SH_IMM_LOW16 file2data2
-0+30 R_SH_IMM_LOW16 file1text3
-0+34 R_SH_IMM_LOW16 file1data4
-0+38 R_SH_IMM_LOW16 unresolved1
-0+3c R_SH_IMM_LOW16 unresolved3
-
-
-RELOCATION RECORDS FOR \[\.data\]:
-OFFSET TYPE VALUE
-0+8 R_SH_DIR32 file1data1
-0+c R_SH_DIR32 file1text2
-0+10 R_SH_DIR32 file2data3
-0+14 R_SH_DIR32 file2text4
-0+18 R_SH_DIR32 unresolved2
-0+1c R_SH_DIR32 unresolved5
-0+28 R_SH_DIR32 file2data1
-0+2c R_SH_DIR32 file2text2
-0+30 R_SH_DIR32 file1data3
-0+34 R_SH_DIR32 file1text4
-0+38 R_SH_DIR32 unresolved2
-0+3c R_SH_DIR32 unresolved4
-
-
-Contents of section \.text:
- 0000 6ff0fff0 6ff0fff0 cc0000a0 cc000140 .*
- 0010 cc000140 cc000140 cc000280 cc0001e0 .*
- 0020 6ff0fff0 6ff0fff0 cc0000a0 cc000140 .*
- 0030 cc000140 cc000140 cc0001e0 cc0001e0 .*
-Contents of section \.data:
- 0000 00000000 00000000 00000000 00000000 .*
- 0010 00000000 00000000 00000000 00000000 .*
- 0020 00000000 00000000 00000000 00000000 .*
- 0030 00000000 00000000 00000000 00000000 .*
-Contents of section .stack:
- 0000 deaddead .*
diff --git a/ld/testsuite/ld-sh/sh64/relax.exp b/ld/testsuite/ld-sh/sh64/relax.exp
deleted file mode 100644
index 4e2068d..0000000
--- a/ld/testsuite/ld-sh/sh64/relax.exp
+++ /dev/null
@@ -1,155 +0,0 @@
-# Expect script for ld-sh tests
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
-#
-# This file is part of the GNU Binutils.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
-# MA 02110-1301, USA.
-#
-
-# Test SH relaxing - that is, that it's disabled when SHmedia sections
-# are present.
-
-if ![istarget sh64-*-*] {
- return
-}
-
-# There are four source files: the first is SHcompact only, the second
-# is SHmedia only, the third has both, and the fourth has only a
-# .cranges section. The table below has:
-# Title
-# as flags for first source (else "n/a" to skip)
-# ditto, other three files
-# ld flags
-# 1/0 whether relaxing should have been done or not, or -1 if we expect
-# the linker to not produce an output file.
-
-if [istarget sh64*-*-linux*] {
- set emul32 "shlelf32_linux"
-} elseif { [istarget sh64*-*-netbsd*] || [istarget sh5*-*-netbsd*] } {
- set emul32 "shelf32_nbsd"
-} else {
- set emul32 "shelf32"
-}
-
-set sh64relaxtests {
- {"SH64 not relaxing, shcompact"
- {"-relax -isa shcompact" "n/a" "n/a" "n/a"} "-m$emul32" 0}
- {"SH64 relaxing, shcompact"
- {"-relax -isa shcompact" "n/a" "n/a" "n/a"} "-relax -m$emul32" 1}
- {"SH64 relaxing, shcompacts"
- {"-relax -isa shcompact" "-isa shcompact" "n/a" "n/a"} "-relax -m$emul32" 1}
- {"SH64 relaxing disabled, shmedia"
- {"-relax -isa shcompact" "-isa shmedia -no-mix" "n/a" "n/a"} "-relax -m$emul32" 0}
- {"SH64 relaxing disabled, mixed"
- {"-relax -isa shcompact" "n/a" "-isa shcompact" "n/a"} "-relax -m$emul32" 0}
- {"SH64 relaxing disabled, cranges"
- {"-relax -isa shcompact" "n/a" "n/a" ""} "-relax -m$emul32" 0}
-}
-
-proc run_sh64relaxtest {sh64relaxtests} {
- global ld
- global as
- global nm
- global objdump
- global readelf
- global srcdir
- global subdir
- global emul32
-
- set testindex 0
-
- set sh64relaxfiles {
- "relax1.s" "relax2.s" "relax3.s" "relax4.s"
- }
-
- foreach testentry $sh64relaxtests {
- set testname [lindex $testentry 0]
- set as_options [lindex $testentry 1]
- set ld_options [subst [lindex $testentry 2]]
- set expect_relaxed [lindex $testentry 3]
-
- set is_unresolved 0
- set objfiles {}
-
- incr testindex
-
- # Assemble each file in the test.
- for {set i 0} {$i < 4} {incr i} {
- set as_file [lindex $sh64relaxfiles $i]
- set as_opt [lindex $as_options $i]
- if { [string compare $as_opt "n/a"] != 0 } {
- set objfile "tmpdir/[file rootname $as_file]-$testindex.o"
- lappend objfiles $objfile
-
- if ![ld_assemble $as "$as_opt $srcdir/$subdir/$as_file" $objfile] {
- set is_unresolved 1
- break
- }
- }
- }
-
- # Catch assembler errors.
- if { $is_unresolved != 0 } {
- unresolved $testname
- continue
- }
-
- set binfile "tmpdir/relax-$testindex.x"
-
- # We're not interested in the pass/fail of the linker as much
- # as we're interested in whether or not relaxing got properly
- # disabled. Hence the lax checking here.
-
- file delete $binfile
- set result [ld_link $ld $binfile " --no-warn-mismatch $ld_options $objfiles"]
- if ![file exists $binfile] {
-
- if {$expect_relaxed == -1} {
- pass $testname
- continue
- }
-
- verbose "$testname: file $binfile doesn't exist" 1
- fail $testname
- continue
- }
-
- catch "exec $objdump -d $binfile" objdump_output
-
- regexp "\[ \t](jsr|bsr)\[ \t]" $objdump_output ignore calltype
-
- if [string match $calltype "bsr"] {
- set relaxed 1
- } elseif [string match $calltype "jsr"] {
- set relaxed 0
- } else {
- verbose "$testname: neither jsr nor bsr found" 1
- verbose $objdump_output 2
- fail $testname
- continue
- }
-
- if {$relaxed != $expect_relaxed} {
- verbose $objdump_output 2
- fail $testname
- exit
- } else {
- pass $testname
- }
- }
-}
-
-run_sh64relaxtest $sh64relaxtests
diff --git a/ld/testsuite/ld-sh/sh64/relax1.s b/ld/testsuite/ld-sh/sh64/relax1.s
deleted file mode 100644
index 873954b..0000000
--- a/ld/testsuite/ld-sh/sh64/relax1.s
+++ /dev/null
@@ -1,12 +0,0 @@
- .globl start
-start:
-.L3:
- mov.l .L4,r1
- .uses .L3
- jsr @r1
- nop
- nop
-.L4:
- .long .L5
-.L5:
- nop
diff --git a/ld/testsuite/ld-sh/sh64/relax2.s b/ld/testsuite/ld-sh/sh64/relax2.s
deleted file mode 100644
index 9bf0802..0000000
--- a/ld/testsuite/ld-sh/sh64/relax2.s
+++ /dev/null
@@ -1,3 +0,0 @@
- .text
-foo1:
- nop
diff --git a/ld/testsuite/ld-sh/sh64/relax3.s b/ld/testsuite/ld-sh/sh64/relax3.s
deleted file mode 100644
index 964bacd..0000000
--- a/ld/testsuite/ld-sh/sh64/relax3.s
+++ /dev/null
@@ -1,8 +0,0 @@
- .text
- .mode shmedia
-foo1:
- nop
-
- .mode shcompact
-foo2:
- nop
diff --git a/ld/testsuite/ld-sh/sh64/relax4.s b/ld/testsuite/ld-sh/sh64/relax4.s
deleted file mode 100644
index 904df7c..0000000
--- a/ld/testsuite/ld-sh/sh64/relax4.s
+++ /dev/null
@@ -1,2 +0,0 @@
- .section .cranges
- .word 0
diff --git a/ld/testsuite/ld-sh/sh64/reldl-1.s b/ld/testsuite/ld-sh/sh64/reldl-1.s
deleted file mode 100644
index 0aeb332..0000000
--- a/ld/testsuite/ld-sh/sh64/reldl-1.s
+++ /dev/null
@@ -1,171 +0,0 @@
-! Relative linking. Like the simple test, but mixing in use of
-! "datalabel" and offsets to the global symbols into the previous
-! combinations.
-!
-! More systematic testing datalabel references,
-! igoring section difference, symbol definition type and offset presence:
-! Datalabel reference plus:
-! (datalabel other file, other file, same file, none)
-! = (1, 2, 3, 4, 12, 13, 23, 123)
-!
-! Definition:
-! (none, same file, other file) = (a, b, c)
-!
-! Combined:
-! = (a1, a2, a3, a4, a12, a13, a23, a123, b1, b2, b3, b4, b12,
-! b13, b23, b123, c1, c2, c3, c4, c12, c13, c23, c123)
-
- .mode SHmedia
- .text
- .global start
-start:
- nop
- .global file1text1
-file1text1:
- nop
- movi file1text1 & 65535,r10
- .global file1text2
-file1text2:
- movi (datalabel file1data2) & 65535,r20
- .global file1text3
-file1text3:
- movi file2text3 & 65535,r20
- .global file1text4
-file1text4:
- movi file2data4 & 65535,r20
- .global file1text5
-file1text5:
- movi unresolved1 & 65535,r40
- .global b1
-b1:
- movi unresolved6 & 65535,r30
- .global b2
-b2:
- movi (datalabel file1text1) & 65535,r10
- .global b3
-b3:
- movi (datalabel file1text1 + 24) & 65535,r10
- .global b4
-b4:
- movi (datalabel file1text5 + 8) & 65535, r40
- .global b12
-b12:
- movi (datalabel file1data2 + 48) & 65535,r20
- .global b13
-b13:
- movi file1data2 & 65535,r20
- .global b23
-b23:
- movi (datalabel file2data4 + 16),r50
- .global b123
-b123:
- movi (datalabel unresolved7) & 65535,r60
- .global oc1
-oc1:
- movi (datalabel unresolved1) & 65535,r60
- .global oc2
-oc2:
- nop
- .global oc3
-oc3:
- nop
- .global oc4
-oc4:
- nop
- .global oc12
-oc12:
- nop
- .global oc13
-oc13:
- nop
- .global oc23
-oc23:
- nop
- .global oc123
-oc123:
- nop
-
- .data
- .long 0
- .global file1data1
-file1data1:
- .long 0
- .long datalabel file1data1 + 8
- .global file1data2
-file1data2:
- .long file1text2
- .global file1data3
-file1data3:
- .long file2data3
- .global file1data4
-file1data4:
- .long file2text4
- .global file1data5
-file1data5:
- .long unresolved2
- .long unresolved5
- .long datalabel unresolved6 + 40
- .long unresolved9
-
- .long datalabel a1
- .long a23
- .long b123
- .long c3
- .long c13
- .long datalabel a2
- .long datalabel a3
- .long datalabel a4
- .long datalabel a12
- .long datalabel a13
- .long datalabel a23
- .long datalabel a123
- .long datalabel b1
- .long datalabel b2
- .long a3
- .long a13
- .long datalabel b3
- .long datalabel b4
- .long datalabel b12
- .long datalabel b13
- .long a123
- .long b3
- .long b13
- .long b23
- .long datalabel b23
- .long datalabel b123
- .long datalabel c1
- .long datalabel c2
- .long datalabel c3
- .long c23
- .long c123
- .long datalabel c4
- .long datalabel c12
- .long datalabel c13
- .long datalabel c23
- .long datalabel c123
-
-
- .long datalabel oa1
- .long datalabel ob1
- .long ob123
- .long datalabel oc1
- .long oa2
- .long ob2
- .long oc2
- .long oa12
- .long datalabel oa12
- .long datalabel ob12
- .long ob12
- .long datalabel oc12
- .long oc12
- .long oa23
- .long datalabel oa13
- .long oc123
- .long datalabel ob13
- .long datalabel oc13
- .long ob23
- .long oc23
- .long oa123
- .long datalabel oa123
- .long datalabel ob123
- .long datalabel oc123
diff --git a/ld/testsuite/ld-sh/sh64/reldl-2.s b/ld/testsuite/ld-sh/sh64/reldl-2.s
deleted file mode 100644
index d632021..0000000
--- a/ld/testsuite/ld-sh/sh64/reldl-2.s
+++ /dev/null
@@ -1,156 +0,0 @@
-! Relative linking with datalabel use, second file. Much like rel-2.s
-
- .mode SHmedia
- .text
- .global start2
-start2:
- nop
- .global file2text1
-file2text1:
- nop
- movi file2text1 & 65535,r10
- .global file2text2
-file2text2:
- movi file2data2 & 65535,r20
- .global file2text3
-file2text3:
- movi file1text3 & 65535,r20
- .global file2text4
-file2text4:
- movi file1data4 & 65535,r20
- movi unresolved1 & 65535,r30
- movi unresolved3 & 65535,r30
- movi datalabel unresolved8 & 65535,r50
- movi datalabel unresolved9 & 65535,r50
- movi datalabel file1text1 & 65535,r40
- movi datalabel file1data2 & 65535,r40
- movi datalabel file1data3 & 65535,r40
- .global c1
-c1:
- nop
- .global c2
-c2:
- nop
- .global c3
-c3:
- nop
- .global c4
-c4:
- nop
- .global c12
-c12:
- nop
- .global c13
-c13:
- nop
- .global c23
-c23:
- nop
- .global c123
-c123:
- nop
-
- .global ob1
-ob1:
- nop
- .global ob2
-ob2:
- nop
- .global ob3
-ob3:
- nop
- .global ob4
-ob4:
- nop
- .global ob12
-ob12:
- nop
- .global ob13
-ob13:
- nop
- .global ob23
-ob23:
- nop
- .global ob123
-ob123:
- nop
-
- .data
- .long 0
- .global file2data1
-file2data1:
- .long 0
- .long file2data1
- .global file2data2
-file2data2:
- .long file2text2
- .global file2data3
-file2data3:
- .long file1data3
- .global file2data4
-file2data4:
- .long file1text4
- .long unresolved2
- .long unresolved4
-
- .long datalabel oa1
- .long datalabel oa2
- .long datalabel oa3
- .long oa13
- .long oc13
- .long datalabel oa4
- .long datalabel oa12
- .long datalabel oa13
- .long datalabel oa23
- .long oa23
- .long oa123
- .long oc3
- .long datalabel oa123
- .long datalabel ob1
- .long datalabel ob2
- .long datalabel ob3
- .long datalabel ob4
- .long oa3
- .long oc23
- .long oc123
- .long datalabel ob12
- .long datalabel ob13
- .long ob13
- .long ob23
- .long datalabel ob23
- .long datalabel ob123
- .long datalabel oc1
- .long ob3
- .long ob123
- .long datalabel oc2
- .long datalabel oc3
- .long datalabel oc4
- .long datalabel oc12
- .long datalabel oc13
- .long datalabel oc23
- .long datalabel oc123
-
- .long datalabel a1
- .long c2
- .long b23
- .long datalabel b1
- .long datalabel c1
- .long datalabel a12
- .long a2
- .long b2
- .long datalabel b12
- .long datalabel c12
- .long b123
- .long c123
- .long datalabel a13
- .long datalabel b13
- .long c23
- .long a123
- .long datalabel c13
- .long datalabel a123
- .long c12
- .long a23
- .long datalabel b123
- .long a12
- .long b12
- .long datalabel c123
diff --git a/ld/testsuite/ld-sh/sh64/reldl32.rd b/ld/testsuite/ld-sh/sh64/reldl32.rd
deleted file mode 100644
index a276d7c..0000000
--- a/ld/testsuite/ld-sh/sh64/reldl32.rd
+++ /dev/null
@@ -1,358 +0,0 @@
-
-Relocation section '\.rela\.text' at offset 0x[0-9a-f]+ contains 26 entries:
-.*
-00000008 +0+5bf6 R_SH_IMM_LOW16 +00000004 +file1text1 +\+ 0
-0000000c +0+2df6 R_SH_IMM_LOW16 +0000000c +file1data2 +\+ 0
-00000010 +0+30f6 R_SH_IMM_LOW16 +00000070 +file2text3 +\+ 0
-00000014 +0+0ff6 R_SH_IMM_LOW16 +0000012c +file2data4 +\+ 0
-00000018 +0+4cf6 R_SH_IMM_LOW16 +00000000 +unresolved1 +\+ 0
-0000001c +0+51f6 R_SH_IMM_LOW16 +00000000 +unresolved6 +\+ 0
-00000020 +0+5df6 R_SH_IMM_LOW16 +00000000 +file1text1 +\+ 0
-00000024 +0+5df6 R_SH_IMM_LOW16 +00000000 +file1text1 +\+ 18
-00000028 +0+21f6 R_SH_IMM_LOW16 +00000000 +file1text5 +\+ 8
-0000002c +0+2df6 R_SH_IMM_LOW16 +0000000c +file1data2 +\+ 30
-00000030 +0+2df6 R_SH_IMM_LOW16 +0000000c +file1data2 +\+ 0
-00000034 +0+35f8 R_SH_IMM_MEDLOW16 +00000000 +file2data4 +\+ 10
-00000038 +0+35f6 R_SH_IMM_LOW16 +00000000 +file2data4 +\+ 10
-0000003c +0+42f6 R_SH_IMM_LOW16 +00000000 +unresolved7 +\+ 0
-00000040 +0+27f6 R_SH_IMM_LOW16 +00000000 +unresolved1 +\+ 0
-00000068 +0+08f6 R_SH_IMM_LOW16 +00000064 +file2text1 +\+ 0
-0000006c +0+24f6 R_SH_IMM_LOW16 +00000124 +file2data2 +\+ 0
-00000070 +0+23f6 R_SH_IMM_LOW16 +00000010 +file1text3 +\+ 0
-00000074 +0+81f6 R_SH_IMM_LOW16 +00000014 +file1data4 +\+ 0
-00000078 +0+4cf6 R_SH_IMM_LOW16 +00000000 +unresolved1 +\+ 0
-0000007c +0+64f6 R_SH_IMM_LOW16 +00000000 +unresolved3 +\+ 0
-00000080 +0+85f6 R_SH_IMM_LOW16 +00000000 +unresolved8 +\+ 0
-00000084 +0+32f6 R_SH_IMM_LOW16 +00000000 +unresolved9 +\+ 0
-00000088 +0+5df6 R_SH_IMM_LOW16 +00000000 +file1text1 +\+ 0
-0000008c +0+4bf6 R_SH_IMM_LOW16 +00000000 +file1data2 +\+ 0
-00000090 +0+28f6 R_SH_IMM_LOW16 +00000000 +file1data3 +\+ 0
-
-Relocation section '\.rela\.data' at offset 0x[0-9a-f]+ contains 134 entries:
-.*
-00000008 +0+0b01 R_SH_DIR32 +00000004 +file1data1 +\+ 0
-0000000c +0+0701 R_SH_DIR32 +0000000c +file1text2 +\+ 0
-00000010 +0+7801 R_SH_DIR32 +00000128 +file2data3 +\+ 0
-00000014 +0+6701 R_SH_DIR32 +00000074 +file2text4 +\+ 0
-00000018 +0+7401 R_SH_DIR32 +00000000 +unresolved2 +\+ 0
-0000001c +0+0501 R_SH_DIR32 +00000000 +unresolved5 +\+ 0
-00000020 +0+6c01 R_SH_DIR32 +00000000 +unresolved6 +\+ 0
-00000024 +0+0601 R_SH_DIR32 +00000000 +unresolved9 +\+ 0
-00000028 +0+7a01 R_SH_DIR32 +00000000 +a1 +\+ 0
-0000002c +0+7001 R_SH_DIR32 +00000000 +a23 +\+ 0
-00000030 +0+5401 R_SH_DIR32 +0000003c +b123 +\+ 0
-00000034 +0+6a01 R_SH_DIR32 +0000009c +c3 +\+ 0
-00000038 +0+3c01 R_SH_DIR32 +000000a8 +c13 +\+ 0
-0000003c +0+2601 R_SH_DIR32 +00000000 +a2 +\+ 0
-00000040 +0+4e01 R_SH_DIR32 +00000000 +a3 +\+ 0
-00000044 +0+2501 R_SH_DIR32 +00000000 +a4 +\+ 0
-00000048 +0+6901 R_SH_DIR32 +00000000 +a12 +\+ 0
-0000004c +0+1501 R_SH_DIR32 +00000000 +a13 +\+ 0
-00000050 +0+7601 R_SH_DIR32 +00000000 +a23 +\+ 0
-00000054 +0+6201 R_SH_DIR32 +00000000 +a123 +\+ 0
-00000058 +0+3d01 R_SH_DIR32 +00000000 +b1 +\+ 0
-0000005c +0+7101 R_SH_DIR32 +00000000 +b2 +\+ 0
-00000060 +0+2f01 R_SH_DIR32 +00000000 +a3 +\+ 0
-00000064 +0+7f01 R_SH_DIR32 +00000000 +a13 +\+ 0
-00000068 +0+2e01 R_SH_DIR32 +00000000 +b3 +\+ 0
-0000006c +0+6801 R_SH_DIR32 +00000000 +b4 +\+ 0
-00000070 +0+5201 R_SH_DIR32 +00000000 +b12 +\+ 0
-00000074 +0+2901 R_SH_DIR32 +00000000 +b13 +\+ 0
-00000078 +0+3e01 R_SH_DIR32 +00000000 +a123 +\+ 0
-0000007c +0+6501 R_SH_DIR32 +00000024 +b3 +\+ 0
-00000080 +0+3b01 R_SH_DIR32 +00000030 +b13 +\+ 0
-00000084 +0+6f01 R_SH_DIR32 +00000034 +b23 +\+ 0
-00000088 +0+7d01 R_SH_DIR32 +00000000 +b23 +\+ 0
-0000008c +0+0c01 R_SH_DIR32 +00000000 +b123 +\+ 0
-00000090 +0+8301 R_SH_DIR32 +00000000 +c1 +\+ 0
-00000094 +0+2c01 R_SH_DIR32 +00000000 +c2 +\+ 0
-00000098 +0+6301 R_SH_DIR32 +00000000 +c3 +\+ 0
-0000009c +0+3901 R_SH_DIR32 +000000ac +c23 +\+ 0
-000000a0 +0+7e01 R_SH_DIR32 +000000b0 +c123 +\+ 0
-000000a4 +0+0e01 R_SH_DIR32 +00000000 +c4 +\+ 0
-000000a8 +0+2001 R_SH_DIR32 +00000000 +c12 +\+ 0
-000000ac +0+3101 R_SH_DIR32 +00000000 +c13 +\+ 0
-000000b0 +0+3601 R_SH_DIR32 +00000000 +c23 +\+ 0
-000000b4 +0+3a01 R_SH_DIR32 +00000000 +c123 +\+ 0
-000000b8 +0+4801 R_SH_DIR32 +00000000 +oa1 +\+ 0
-000000bc +0+1401 R_SH_DIR32 +00000000 +ob1 +\+ 0
-000000c0 +0+4401 R_SH_DIR32 +000000d0 +ob123 +\+ 0
-000000c4 +0+5901 R_SH_DIR32 +00000000 +oc1 +\+ 0
-000000c8 +0+7901 R_SH_DIR32 +00000000 +oa2 +\+ 0
-000000cc +0+6101 R_SH_DIR32 +000000b8 +ob2 +\+ 0
-000000d0 +0+7201 R_SH_DIR32 +00000044 +oc2 +\+ 0
-000000d4 +0+4901 R_SH_DIR32 +00000000 +oa12 +\+ 0
-000000d8 +0+1b01 R_SH_DIR32 +00000000 +oa12 +\+ 0
-000000dc +0+6001 R_SH_DIR32 +00000000 +ob12 +\+ 0
-000000e0 +0+4a01 R_SH_DIR32 +000000c4 +ob12 +\+ 0
-000000e4 +0+5a01 R_SH_DIR32 +00000000 +oc12 +\+ 0
-000000e8 +0+1201 R_SH_DIR32 +00000050 +oc12 +\+ 0
-000000ec +0+3f01 R_SH_DIR32 +00000000 +oa23 +\+ 0
-000000f0 +0+4501 R_SH_DIR32 +00000000 +oa13 +\+ 0
-000000f4 +0+0a01 R_SH_DIR32 +0000005c +oc123 +\+ 0
-000000f8 +0+5501 R_SH_DIR32 +00000000 +ob13 +\+ 0
-000000fc +0+5c01 R_SH_DIR32 +00000000 +oc13 +\+ 0
-00000100 +0+8201 R_SH_DIR32 +000000cc +ob23 +\+ 0
-00000104 +0+2b01 R_SH_DIR32 +00000058 +oc23 +\+ 0
-00000108 +0+5701 R_SH_DIR32 +00000000 +oa123 +\+ 0
-0000010c +0+5001 R_SH_DIR32 +00000000 +oa123 +\+ 0
-00000110 +0+6601 R_SH_DIR32 +00000000 +ob123 +\+ 0
-00000114 +0+3301 R_SH_DIR32 +00000000 +oc123 +\+ 0
-00000120 +0+7c01 R_SH_DIR32 +0000011c +file2data1 +\+ 0
-00000124 +0+5e01 R_SH_DIR32 +0000006c +file2text2 +\+ 0
-00000128 +0+8001 R_SH_DIR32 +00000010 +file1data3 +\+ 0
-0000012c +0+7701 R_SH_DIR32 +00000014 +file1text4 +\+ 0
-00000130 +0+7401 R_SH_DIR32 +00000000 +unresolved2 +\+ 0
-00000134 +0+7b01 R_SH_DIR32 +00000000 +unresolved4 +\+ 0
-00000138 +0+4801 R_SH_DIR32 +00000000 +oa1 +\+ 0
-0000013c +0+1701 R_SH_DIR32 +00000000 +oa2 +\+ 0
-00000140 +0+6d01 R_SH_DIR32 +00000000 +oa3 +\+ 0
-00000144 +0+1c01 R_SH_DIR32 +00000000 +oa13 +\+ 0
-00000148 +0+1901 R_SH_DIR32 +00000054 +oc13 +\+ 0
-0000014c +0+1001 R_SH_DIR32 +00000000 +oa4 +\+ 0
-00000150 +0+1b01 R_SH_DIR32 +00000000 +oa12 +\+ 0
-00000154 +0+4501 R_SH_DIR32 +00000000 +oa13 +\+ 0
-00000158 +0+3801 R_SH_DIR32 +00000000 +oa23 +\+ 0
-0000015c +0+3f01 R_SH_DIR32 +00000000 +oa23 +\+ 0
-00000160 +0+5701 R_SH_DIR32 +00000000 +oa123 +\+ 0
-00000164 +0+1601 R_SH_DIR32 +00000048 +oc3 +\+ 0
-00000168 +0+5001 R_SH_DIR32 +00000000 +oa123 +\+ 0
-0000016c +0+1401 R_SH_DIR32 +00000000 +ob1 +\+ 0
-00000170 +0+2201 R_SH_DIR32 +00000000 +ob2 +\+ 0
-00000174 +0+5f01 R_SH_DIR32 +00000000 +ob3 +\+ 0
-00000178 +0+1301 R_SH_DIR32 +00000000 +ob4 +\+ 0
-0000017c +0+8401 R_SH_DIR32 +00000000 +oa3 +\+ 0
-00000180 +0+2b01 R_SH_DIR32 +00000058 +oc23 +\+ 0
-00000184 +0+0a01 R_SH_DIR32 +0000005c +oc123 +\+ 0
-00000188 +0+6001 R_SH_DIR32 +00000000 +ob12 +\+ 0
-0000018c +0+5501 R_SH_DIR32 +00000000 +ob13 +\+ 0
-00000190 +0+4d01 R_SH_DIR32 +000000c8 +ob13 +\+ 0
-00000194 +0+8201 R_SH_DIR32 +000000cc +ob23 +\+ 0
-00000198 +0+5801 R_SH_DIR32 +00000000 +ob23 +\+ 0
-0000019c +0+6601 R_SH_DIR32 +00000000 +ob123 +\+ 0
-000001a0 +0+5901 R_SH_DIR32 +00000000 +oc1 +\+ 0
-000001a4 +0+1101 R_SH_DIR32 +000000bc +ob3 +\+ 0
-000001a8 +0+4401 R_SH_DIR32 +000000d0 +ob123 +\+ 0
-000001ac +0+0901 R_SH_DIR32 +00000000 +oc2 +\+ 0
-000001b0 +0+3701 R_SH_DIR32 +00000000 +oc3 +\+ 0
-000001b4 +0+5301 R_SH_DIR32 +00000000 +oc4 +\+ 0
-000001b8 +0+5a01 R_SH_DIR32 +00000000 +oc12 +\+ 0
-000001bc +0+5c01 R_SH_DIR32 +00000000 +oc13 +\+ 0
-000001c0 +0+2a01 R_SH_DIR32 +00000000 +oc23 +\+ 0
-000001c4 +0+3301 R_SH_DIR32 +00000000 +oc123 +\+ 0
-000001c8 +0+7a01 R_SH_DIR32 +00000000 +a1 +\+ 0
-000001cc +0+1a01 R_SH_DIR32 +00000098 +c2 +\+ 0
-000001d0 +0+6f01 R_SH_DIR32 +00000034 +b23 +\+ 0
-000001d4 +0+3d01 R_SH_DIR32 +00000000 +b1 +\+ 0
-000001d8 +0+8301 R_SH_DIR32 +00000000 +c1 +\+ 0
-000001dc +0+6901 R_SH_DIR32 +00000000 +a12 +\+ 0
-000001e0 +0+5601 R_SH_DIR32 +00000000 +a2 +\+ 0
-000001e4 +0+0d01 R_SH_DIR32 +00000020 +b2 +\+ 0
-000001e8 +0+5201 R_SH_DIR32 +00000000 +b12 +\+ 0
-000001ec +0+2001 R_SH_DIR32 +00000000 +c12 +\+ 0
-000001f0 +0+5401 R_SH_DIR32 +0000003c +b123 +\+ 0
-000001f4 +0+7e01 R_SH_DIR32 +000000b0 +c123 +\+ 0
-000001f8 +0+1501 R_SH_DIR32 +00000000 +a13 +\+ 0
-000001fc +0+2901 R_SH_DIR32 +00000000 +b13 +\+ 0
-00000200 +0+3901 R_SH_DIR32 +000000ac +c23 +\+ 0
-00000204 +0+3e01 R_SH_DIR32 +00000000 +a123 +\+ 0
-00000208 +0+3101 R_SH_DIR32 +00000000 +c13 +\+ 0
-0000020c +0+6201 R_SH_DIR32 +00000000 +a123 +\+ 0
-00000210 +0+6e01 R_SH_DIR32 +000000a4 +c12 +\+ 0
-00000214 +0+7001 R_SH_DIR32 +00000000 +a23 +\+ 0
-00000218 +0+0c01 R_SH_DIR32 +00000000 +b123 +\+ 0
-0000021c +0+4001 R_SH_DIR32 +00000000 +a12 +\+ 0
-00000220 +0+7301 R_SH_DIR32 +0000002c +b12 +\+ 0
-00000224 +0+3a01 R_SH_DIR32 +00000000 +c123 +\+ 0
-
-Symbol table '\.symtab' contains 134 entries:
- +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
- +0: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND
- +1: 00000000 +0 +SECTION +LOCAL +DEFAULT +1
- +2: 00000000 +0 +SECTION +LOCAL +DEFAULT +3
- +3: 00000000 +0 +SECTION +LOCAL +DEFAULT +5
- +4: 00000000 +0 +SECTION +LOCAL +DEFAULT +6
- +5: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved5
- +6: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved9
- +7: 0000000c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file1text2
- +8: 00000064 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file2text1
- +9: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc2
- +10: 0000005c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc123
- +11: 00000004 +0 +NOTYPE +GLOBAL +DEFAULT +3 file1data1
- +12: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b123
- +13: 00000020 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b2
- +14: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c4
- +15: 0000012c +0 +NOTYPE +GLOBAL +DEFAULT +3 file2data4
- +16: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa4
- +17: 000000bc +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob3
- +18: 00000050 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc12
- +19: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob4
- +20: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob1
- +21: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a13
- +22: 00000048 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc3
- +23: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa2
- +24: 000000a0 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c4
- +25: 00000054 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc13
- +26: 00000098 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c2
- +27: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa12
- +28: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa13
- +29: 000000c0 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob4
- +30: 0000001c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b1
- +31: 00000018 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file1text5
- +32: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c12
- +33: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND file1text5
- +34: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob2
- +35: 00000010 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file1text3
- +36: 00000124 +0 +NOTYPE +GLOBAL +DEFAULT +3 file2data2
- +37: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a4
- +38: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a2
- +39: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND unresolved1
- +40: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND file1data3
- +41: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b13
- +42: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc23
- +43: 00000058 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc23
- +44: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c2
- +45: 0000000c +0 +NOTYPE +GLOBAL +DEFAULT +3 file1data2
- +46: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b3
- +47: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a3
- +48: 00000070 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file2text3
- +49: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c13
- +50: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND unresolved9
- +51: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc123
- +52: 00000028 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b4
- +53: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND file2data4
- +54: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c23
- +55: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc3
- +56: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa23
- +57: 000000ac +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c23
- +58: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c123
- +59: 00000030 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b13
- +60: 000000a8 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c13
- +61: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b1
- +62: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a123
- +63: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa23
- +64: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a12
- +65: 000000b4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob1
- +66: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND unresolved7
- +67: 00000060 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 start2
- +68: 000000d0 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob123
- +69: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa13
- +70: 00000094 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c1
- +71: 0000004c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc4
- +72: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa1
- +73: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa12
- +74: 000000c4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob12
- +75: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND file1data2
- +76: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved1
- +77: 000000c8 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob13
- +78: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a3
- +79: 00000018 +0 +NOTYPE +GLOBAL +DEFAULT +3 file1data5
- +80: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa123
- +81: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved6
- +82: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b12
- +83: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc4
- +84: 0000003c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b123
- +85: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob13
- +86: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a2
- +87: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa123
- +88: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob23
- +89: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc1
- +90: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc12
- +91: 00000004 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file1text1
- +92: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc13
- +93: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND file1text1
- +94: 0000006c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file2text2
- +95: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob3
- +96: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob12
- +97: 000000b8 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob2
- +98: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a123
- +99: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c3
- +100: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved3
- +101: 00000024 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b3
- +102: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob123
- +103: 00000074 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file2text4
- +104: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b4
- +105: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a12
- +106: 0000009c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c3
- +107: 00000040 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc1
- +108: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND unresolved6
- +109: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa3
- +110: 000000a4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c12
- +111: 00000034 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b23
- +112: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a23
- +113: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b2
- +114: 00000044 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc2
- +115: 0000002c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b12
- +116: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved2
- +117: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 start
- +118: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a23
- +119: 00000014 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file1text4
- +120: 00000128 +0 +NOTYPE +GLOBAL +DEFAULT +3 file2data3
- +121: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa2
- +122: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a1
- +123: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved4
- +124: 0000011c +0 +NOTYPE +GLOBAL +DEFAULT +3 file2data1
- +125: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b23
- +126: 000000b0 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c123
- +127: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a13
- +128: 00000010 +0 +NOTYPE +GLOBAL +DEFAULT +3 file1data3
- +129: 00000014 +0 +NOTYPE +GLOBAL +DEFAULT +3 file1data4
- +130: 000000cc +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob23
- +131: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c1
- +132: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa3
- +133: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND unresolved8
-
-Hex dump of section '\.text':
-.*
- 0x00000000 6ff0fff0 6ff0fff0 cc0000a0 cc000140 .*
- 0x00000010 cc000140 cc000140 cc000280 cc0001e0 .*
- 0x00000020 cc0000a0 cc0000a0 cc000280 cc000140 .*
- 0x00000030 cc000140 cc000320 c8000320 cc0003c0 .*
- 0x00000040 cc0003c0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00000050 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00000060 6ff0fff0 6ff0fff0 cc0000a0 cc000140 .*
- 0x00000070 cc000140 cc000140 cc0001e0 cc0001e0 .*
- 0x00000080 cc000320 cc000320 cc000280 cc000280 .*
- 0x00000090 cc000280 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x000000a0 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x000000b0 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x000000c0 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x000000d0 6ff0fff0 .*
-
-Hex dump of section '\.data':
-.*
- 0x00000000 00000000 00000000 00000008 00000000 .*
- 0x00000010 00000000 00000000 00000000 00000000 .*
- 0x00000020 00000028 00000000 00000000 00000000 .*
- 0x00000030 00000000 00000000 00000000 00000000 .*
- 0x00000040 00000000 00000000 00000000 00000000 .*
- 0x00000050 00000000 00000000 00000000 00000000 .*
- 0x00000060 00000000 00000000 00000000 00000000 .*
- 0x00000070 00000000 00000000 00000000 00000000 .*
- 0x00000080 00000000 00000000 00000000 00000000 .*
- 0x00000090 00000000 00000000 00000000 00000000 .*
- 0x000000a0 00000000 00000000 00000000 00000000 .*
- 0x000000b0 00000000 00000000 00000000 00000000 .*
- 0x000000c0 00000000 00000000 00000000 00000000 .*
- 0x000000d0 00000000 00000000 00000000 00000000 .*
- 0x000000e0 00000000 00000000 00000000 00000000 .*
- 0x000000f0 00000000 00000000 00000000 00000000 .*
- 0x00000100 00000000 00000000 00000000 00000000 .*
- 0x00000110 00000000 00000000 00000000 00000000 .*
- 0x00000120 00000000 00000000 00000000 00000000 .*
- 0x00000130 00000000 00000000 00000000 00000000 .*
- 0x00000140 00000000 00000000 00000000 00000000 .*
- 0x00000150 00000000 00000000 00000000 00000000 .*
- 0x00000160 00000000 00000000 00000000 00000000 .*
- 0x00000170 00000000 00000000 00000000 00000000 .*
- 0x00000180 00000000 00000000 00000000 00000000 .*
- 0x00000190 00000000 00000000 00000000 00000000 .*
- 0x000001a0 00000000 00000000 00000000 00000000 .*
- 0x000001b0 00000000 00000000 00000000 00000000 .*
- 0x000001c0 00000000 00000000 00000000 00000000 .*
- 0x000001d0 00000000 00000000 00000000 00000000 .*
- 0x000001e0 00000000 00000000 00000000 00000000 .*
- 0x000001f0 00000000 00000000 00000000 00000000 .*
- 0x00000200 00000000 00000000 00000000 00000000 .*
- 0x00000210 00000000 00000000 00000000 00000000 .*
- 0x00000220 00000000 00000000 .*
diff --git a/ld/testsuite/ld-sh/sh64/reldl64.rd b/ld/testsuite/ld-sh/sh64/reldl64.rd
deleted file mode 100644
index 71b984c..0000000
--- a/ld/testsuite/ld-sh/sh64/reldl64.rd
+++ /dev/null
@@ -1,360 +0,0 @@
-
-Relocation section '\.rela\.text' at offset 0x[0-9a-f]+ contains 28 entries:
-.*
-0+8 +0+5b000000f6 R_SH_IMM_LOW16[ ]+0+4 +file1text1[ ]+\+ 0
-0+c +0+2d000000f6 R_SH_IMM_LOW16[ ]+0+c +file1data2[ ]+\+ 0
-0+10 +0+30000000f6 R_SH_IMM_LOW16[ ]+0+78 +file2text3[ ]+\+ 0
-0+14 +0+0f000000f6 R_SH_IMM_LOW16[ ]+0+12c +file2data4[ ]+\+ 0
-0+18 +0+4c000000f6 R_SH_IMM_LOW16[ ]+0+ +unresolved1[ ]+\+ 0
-0+1c +0+51000000f6 R_SH_IMM_LOW16[ ]+0+ +unresolved6[ ]+\+ 0
-0+20 +0+5d000000f6 R_SH_IMM_LOW16[ ]+0+ +file1text1[ ]+\+ 0
-0+24 +0+5d000000f6 R_SH_IMM_LOW16[ ]+0+ +file1text1[ ]+\+ 18
-0+28 +0+21000000f6 R_SH_IMM_LOW16[ ]+0+ +file1text5[ ]+\+ 8
-0+2c +0+2d000000f6 R_SH_IMM_LOW16[ ]+0+c +file1data2[ ]+\+ 30
-0+30 +0+2d000000f6 R_SH_IMM_LOW16[ ]+0+c +file1data2[ ]+\+ 0
-0+34 +0+35000000fc R_SH_IMM_HI16[ ]+0+ +file2data4[ ]+\+ 10
-0+38 +0+35000000fa R_SH_IMM_MEDHI16[ ]+0+ +file2data4[ ]+\+ 10
-0+3c +0+35000000f8 R_SH_IMM_MEDLOW16[ ]+0+ +file2data4[ ]+\+ 10
-0+40 +0+35000000f6 R_SH_IMM_LOW16[ ]+0+ +file2data4[ ]+\+ 10
-0+44 +0+42000000f6 R_SH_IMM_LOW16[ ]+0+ +unresolved7[ ]+\+ 0
-0+48 +0+27000000f6 R_SH_IMM_LOW16[ ]+0+ +unresolved1[ ]+\+ 0
-0+70 +0+08000000f6 R_SH_IMM_LOW16[ ]+0+6c +file2text1[ ]+\+ 0
-0+74 +0+24000000f6 R_SH_IMM_LOW16[ ]+0+124 +file2data2[ ]+\+ 0
-0+78 +0+23000000f6 R_SH_IMM_LOW16[ ]+0+10 +file1text3[ ]+\+ 0
-0+7c +0+81000000f6 R_SH_IMM_LOW16[ ]+0+14 +file1data4[ ]+\+ 0
-0+80 +0+4c000000f6 R_SH_IMM_LOW16[ ]+0+ +unresolved1[ ]+\+ 0
-0+84 +0+64000000f6 R_SH_IMM_LOW16[ ]+0+ +unresolved3[ ]+\+ 0
-0+88 +0+85000000f6 R_SH_IMM_LOW16[ ]+0+ +unresolved8[ ]+\+ 0
-0+8c +0+32000000f6 R_SH_IMM_LOW16[ ]+0+ +unresolved9[ ]+\+ 0
-0+90 +0+5d000000f6 R_SH_IMM_LOW16[ ]+0+ +file1text1[ ]+\+ 0
-0+94 +0+4b000000f6 R_SH_IMM_LOW16[ ]+0+ +file1data2[ ]+\+ 0
-0+98 +0+28000000f6 R_SH_IMM_LOW16[ ]+0+ +file1data3[ ]+\+ 0
-
-Relocation section '\.rela\.data' at offset 0x[0-9a-f]+ contains 134 entries:
-.*
-0+8 +0+0b00000001 R_SH_DIR32[ ]+0+4 +file1data1[ ]+\+ 0
-0+c +0+700000001 R_SH_DIR32[ ]+0+c +file1text2[ ]+\+ 0
-0+10 +0+7800000001 R_SH_DIR32[ ]+0+128 +file2data3[ ]+\+ 0
-0+14 +0+6700000001 R_SH_DIR32[ ]+0+7c +file2text4[ ]+\+ 0
-0+18 +0+7400000001 R_SH_DIR32[ ]+0+ +unresolved2[ ]+\+ 0
-0+1c +0+0500000001 R_SH_DIR32[ ]+0+ +unresolved5[ ]+\+ 0
-0+20 +0+6c00000001 R_SH_DIR32[ ]+0+ +unresolved6[ ]+\+ 0
-0+24 +0+0600000001 R_SH_DIR32[ ]+0+ +unresolved9[ ]+\+ 0
-0+28 +0+7a00000001 R_SH_DIR32[ ]+0+ +a1[ ]+\+ 0
-0+2c +0+7000000001 R_SH_DIR32[ ]+0+ +a23[ ]+\+ 0
-0+30 +0+5400000001 R_SH_DIR32[ ]+0+44 +b123[ ]+\+ 0
-0+34 +0+6a00000001 R_SH_DIR32[ ]+0+a4 +c3[ ]+\+ 0
-0+38 +0+3c00000001 R_SH_DIR32[ ]+0+b0 +c13[ ]+\+ 0
-0+3c +0+2600000001 R_SH_DIR32[ ]+0+ +a2[ ]+\+ 0
-0+40 +0+4e00000001 R_SH_DIR32[ ]+0+ +a3[ ]+\+ 0
-0+44 +0+2500000001 R_SH_DIR32[ ]+0+ +a4[ ]+\+ 0
-0+48 +0+6900000001 R_SH_DIR32[ ]+0+ +a12[ ]+\+ 0
-0+4c +0+1500000001 R_SH_DIR32[ ]+0+ +a13[ ]+\+ 0
-0+50 +0+7600000001 R_SH_DIR32[ ]+0+ +a23[ ]+\+ 0
-0+54 +0+6200000001 R_SH_DIR32[ ]+0+ +a123[ ]+\+ 0
-0+58 +0+3d00000001 R_SH_DIR32[ ]+0+ +b1[ ]+\+ 0
-0+5c +0+7100000001 R_SH_DIR32[ ]+0+ +b2[ ]+\+ 0
-0+60 +0+2f00000001 R_SH_DIR32[ ]+0+ +a3[ ]+\+ 0
-0+64 +0+7f00000001 R_SH_DIR32[ ]+0+ +a13[ ]+\+ 0
-0+68 +0+2e00000001 R_SH_DIR32[ ]+0+ +b3[ ]+\+ 0
-0+6c +0+6800000001 R_SH_DIR32[ ]+0+ +b4[ ]+\+ 0
-0+70 +0+5200000001 R_SH_DIR32[ ]+0+ +b12[ ]+\+ 0
-0+74 +0+2900000001 R_SH_DIR32[ ]+0+ +b13[ ]+\+ 0
-0+78 +0+3e00000001 R_SH_DIR32[ ]+0+ +a123[ ]+\+ 0
-0+7c +0+6500000001 R_SH_DIR32[ ]+0+24 +b3[ ]+\+ 0
-0+80 +0+3b00000001 R_SH_DIR32[ ]+0+30 +b13[ ]+\+ 0
-0+84 +0+6f00000001 R_SH_DIR32[ ]+0+34 +b23[ ]+\+ 0
-0+88 +0+7d00000001 R_SH_DIR32[ ]+0+ +b23[ ]+\+ 0
-0+8c +0+0c00000001 R_SH_DIR32[ ]+0+ +b123[ ]+\+ 0
-0+90 +0+8300000001 R_SH_DIR32[ ]+0+ +c1[ ]+\+ 0
-0+94 +0+2c00000001 R_SH_DIR32[ ]+0+ +c2[ ]+\+ 0
-0+98 +0+6300000001 R_SH_DIR32[ ]+0+ +c3[ ]+\+ 0
-0+9c +0+3900000001 R_SH_DIR32[ ]+0+b4 +c23[ ]+\+ 0
-0+a0 +0+7e00000001 R_SH_DIR32[ ]+0+b8 +c123[ ]+\+ 0
-0+a4 +0+0e00000001 R_SH_DIR32[ ]+0+ +c4[ ]+\+ 0
-0+a8 +0+2000000001 R_SH_DIR32[ ]+0+ +c12[ ]+\+ 0
-0+ac +0+3100000001 R_SH_DIR32[ ]+0+ +c13[ ]+\+ 0
-0+b0 +0+3600000001 R_SH_DIR32[ ]+0+ +c23[ ]+\+ 0
-0+b4 +0+3a00000001 R_SH_DIR32[ ]+0+ +c123[ ]+\+ 0
-0+b8 +0+4800000001 R_SH_DIR32[ ]+0+ +oa1[ ]+\+ 0
-0+bc +0+1400000001 R_SH_DIR32[ ]+0+ +ob1[ ]+\+ 0
-0+c0 +0+4400000001 R_SH_DIR32[ ]+0+d8 +ob123[ ]+\+ 0
-0+c4 +0+5900000001 R_SH_DIR32[ ]+0+ +oc1[ ]+\+ 0
-0+c8 +0+7900000001 R_SH_DIR32[ ]+0+ +oa2[ ]+\+ 0
-0+cc +0+6100000001 R_SH_DIR32[ ]+0+c0 +ob2[ ]+\+ 0
-0+d0 +0+7200000001 R_SH_DIR32[ ]+0+4c +oc2[ ]+\+ 0
-0+d4 +0+4900000001 R_SH_DIR32[ ]+0+ +oa12[ ]+\+ 0
-0+d8 +0+1b00000001 R_SH_DIR32[ ]+0+ +oa12[ ]+\+ 0
-0+dc +0+6000000001 R_SH_DIR32[ ]+0+ +ob12[ ]+\+ 0
-0+e0 +0+4a00000001 R_SH_DIR32[ ]+0+cc +ob12[ ]+\+ 0
-0+e4 +0+5a00000001 R_SH_DIR32[ ]+0+ +oc12[ ]+\+ 0
-0+e8 +0+1200000001 R_SH_DIR32[ ]+0+58 +oc12[ ]+\+ 0
-0+ec +0+3f00000001 R_SH_DIR32[ ]+0+ +oa23[ ]+\+ 0
-0+f0 +0+4500000001 R_SH_DIR32[ ]+0+ +oa13[ ]+\+ 0
-0+f4 +0+0a00000001 R_SH_DIR32[ ]+0+64 +oc123[ ]+\+ 0
-0+f8 +0+5500000001 R_SH_DIR32[ ]+0+ +ob13[ ]+\+ 0
-0+fc +0+5c00000001 R_SH_DIR32[ ]+0+ +oc13[ ]+\+ 0
-0+100 +0+8200000001 R_SH_DIR32[ ]+0+d4 +ob23[ ]+\+ 0
-0+104 +0+2b00000001 R_SH_DIR32[ ]+0+60 +oc23[ ]+\+ 0
-0+108 +0+5700000001 R_SH_DIR32[ ]+0+ +oa123[ ]+\+ 0
-0+10c +0+5000000001 R_SH_DIR32[ ]+0+ +oa123[ ]+\+ 0
-0+110 +0+6600000001 R_SH_DIR32[ ]+0+ +ob123[ ]+\+ 0
-0+114 +0+3300000001 R_SH_DIR32[ ]+0+ +oc123[ ]+\+ 0
-0+120 +0+7c00000001 R_SH_DIR32[ ]+0+11c +file2data1[ ]+\+ 0
-0+124 +0+5e00000001 R_SH_DIR32[ ]+0+74 +file2text2[ ]+\+ 0
-0+128 +0+8000000001 R_SH_DIR32[ ]+0+10 +file1data3[ ]+\+ 0
-0+12c +0+7700000001 R_SH_DIR32[ ]+0+14 +file1text4[ ]+\+ 0
-0+130 +0+7400000001 R_SH_DIR32[ ]+0+ +unresolved2[ ]+\+ 0
-0+134 +0+7b00000001 R_SH_DIR32[ ]+0+ +unresolved4[ ]+\+ 0
-0+138 +0+4800000001 R_SH_DIR32[ ]+0+ +oa1[ ]+\+ 0
-0+13c +0+1700000001 R_SH_DIR32[ ]+0+ +oa2[ ]+\+ 0
-0+140 +0+6d00000001 R_SH_DIR32[ ]+0+ +oa3[ ]+\+ 0
-0+144 +0+1c00000001 R_SH_DIR32[ ]+0+ +oa13[ ]+\+ 0
-0+148 +0+1900000001 R_SH_DIR32[ ]+0+5c +oc13[ ]+\+ 0
-0+14c +0+1000000001 R_SH_DIR32[ ]+0+ +oa4[ ]+\+ 0
-0+150 +0+1b00000001 R_SH_DIR32[ ]+0+ +oa12[ ]+\+ 0
-0+154 +0+4500000001 R_SH_DIR32[ ]+0+ +oa13[ ]+\+ 0
-0+158 +0+3800000001 R_SH_DIR32[ ]+0+ +oa23[ ]+\+ 0
-0+15c +0+3f00000001 R_SH_DIR32[ ]+0+ +oa23[ ]+\+ 0
-0+160 +0+5700000001 R_SH_DIR32[ ]+0+ +oa123[ ]+\+ 0
-0+164 +0+1600000001 R_SH_DIR32[ ]+0+50 +oc3[ ]+\+ 0
-0+168 +0+5000000001 R_SH_DIR32[ ]+0+ +oa123[ ]+\+ 0
-0+16c +0+1400000001 R_SH_DIR32[ ]+0+ +ob1[ ]+\+ 0
-0+170 +0+2200000001 R_SH_DIR32[ ]+0+ +ob2[ ]+\+ 0
-0+174 +0+5f00000001 R_SH_DIR32[ ]+0+ +ob3[ ]+\+ 0
-0+178 +0+1300000001 R_SH_DIR32[ ]+0+ +ob4[ ]+\+ 0
-0+17c +0+8400000001 R_SH_DIR32[ ]+0+ +oa3[ ]+\+ 0
-0+180 +0+2b00000001 R_SH_DIR32[ ]+0+60 +oc23[ ]+\+ 0
-0+184 +0+0a00000001 R_SH_DIR32[ ]+0+64 +oc123[ ]+\+ 0
-0+188 +0+6000000001 R_SH_DIR32[ ]+0+ +ob12[ ]+\+ 0
-0+18c +0+5500000001 R_SH_DIR32[ ]+0+ +ob13[ ]+\+ 0
-0+190 +0+4d00000001 R_SH_DIR32[ ]+0+d0 +ob13[ ]+\+ 0
-0+194 +0+8200000001 R_SH_DIR32[ ]+0+d4 +ob23[ ]+\+ 0
-0+198 +0+5800000001 R_SH_DIR32[ ]+0+ +ob23[ ]+\+ 0
-0+19c +0+6600000001 R_SH_DIR32[ ]+0+ +ob123[ ]+\+ 0
-0+1a0 +0+5900000001 R_SH_DIR32[ ]+0+ +oc1[ ]+\+ 0
-0+1a4 +0+1100000001 R_SH_DIR32[ ]+0+c4 +ob3[ ]+\+ 0
-0+1a8 +0+4400000001 R_SH_DIR32[ ]+0+d8 +ob123[ ]+\+ 0
-0+1ac +0+0900000001 R_SH_DIR32[ ]+0+ +oc2[ ]+\+ 0
-0+1b0 +0+3700000001 R_SH_DIR32[ ]+0+ +oc3[ ]+\+ 0
-0+1b4 +0+5300000001 R_SH_DIR32[ ]+0+ +oc4[ ]+\+ 0
-0+1b8 +0+5a00000001 R_SH_DIR32[ ]+0+ +oc12[ ]+\+ 0
-0+1bc +0+5c00000001 R_SH_DIR32[ ]+0+ +oc13[ ]+\+ 0
-0+1c0 +0+2a00000001 R_SH_DIR32[ ]+0+ +oc23[ ]+\+ 0
-0+1c4 +0+3300000001 R_SH_DIR32[ ]+0+ +oc123[ ]+\+ 0
-0+1c8 +0+7a00000001 R_SH_DIR32[ ]+0+ +a1[ ]+\+ 0
-0+1cc +0+1a00000001 R_SH_DIR32[ ]+0+a0 +c2[ ]+\+ 0
-0+1d0 +0+6f00000001 R_SH_DIR32[ ]+0+34 +b23[ ]+\+ 0
-0+1d4 +0+3d00000001 R_SH_DIR32[ ]+0+ +b1[ ]+\+ 0
-0+1d8 +0+8300000001 R_SH_DIR32[ ]+0+ +c1[ ]+\+ 0
-0+1dc +0+6900000001 R_SH_DIR32[ ]+0+ +a12[ ]+\+ 0
-0+1e0 +0+5600000001 R_SH_DIR32[ ]+0+ +a2[ ]+\+ 0
-0+1e4 +0+0d00000001 R_SH_DIR32[ ]+0+20 +b2[ ]+\+ 0
-0+1e8 +0+5200000001 R_SH_DIR32[ ]+0+ +b12[ ]+\+ 0
-0+1ec +0+2000000001 R_SH_DIR32[ ]+0+ +c12[ ]+\+ 0
-0+1f0 +0+5400000001 R_SH_DIR32[ ]+0+44 +b123[ ]+\+ 0
-0+1f4 +0+7e00000001 R_SH_DIR32[ ]+0+b8 +c123[ ]+\+ 0
-0+1f8 +0+1500000001 R_SH_DIR32[ ]+0+ +a13[ ]+\+ 0
-0+1fc +0+2900000001 R_SH_DIR32[ ]+0+ +b13[ ]+\+ 0
-0+200 +0+3900000001 R_SH_DIR32[ ]+0+b4 +c23[ ]+\+ 0
-0+204 +0+3e00000001 R_SH_DIR32[ ]+0+ +a123[ ]+\+ 0
-0+208 +0+3100000001 R_SH_DIR32[ ]+0+ +c13[ ]+\+ 0
-0+20c +0+6200000001 R_SH_DIR32[ ]+0+ +a123[ ]+\+ 0
-0+210 +0+6e00000001 R_SH_DIR32[ ]+0+ac +c12[ ]+\+ 0
-0+214 +0+7000000001 R_SH_DIR32[ ]+0+ +a23[ ]+\+ 0
-0+218 +0+0c00000001 R_SH_DIR32[ ]+0+ +b123[ ]+\+ 0
-0+21c +0+4000000001 R_SH_DIR32[ ]+0+ +a12[ ]+\+ 0
-0+220 +0+7300000001 R_SH_DIR32[ ]+0+2c +b12[ ]+\+ 0
-0+224 +0+3a00000001 R_SH_DIR32[ ]+0+ +c123[ ]+\+ 0
-
-Symbol table '\.symtab' contains 134 entries:
- +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
- +0: 0+0000 +0 +NOTYPE +LOCAL +DEFAULT +UND
- +1: 0+0000 +0 +SECTION +LOCAL +DEFAULT +1
- +2: 0+0000 +0 +SECTION +LOCAL +DEFAULT +3
- +3: 0+0000 +0 +SECTION +LOCAL +DEFAULT +5
- +4: 0+0000 +0 +SECTION +LOCAL +DEFAULT +6
- +5: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved5
- +6: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved9
- +7: 0+000c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file1text2
- +8: 0+006c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file2text1
- +9: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc2
- +10: 0+0064 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc123
- +11: 0+0004 +0 +NOTYPE +GLOBAL +DEFAULT +3 file1data1
- +12: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b123
- +13: 0+0020 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b2
- +14: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c4
- +15: 0+012c +0 +NOTYPE +GLOBAL +DEFAULT +3 file2data4
- +16: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa4
- +17: 0+00c4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob3
- +18: 0+0058 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc12
- +19: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob4
- +20: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob1
- +21: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a13
- +22: 0+0050 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc3
- +23: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa2
- +24: 0+00a8 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c4
- +25: 0+005c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc13
- +26: 0+00a0 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c2
- +27: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa12
- +28: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa13
- +29: 0+00c8 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob4
- +30: 0+001c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b1
- +31: 0+0018 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file1text5
- +32: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c12
- +33: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND file1text5
- +34: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob2
- +35: 0+0010 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file1text3
- +36: 0+0124 +0 +NOTYPE +GLOBAL +DEFAULT +3 file2data2
- +37: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a4
- +38: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a2
- +39: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND unresolved1
- +40: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND file1data3
- +41: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b13
- +42: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc23
- +43: 0+0060 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc23
- +44: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c2
- +45: 0+000c +0 +NOTYPE +GLOBAL +DEFAULT +3 file1data2
- +46: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b3
- +47: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a3
- +48: 0+0078 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file2text3
- +49: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c13
- +50: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND unresolved9
- +51: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc123
- +52: 0+0028 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b4
- +53: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND file2data4
- +54: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c23
- +55: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc3
- +56: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa23
- +57: 0+00b4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c23
- +58: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c123
- +59: 0+0030 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b13
- +60: 0+00b0 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c13
- +61: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b1
- +62: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a123
- +63: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa23
- +64: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a12
- +65: 0+00bc +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob1
- +66: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND unresolved7
- +67: 0+0068 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 start2
- +68: 0+00d8 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob123
- +69: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa13
- +70: 0+009c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c1
- +71: 0+0054 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc4
- +72: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa1
- +73: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa12
- +74: 0+00cc +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob12
- +75: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND file1data2
- +76: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved1
- +77: 0+00d0 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob13
- +78: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a3
- +79: 0+0018 +0 +NOTYPE +GLOBAL +DEFAULT +3 file1data5
- +80: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa123
- +81: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved6
- +82: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b12
- +83: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc4
- +84: 0+0044 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b123
- +85: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob13
- +86: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a2
- +87: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa123
- +88: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob23
- +89: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc1
- +90: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc12
- +91: 0+0004 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file1text1
- +92: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc13
- +93: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND file1text1
- +94: 0+0074 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file2text2
- +95: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob3
- +96: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob12
- +97: 0+00c0 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob2
- +98: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a123
- +99: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c3
- +100: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved3
- +101: 0+0024 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b3
- +102: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob123
- +103: 0+007c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file2text4
- +104: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b4
- +105: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a12
- +106: 0+00a4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c3
- +107: 0+0048 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc1
- +108: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND unresolved6
- +109: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa3
- +110: 0+00ac +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c12
- +111: 0+0034 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b23
- +112: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a23
- +113: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b2
- +114: 0+004c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc2
- +115: 0+002c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b12
- +116: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved2
- +117: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 start
- +118: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a23
- +119: 0+0014 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file1text4
- +120: 0+0128 +0 +NOTYPE +GLOBAL +DEFAULT +3 file2data3
- +121: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa2
- +122: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a1
- +123: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved4
- +124: 0+011c +0 +NOTYPE +GLOBAL +DEFAULT +3 file2data1
- +125: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b23
- +126: 0+00b8 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c123
- +127: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a13
- +128: 0+0010 +0 +NOTYPE +GLOBAL +DEFAULT +3 file1data3
- +129: 0+0014 +0 +NOTYPE +GLOBAL +DEFAULT +3 file1data4
- +130: 0+00d4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4] +1 ob23
- +131: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c1
- +132: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa3
- +133: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND unresolved8
-
-Hex dump of section '\.text':
-.*
- 0x00000000 6ff0fff0 6ff0fff0 cc0000a0 cc000140 .*
- 0x00000010 cc000140 cc000140 cc000280 cc0001e0 .*
- 0x00000020 cc0000a0 cc0000a0 cc000280 cc000140 .*
- 0x00000030 cc000140 cc000320 c8000320 c8000320 .*
- 0x00000040 c8000320 cc0003c0 cc0003c0 6ff0fff0 .*
- 0x00000050 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00000060 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x00000070 cc0000a0 cc000140 cc000140 cc000140 .*
- 0x00000080 cc0001e0 cc0001e0 cc000320 cc000320 .*
- 0x00000090 cc000280 cc000280 cc000280 6ff0fff0 .*
- 0x000000a0 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x000000b0 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x000000c0 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 0x000000d0 6ff0fff0 6ff0fff0 6ff0fff0 .*
-
-Hex dump of section '\.data':
-.*
- 0x00000000 00000000 00000000 00000008 00000000 .*
- 0x00000010 00000000 00000000 00000000 00000000 .*
- 0x00000020 00000028 00000000 00000000 00000000 .*
- 0x00000030 00000000 00000000 00000000 00000000 .*
- 0x00000040 00000000 00000000 00000000 00000000 .*
- 0x00000050 00000000 00000000 00000000 00000000 .*
- 0x00000060 00000000 00000000 00000000 00000000 .*
- 0x00000070 00000000 00000000 00000000 00000000 .*
- 0x00000080 00000000 00000000 00000000 00000000 .*
- 0x00000090 00000000 00000000 00000000 00000000 .*
- 0x000000a0 00000000 00000000 00000000 00000000 .*
- 0x000000b0 00000000 00000000 00000000 00000000 .*
- 0x000000c0 00000000 00000000 00000000 00000000 .*
- 0x000000d0 00000000 00000000 00000000 00000000 .*
- 0x000000e0 00000000 00000000 00000000 00000000 .*
- 0x000000f0 00000000 00000000 00000000 00000000 .*
- 0x00000100 00000000 00000000 00000000 00000000 .*
- 0x00000110 00000000 00000000 00000000 00000000 .*
- 0x00000120 00000000 00000000 00000000 00000000 .*
- 0x00000130 00000000 00000000 00000000 00000000 .*
- 0x00000140 00000000 00000000 00000000 00000000 .*
- 0x00000150 00000000 00000000 00000000 00000000 .*
- 0x00000160 00000000 00000000 00000000 00000000 .*
- 0x00000170 00000000 00000000 00000000 00000000 .*
- 0x00000180 00000000 00000000 00000000 00000000 .*
- 0x00000190 00000000 00000000 00000000 00000000 .*
- 0x000001a0 00000000 00000000 00000000 00000000 .*
- 0x000001b0 00000000 00000000 00000000 00000000 .*
- 0x000001c0 00000000 00000000 00000000 00000000 .*
- 0x000001d0 00000000 00000000 00000000 00000000 .*
- 0x000001e0 00000000 00000000 00000000 00000000 .*
- 0x000001f0 00000000 00000000 00000000 00000000 .*
- 0x00000200 00000000 00000000 00000000 00000000 .*
- 0x00000210 00000000 00000000 00000000 00000000 .*
- 0x00000220 00000000 00000000 .*
diff --git a/ld/testsuite/ld-sh/sh64/relfail.exp b/ld/testsuite/ld-sh/sh64/relfail.exp
deleted file mode 100644
index 8eed8ec..0000000
--- a/ld/testsuite/ld-sh/sh64/relfail.exp
+++ /dev/null
@@ -1,219 +0,0 @@
-# Expect script for ld-sh tests
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
-#
-# This file is part of the GNU Binutils.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
-# MA 02110-1301, USA.
-#
-
-# Test SH reloc failures - that is, cases that ld must not allow.
-
-if ![istarget sh64-*-*] {
- return
-}
-
-if [istarget sh64-*-linux*] {
- set emul32 "shlelf32_linux"
- set oformat32 "elf32-sh64-linux"
- set startsym "_start"
- set doabi64 0
-} elseif { [istarget sh64*-*-netbsd*] || [istarget sh5*-*-netbsd*] } then {
- set emul32 "shelf32_nbsd"
- set oformat32 "elf32-sh64-nbsd"
- set startsym "__start"
- set doabi64 1
- set emul64 "shelf64_nbsd"
- set oformat64 "elf64-sh64-nbsd"
-} else {
- set emul32 "shelf32"
- set oformat32 "elf32-sh64"
- set startsym "start"
- set doabi64 1
- set emul64 "shelf64"
- set oformat64 "elf64-sh64"
-}
-
-# opcode, asflags, ldflags, expected or "" for fail
-# opcode blank means rebuild relfail.o and set default as/ld options
-
-set sh64abi32relfailtests {
-
- { "" "-isa=shcompact -abi=32" "-m $emul32 -Ttext 0x1000 --oformat $oformat32" "" }
- { "mov.l lab,r0;.align 3;lab:nop" "" "" "mov.l 1008" }
- { "mov.l to0,r0" "" "" "mov.l 1010" }
- { "mov.l to1,r0" "" "" "" }
- { "mov.l to2,r0" "" "" "" }
- { "mov.l to3,r0" "" "" "" }
- { "mov.l to4,r0" "" "" "mov.l 1014" }
-
- { "" "-isa=shmedia -abi=32 -no-expand" "-m $emul32 -Ttext 0x1000 --oformat $oformat32" "" }
- { "pta lab,tr0;.align 3;lab:nop" "" "" "pta.*1008" }
-
- { "ld.q r0,datalabel to0 - 0x1000,r0" "" "" "ld.q.*,16," }
- { "ld.q r0,datalabel to1 - 0x1000,r0" "" "" "" }
- { "ld.q r0,datalabel to2 - 0x1000,r0" "" "" "" }
- { "ld.q r0,datalabel to3 - 0x1000,r0" "" "" "" }
- { "ld.q r0,datalabel to4 - 0x1000,r0" "" "" "" }
-
- { "ld.l r0,datalabel to0 - 0x1000,r0" "" "" "ld.l.*,16," }
- { "ld.l r0,datalabel to1 - 0x1000,r0" "" "" "" }
- { "ld.l r0,datalabel to2 - 0x1000,r0" "" "" "" }
- { "ld.l r0,datalabel to3 - 0x1000,r0" "" "" "" }
- { "ld.l r0,datalabel to4 - 0x1000,r0" "" "" "ld.l.*,20," }
-
- { "ld.w r0,datalabel to0 - 0x1000,r0" "" "" "ld.w.*,16," }
- { "ld.w r0,datalabel to1 - 0x1000,r0" "" "" "" }
- { "ld.w r0,datalabel to2 - 0x1000,r0" "" "" "ld.w.*,18," }
- { "ld.w r0,datalabel to3 - 0x1000,r0" "" "" "" }
- { "ld.w r0,datalabel to4 - 0x1000,r0" "" "" "ld.w.*,20," }
-
-}
-
-set sh64abi64relfailtests {
-
- { "" "-isa=shmedia -abi=64 -no-expand" "-m $emul64 -Ttext 0x1000 --oformat $oformat64" "" }
- { "pta lab,tr0;.align 3;lab:nop" "" "" "pta.*1008" }
- { "pta datalabel to0,tr0" "" "" "pta.*1010" }
- { "pta datalabel to1,tr0" "" "" "pta.*1011" }
- { "pta datalabel to2,tr0" "" "" "" }
- { "pta datalabel to3,tr0" "" "" "" }
- { "pta datalabel to4,tr0" "" "" "pta.*1014" }
-
- { "ld.q r0,datalabel to0 - 0x1000,r0" "" "" "ld.q.*,16," }
- { "ld.q r0,datalabel to1 - 0x1000,r0" "" "" "" }
- { "ld.q r0,datalabel to2 - 0x1000,r0" "" "" "" }
- { "ld.q r0,datalabel to3 - 0x1000,r0" "" "" "" }
- { "ld.q r0,datalabel to4 - 0x1000,r0" "" "" "" }
-
- { "ld.l r0,datalabel to0 - 0x1000,r0" "" "" "ld.l.*,16," }
- { "ld.l r0,datalabel to1 - 0x1000,r0" "" "" "" }
- { "ld.l r0,datalabel to2 - 0x1000,r0" "" "" "" }
- { "ld.l r0,datalabel to3 - 0x1000,r0" "" "" "" }
- { "ld.l r0,datalabel to4 - 0x1000,r0" "" "" "ld.l.*,20," }
-
- { "ld.w r0,datalabel to0 - 0x1000,r0" "" "" "ld.w.*,16," }
- { "ld.w r0,datalabel to1 - 0x1000,r0" "" "" "" }
- { "ld.w r0,datalabel to2 - 0x1000,r0" "" "" "ld.w.*,18," }
- { "ld.w r0,datalabel to3 - 0x1000,r0" "" "" "" }
- { "ld.w r0,datalabel to4 - 0x1000,r0" "" "" "ld.w.*,20," }
-
-}
-
-proc run_sh64relfailtests {sh64relfailtests} {
- global ld
- global as
- global nm
- global objdump
- global readelf
- global srcdir
- global subdir
- global emul32
- global emul64
- global oformat32
- global oformat64
- global startsym
-
- set testindex 0
- set is_unresolved 0
-
- foreach testentry $sh64relfailtests {
- set opcode [lindex $testentry 0]
- set as_options [lindex $testentry 1]
- set ld_options [subst [lindex $testentry 2]]
- set expect_fail [lindex $testentry 3]
-
- set testname "SH64 relfail $opcode $as_options $ld_options"
-
- set objfiles {}
-
- incr testindex
-
- if {$opcode == ""} {
- set def_as_options $as_options
- set def_ld_options $ld_options
- set is_unresolved 0
- set baseobj "tmpdir/relfail-$testindex.o"
- if ![ld_assemble $as "$as_options $srcdir/$subdir/relfail.s" $baseobj] {
- set is_unresolved 1
- }
- continue
- }
-
- if {$as_options == ""} {
- set as_options $def_as_options
- }
- if {$ld_options == ""} {
- set ld_options $def_ld_options
- }
-
- if { $is_unresolved } {
- unresolved $testname
- continue
- }
-
- set asm [open "tmpdir/relfail-$testindex.s" "w"]
- puts $asm " .text"
- puts $asm " .global $startsym"
- puts $asm "$startsym:"
- puts $asm " $opcode"
- close $asm
-
- if ![ld_assemble $as "$as_options tmpdir/relfail-$testindex.s" "tmpdir/relfail-$testindex.o"] {
- unresolved $testname
- continue
- }
-
- set binfile "tmpdir/relfail-$testindex.x"
-
- file delete $binfile
- set objects "tmpdir/relfail-$testindex.o $baseobj"
- set result [ld_link $ld $binfile "--no-warn-mismatch $ld_options $objects"]
-
- set exists [file exists $binfile]
- if {$exists && $expect_fail == ""} {
- verbose "$testname: file $binfile exists when it shouldn't" 1
- catch "exec $objdump -d $binfile" objdump_output
- verbose $objdump_output 1
- fail "$testname (file exists)"
- continue
- }
- if {!$exists && $expect_fail != ""} {
- verbose "$testname: file $binfile doesn't exist when it should" 1
- fail "$testname (file missing)"
- continue
- }
-
- if {$exists} {
- catch "exec $objdump -d $binfile" objdump_output
- regsub -all {[ ][ ]*} $objdump_output " " objdump_short
- if ![regexp $expect_fail $objdump_short junk] {
- verbose $objdump_output 1
- fail "$testname (incorrect reloc)"
- continue
- }
- }
-
- file delete "tmpdir/relfail-$testindex.s"
- file delete "tmpdir/relfail-$testindex.o"
- file delete $binfile
- pass $testname
- }
-}
-
-run_sh64relfailtests $sh64abi32relfailtests
-if {$doabi64} {
- run_sh64relfailtests $sh64abi64relfailtests
-}
diff --git a/ld/testsuite/ld-sh/sh64/relfail.s b/ld/testsuite/ld-sh/sh64/relfail.s
deleted file mode 100644
index 5f5d171..0000000
--- a/ld/testsuite/ld-sh/sh64/relfail.s
+++ /dev/null
@@ -1,36 +0,0 @@
- .text
- .align 4
- .global to0
-to0:
- .byte 0
- .global to1
-to1:
- .byte 0
- .global to2
-to2:
- .byte 0
- .global to3
-to3:
- .byte 0
- .global to4
-to4:
- .byte 0
- .byte 0
-
- .data
- .align 4
- .global do0
-do0:
- .byte 0
- .global do1
-do1:
- .byte 0
- .global do2
-do2:
- .byte 0
- .global do3
-do3:
- .byte 0
- .global do4
-do4:
- .byte 0
diff --git a/ld/testsuite/ld-sh/sh64/sh64-1.s b/ld/testsuite/ld-sh/sh64/sh64-1.s
deleted file mode 100644
index 3e488db..0000000
--- a/ld/testsuite/ld-sh/sh64/sh64-1.s
+++ /dev/null
@@ -1,20 +0,0 @@
-! Test that all common kinds of relocs get right for simple use.
-! Auxiliary part.
- .text
- .mode SHmedia
- .global foo
- .global bar
-foo:
- pt/l xyzzy,tr3
-bar:
- nop
-
- .data
- .global baz
-baz:
- .long foobar
- .long bar
- .global baz2
-baz2:
- .long xyzzy
-foobar: .long baz
diff --git a/ld/testsuite/ld-sh/sh64/sh64-2.s b/ld/testsuite/ld-sh/sh64/sh64-2.s
deleted file mode 100644
index 8ca24c0..0000000
--- a/ld/testsuite/ld-sh/sh64/sh64-2.s
+++ /dev/null
@@ -1,27 +0,0 @@
-! Test that all common kinds of relocs get right for simple cases.
-! Main part.
- .text
- .global start
- .mode SHmedia
-start:
- movi foo,r33
- movi bar,r21
- pt/l bar,tr3
- movi foobar,r43
- movi baz2,r53
- movi foobar2,r4
- pta xyzzy,tr5
- pt/u plugh,tr1
-
- .data
- .global foobar
-foobar: .long baz
-foobar2:
- .long bar
-
- .section .text.other,"ax"
- .global xyzzy
-xyzzy:
- nop
-plugh:
- nop
diff --git a/ld/testsuite/ld-sh/sh64/sh64.exp b/ld/testsuite/ld-sh/sh64/sh64.exp
deleted file mode 100644
index 2fb874a..0000000
--- a/ld/testsuite/ld-sh/sh64/sh64.exp
+++ /dev/null
@@ -1,137 +0,0 @@
-# Expect script for ld-sh tests
-# Copyright (C) 2000-2018 Free Software Foundation, Inc.
-#
-# This file is part of the GNU Binutils.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
-# MA 02110-1301, USA.
-#
-
-# Test SH linking; all types of relocs. This tests the assembler and
-# tools like objdump as well as the linker.
-
-if ![istarget sh64-*-*] {
- return
-}
-
-if [istarget sh64*-*-linux*] {
- return
-}
-
-if { [istarget sh64*-*-netbsd*] || [istarget sh5*-*-netbsd*] } then {
- return
-}
-
-# List contains test-items with 3 items followed by 2 lists:
-# 0:name 1:ld early options 2:ld late options 3:assembler options
-# 4:filenames of assembler files 5: action and options. 6: name of output file
-
-# Actions:
-# objdump: Apply objdump options on result. Compare with regex (last arg).
-# nm: Apply nm options on result. Compare with regex (last arg).
-# readelf: Apply readelf options on result. Compare with regex (last arg).
-
-# Note that the contents dump is the same for "inter-file datalabel
-# references, 64-bit ABI" as for 32-bit ABI and ELF so we re-use it.
-
-set sh64tests {
- {"SH64 linking, 64-bit ABI" "-mshelf64" ""
- "--abi=64" {sh64-1.s sh64-2.s}
- {{objdump -sr abi64.sd} {objdump -x abi64.xd}} "abi64.bin" }
- {"SH64 linking, 64-bit ABI, -no-expand" "-mshelf64" ""
- "--abi=64 -no-expand" {sh64-1.s sh64-2.s}
- {{objdump -sr abixx-noexp.sd}} "abi64-noexp.bin" }
- {"SH64 linking, 32-bit ABI" "-mshelf32" ""
- "--abi=32" {sh64-1.s sh64-2.s}
- {{objdump -sr abi32.sd} {objdump -x abi32.xd}} "abi32.bin" }
- {"SH64 linking, 32-bit ABI, -no-expand" "-mshelf32" ""
- "--abi=32 -no-expand" {sh64-1.s sh64-2.s}
- {{objdump -sr abixx-noexp.sd}} "abi32-noexp.bin" }
- {"SH64 linking, single multi-ISA object" "-mshelf32" ""
- "--abi=32" {shmix-1.s}
- {{objdump -sr mix1.sd} {objdump -x mix1.xd}} "mix1.bin" }
- {"SH64 linking, single multi-ISA object, -no-expand" "-mshelf32" ""
- "--abi=32 -no-expand" {shmix-1.s}
- {{objdump -sr mix1-noexp.sd}} "mix1-noexp.bin" }
- {"SH64 linking, two different-ISA objects" "-mshelf32" ""
- "--abi=32" {shmix-2.s shmix-3.s}
- {{objdump -sr mix2.sd} {objdump -x mix2.xd}} "mix2.bin" }
- {"SH64 linking, two different-ISA objects, -no-expand" "-mshelf32" ""
- "--abi=32 -no-expand" {shmix-2.s shmix-3.s}
- {{objdump -sr mix2-noexp.sd}} "mix2-noexp.bin" }
- {"SH64 linking, single SHcompact" "-mshelf32" ""
- "--isa=SHcompact" {shcmp-1.s}
- {{objdump -sr cmpct1.sd} {objdump -x cmpct1.xd}} "cmpct1.bin" }
- {"SH64 inter-file datalabel references, 64-bit ABI" "-mshelf64" ""
- "--abi=64" {shdl-1.s shdl-2.s}
- {{objdump -sr shdl64.sd} {objdump -x shdl64.xd}} "shdl64.bin" }
- {"SH64 inter-file datalabel references, 32-bit ABI" "-mshelf32" ""
- "--abi=32" {shdl-1.s shdl-2.s}
- {{objdump -sr shdl64.sd} {objdump -x shdl32.xd}} "shdl32.bin" }
- {"SH64 inter-file datalabel references and gc-sections, 32-bit ABI" "-mshelf32 --gc-sections" ""
- "--abi=32" {dlsection-1.s }
- {{objdump -sr dlsection.sd}} "dlsection32.bin" }
- {"SH64 inter-file datalabel references and gc-sections, 64-bit ABI" "-mshelf64 --gc-sections" ""
- "--abi=64" {dlsection-1.s }
- {{objdump -sr dlsection.sd}} "dlsection64.bin" }
- {"SH64 simple partial linking, 32-bit ABI" "-mshelf32 -r" ""
- "--abi=32" {rel-1.s rel-2.s}
- {{objdump -sx rel32.xd}} "rel32.bin" }
- {"SH64 simple partial linking, 64-bit ABI" "-mshelf64 -r" ""
- "--abi=64" {rel-1.s rel-2.s}
- {{objdump -sx rel64.xd}} "rel64.bin" }
- {"SH64 partial linking with datalabel references, 32-bit ABI" "-mshelf32 -r" ""
- "--abi=32" {reldl-1.s reldl-2.s}
- {{readelf {-s -r -x 1 -x 3} reldl32.rd}} "reldl32.bin" }
- {"SH64 partial linking with datalabel references, 64-bit ABI" "-mshelf64 -r" ""
- "--abi=64" {reldl-1.s reldl-2.s}
- {{readelf {-s -r -x 1 -x 3} reldl64.rd}} "reldl64.bin" }
- {"Handling SH64 assembler-generated .cranges" "-mshelf32" ""
- "--abi=32" {crange-2a.s crange-1.s}
- {{readelf {-S -s -r -x 1 -x 2 -x 4} crange1.rd}} "crange1.bin" }
- {"Handling SH64 assembler-generated .cranges, partial linking" "-mshelf32 -r" ""
- "--abi=32" {crange-2a.s}
- {{readelf {-S -s -r -x 2 -x 6} crangerel1.rd}} "crangerel1.bin" }
- {"Mixing SH64 assembler-generated with linker-generated .cranges" "-mshelf32" ""
- "--abi=32" {crange-2a.s crange-2b.s crange-1.s}
- {{readelf {-S -s -r -x 2 -x 4} crange2.rd}} "crange2.bin" }
- {"Mixing SH64 assembler-generated with linker-generated .cranges, partial linking"
- "-mshelf32 -r" ""
- "--abi=32" {crange-2a.s crange-2c.s crange-2d.s crange-2e.s}
- {{readelf {-S -s -r -x 2 -x 6} crangerel2.rd}} "crangerel2.bin" }
- {"Merge and use of SH64 .cranges, some not originally in order" "-mshelf32" ""
- "--abi=32"
- {crange-2e.s crange-2f.s crange-2g.s crange-2a.s crange-2d.s crange-2i.s
- crange-2h.s crange-1.s}
- {{readelf {-S -s -x 2 -x 4} crange3.rd} {objdump -d crange3.dd}} "crange3.bin" }
- {"Sorted SH64 .cranges, entry at SHcompact code" "-mshelf32 --entry diversion" ""
- "--abi=32"
- {crange-2e.s crange-2f.s crange-2g.s crange-2a.s crange-2d.s crange-2i.s
- crange-2h.s crange-1.s}
- {{readelf {-h -S -s -x 2 -x 4} crange3-cmpct.rd}} "crange3-cmpct.bin" }
- {"Sorted SH64 .cranges, entry at SHmedia code" "-mshelf32 --entry diversion2" ""
- "--abi=32"
- {crange-2e.s crange-2f.s crange-2g.s crange-2a.s crange-2d.s crange-2i.s
- crange-2h.s crange-1.s}
- {{readelf {-h -S -s -x 2 -x 4} crange3-media.rd}} "crange3-media.bin" }
- {"SH64 Big Endianness" "-mshelf64 -Tendian.ld" ""
- "--abi=64" {endian.s}
- {{objdump -s endian.sbd} {objdump -d endian.dbd}} "endianb.bin" }
- {"SH64 Little Endianness" "-mshlelf64 -Tendian.ld" ""
- "--abi=64 --little" {endian.s}
- {{objdump -s endian.sld} {objdump -d endian.dld}} "endinanl.bin" }
-}
-
-run_ld_link_tests $sh64tests
diff --git a/ld/testsuite/ld-sh/sh64/shcmp-1.s b/ld/testsuite/ld-sh/sh64/shcmp-1.s
deleted file mode 100644
index f915af4..0000000
--- a/ld/testsuite/ld-sh/sh64/shcmp-1.s
+++ /dev/null
@@ -1,15 +0,0 @@
-! A single SHcompact file, that should link correctly.
- .text
- .global start
-start:
- mova next,r0
- nop
-next:
- nop
- mov #42,r10
-
- .section .rodata
- .long start
-here:
- .long here
- .long next
diff --git a/ld/testsuite/ld-sh/sh64/shdl-1.s b/ld/testsuite/ld-sh/sh64/shdl-1.s
deleted file mode 100644
index 0f2803c..0000000
--- a/ld/testsuite/ld-sh/sh64/shdl-1.s
+++ /dev/null
@@ -1,359 +0,0 @@
-! Test inter-file DataLabel support.
-!
-! We need to test symbols that are:
-! * Global, defined in this file, with/without/both-with-without datalabel
-! references.
-! * The above in combinations where the reference is/is not from within
-! the same section. The implementation is currently indifferent to that
-! fact, but it seems likely to be something that can change.
-! * Extern with/without/both-with-without datalabel-qualified references.
-! * The above with reference from same *and* other file.
-! * The above in combinations for where the symbol is/is not a
-! STO_SH5_ISA32-marked symbol.
-
-! There will be omissions and overlap in combinations. Add spotted
-! omissions with complementary tests in other files.
-
- .text
- .mode SHmedia
-
-! For good measure, we start with a nop to get a non-zero offset within
-! the .text section.
-
- .global start
-start:
- nop
-
-! Referenced from the same file, same section, is ISA32, only referenced
-! with datalabel qualifier.
- .global foo
-foo:
- nop
- movi (datalabel foo + 8) & 65535,r30
-
-! Referenced from same file, same section, both with and without
-! datalabel qualifier, is ISA32.
- .global fooboth
-fooboth:
- nop
- movi (datalabel fooboth + 16) & 65535,r40
- movi (fooboth + 12) & 65535,r40
-
-! Same as above, but in different order.
- .global fooboth2
-fooboth2:
- nop
- movi (fooboth2 + 12) & 65535,r40
- movi (datalabel fooboth2 + 16) & 65535,r40
-
-! Referenced from this file and another, same section, is ISA32.
- .global foowithout
-foowithout:
- nop
- movi (foowithout + 24) & 65535,r30
-
-! Same as above, different section than definition.
-
- .global foo_other
-foo_other:
- nop
- .global foo_otherboth
-foo_otherboth:
- nop
- .global foo_otherboth2
-foo_otherboth2:
- nop
- .global foo_otherwithout
-foo_otherwithout:
- nop
-
- .section .rodata
- .long datalabel foo_other + 4
- .long datalabel foo_otherboth + 40
- .long foo_otherboth + 24
- .long foo_otherboth2 + 24
- .long datalabel foo_otherboth2 + 40
- .long foo_otherwithout
-
- .text
-
-! Same as above, mixing references from same and other section.
- .global foo_mix
-foo_mix:
- nop
- movi (datalabel foo_mix + 8) & 65535,r30
- .global foo_mix2
-foo_mix2:
- nop
- movi (foo_mix2 + 8) & 65535,r30
- .global foo_mixboth
-foo_mixboth:
- nop
- movi (datalabel foo_mixboth + 80) & 65535,r30
- movi (foo_mixboth + 80) & 65535,r30
- .global foo_mixboth2
-foo_mixboth2:
- nop
- movi (foo_mixboth2 + 64) & 65535,r30
- movi (datalabel foo_mixboth2 + 64) & 65535,r30
- .global foo_mixwithout
-foo_mixwithout:
- nop
- movi (foo_mixwithout + 42) & 65535,r30
- .global foo_mixwithout2
-foo_mixwithout2:
- nop
- movi (foo_mixwithout2 + 24) & 65535,r30
-
- .section .rodata
- .long foo_mix + 4
- .long datalabel foo_mix2 + 48
- .long datalabel foo_mixboth + 400
- .long foo_mixboth + 420
- .long foo_mixboth2 + 248
- .long datalabel foo_mixboth2 + 240
- .long foo_mixwithout
-
-! Same as above, referencing symbol in other file (reference only from
-! this to other file).
-
- .text
- nop
- movi (datalabel bar + 8) & 65535,r30
-
- movi (datalabel barboth + 16) & 65535,r40
- movi (barboth + 12) & 65535,r40
-
- movi (barboth2 + 12) & 65535,r40
- movi (datalabel barboth2 + 16) & 65535,r40
-
- movi (barwithout + 24) & 65535,r30
-
- .section .rodata
- .long datalabel bar_other + 4
- .long datalabel bar_otherboth + 40
- .long bar_otherboth + 24
- .long bar_otherboth2 + 24
- .long datalabel bar_otherboth2 + 40
- .long bar_otherwithout
-
- .text
- movi (datalabel bar_mix + 8) & 65535,r30
- movi (bar_mix2 + 8) & 65535,r30
- movi (datalabel bar_mixboth + 80) & 65535,r30
- movi (bar_mixboth + 80) & 65535,r30
- movi (bar_mixboth2 + 64) & 65535,r30
- movi (datalabel bar_mixboth2 + 64) & 65535,r30
- movi (bar_mixwithout + 42) & 65535,r30
- movi (bar_mixwithout2 + 24) & 65535,r30
-
- .section .rodata
- .long bar_mix + 4
- .long datalabel bar_mix2 + 48
- .long datalabel bar_mixboth + 400
- .long bar_mixboth + 420
- .long bar_mixboth2 + 248
- .long datalabel bar_mixboth2 + 240
- .long bar_mixwithout
-
-! Same as above, referencing symbol in other file *and* within that file.
-
- .text
- movi (datalabel baz + 8) & 65535,r30
-
- movi (datalabel bazboth + 16) & 65535,r40
- movi (bazboth + 12) & 65535,r40
-
- movi (bazboth2 + 12) & 65535,r40
- movi (datalabel bazboth2 + 16) & 65535,r40
-
- movi (bazwithout + 24) & 65535,r30
-
- .section .rodata
- .long datalabel baz_other + 4
- .long datalabel baz_otherboth + 40
- .long baz_otherboth + 24
- .long baz_otherboth2 + 24
- .long datalabel baz_otherboth2 + 40
- .long baz_otherwithout
-
- .text
- movi (datalabel baz_mix + 8) & 65535,r30
- movi (baz_mix2 + 8) & 65535,r30
- movi (datalabel baz_mixboth + 80) & 65535,r30
- movi (baz_mixboth + 80) & 65535,r30
- movi (baz_mixboth2 + 64) & 65535,r30
- movi (datalabel baz_mixboth2 + 64) & 65535,r30
- movi (baz_mixwithout + 42) & 65535,r30
- movi (baz_mixwithout2 + 24) & 65535,r30
-
- .section .rodata
- .long baz_mix + 4
- .long datalabel baz_mix2 + 48
- .long datalabel baz_mixboth + 400
- .long baz_mixboth + 420
- .long baz_mixboth2 + 248
- .long datalabel baz_mixboth2 + 240
- .long baz_mixwithout
-
-! Same as all of the above, but where the symbol is not an ISA32 one.
-
- .data
- .global dfoo
-dfoo:
- .long 0
- .long (datalabel dfoo + 8)
-
- .global dfooboth
-dfooboth:
- .long 0
- .long (datalabel dfooboth + 16)
- .long (dfooboth + 12)
-
- .global dfooboth2
-dfooboth2:
- .long 0
- .long (dfooboth2 + 12)
- .long (datalabel dfooboth2 + 16)
-
- .global dfoowithout
-dfoowithout:
- .long 0
- .long (dfoowithout + 24)
-
- .global dfoo_other
-dfoo_other:
- .long 0
- .global dfoo_otherboth
-dfoo_otherboth:
- .long 0
- .global dfoo_otherboth2
-dfoo_otherboth2:
- .long 0
- .global dfoo_otherwithout
-dfoo_otherwithout:
- .long 0
-
- .section .rodata
- .long datalabel dfoo_other + 4
- .long datalabel dfoo_otherboth + 40
- .long dfoo_otherboth + 24
- .long dfoo_otherboth2 + 24
- .long datalabel dfoo_otherboth2 + 40
- .long dfoo_otherwithout
-
- .data
-
-! Same as above, mixing references from same and other section.
- .global dfoo_mix
-dfoo_mix:
- .long 0
- .long (datalabel dfoo_mix + 8)
- .global dfoo_mix2
-dfoo_mix2:
- .long 0
- .long (dfoo_mix2 + 8)
- .global dfoo_mixboth
-dfoo_mixboth:
- .long 0
- .long (datalabel dfoo_mixboth + 80)
- .long (dfoo_mixboth + 80)
- .global dfoo_mixboth2
-dfoo_mixboth2:
- .long 0
- .long (dfoo_mixboth2 + 64)
- .long (datalabel dfoo_mixboth2 + 64)
- .global dfoo_mixwithout
-dfoo_mixwithout:
- .long 0
- .long (dfoo_mixwithout + 42)
- .global dfoo_mixwithout2
-dfoo_mixwithout2:
- .long 0
- .long (dfoo_mixwithout2 + 24)
-
- .section .rodata
- .long dfoo_mix + 4
- .long datalabel dfoo_mix2 + 48
- .long datalabel dfoo_mixboth + 400
- .long dfoo_mixboth + 420
- .long dfoo_mixboth2 + 248
- .long datalabel dfoo_mixboth2 + 240
- .long dfoo_mixwithout
-
-! Same as above, referencing symbol in other file (reference only from
-! this to other file).
-
- .text
- movi (datalabel dbarboth + 16) & 65535,r40
- movi (dbarboth + 12) & 65535,r40
- movi (dbarboth2 + 12) & 65535,r40
- movi (datalabel dbarboth2 + 16) & 65535,r40
- movi (dbarwithout + 24) & 65535,r30
-
- .data
- .long (datalabel dbar + 8)
- .long datalabel dbar_other + 4
- .long datalabel dbar_otherboth + 40
- .long dbar_otherboth + 24
- .long dbar_otherboth2 + 24
- .long datalabel dbar_otherboth2 + 40
- .long dbar_otherwithout
-
- .text
- movi (datalabel dbar_mix + 8) & 65535,r30
- movi (dbar_mix2 + 8) & 65535,r30
- movi (datalabel dbar_mixboth + 80) & 65535,r30
- movi (dbar_mixboth + 80) & 65535,r30
- movi (dbar_mixboth2 + 64) & 65535,r30
- movi (datalabel dbar_mixboth2 + 64) & 65535,r30
- movi (dbar_mixwithout + 42) & 65535,r30
- movi (dbar_mixwithout2 + 24) & 65535,r30
-
- .data
- .long dbar_mix + 4
- .long datalabel dbar_mix2 + 48
- .long datalabel dbar_mixboth + 400
- .long dbar_mixboth + 420
- .long dbar_mixboth2 + 248
- .long datalabel dbar_mixboth2 + 240
- .long dbar_mixwithout
-
-! Same as above, referencing symbol in other file *and* within that file.
-
- .text
- movi (datalabel dbazboth + 16) & 65535,r40
- movi (dbazboth + 12) & 65535,r40
-
- movi (dbazboth2 + 12) & 65535,r40
- movi (datalabel dbazboth2 + 16) & 65535,r40
-
- movi (dbazwithout + 24) & 65535,r30
-
- .data
- .long (datalabel dbaz + 8)
- .long datalabel dbaz_other + 4
- .long datalabel dbaz_otherboth + 40
- .long dbaz_otherboth + 24
- .long dbaz_otherboth2 + 24
- .long datalabel dbaz_otherboth2 + 40
- .long dbaz_otherwithout
-
- .text
- movi (datalabel dbaz_mix + 8) & 65535,r30
- movi (dbaz_mix2 + 8) & 65535,r30
- movi (datalabel dbaz_mixboth + 80) & 65535,r30
- movi (dbaz_mixboth + 80) & 65535,r30
- movi (dbaz_mixboth2 + 64) & 65535,r30
- movi (datalabel dbaz_mixboth2 + 64) & 65535,r30
- movi (dbaz_mixwithout + 42) & 65535,r30
- movi (dbaz_mixwithout2 + 24) & 65535,r30
-
- .data
- .long dbaz_mix + 4
- .long datalabel dbaz_mix2 + 48
- .long datalabel dbaz_mixboth + 400
- .long dbaz_mixboth + 420
- .long dbaz_mixboth2 + 248
- .long datalabel dbaz_mixboth2 + 240
- .long dbaz_mixwithout
diff --git a/ld/testsuite/ld-sh/sh64/shdl-2.s b/ld/testsuite/ld-sh/sh64/shdl-2.s
deleted file mode 100644
index a41fd52..0000000
--- a/ld/testsuite/ld-sh/sh64/shdl-2.s
+++ /dev/null
@@ -1,286 +0,0 @@
-! Part two of test for inter-file DataLabel support.
-
- .mode SHmedia
- .text
-part2:
- movi (datalabel foowithout + 16) & 65535, r24
-
- .section .rodata
- .long datalabel foo_otherwithout + 32
-
- .text
- movi (datalabel foo_mixwithout + 1024) & 65535, r24
- .section .rodata
- .long datalabel foo_mixwithout + 32
-
- .text
- movi (datalabel foo_mixwithout2 + 1024) & 65535, r24
- .section .rodata
- .long foo_mixwithout2 + 32
-
- .text
- .global bar
-bar:
- nop
-
- .global barboth
-barboth:
- nop
-
- .global barboth2
-barboth2:
- nop
-
- .global barwithout
-barwithout:
- nop
-
- .global bar_other
-bar_other:
- nop
- .global bar_otherboth
-bar_otherboth:
- nop
- .global bar_otherboth2
-bar_otherboth2:
- nop
- .global bar_otherwithout
-bar_otherwithout:
- nop
-
- .text
-
- .global bar_mix
-bar_mix:
- nop
- .global bar_mix2
-bar_mix2:
- nop
- .global bar_mixboth
-bar_mixboth:
- nop
- .global bar_mixboth2
-bar_mixboth2:
- nop
- .global bar_mixwithout
-bar_mixwithout:
- nop
- .global bar_mixwithout2
-bar_mixwithout2:
- nop
-
-! Almost-copy of "foo" in primary file.
-
- .global baz
-baz:
- nop
- movi (datalabel baz + 8) & 65535,r30
-
- .global bazboth
-bazboth:
- nop
- movi (datalabel bazboth + 16) & 65535,r40
- movi (bazboth + 12) & 65535,r40
-
- .global bazboth2
-bazboth2:
- nop
- movi (bazboth2 + 12) & 65535,r40
- movi (datalabel bazboth2 + 16) & 65535,r40
-
- .global bazwithout
-bazwithout:
- nop
- movi (datalabel bazwithout + 24) & 65535,r30
-
- .global baz_other
-baz_other:
- nop
- .global baz_otherboth
-baz_otherboth:
- nop
- .global baz_otherboth2
-baz_otherboth2:
- nop
- .global baz_otherwithout
-baz_otherwithout:
- nop
-
- .section .rodata
- .long datalabel baz_other + 4
- .long datalabel baz_otherboth + 40
- .long baz_otherboth + 24
- .long baz_otherboth2 + 24
- .long datalabel baz_otherboth2 + 40
- .long baz_otherwithout
-
- .text
-
- .global baz_mix
-baz_mix:
- nop
- movi (datalabel baz_mix + 8) & 65535,r30
- .global baz_mix2
-baz_mix2:
- nop
- movi (baz_mix2 + 8) & 65535,r30
- .global baz_mixboth
-baz_mixboth:
- nop
- movi (datalabel baz_mixboth + 80) & 65535,r30
- movi (baz_mixboth + 80) & 65535,r30
- .global baz_mixboth2
-baz_mixboth2:
- nop
- movi (baz_mixboth2 + 64) & 65535,r30
- movi (datalabel baz_mixboth2 + 64) & 65535,r30
- .global baz_mixwithout
-baz_mixwithout:
- nop
- movi (baz_mixwithout + 42) & 65535,r30
- .global baz_mixwithout2
-baz_mixwithout2:
- nop
- movi (baz_mixwithout2 + 24) & 65535,r30
-
- .section .rodata
- .long baz_mix + 4
- .long datalabel baz_mix2 + 48
- .long datalabel baz_mixboth + 400
- .long baz_mixboth + 420
- .long baz_mixboth2 + 248
- .long datalabel baz_mixboth2 + 240
- .long baz_mixwithout
-
- .data
- .long datalabel dfoowithout + 44
- .long datalabel dfoo_mixwithout + 48
- .long datalabel dfoo_mixwithout2 + 84
-
- .global dbar
-dbar:
- .long 0
- .global dbarboth
-dbarboth:
- .long 0
- .global dbarboth2
-dbarboth2:
- .long 0
- .global dbarwithout
-dbarwithout:
- .long 0
- .global dbar_other
-dbar_other:
- .long 0
- .global dbar_otherboth
-dbar_otherboth:
- .long 0
- .global dbar_otherboth2
-dbar_otherboth2:
- .long 0
- .global dbar_otherwithout
-dbar_otherwithout:
- .long 0
-
- .global dbar_mix
-dbar_mix:
- .long 0
- .global dbar_mix2
-dbar_mix2:
- .long 0
- .global dbar_mixboth
-dbar_mixboth:
- .long 0
- .global dbar_mixboth2
-dbar_mixboth2:
- .long 0
- .global dbar_mixwithout
-dbar_mixwithout:
- .long 0
- .global dbar_mixwithout2
-dbar_mixwithout2:
- .long 0
-
-! Almost-copy of "dfoo" in primary file.
-
- .data
- .global dbaz
-dbaz:
- .long 0
- .long (datalabel dbaz + 8)
-
- .global dbazboth
-dbazboth:
- .long 0
- .long (datalabel dbazboth + 16)
- .long (dbazboth + 12)
-
- .global dbazboth2
-dbazboth2:
- .long 0
- .long (dbazboth2 + 12)
- .long (datalabel dbazboth2 + 16)
-
- .global dbazwithout
-dbazwithout:
- .long 0
- .long (dbazwithout + 24)
-
- .global dbaz_other
-dbaz_other:
- .long 0
- .global dbaz_otherboth
-dbaz_otherboth:
- .long 0
- .global dbaz_otherboth2
-dbaz_otherboth2:
- .long 0
- .global dbaz_otherwithout
-dbaz_otherwithout:
- .long 0
-
- .section .rodata
- .long datalabel dbaz_other + 4
- .long datalabel dbaz_otherboth + 40
- .long dbaz_otherboth + 24
- .long dbaz_otherboth2 + 24
- .long datalabel dbaz_otherboth2 + 40
- .long dbaz_otherwithout
-
- .data
-
- .global dbaz_mix
-dbaz_mix:
- .long 0
- .long (datalabel dbaz_mix + 8)
- .global dbaz_mix2
-dbaz_mix2:
- .long 0
- .long (dbaz_mix2 + 8)
- .global dbaz_mixboth
-dbaz_mixboth:
- .long 0
- .long (datalabel dbaz_mixboth + 80)
- .long (dbaz_mixboth + 80)
- .global dbaz_mixboth2
-dbaz_mixboth2:
- .long 0
- .long (dbaz_mixboth2 + 64)
- .long (datalabel dbaz_mixboth2 + 64)
- .global dbaz_mixwithout
-dbaz_mixwithout:
- .long 0
- .long (dbaz_mixwithout + 42)
- .global dbaz_mixwithout2
-dbaz_mixwithout2:
- .long 0
- .long (dbaz_mixwithout2 + 24)
-
- .section .rodata
- .long dbaz_mix + 4
- .long datalabel dbaz_mix2 + 48
- .long datalabel dbaz_mixboth + 400
- .long dbaz_mixboth + 420
- .long dbaz_mixboth2 + 248
- .long datalabel dbaz_mixboth2 + 240
- .long dbaz_mixwithout
diff --git a/ld/testsuite/ld-sh/sh64/shdl32.xd b/ld/testsuite/ld-sh/sh64/shdl32.xd
deleted file mode 100644
index d9c2364..0000000
--- a/ld/testsuite/ld-sh/sh64/shdl32.xd
+++ /dev/null
@@ -1,124 +0,0 @@
-.*: file format .*-sh64
-.*
-architecture: sh5, flags 0x0+112:
-EXEC_P, HAS_SYMS, D_PAGED
-start address 0x0+1001
-
-Program Header:
- LOAD off 0x0+100 vaddr 0x0+1000 paddr 0x0+1000 align 2\*\*7
- filesz 0x0+348 memsz 0x0+348 flags r-x
- LOAD off 0x0+448 vaddr 0x0+13c8 paddr 0x0+13c8 align 2\*\*7
- filesz 0x0+194 memsz 0x0+194 flags rw-
- LOAD off 0x0+600 vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*7
- filesz 0x00000004 memsz 0x00000004 flags rw-
-
-Sections:
-Idx Name Size VMA LMA File off Algn
- 0 \.text 0+204 0+1000 0+1000 0+100 2\*\*0
- CONTENTS, ALLOC, LOAD, READONLY, CODE
- 1 \.rodata 0+144 0+1204 0+1204 0+304 2\*\*2
- CONTENTS, ALLOC, LOAD, READONLY, DATA
- 2 \.data 0+194 0+13c8 0+13c8 0+448 2\*\*2
- CONTENTS, ALLOC, LOAD, DATA
- 3 \.stack 0+4 0+80000 0+80000 0+600 2\*\*0
- CONTENTS, ALLOC, LOAD, DATA
-SYMBOL TABLE:
-0+1000 l d \.text 0+ (|\.text)
-0+1204 l d \.rodata 0+ (|\.rodata)
-0+13c8 l d \.data 0+ (|\.data)
-0+80000 l d \.stack 0+ (|\.stack)
-0+ l df \*ABS\* 0+ .*
-0+1150 l \.text 0+ 0x04 part2
-0+13f8 g \.data 0+ dfoo_otherboth2
-0+1178 g \.text 0+ 0x04 bar_otherwithout
-0+11b4 g \.text 0+ 0x04 bazwithout
-0+1428 g \.data 0+ dfoo_mixwithout
-0+1554 g \.data 0+ dbaz_mixwithout2
-0+11bc g \.text 0+ 0x04 baz_other
-0+11cc g \.text 0+ 0x04 baz_mix
-0+11c0 g \.text 0+ 0x04 baz_otherboth
-0+13e8 g \.data 0+ dfoowithout
-0+14b4 g \.data 0+ dbar
-0+106c g \.text 0+ 0x04 foo_mixwithout2
-0+11a8 g \.text 0+ 0x04 bazboth2
-0+13fc g \.data 0+ dfoo_otherwithout
-0+11c4 g \.text 0+ 0x04 baz_otherboth2
-0+1174 g \.text 0+ 0x04 bar_otherboth2
-0+1194 g \.text 0+ 0x04 baz
-0+13c8 g \.data 0+ dfoo
-0+14e8 g \.data 0+ dbar_mixwithout2
-0+13dc g \.data 0+ dfooboth2
-0+1408 g \.data 0+ dfoo_mix2
-0+154c g \.data 0+ dbaz_mixwithout
-0+1044 g \.text 0+ 0x04 foo_mix2
-0+1018 g \.text 0+ 0x04 fooboth2
-0+14cc g \.data 0+ dbar_otherboth2
-0+117c g \.text 0+ 0x04 bar_mix
-0+14d0 g \.data 0+ dbar_otherwithout
-0+11dc g \.text 0+ 0x04 baz_mixboth
-0+14c8 g \.data 0+ dbar_otherboth
-0+150c g \.data 0+ dbazwithout
-0+152c g \.data 0+ dbaz_mix2
-0+1184 g \.text 0+ 0x04 bar_mixboth
-0+13f4 g \.data 0+ dfoo_otherboth
-0+14dc g \.data 0+ dbar_mixboth
-0+1024 g \.text 0+ 0x04 foowithout
-0+14e4 g \.data 0+ dbar_mixwithout
-0+11fc g \.text 0+ 0x04 baz_mixwithout2
-0+1030 g \.text 0+ 0x04 foo_otherboth
-0+1540 g \.data 0+ dbaz_mixboth2
-0+104c g \.text 0+ 0x04 foo_mixboth
-0+1534 g \.data 0+ dbaz_mixboth
-0+103c g \.text 0+ 0x04 foo_mix
-0+1518 g \.data 0+ dbaz_otherboth
-0+14e0 g \.data 0+ dbar_mixboth2
-0+14ec g \.data 0+ dbaz
-0+1524 g \.data 0+ dbaz_mix
-0+13c8 g .* 0+ ___dtors
-0+141c g \.data 0+ dfoo_mixboth2
-0+119c g \.text 0+ 0x04 bazboth
-0+13f0 g \.data 0+ dfoo_other
-0+11e8 g \.text 0+ 0x04 baz_mixboth2
-0+1514 g \.data 0+ dbaz_other
-0+1164 g \.text 0+ 0x04 barboth2
-0+1168 g \.text 0+ 0x04 barwithout
-0+14d8 g \.data 0+ dbar_mix2
-0+1560 g \.data 0+ __bss_start
-0+1410 g \.data 0+ dfoo_mixboth
-0+14c4 g \.data 0+ dbar_other
-0+1180 g \.text 0+ 0x04 bar_mix2
-0+14f4 g \.data 0+ dbazboth
-0+1038 g \.text 0+ 0x04 foo_otherwithout
-0+1190 g \.text 0+ 0x04 bar_mixwithout2
-0+13c8 g .* 0+ ___ctors_end
-0+1064 g \.text 0+ 0x04 foo_mixwithout
-0+116c g \.text 0+ 0x04 bar_other
-0+13d0 g \.data 0+ dfooboth
-0+1034 g \.text 0+ 0x04 foo_otherboth2
-0+1400 g \.data 0+ dfoo_mix
-0+13c8 g .* 0+ ___ctors
-0+14d4 g \.data 0+ dbar_mix
-0+100c g \.text 0+ 0x04 fooboth
-0+1170 g \.text 0+ 0x04 bar_otherboth
-0+14c0 g \.data 0+ dbarwithout
-0+1004 g \.text 0+ 0x04 foo
-0+102c g \.text 0+ 0x04 foo_other
-0+1560 g \.data 0+ _edata
-0+1560 g \.data 0+ _end
-0+1430 g \.data 0+ dfoo_mixwithout2
-0+1058 g \.text 0+ 0x04 foo_mixboth2
-0+11d4 g \.text 0+ 0x04 baz_mix2
-0+11c8 g \.text 0+ 0x04 baz_otherwithout
-0+1000 g \.text 0+ 0x04 start
-0+14bc g \.data 0+ dbarboth2
-0+118c g \.text 0+ 0x04 bar_mixwithout
-0+115c g \.text 0+ 0x04 bar
-0+80000 g \.stack 0+ _stack
-0+1520 g \.data 0+ dbaz_otherwithout
-0+11f4 g \.text 0+ 0x04 baz_mixwithout
-0+1160 g \.text 0+ 0x04 barboth
-0+14b8 g \.data 0+ dbarboth
-0+1188 g \.text 0+ 0x04 bar_mixboth2
-0+13c8 g .* 0+ ___dtors_end
-0+151c g \.data 0+ dbaz_otherboth2
-0+1500 g \.data 0+ dbazboth2
diff --git a/ld/testsuite/ld-sh/sh64/shdl64.sd b/ld/testsuite/ld-sh/sh64/shdl64.sd
deleted file mode 100644
index abe257a..0000000
--- a/ld/testsuite/ld-sh/sh64/shdl64.sd
+++ /dev/null
@@ -1,87 +0,0 @@
-.*: file format .*-sh64
-
-Contents of section \.text:
- 1000 6ff0fff0 6ff0fff0 cc4031e0 6ff0fff0 .*
- 1010 cc407280 cc406680 6ff0fff0 cc409680 .*
- 1020 cc40a280 6ff0fff0 cc40f5e0 6ff0fff0 .*
- 1030 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 1040 cc4111e0 6ff0fff0 cc4135e0 6ff0fff0 .*
- 1050 cc4271e0 cc4275e0 6ff0fff0 cc4265e0 .*
- 1060 cc4261e0 6ff0fff0 cc423de0 6ff0fff0 .*
- 1070 cc4215e0 6ff0fff0 cc4591e0 cc45c280 .*
- 1080 cc45b680 cc45c680 cc45d280 cc4605e0 .*
- 1090 cc4611e0 cc4625e0 cc4751e0 cc4755e0 .*
- 10a0 cc4725e0 cc4721e0 cc46dde0 cc46a5e0 .*
- 10b0 cc4671e0 cc46b280 cc46a680 cc46d680 .*
- 10c0 cc46e280 cc4735e0 cc4751e0 cc4775e0 .*
- 10d0 cc48b1e0 cc48b5e0 cc48a5e0 cc48a1e0 .*
- 10e0 cc487de0 cc4855e0 cc532280 cc531280 .*
- 10f0 cc532280 cc533280 cc5361e0 cc5371e0 .*
- 1100 cc5381e0 cc54b1e0 cc54b1e0 cc5481e0 .*
- 1110 cc5481e0 cc5439e0 cc5401e0 cc541280 .*
- 1120 cc540280 cc543280 cc544280 cc5491e0 .*
- 1130 cc54b1e0 cc54d1e0 cc5611e0 cc5611e0 .*
- 1140 cc5601e0 cc5601e0 cc55d9e0 cc55b1e0 .*
- 1150 cc40d180 cc519180 cc51b180 6ff0fff0 .*
- 1160 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 1170 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 1180 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 1190 6ff0fff0 6ff0fff0 cc4671e0 6ff0fff0 .*
- 11a0 cc46b280 cc46a680 6ff0fff0 cc46d680 .*
- 11b0 cc46e280 6ff0fff0 cc4731e0 6ff0fff0 .*
- 11c0 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .*
- 11d0 cc4751e0 6ff0fff0 cc4775e0 6ff0fff0 .*
- 11e0 cc48b1e0 cc48b5e0 6ff0fff0 cc48a5e0 .*
- 11f0 cc48a1e0 6ff0fff0 cc487de0 6ff0fff0 .*
- 1200 cc4855e0 .*
-Contents of section \.rodata:
- 1204 00001030 00001058 00001049 0000104d .*
- 1214 0000105c 00001039 00001041 00001074 .*
- 1224 000011dc 000011f1 00001151 00001148 .*
- 1234 00001065 00001170 00001198 00001189 .*
- 1244 0000118d 0000119c 00001179 00001181 .*
- 1254 000011b0 00001314 00001329 00001281 .*
- 1264 00001278 0000118d 000011c0 000011e8 .*
- 1274 000011d9 000011dd 000011ec 000011c9 .*
- 1284 000011d1 00001204 0000136c 00001381 .*
- 1294 000012e1 000012d8 000011f5 000013f4 .*
- 12a4 0000141c 0000140c 00001410 00001420 .*
- 12b4 000013fc 00001404 00001438 000015a0 .*
- 12c4 000015b4 00001514 0000150c 00001428 .*
- 12d4 00001058 00001084 0000108d 000011c0 .*
- 12e4 000011e8 000011d9 000011dd 000011ec .*
- 12f4 000011c9 000011d1 00001204 0000136c .*
- 1304 00001381 000012e1 000012d8 000011f5 .*
- 1314 00001518 00001540 00001530 00001534 .*
- 1324 00001544 00001520 00001528 0000155c .*
- 1334 000016c4 000016d8 00001638 00001630 .*
- 1344 0000154c .*
-Contents of section \.data:
- 13c8 00000000 000013d0 00000000 000013e0 .*
- 13d8 000013dc 00000000 000013e8 000013ec .*
- 13e8 00000000 00001400 00000000 00000000 .*
- 13f8 00000000 00000000 00000000 00001408 .*
- 1408 00000000 00001410 00000000 00001460 .*
- 1418 00001460 00000000 0000145c 0000145c .*
- 1428 00000000 00001452 00000000 00001448 .*
- 1438 000014bc 000014c8 000014f0 000014e0 .*
- 1448 000014e4 000014f4 000014d0 000014d8 .*
- 1458 00001508 0000166c 00001680 000015d8 .*
- 1468 000015d0 000014e4 000014f4 00001518 .*
- 1478 00001540 00001530 00001534 00001544 .*
- 1488 00001520 00001528 0000155c 000016c4 .*
- 1498 000016d8 00001638 00001630 0000154c .*
- 14a8 00001414 00001458 00001484 00000000 .*
- 14b8 00000000 00000000 00000000 00000000 .*
- 14c8 00000000 00000000 00000000 00000000 .*
- 14d8 00000000 00000000 00000000 00000000 .*
- 14e8 00000000 00000000 000014f4 00000000 .*
- 14f8 00001504 00001500 00000000 0000150c .*
- 1508 00001510 00000000 00001524 00000000 .*
- 1518 00000000 00000000 00000000 00000000 .*
- 1528 0000152c 00000000 00001534 00000000 .*
- 1538 00001584 00001584 00000000 00001580 .*
- 1548 00001580 00000000 00001576 00000000 .*
- 1558 0000156c .*
-Contents of section \.stack:
- 80000 deaddead .*
diff --git a/ld/testsuite/ld-sh/sh64/shdl64.xd b/ld/testsuite/ld-sh/sh64/shdl64.xd
deleted file mode 100644
index 6e2c41c..0000000
--- a/ld/testsuite/ld-sh/sh64/shdl64.xd
+++ /dev/null
@@ -1,124 +0,0 @@
-.*: file format .*-sh64
-.*
-architecture: sh5, flags 0x0+112:
-EXEC_P, HAS_SYMS, D_PAGED
-start address 0x0+1001
-
-Program Header:
- LOAD off 0x0+100 vaddr 0x0+1000 paddr 0x0+1000 align 2\*\*7
- filesz 0x0+348 memsz 0x0+348 flags r-x
- LOAD off 0x0+448 vaddr 0x0+13c8 paddr 0x0+13c8 align 2\*\*7
- filesz 0x0+194 memsz 0x0+194 flags rw-
- LOAD off 0x0+600 vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*7
- filesz 0x0+4 memsz 0x0+4 flags rw-
-
-Sections:
-Idx Name Size VMA LMA File off Algn
- 0 \.text 0+204 0+1000 0+1000 0+100 2\*\*0
- CONTENTS, ALLOC, LOAD, READONLY, CODE
- 1 \.rodata 0+144 0+1204 0+1204 0+304 2\*\*2
- CONTENTS, ALLOC, LOAD, READONLY, DATA
- 2 \.data 0+194 0+13c8 0+13c8 0+448 2\*\*2
- CONTENTS, ALLOC, LOAD, DATA
- 3 \.stack 0+4 0+80000 0+80000 0+600 2\*\*0
- CONTENTS, ALLOC, LOAD, DATA
-SYMBOL TABLE:
-0+1000 l d \.text 0+ (|\.text)
-0+1204 l d \.rodata 0+ (|\.rodata)
-0+13c8 l d \.data 0+ (|\.data)
-0+80000 l d \.stack 0+ (|\.stack)
-0+ l df \*ABS\* 0+ .*
-0+1150 l \.text 0+ 0x04 part2
-0+13f8 g \.data 0+ dfoo_otherboth2
-0+1178 g \.text 0+ 0x04 bar_otherwithout
-0+11b4 g \.text 0+ 0x04 bazwithout
-0+1428 g \.data 0+ dfoo_mixwithout
-0+1554 g \.data 0+ dbaz_mixwithout2
-0+11bc g \.text 0+ 0x04 baz_other
-0+11cc g \.text 0+ 0x04 baz_mix
-0+11c0 g \.text 0+ 0x04 baz_otherboth
-0+13e8 g \.data 0+ dfoowithout
-0+14b4 g \.data 0+ dbar
-0+106c g \.text 0+ 0x04 foo_mixwithout2
-0+11a8 g \.text 0+ 0x04 bazboth2
-0+13fc g \.data 0+ dfoo_otherwithout
-0+11c4 g \.text 0+ 0x04 baz_otherboth2
-0+1174 g \.text 0+ 0x04 bar_otherboth2
-0+1194 g \.text 0+ 0x04 baz
-0+13c8 g \.data 0+ dfoo
-0+14e8 g \.data 0+ dbar_mixwithout2
-0+13dc g \.data 0+ dfooboth2
-0+1408 g \.data 0+ dfoo_mix2
-0+154c g \.data 0+ dbaz_mixwithout
-0+1044 g \.text 0+ 0x04 foo_mix2
-0+1018 g \.text 0+ 0x04 fooboth2
-0+14cc g \.data 0+ dbar_otherboth2
-0+117c g \.text 0+ 0x04 bar_mix
-0+14d0 g \.data 0+ dbar_otherwithout
-0+11dc g \.text 0+ 0x04 baz_mixboth
-0+14c8 g \.data 0+ dbar_otherboth
-0+150c g \.data 0+ dbazwithout
-0+152c g \.data 0+ dbaz_mix2
-0+1184 g \.text 0+ 0x04 bar_mixboth
-0+13f4 g \.data 0+ dfoo_otherboth
-0+14dc g \.data 0+ dbar_mixboth
-0+1024 g \.text 0+ 0x04 foowithout
-0+14e4 g \.data 0+ dbar_mixwithout
-0+11fc g \.text 0+ 0x04 baz_mixwithout2
-0+1030 g \.text 0+ 0x04 foo_otherboth
-0+1540 g \.data 0+ dbaz_mixboth2
-0+104c g \.text 0+ 0x04 foo_mixboth
-0+1534 g \.data 0+ dbaz_mixboth
-0+103c g \.text 0+ 0x04 foo_mix
-0+1518 g \.data 0+ dbaz_otherboth
-0+14e0 g \.data 0+ dbar_mixboth2
-0+14ec g \.data 0+ dbaz
-0+1524 g \.data 0+ dbaz_mix
-0+13c8 g .* 0+ ___dtors
-0+141c g \.data 0+ dfoo_mixboth2
-0+119c g \.text 0+ 0x04 bazboth
-0+13f0 g \.data 0+ dfoo_other
-0+11e8 g \.text 0+ 0x04 baz_mixboth2
-0+1514 g \.data 0+ dbaz_other
-0+1164 g \.text 0+ 0x04 barboth2
-0+1168 g \.text 0+ 0x04 barwithout
-0+14d8 g \.data 0+ dbar_mix2
-0+1560 g \.data 0+ __bss_start
-0+1410 g \.data 0+ dfoo_mixboth
-0+14c4 g \.data 0+ dbar_other
-0+1180 g \.text 0+ 0x04 bar_mix2
-0+14f4 g \.data 0+ dbazboth
-0+1038 g \.text 0+ 0x04 foo_otherwithout
-0+1190 g \.text 0+ 0x04 bar_mixwithout2
-0+13c8 g .* 0+ ___ctors_end
-0+1064 g \.text 0+ 0x04 foo_mixwithout
-0+116c g \.text 0+ 0x04 bar_other
-0+13d0 g \.data 0+ dfooboth
-0+1034 g \.text 0+ 0x04 foo_otherboth2
-0+1400 g \.data 0+ dfoo_mix
-0+13c8 g .* 0+ ___ctors
-0+14d4 g \.data 0+ dbar_mix
-0+100c g \.text 0+ 0x04 fooboth
-0+1170 g \.text 0+ 0x04 bar_otherboth
-0+14c0 g \.data 0+ dbarwithout
-0+1004 g \.text 0+ 0x04 foo
-0+102c g \.text 0+ 0x04 foo_other
-0+1560 g \.data 0+ _edata
-0+1560 g \.data 0+ _end
-0+1430 g \.data 0+ dfoo_mixwithout2
-0+1058 g \.text 0+ 0x04 foo_mixboth2
-0+11d4 g \.text 0+ 0x04 baz_mix2
-0+11c8 g \.text 0+ 0x04 baz_otherwithout
-0+1000 g \.text 0+ 0x04 start
-0+14bc g \.data 0+ dbarboth2
-0+118c g \.text 0+ 0x04 bar_mixwithout
-0+115c g \.text 0+ 0x04 bar
-0+80000 g \.stack 0+ _stack
-0+1520 g \.data 0+ dbaz_otherwithout
-0+11f4 g \.text 0+ 0x04 baz_mixwithout
-0+1160 g \.text 0+ 0x04 barboth
-0+14b8 g \.data 0+ dbarboth
-0+1188 g \.text 0+ 0x04 bar_mixboth2
-0+13c8 g .* 0+ ___dtors_end
-0+151c g \.data 0+ dbaz_otherboth2
-0+1500 g \.data 0+ dbazboth2
diff --git a/ld/testsuite/ld-sh/sh64/shmix-1.s b/ld/testsuite/ld-sh/sh64/shmix-1.s
deleted file mode 100644
index e078ac2..0000000
--- a/ld/testsuite/ld-sh/sh64/shmix-1.s
+++ /dev/null
@@ -1,33 +0,0 @@
-! Check mixed-mode objects; different sections holding different ISA:s.
- .mode SHcompact
- .text
- .global start
-start:
- bt forw
- mova start2,r0
-start2:
- nop
- nop
-forw:
- nop
- .align 2
- .long $
- .long start2
- .long mediacode2
-
- .data
- .long $
- .long start2
- .long mediacode2
-
- .section .text.media,"ax"
- .mode SHmedia
- .align 2
-mediacode:
- ptb forw,tr4
- pt start2,tr5
-mediacode2:
- movi start2,r54
- movi mediacode2,r45
- pta mediacode2,tr7
- nop
diff --git a/ld/testsuite/ld-sh/sh64/shmix-2.s b/ld/testsuite/ld-sh/sh64/shmix-2.s
deleted file mode 100644
index 2ea7344..0000000
--- a/ld/testsuite/ld-sh/sh64/shmix-2.s
+++ /dev/null
@@ -1,28 +0,0 @@
-! A SHmedia object, that we will link to a SHcompact object.
-! We will be using .text for the SHmedia code and .text.compact for the
-! SHcompact code, so we don't get two ISA in the same section.
- .text
- .mode SHmedia
-
- .global start
- .global medialabel1
- .global medialabel2
- .global medialabel3
-start:
- movi compactlabel1,r14
- movi compactlabel4,r14
-medialabel1:
- pt compactlabel2,tr6
-medialabel2:
- nop
-
- .section .rodata
- .long compactlabel3
-medialabel3:
- .long compactlabel5
-
- .data
- .global medialabel4
- .long 0
-medialabel4:
- .long compactlabel2
diff --git a/ld/testsuite/ld-sh/sh64/shmix-3.s b/ld/testsuite/ld-sh/sh64/shmix-3.s
deleted file mode 100644
index 42d1212..0000000
--- a/ld/testsuite/ld-sh/sh64/shmix-3.s
+++ /dev/null
@@ -1,32 +0,0 @@
-! A SHcompact object, that we will link to a SHmedia object.
-! We will be using .text for the SHmedia code and .text.compact for the
-! SHcompact code, so we don't get two ISA in the same section.
- .section .text.compact,"ax"
- .mode SHcompact
- .global compactlabel1
- .global compactlabel2
- .global compactlabel3
- .global compactlabel4
- .global compactlabel5
-locallabel:
- nop
-compactlabel1:
- mova compactlabel2,r0
-compactlabel2:
- mova compactlabel3,r0
- nop
-compactlabel3:
- nop
- .align 2
- .long medialabel1
- .long medialabel4
-
- .section .rodata
- .long medialabel2
-compactlabel4:
- .long medialabel3
-
- .data
- .long 0
-compactlabel5:
- .long medialabel4
diff --git a/ld/testsuite/ld-sh/sh64/stobin-0-dso.d b/ld/testsuite/ld-sh/sh64/stobin-0-dso.d
deleted file mode 100644
index 405c05a..0000000
--- a/ld/testsuite/ld-sh/sh64/stobin-0-dso.d
+++ /dev/null
@@ -1,9 +0,0 @@
-#source: stolib.s
-#as: --abi=32 --isa=SHmedia
-#ld: -shared -mshelf32
-#objdump: -drj.text
-#target: sh64-*-elf
-
-.*: +file format elf32-sh64.*
-
-#pass
diff --git a/ld/testsuite/ld-sh/sh64/stobin-1.d b/ld/testsuite/ld-sh/sh64/stobin-1.d
deleted file mode 100644
index e0f8b27..0000000
--- a/ld/testsuite/ld-sh/sh64/stobin-1.d
+++ /dev/null
@@ -1,15 +0,0 @@
-#source: stobin.s
-#as: --abi=32 --isa=SHmedia
-#ld: -mshelf32 tmpdir/stobin-0-dso.so
-#objdump: -drj.text
-#target: sh64-*-elf
-
-.*: +file format elf32-sh64.*
-
-Disassembly of section \.text:
-
-0+[0-9a-f]+ <start>:
- [0-9a-f]+: cffffd90 movi -1,r25
- [0-9a-f]+: cbfee590 shori 65465,r25 ! 0xffffffb9 .*
- [0-9a-f]+: 6bf56600 ptrel/l r25,tr0
- [0-9a-f]+: 4401fff0 blink tr0,r63
diff --git a/ld/testsuite/ld-sh/sh64/stobin.s b/ld/testsuite/ld-sh/sh64/stobin.s
deleted file mode 100644
index 30d3597..0000000
--- a/ld/testsuite/ld-sh/sh64/stobin.s
+++ /dev/null
@@ -1,5 +0,0 @@
- .text
- .globl start
-start:
- pt bar, tr0
- blink tr0, r63
diff --git a/ld/testsuite/ld-sh/sh64/stolib.s b/ld/testsuite/ld-sh/sh64/stolib.s
deleted file mode 100644
index a5dee2b..0000000
--- a/ld/testsuite/ld-sh/sh64/stolib.s
+++ /dev/null
@@ -1,7 +0,0 @@
- .text
- .globl bar
- .type bar,@function
-bar:
- ptabs r18, tr0
- blink tr0, r63
-.Lfe_bar: .size bar,.Lfe_bar-bar
diff --git a/ld/testsuite/ld-srec/srec.exp b/ld/testsuite/ld-srec/srec.exp
index 7cda271..7604e53 100644
--- a/ld/testsuite/ld-srec/srec.exp
+++ b/ld/testsuite/ld-srec/srec.exp
@@ -288,14 +288,6 @@ proc run_srec_test { test objs } {
setup_xfail "riscv*-*-*"
}
- # SH64 targets cannot convert format in the linker
- # using the -oformat command line switch.
- if [istarget sh64*-*-elf] {
- # This is what gcc passes to ld by default.
- set flags "$flags -mshelf32"
- setup_xfail "sh64*-*-*"
- }
-
# V850 targets need libgcc.a
if [istarget v850*-*-elf] {
set objs "$objs -L ../gcc -lgcc"
diff --git a/ld/testsuite/ld-undefined/undefined.exp b/ld/testsuite/ld-undefined/undefined.exp
index f97db1c..4a55c54 100644
--- a/ld/testsuite/ld-undefined/undefined.exp
+++ b/ld/testsuite/ld-undefined/undefined.exp
@@ -124,7 +124,6 @@ if { ![is_remote host] && [which $CC] == 0 } {
setup_xfail mcore-*-elf
setup_xfail mep-*-*
setup_xfail mips-sgi-irix6*
- setup_xfail "sh64-*-*"
# Fails for the MSP430 because it uses SYM_DIFF relocs but it does
# not provide a special_function for handling them. If
# optimization is enabled then this test passes because
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index adf70dd..d4a0d91 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,5 +1,19 @@
2018-04-16 Alan Modra <amodra@gmail.com>
+ * Makefile.am: Remove sh5 and sh64 support.
+ * configure.ac: Likewise.
+ * disassemble.c: Likewise.
+ * disassemble.h: Likewise.
+ * sh-dis.c: Likewise.
+ * sh64-dis.c: Delete.
+ * sh64-opc.c: Delete.
+ * sh64-opc.h: Delete.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+ * po/POTFILES.in: Regenerate.
+
+2018-04-16 Alan Modra <amodra@gmail.com>
+
* Makefile.am: Remove w65 support.
* configure.ac: Likewise.
* disassemble.c: Likewise.
diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index 71140bb..05def3f 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -80,7 +80,6 @@ HFILES = \
mt-desc.h mt-opc.h \
score-opc.h \
sh-opc.h \
- sh64-opc.h \
sysdep.h \
xc16x-desc.h xc16x-opc.h \
xstormy16-desc.h xstormy16-opc.h \
@@ -228,8 +227,6 @@ TARGET_LIBOPCODES_CFILES = \
score-dis.c \
score7-dis.c \
sh-dis.c \
- sh64-dis.c \
- sh64-opc.c \
sparc-dis.c \
sparc-opc.c \
spu-dis.c \
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index 4d731c0..ca82230 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -381,7 +381,6 @@ HFILES = \
mt-desc.h mt-opc.h \
score-opc.h \
sh-opc.h \
- sh64-opc.h \
sysdep.h \
xc16x-desc.h xc16x-opc.h \
xstormy16-desc.h xstormy16-opc.h \
@@ -530,8 +529,6 @@ TARGET_LIBOPCODES_CFILES = \
score-dis.c \
score7-dis.c \
sh-dis.c \
- sh64-dis.c \
- sh64-opc.c \
sparc-dis.c \
sparc-opc.c \
spu-dis.c \
@@ -932,8 +929,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/score-dis.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/score7-dis.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sh-dis.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sh64-dis.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sh64-opc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparc-dis.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparc-opc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spu-dis.Plo@am__quote@
diff --git a/opcodes/configure b/opcodes/configure
index 56c8b33..6e58d0c 100755
--- a/opcodes/configure
+++ b/opcodes/configure
@@ -12687,21 +12687,7 @@ if test x${all_targets} = xfalse ; then
bfd_rx_arch) ta="$ta rx-dis.lo rx-decode.lo";;
bfd_s390_arch) ta="$ta s390-dis.lo s390-opc.lo" ;;
bfd_score_arch) ta="$ta score-dis.lo score7-dis.lo" ;;
- bfd_sh_arch)
- # We can't decide what we want just from the CPU family.
- # We want SH5 support unless a specific version of sh is
- # specified, as in sh3-elf, sh3b-linux-gnu, etc.
- # Include it just for ELF targets, since the SH5 bfd:s are ELF only.
- for t in $target $canon_targets; do
- case $t in
- all | sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \
- sh-*-linux* | shl-*-linux*)
- ta="$ta sh64-dis.lo sh64-opc.lo"
- archdefs="$archdefs -DINCLUDE_SHMEDIA"
- break;;
- esac;
- done
- ta="$ta sh-dis.lo cgen-bitset.lo" ;;
+ bfd_sh_arch) ta="$ta sh-dis.lo cgen-bitset.lo" ;;
bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
bfd_spu_arch) ta="$ta spu-dis.lo spu-opc.lo" ;;
bfd_tic30_arch) ta="$ta tic30-dis.lo" ;;
diff --git a/opcodes/configure.ac b/opcodes/configure.ac
index eee9eac..2bd880f 100644
--- a/opcodes/configure.ac
+++ b/opcodes/configure.ac
@@ -311,21 +311,7 @@ if test x${all_targets} = xfalse ; then
bfd_rx_arch) ta="$ta rx-dis.lo rx-decode.lo";;
bfd_s390_arch) ta="$ta s390-dis.lo s390-opc.lo" ;;
bfd_score_arch) ta="$ta score-dis.lo score7-dis.lo" ;;
- bfd_sh_arch)
- # We can't decide what we want just from the CPU family.
- # We want SH5 support unless a specific version of sh is
- # specified, as in sh3-elf, sh3b-linux-gnu, etc.
- # Include it just for ELF targets, since the SH5 bfd:s are ELF only.
- for t in $target $canon_targets; do
- case $t in
- all | sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \
- sh-*-linux* | shl-*-linux*)
- ta="$ta sh64-dis.lo sh64-opc.lo"
- archdefs="$archdefs -DINCLUDE_SHMEDIA"
- break;;
- esac;
- done
- ta="$ta sh-dis.lo cgen-bitset.lo" ;;
+ bfd_sh_arch) ta="$ta sh-dis.lo cgen-bitset.lo" ;;
bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
bfd_spu_arch) ta="$ta spu-dis.lo spu-opc.lo" ;;
bfd_tic30_arch) ta="$ta tic30-dis.lo" ;;
diff --git a/opcodes/disassemble.c b/opcodes/disassemble.c
index c5642c7..4cb90f1 100644
--- a/opcodes/disassemble.c
+++ b/opcodes/disassemble.c
@@ -97,7 +97,6 @@
#define ARCH_xtensa
#define ARCH_z80
#define ARCH_z8k
-#define INCLUDE_SHMEDIA
#endif
#ifdef ARCH_m32c
diff --git a/opcodes/disassemble.h b/opcodes/disassemble.h
index 27c6c10..5284033 100644
--- a/opcodes/disassemble.h
+++ b/opcodes/disassemble.h
@@ -78,7 +78,6 @@ extern int print_insn_pdp11 (bfd_vma, disassemble_info *);
extern int print_insn_pj (bfd_vma, disassemble_info *);
extern int print_insn_pru (bfd_vma, disassemble_info *);
extern int print_insn_s390 (bfd_vma, disassemble_info *);
-extern int print_insn_sh64 (bfd_vma, disassemble_info *);
extern int print_insn_spu (bfd_vma, disassemble_info *);
extern int print_insn_tic30 (bfd_vma, disassemble_info *);
extern int print_insn_tic4x (bfd_vma, disassemble_info *);
diff --git a/opcodes/po/POTFILES.in b/opcodes/po/POTFILES.in
index 6e611c8..cc3997d 100644
--- a/opcodes/po/POTFILES.in
+++ b/opcodes/po/POTFILES.in
@@ -184,9 +184,6 @@ score-opc.h
score7-dis.c
sh-dis.c
sh-opc.h
-sh64-dis.c
-sh64-opc.c
-sh64-opc.h
sparc-dis.c
sparc-opc.c
spu-dis.c
diff --git a/opcodes/sh-dis.c b/opcodes/sh-dis.c
index c441e59..33aec29 100644
--- a/opcodes/sh-dis.c
+++ b/opcodes/sh-dis.c
@@ -27,10 +27,6 @@
#include "sh-opc.h"
#include "disassemble.h"
-#ifdef ARCH_all
-#define INCLUDE_SHMEDIA
-#endif
-
static void
print_movxy (const sh_opcode_info *op,
int rn,
@@ -404,16 +400,6 @@ print_insn_sh (bfd_vma memaddr, struct disassemble_info *info)
&& bfd_asymbol_flavour(*info->symbols) == bfd_target_coff_flavour)
target_arch = arch_sh4;
break;
- case bfd_mach_sh5:
-#ifdef INCLUDE_SHMEDIA
- status = print_insn_sh64 (memaddr, info);
- if (status != -2)
- return status;
-#endif
- /* When we get here for sh64, it's because we want to disassemble
- SHcompact, i.e. arch_sh4. */
- target_arch = arch_sh4;
- break;
default:
target_arch = sh_get_arch_from_bfd_mach (info->mach);
}
diff --git a/opcodes/sh64-dis.c b/opcodes/sh64-dis.c
deleted file mode 100644
index 7d511aa..0000000
--- a/opcodes/sh64-dis.c
+++ /dev/null
@@ -1,619 +0,0 @@
-/* Disassemble SH64 instructions.
- Copyright (C) 2000-2018 Free Software Foundation, Inc.
-
- This file is part of the GNU opcodes library.
-
- This library is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- It is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
- License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this file; see the file COPYING. If not, write to the
- Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
- MA 02110-1301, USA. */
-
-#include "sysdep.h"
-#include <stdio.h>
-#include "disassemble.h"
-#include "sh64-opc.h"
-#include "libiberty.h"
-/* We need to refer to the ELF header structure. */
-#include "elf-bfd.h"
-#include "elf/sh.h"
-#include "elf32-sh64.h"
-
-#define ELF_MODE32_CODE_LABEL_P(SYM) \
- (((elf_symbol_type *) (SYM))->internal_elf_sym.st_other & STO_SH5_ISA32)
-
-#define SAVED_MOVI_R(INFO) \
- (((struct sh64_disassemble_info *) ((INFO)->private_data))->address_reg)
-
-#define SAVED_MOVI_IMM(INFO) \
- (((struct sh64_disassemble_info *) ((INFO)->private_data))->built_address)
-
-struct sh64_disassemble_info
- {
- /* When we see a MOVI, we save the register and the value, and merge a
- subsequent SHORI and display the address, if there is one. */
- unsigned int address_reg;
- bfd_signed_vma built_address;
-
- /* This is the range decriptor for the current address. It is kept
- around for the next call. */
- sh64_elf_crange crange;
- };
-
-/* Each item in the table is a mask to indicate which bits to be set
- to determine an instruction's operator.
- The index is as same as the instruction in the opcode table.
- Note that some archs have this as a field in the opcode table. */
-static unsigned long *shmedia_opcode_mask_table;
-
-/* Initialize the SH64 opcode mask table for each instruction in SHmedia
- mode. */
-
-static void
-initialize_shmedia_opcode_mask_table (void)
-{
- int n_opc;
- int n;
-
- /* Calculate number of opcodes. */
- for (n_opc = 0; shmedia_table[n_opc].name != NULL; n_opc++)
- ;
-
- shmedia_opcode_mask_table
- = xmalloc (sizeof (shmedia_opcode_mask_table[0]) * n_opc);
-
- for (n = 0; n < n_opc; n++)
- {
- int i;
-
- unsigned long mask = 0;
-
- for (i = 0; shmedia_table[n].arg[i] != A_NONE; i++)
- {
- int offset = shmedia_table[n].nibbles[i];
- int length;
-
- switch (shmedia_table[n].arg[i])
- {
- case A_GREG_M:
- case A_GREG_N:
- case A_GREG_D:
- case A_CREG_K:
- case A_CREG_J:
- case A_FREG_G:
- case A_FREG_H:
- case A_FREG_F:
- case A_DREG_G:
- case A_DREG_H:
- case A_DREG_F:
- case A_FMREG_G:
- case A_FMREG_H:
- case A_FMREG_F:
- case A_FPREG_G:
- case A_FPREG_H:
- case A_FPREG_F:
- case A_FVREG_G:
- case A_FVREG_H:
- case A_FVREG_F:
- case A_REUSE_PREV:
- length = 6;
- break;
-
- case A_TREG_A:
- case A_TREG_B:
- length = 3;
- break;
-
- case A_IMMM:
- abort ();
- break;
-
- case A_IMMU5:
- length = 5;
- break;
-
- case A_IMMS6:
- case A_IMMU6:
- case A_IMMS6BY32:
- length = 6;
- break;
-
- case A_IMMS10:
- case A_IMMS10BY1:
- case A_IMMS10BY2:
- case A_IMMS10BY4:
- case A_IMMS10BY8:
- length = 10;
- break;
-
- case A_IMMU16:
- case A_IMMS16:
- case A_PCIMMS16BY4:
- case A_PCIMMS16BY4_PT:
- length = 16;
- break;
-
- default:
- abort ();
- length = 0;
- break;
- }
-
- if (length != 0)
- mask |= (0xffffffff >> (32 - length)) << offset;
- }
- shmedia_opcode_mask_table[n] = 0xffffffff & ~mask;
- }
-}
-
-/* Get a predefined control-register-name, or return NULL. */
-
-static const char *
-creg_name (int cregno)
-{
- const shmedia_creg_info *cregp;
-
- /* If control register usage is common enough, change this to search a
- hash-table. */
- for (cregp = shmedia_creg_table; cregp->name != NULL; cregp++)
- if (cregp->cregno == cregno)
- return cregp->name;
-
- return NULL;
-}
-
-/* Main function to disassemble SHmedia instructions. */
-
-static int
-print_insn_shmedia (bfd_vma memaddr, struct disassemble_info *info)
-{
- fprintf_ftype fprintf_fn = info->fprintf_func;
- void *stream = info->stream;
- unsigned char insn[4];
- unsigned long instruction;
- int status;
- int n;
- const shmedia_opcode_info *op;
- int i;
- unsigned int r = 0;
- long imm = 0;
- bfd_vma disp_pc_addr;
-
- status = info->read_memory_func (memaddr, insn, 4, info);
-
- /* If we can't read four bytes, something is wrong. Display any data we
- can get as .byte:s. */
- if (status != 0)
- {
- for (i = 0; i < 3; i++)
- {
- status = info->read_memory_func (memaddr + i, insn, 1, info);
- if (status != 0)
- break;
- (*fprintf_fn) (stream, "%s0x%02x",
- i == 0 ? ".byte " : ", ",
- insn[0]);
- }
-
- return i ? i : -1;
- }
-
- /* Rearrange the bytes to make up an instruction. */
- if (info->endian == BFD_ENDIAN_LITTLE)
- instruction = bfd_getl32 (insn);
- else
- instruction = bfd_getb32 (insn);
-
- /* FIXME: Searching could be implemented using a hash on relevant
- fields. */
- for (n = 0, op = shmedia_table;
- op->name != NULL
- && ((instruction & shmedia_opcode_mask_table[n]) != op->opcode_base);
- n++, op++)
- ;
-
- /* FIXME: We should also check register number constraints. */
- if (op->name == NULL)
- {
- fprintf_fn (stream, ".long 0x%08lx", instruction);
- return 4;
- }
-
- fprintf_fn (stream, "%s\t", op->name);
-
- for (i = 0; i < 3 && op->arg[i] != A_NONE; i++)
- {
- unsigned long temp = instruction >> op->nibbles[i];
- int by_number = 0;
-
- if (i > 0 && op->arg[i] != A_REUSE_PREV)
- fprintf_fn (stream, ",");
-
- switch (op->arg[i])
- {
- case A_REUSE_PREV:
- continue;
-
- case A_GREG_M:
- case A_GREG_N:
- case A_GREG_D:
- r = temp & 0x3f;
- fprintf_fn (stream, "r%d", r);
- break;
-
- case A_FVREG_F:
- case A_FVREG_G:
- case A_FVREG_H:
- r = temp & 0x3f;
- fprintf_fn (stream, "fv%d", r);
- break;
-
- case A_FPREG_F:
- case A_FPREG_G:
- case A_FPREG_H:
- r = temp & 0x3f;
- fprintf_fn (stream, "fp%d", r);
- break;
-
- case A_FMREG_F:
- case A_FMREG_G:
- case A_FMREG_H:
- r = temp & 0x3f;
- fprintf_fn (stream, "mtrx%d", r);
- break;
-
- case A_CREG_K:
- case A_CREG_J:
- {
- const char *name;
-
- r = temp & 0x3f;
-
- name = creg_name (r);
-
- if (name != NULL)
- fprintf_fn (stream, "%s", name);
- else
- fprintf_fn (stream, "cr%d", r);
- }
- break;
-
- case A_FREG_G:
- case A_FREG_H:
- case A_FREG_F:
- r = temp & 0x3f;
- fprintf_fn (stream, "fr%d", r);
- break;
-
- case A_DREG_G:
- case A_DREG_H:
- case A_DREG_F:
- r = temp & 0x3f;
- fprintf_fn (stream, "dr%d", r);
- break;
-
- case A_TREG_A:
- case A_TREG_B:
- r = temp & 0x7;
- fprintf_fn (stream, "tr%d", r);
- break;
-
- /* A signed 6-bit number. */
- case A_IMMS6:
- imm = temp & 0x3f;
- if (imm & (unsigned long) 0x20)
- imm |= ~(unsigned long) 0x3f;
- fprintf_fn (stream, "%ld", imm);
- break;
-
- /* A signed 6-bit number, multiplied by 32 when used. */
- case A_IMMS6BY32:
- imm = temp & 0x3f;
- if (imm & (unsigned long) 0x20)
- imm |= ~(unsigned long) 0x3f;
- fprintf_fn (stream, "%ld", imm * 32);
- break;
-
- /* A signed 10-bit number, multiplied by 8 when used. */
- case A_IMMS10BY8:
- by_number++;
- /* Fall through. */
-
- /* A signed 10-bit number, multiplied by 4 when used. */
- case A_IMMS10BY4:
- by_number++;
- /* Fall through. */
-
- /* A signed 10-bit number, multiplied by 2 when used. */
- case A_IMMS10BY2:
- by_number++;
- /* Fall through. */
-
- /* A signed 10-bit number. */
- case A_IMMS10:
- case A_IMMS10BY1:
- imm = temp & 0x3ff;
- if (imm & (unsigned long) 0x200)
- imm |= ~(unsigned long) 0x3ff;
- imm <<= by_number;
- fprintf_fn (stream, "%ld", imm);
- break;
-
- /* A signed 16-bit number. */
- case A_IMMS16:
- imm = temp & 0xffff;
- if (imm & (unsigned long) 0x8000)
- imm |= ~((unsigned long) 0xffff);
- fprintf_fn (stream, "%ld", imm);
- break;
-
- /* A PC-relative signed 16-bit number, multiplied by 4 when
- used. */
- case A_PCIMMS16BY4:
- imm = temp & 0xffff; /* 16 bits */
- if (imm & (unsigned long) 0x8000)
- imm |= ~(unsigned long) 0xffff;
- imm <<= 2;
- disp_pc_addr = (bfd_vma) imm + memaddr;
- (*info->print_address_func) (disp_pc_addr, info);
- break;
-
- /* An unsigned 5-bit number. */
- case A_IMMU5:
- imm = temp & 0x1f;
- fprintf_fn (stream, "%ld", imm);
- break;
-
- /* An unsigned 6-bit number. */
- case A_IMMU6:
- imm = temp & 0x3f;
- fprintf_fn (stream, "%ld", imm);
- break;
-
- /* An unsigned 16-bit number. */
- case A_IMMU16:
- imm = temp & 0xffff;
- fprintf_fn (stream, "%ld", imm);
- break;
-
- default:
- abort ();
- break;
- }
- }
-
- /* FIXME: Looks like 32-bit values only are handled.
- FIXME: PC-relative numbers aren't handled correctly. */
- if (op->opcode_base == (unsigned long) SHMEDIA_SHORI_OPC
- && SAVED_MOVI_R (info) == r)
- {
- asection *section = info->section;
-
- /* Most callers do not set the section field correctly yet. Revert
- to getting the section from symbols, if any. */
- if (section == NULL
- && info->symbols != NULL
- && bfd_asymbol_flavour (info->symbols[0]) == bfd_target_elf_flavour
- && ! bfd_is_und_section (bfd_get_section (info->symbols[0]))
- && ! bfd_is_abs_section (bfd_get_section (info->symbols[0])))
- section = bfd_get_section (info->symbols[0]);
-
- /* Only guess addresses when the contents of this section is fully
- relocated. Otherwise, the value will be zero or perhaps even
- bogus. */
- if (section == NULL
- || section->owner == NULL
- || elf_elfheader (section->owner)->e_type == ET_EXEC)
- {
- bfd_signed_vma shori_addr;
-
- shori_addr = SAVED_MOVI_IMM (info) << 16;
- shori_addr |= imm;
-
- fprintf_fn (stream, "\t! 0x");
- (*info->print_address_func) (shori_addr, info);
- }
- }
-
- if (op->opcode_base == SHMEDIA_MOVI_OPC)
- {
- SAVED_MOVI_IMM (info) = imm;
- SAVED_MOVI_R (info) = r;
- }
- else
- {
- SAVED_MOVI_IMM (info) = 0;
- SAVED_MOVI_R (info) = 255;
- }
-
- return 4;
-}
-
-/* Check the type of contents about to be disassembled. This is like
- sh64_get_contents_type (which may be called from here), except that it
- takes the same arguments as print_insn_* and does what can be done if
- no section is available. */
-
-static enum sh64_elf_cr_type
-sh64_get_contents_type_disasm (bfd_vma memaddr, struct disassemble_info *info)
-{
- struct sh64_disassemble_info *sh64_infop = info->private_data;
-
- /* Perhaps we have a region from a previous probe and it still counts
- for this address? */
- if (sh64_infop->crange.cr_type != CRT_NONE
- && memaddr >= sh64_infop->crange.cr_addr
- && memaddr < sh64_infop->crange.cr_addr + sh64_infop->crange.cr_size)
- return sh64_infop->crange.cr_type;
-
- /* If we have a section, try and use it. */
- if (info->section
- && bfd_get_flavour (info->section->owner) == bfd_target_elf_flavour)
- {
- enum sh64_elf_cr_type cr_type
- = sh64_get_contents_type (info->section, memaddr,
- &sh64_infop->crange);
-
- if (cr_type != CRT_NONE)
- return cr_type;
- }
-
- /* If we have symbols, we can try and get at a section from *that*. */
- if (info->symbols != NULL
- && bfd_asymbol_flavour (info->symbols[0]) == bfd_target_elf_flavour
- && ! bfd_is_und_section (bfd_get_section (info->symbols[0]))
- && ! bfd_is_abs_section (bfd_get_section (info->symbols[0])))
- {
- enum sh64_elf_cr_type cr_type
- = sh64_get_contents_type (bfd_get_section (info->symbols[0]),
- memaddr, &sh64_infop->crange);
-
- if (cr_type != CRT_NONE)
- return cr_type;
- }
-
- /* We can make a reasonable guess based on the st_other field of a
- symbol; for a BranchTarget this is marked as STO_SH5_ISA32 and then
- it's most probably code there. */
- if (info->symbols
- && bfd_asymbol_flavour (info->symbols[0]) == bfd_target_elf_flavour
- && elf_symbol_from (bfd_asymbol_bfd (info->symbols[0]),
- info->symbols[0])->internal_elf_sym.st_other
- == STO_SH5_ISA32)
- return CRT_SH5_ISA32;
-
- /* If all else fails, guess this is code and guess on the low bit set. */
- return (memaddr & 1) == 1 ? CRT_SH5_ISA32 : CRT_SH5_ISA16;
-}
-
-/* Initialize static and dynamic disassembly state. */
-
-static bfd_boolean
-init_sh64_disasm_info (struct disassemble_info *info)
-{
- struct sh64_disassemble_info *sh64_infop
- = calloc (sizeof (*sh64_infop), 1);
-
- if (sh64_infop == NULL)
- return FALSE;
-
- info->private_data = sh64_infop;
-
- SAVED_MOVI_IMM (info) = 0;
- SAVED_MOVI_R (info) = 255;
-
- if (shmedia_opcode_mask_table == NULL)
- initialize_shmedia_opcode_mask_table ();
-
- return TRUE;
-}
-
-/* Main entry to disassemble SHmedia instructions, given an endian set in
- INFO. Note that the simulator uses this as the main entry and does not
- use any of the functions further below. */
-
-int
-print_insn_sh64x_media (bfd_vma memaddr, struct disassemble_info *info)
-{
- if (info->private_data == NULL && ! init_sh64_disasm_info (info))
- return -1;
-
- /* Make reasonable output. */
- info->bytes_per_line = 4;
- info->bytes_per_chunk = 4;
-
- return print_insn_shmedia (memaddr, info);
-}
-
-/* Main entry to disassemble SHmedia insns.
- If we see an SHcompact instruction, return -2. */
-
-int
-print_insn_sh64 (bfd_vma memaddr, struct disassemble_info *info)
-{
- enum bfd_endian endian = info->endian;
- enum sh64_elf_cr_type cr_type;
-
- if (info->private_data == NULL && ! init_sh64_disasm_info (info))
- return -1;
-
- cr_type = sh64_get_contents_type_disasm (memaddr, info);
- if (cr_type != CRT_SH5_ISA16)
- {
- int length = 4 - (memaddr % 4);
- info->display_endian = endian;
-
- /* If we got an uneven address to indicate SHmedia, adjust it. */
- if (cr_type == CRT_SH5_ISA32 && length == 3)
- memaddr--, length = 4;
-
- /* Only disassemble on four-byte boundaries. Addresses that are not
- a multiple of four can happen after a data region. */
- if (cr_type == CRT_SH5_ISA32 && length == 4)
- return print_insn_sh64x_media (memaddr, info);
-
- /* We get CRT_DATA *only* for data regions in a mixed-contents
- section. For sections with data only, we get indication of one
- of the ISA:s. You may think that we shouldn't disassemble
- section with only data if we can figure that out. However, the
- disassembly function is by default not called for data-only
- sections, so if the user explicitly specified disassembly of a
- data section, that's what we should do. */
- if (cr_type == CRT_DATA || length != 4)
- {
- int status;
- unsigned char data[4];
- struct sh64_disassemble_info *sh64_infop = info->private_data;
-
- if (length == 4
- && sh64_infop->crange.cr_type != CRT_NONE
- && memaddr >= sh64_infop->crange.cr_addr
- && memaddr < (sh64_infop->crange.cr_addr
- + sh64_infop->crange.cr_size))
- length
- = (sh64_infop->crange.cr_addr
- + sh64_infop->crange.cr_size - memaddr);
-
- status
- = (*info->read_memory_func) (memaddr, data,
- length >= 4 ? 4 : length, info);
-
- if (status == 0 && length >= 4)
- {
- (*info->fprintf_func) (info->stream, ".long 0x%08lx",
- endian == BFD_ENDIAN_BIG
- ? (long) (bfd_getb32 (data))
- : (long) (bfd_getl32 (data)));
- return 4;
- }
- else
- {
- int i;
-
- for (i = 0; i < length; i++)
- {
- status = info->read_memory_func (memaddr + i, data, 1, info);
- if (status != 0)
- break;
- (*info->fprintf_func) (info->stream, "%s0x%02x",
- i == 0 ? ".byte " : ", ",
- data[0]);
- }
-
- return i ? i : -1;
- }
- }
- }
-
- /* SH1 .. SH4 instruction, let caller handle it. */
- return -2;
-}
diff --git a/opcodes/sh64-opc.c b/opcodes/sh64-opc.c
deleted file mode 100644
index f648c91..0000000
--- a/opcodes/sh64-opc.c
+++ /dev/null
@@ -1,777 +0,0 @@
-/* Definitions for SH64 opcodes.
- Copyright (C) 2000-2018 Free Software Foundation, Inc.
-
- This file is part of the GNU opcodes library.
-
- This library is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- It is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
- License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this file; see the file COPYING. If not, write to the
- Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
- MA 02110-1301, USA. */
-
-#include "sh64-opc.h"
-#include <stdio.h>
-
-/* Users currently assume that no mnemonic appears twice. For
- disassembly, the first complete match is displayed. */
-const shmedia_opcode_info shmedia_table[] = {
-
-/* 000000mmmmmm1001nnnnnndddddd0000 add <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "add", {A_GREG_M,A_GREG_N,A_GREG_D},
- {OFFSET_20,OFFSET_10,OFFSET_4}, SHMEDIA_ADD_OPC
- },
-/* 000000mmmmmm1000nnnnnndddddd0000 add.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "add.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x00080000
- },
-/* 110100mmmmmmssssssssssdddddd0000 addi <A_GREG_M>,<A_IMMS10>,<A_GREG_D> */
- { "addi", {A_GREG_M,A_IMMS10BY1,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4},
- SHMEDIA_ADDI_OPC
- },
-/* 110101mmmmmmssssssssssdddddd0000 addi.l <A_GREG_M>,<A_IMMS10>,<A_GREG_D> */
- { "addi.l", {A_GREG_M,A_IMMS10BY1,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xd4000000
- },
-/* 000000mmmmmm1100nnnnnndddddd0000 addz.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "addz.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x000c0000
- },
-/* 111000mmmmmm0100ssssss1111110000 alloco <A_GREG_M>,<A_IMMS6BY32> */
- { "alloco", {A_GREG_M,A_IMMS6BY32}, {OFFSET_20,OFFSET_10}, 0xe00403f0
- },
-/* 000001mmmmmm1011nnnnnndddddd0000 and <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "and", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x040b0000
- },
-/* 000001mmmmmm1111nnnnnndddddd0000 andc <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "andc", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x040f0000
- },
-/* 110110mmmmmmssssssssssdddddd0000 andi <A_GREG_M>,<A_IMMS10>,<A_GREG_D> */
- { "andi", {A_GREG_M,A_IMMS10,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xd8000000
- },
-/* 011001mmmmmm0001nnnnnnl00ccc0000 beq <A_GREG_M>,<A_GREG_N>,<A_TREG_A> */
- { "beq/l", {A_GREG_M,A_GREG_N,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x64010200
- },
-/* 011001mmmmmm0001nnnnnnl00ccc0000 beq <A_GREG_M>,<A_GREG_N>,<A_TREG_A> */
- { "beq", {A_GREG_M,A_GREG_N,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x64010200
- },
-/* 011001mmmmmm0001nnnnnn000ccc0000 beq/u <A_GREG_M>,<A_GREG_N>,<A_TREG_A> */
- { "beq/u", {A_GREG_M,A_GREG_N,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x64010000
- },
-/* 111001mmmmmm0001ssssssl00ccc0000 beqi <A_GREG_M>,<A_IMMS6>,<A_TREG_A> */
- { "beqi/l", {A_GREG_M,A_IMMS6,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xe4010200
- },
-/* 111001mmmmmm0001ssssssl00ccc0000 beqi <A_GREG_M>,<A_IMMS6>,<A_TREG_A> */
- { "beqi", {A_GREG_M,A_IMMS6,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xe4010200
- },
-/* 111001mmmmmm0001ssssss000ccc0000 beqi/u <A_GREG_M>,<A_IMMS6>,<A_TREG_A> */
- { "beqi/u", {A_GREG_M,A_IMMS6,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xe4010000
- },
-/* 011001mmmmmm0011nnnnnnl00ccc0000 bge <A_GREG_M>,<A_GREG_N>,<A_TREG_A> */
- { "bge/l", {A_GREG_M,A_GREG_N,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x64030200
- },
-/* 011001mmmmmm0011nnnnnnl00ccc0000 bge <A_GREG_M>,<A_GREG_N>,<A_TREG_A> */
- { "bge", {A_GREG_M,A_GREG_N,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x64030200
- },
-/* 011001mmmmmm0011nnnnnn000ccc0000 bge/u <A_GREG_M>,<A_GREG_N>,<A_TREG_A> */
- { "bge/u", {A_GREG_M,A_GREG_N,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x64030000
- },
-/* 011001mmmmmm1011nnnnnnl00ccc0000 bgeu <A_GREG_M>,<A_GREG_N>,<A_TREG_A> */
- { "bgeu/l", {A_GREG_M,A_GREG_N,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x640b0200
- },
-/* 011001mmmmmm1011nnnnnnl00ccc0000 bgeu <A_GREG_M>,<A_GREG_N>,<A_TREG_A> */
- { "bgeu", {A_GREG_M,A_GREG_N,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x640b0200
- },
-/* 011001mmmmmm1011nnnnnn000ccc0000 bgeu/u <A_GREG_M>,<A_GREG_N>,<A_TREG_A> */
- { "bgeu/u", {A_GREG_M,A_GREG_N,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x640b0000
- },
-/* 011001mmmmmm0111nnnnnnl00ccc0000 bgt <A_GREG_M>,<A_GREG_N>,<A_TREG_A> */
- { "bgt/l", {A_GREG_M,A_GREG_N,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x64070200
- },
-/* 011001mmmmmm0111nnnnnnl00ccc0000 bgt <A_GREG_M>,<A_GREG_N>,<A_TREG_A> */
- { "bgt", {A_GREG_M,A_GREG_N,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x64070200
- },
-/* 011001mmmmmm0111nnnnnn000ccc0000 bgt/u <A_GREG_M>,<A_GREG_N>,<A_TREG_A> */
- { "bgt/u", {A_GREG_M,A_GREG_N,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x64070000
- },
-/* 011001mmmmmm1111nnnnnnl00ccc0000 bgtu <A_GREG_M>,<A_GREG_N>,<A_TREG_A> */
- { "bgtu/l", {A_GREG_M,A_GREG_N,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x640f0200
- },
-/* 011001mmmmmm1111nnnnnnl00ccc0000 bgtu <A_GREG_M>,<A_GREG_N>,<A_TREG_A> */
- { "bgtu", {A_GREG_M,A_GREG_N,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x640f0200
- },
-/* 011001mmmmmm1111nnnnnn000ccc0000 bgtu/u <A_GREG_M>,<A_GREG_N>,<A_TREG_A> */
- { "bgtu/u", {A_GREG_M,A_GREG_N,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x640f0000
- },
-/* 010001000bbb0001111111dddddd0000 blink <A_TREG_B>,<A_GREG_D> */
- { "blink", {A_TREG_B,A_GREG_D}, {OFFSET_20,OFFSET_4}, 0x4401fc00
- },
-/* 011001mmmmmm0101nnnnnnl00ccc0000 bne <A_GREG_M>,<A_GREG_N>,<A_TREG_A> */
- { "bne/l", {A_GREG_M,A_GREG_N,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x64050200
- },
-/* 011001mmmmmm0101nnnnnnl00ccc0000 bne <A_GREG_M>,<A_GREG_N>,<A_TREG_A> */
- { "bne", {A_GREG_M,A_GREG_N,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x64050200
- },
-/* 011001mmmmmm0101nnnnnn000ccc0000 bne/u <A_GREG_M>,<A_GREG_N>,<A_TREG_A> */
- { "bne/u", {A_GREG_M,A_GREG_N,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x64050000
- },
-/* 111001mmmmmm0101ssssssl00ccc0000 bnei <A_GREG_M>,<A_IMMS6>,<A_TREG_A> */
- { "bnei/l", {A_GREG_M,A_IMMS6,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xe4050200
- },
-/* 111001mmmmmm0101ssssssl00ccc0000 bnei <A_GREG_M>,<A_IMMS6>,<A_TREG_A> */
- { "bnei", {A_GREG_M,A_IMMS6,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xe4050200
- },
-/* 111001mmmmmm0101ssssss000ccc0000 bnei/u <A_GREG_M>,<A_IMMS6>,<A_TREG_A> */
- { "bnei/u", {A_GREG_M,A_IMMS6,A_TREG_A}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xe4050000
- },
-/* 01101111111101011111111111110000 brk */
- { "brk", {A_NONE}, {OFFSET_NONE}, 0x6ff5fff0
- },
-/* 000000mmmmmm1111111111dddddd0000 byterev <A_GREG_M>,<A_GREG_D> */
- { "byterev", {A_GREG_M,A_GREG_D}, {OFFSET_20,OFFSET_4}, 0x000ffc00
- },
-/* 000000mmmmmm0001nnnnnndddddd0000 cmpeq <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "cmpeq", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x00010000
- },
-/* 000000mmmmmm0011nnnnnndddddd0000 cmpgt <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "cmpgt", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x00030000
- },
-/* 000000mmmmmm0111nnnnnndddddd0000 cmpgtu <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "cmpgtu", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x00070000
- },
-/* 001000mmmmmm0001nnnnnnwwwwww0000 cmveq <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "cmveq", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x20010000
- },
-/* 001000mmmmmm0101nnnnnnwwwwww0000 cmvne <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "cmvne", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x20050000
- },
-/* 000110gggggg0001ggggggffffff0000 fabs.d <A_DREG_G>,<A_DREG_F> */
- { "fabs.d", {A_DREG_G,A_REUSE_PREV,A_DREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x18010000
- },
-/* 000110gggggg0000ggggggffffff0000 fabs.s <A_FREG_G>,<A_FREG_F> */
- { "fabs.s", {A_FREG_G,A_REUSE_PREV,A_FREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x18000000
- },
-/* 001101gggggg0001hhhhhhffffff0000 fadd.s <A_DREG_G>,<A_DREG_H>,<A_DREG_F> */
- { "fadd.d", {A_DREG_G,A_DREG_H,A_DREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x34010000
- },
-/* 001101gggggg0000hhhhhhffffff0000 fadd.s <A_FREG_G>,<A_FREG_H>,<A_FREG_F> */
- { "fadd.s", {A_FREG_G,A_FREG_H,A_FREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x34000000
- },
-/* 001100gggggg1001hhhhhhdddddd0000 fcmpeq.s <A_DREG_G>,<A_DREG_H>,<A_GREG_D> */
- { "fcmpeq.d", {A_DREG_G,A_DREG_H,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x30090000
- },
-/* 001100gggggg1000hhhhhhdddddd0000 fcmpeq.s <A_FREG_G>,<A_FREG_H>,<A_GREG_D> */
- { "fcmpeq.s", {A_FREG_G,A_FREG_H,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x30080000
- },
-/* 001100gggggg1111hhhhhhdddddd0000 fcmpge.d <A_DREG_G>,<A_DREG_H>,<A_GREG_D> */
- { "fcmpge.d", {A_DREG_G,A_DREG_H,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x300f0000
- },
-/* 001100gggggg1110hhhhhhdddddd0000 fcmpge.s <A_FREG_G>,<A_FREG_H>,<A_GREG_D> */
- { "fcmpge.s", {A_FREG_G,A_FREG_H,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x300e0000
- },
-/* 001100gggggg1101hhhhhhdddddd0000 fcmpgt.d <A_DREG_G>,<A_DREG_H>,<A_GREG_D> */
- { "fcmpgt.d", {A_DREG_G,A_DREG_H,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x300d0000
- },
-/* 001100gggggg1100hhhhhhdddddd0000 fcmpgt.s <A_FREG_G>,<A_FREG_H>,<A_GREG_D> */
- { "fcmpgt.s", {A_FREG_G,A_FREG_H,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x300c0000
- },
-/* 001100gggggg1011hhhhhhdddddd0000 fcmpun.d <A_DREG_G>,<A_DREG_H>,<A_GREG_D> */
- { "fcmpun.d", {A_DREG_G,A_DREG_H,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x300b0000
- },
-/* 001100gggggg1010hhhhhhdddddd0000 fcmpun.s <A_FREG_G>,<A_FREG_H>,<A_GREG_D> */
- { "fcmpun.s", {A_FREG_G,A_FREG_H,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x300a0000
- },
-/* 001110gggggg0111ggggggffffff0000 fcnv.ds <A_DREG_G>,<A_FREG_F> */
- { "fcnv.ds", {A_DREG_G,A_REUSE_PREV,A_FREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x38070000
- },
-/* 001110gggggg0110ggggggffffff0000 fcnv.sd <A_FREG_G>,<A_DREG_F> */
- { "fcnv.sd", {A_FREG_G,A_REUSE_PREV,A_DREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x38060000
- },
-/* 001101gggggg0101hhhhhhffffff0000 fdiv.d <A_DREG_G>,<A_DREG_H>,<A_DREG_F> */
- { "fdiv.d", {A_DREG_G,A_DREG_H,A_DREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x34050000
- },
-/* 001101gggggg0100hhhhhhffffff0000 fdiv.s <A_FREG_G>,<A_FREG_H>,<A_FREG_F> */
- { "fdiv.s", {A_FREG_G,A_FREG_H,A_FREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x34040000
- },
-/* 0001111111110010111111ffffff0000 fgetscr <A_FREG_F> */
- { "fgetscr", {A_FREG_F}, {OFFSET_4}, 0x1ff2fc00
- },
-/* 000101gggggg0110hhhhhhffffff0000 fipr.s <A_FVREG_G>,<A_FVREG_H>,<A_FREG_F> */
- { "fipr.s", {A_FVREG_G,A_FVREG_H,A_FREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x14060000
- },
-/* 100111mmmmmmssssssssssffffff0000 fld.d <A_GREG_M>,<A_IMMS10BY8>,<A_DREG_F> */
- { "fld.d", {A_GREG_M,A_IMMS10BY8,A_DREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x9c000000
- },
-/* 100110mmmmmmssssssssssffffff0000 fld.p <A_GREG_M>,<A_IMMS10BY8>,<A_FPREG_F> */
- { "fld.p", {A_GREG_M,A_IMMS10BY8,A_FPREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x98000000
- },
-/* 100101mmmmmmssssssssssffffff0000 fld.s <A_GREG_M>,<A_IMMS10BY4>,<A_FREG_F> */
- { "fld.s", {A_GREG_M,A_IMMS10BY4,A_FREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x94000000
- },
-/* 000111mmmmmm1001nnnnnnffffff0000 fldx.d <A_GREG_M>,<A_GREG_N>,<A_DREG_F> */
- { "fldx.d", {A_GREG_M,A_GREG_N,A_DREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x1c090000
- },
-/* 000111mmmmmm1101nnnnnnffffff0000 fldx.p <A_GREG_M>,<A_GREG_N>,<A_FPREG_F> */
- { "fldx.p", {A_GREG_M,A_GREG_N,A_FPREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x1c0d0000
- },
-/* 000111mmmmmm1000nnnnnnffffff0000 fldx.s <A_GREG_M>,<A_GREG_N>,<A_FREG_F> */
- { "fldx.s", {A_GREG_M,A_GREG_N,A_FREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x1c080000
- },
-/* 001110gggggg1110ggggggffffff0000 float.ld <A_FREG_G>,<A_DREG_F> */
- { "float.ld", {A_FREG_G,A_REUSE_PREV,A_DREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x380e0000
- },
-/* 001110gggggg1100ggggggffffff0000 float.ls <A_FREG_G>,<A_FREG_F> */
- { "float.ls", {A_FREG_G,A_REUSE_PREV,A_FREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x380c0000
- },
-/* 001110gggggg1101ggggggffffff0000 float.qd <A_DREG_G>,<A_DREG_F> */
- { "float.qd", {A_DREG_G,A_REUSE_PREV,A_DREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x380d0000
- },
-/* 001110gggggg1111ggggggffffff0000 float.qs <A_DREG_G>,<A_FREG_F> */
- { "float.qs", {A_DREG_G,A_REUSE_PREV,A_FREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x380f0000
- },
-/* 001101gggggg1110hhhhhhqqqqqq0000 fmac.s <A_FREG_G>,<A_FREG_H>,<A_FREG_F> */
- { "fmac.s", {A_FREG_G,A_FREG_H,A_FREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x340e0000
- },
-/* 001110gggggg0001ggggggffffff0000 fmov.d <A_DREG_G>,<A_DREG_F> */
- { "fmov.d", {A_DREG_G,A_REUSE_PREV,A_DREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x38010000
- },
-/* 001100gggggg0001ggggggdddddd0000 fmov.dq <A_DREG_G>,<A_GREG_D> */
- { "fmov.dq", {A_DREG_G,A_REUSE_PREV,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x30010000
- },
-/* 000111mmmmmm0000111111ffffff0000 fmov.ls <A_GREG_M>,<A_FREG_F> */
- { "fmov.ls", {A_GREG_M,A_FREG_F}, {OFFSET_20,OFFSET_4}, 0x1c00fc00
- },
-/* 000111mmmmmm0001111111ffffff0000 fmov.qd <A_GREG_M>,<A_DREG_F> */
- { "fmov.qd", {A_GREG_M,A_DREG_F}, {OFFSET_20,OFFSET_4}, 0x1c01fc00
- },
-/* 001110gggggg0000ggggggffffff0000 fmov.s <A_FREG_G>,<A_FREG_F> */
- { "fmov.s", {A_FREG_G,A_REUSE_PREV,A_FREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x38000000
- },
-/* 001100gggggg0000ggggggdddddd0000 fmov.sl <A_FREG_G>,<A_GREG_D> */
- { "fmov.sl", {A_FREG_G,A_REUSE_PREV,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x30000000
- },
-/* 001101gggggg0111hhhhhhffffff0000 fmul.d <A_DREG_G>,<A_DREG_H>,<A_DREG_F> */
- { "fmul.d", {A_DREG_G,A_DREG_H,A_DREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x34070000
- },
-/* 001101gggggg0110hhhhhhffffff0000 fmul.s <A_FREG_G>,<A_FREG_H>,<A_FREG_F> */
- { "fmul.s", {A_FREG_G,A_FREG_H,A_FREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x34060000
- },
-/* 000110gggggg0011ggggggffffff0000 fneg.d <A_DREG_G>,<A_DREG_F> */
- { "fneg.d", {A_DREG_G,A_REUSE_PREV,A_DREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x18030000
- },
-/* 000110gggggg0010ggggggffffff0000 fneg.s <A_FREG_G>,<A_FREG_F> */
- { "fneg.s", {A_FREG_G,A_REUSE_PREV,A_FREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x18020000
- },
-/* 001100gggggg0010gggggg1111110000 fputscr <A_FREG_G> */
- { "fputscr", {A_FREG_G,A_REUSE_PREV}, {OFFSET_20,OFFSET_10}, 0x300203f0
- },
-/* 001110gggggg0101ggggggffffff0000 fsqrt.d <A_DREG_G>,<A_DREG_F> */
- { "fsqrt.d", {A_DREG_G,A_REUSE_PREV,A_DREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x38050000
- },
-/* 001110gggggg0100ggggggffffff0000 fsqrt.s <A_FREG_G>,<A_FREG_F> */
- { "fsqrt.s", {A_FREG_G,A_REUSE_PREV,A_FREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x38040000
- },
-/* 101111mmmmmmsssssssssszzzzzz0000 fst.d <A_GREG_M>,<A_IMMS10BY8>,<A_DREG_F> */
- { "fst.d", {A_GREG_M,A_IMMS10BY8,A_DREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xbc000000
- },
-/* 101110mmmmmmsssssssssszzzzzz0000 fst.p <A_GREG_M>,<A_IMMS10BY8>,<A_FPREG_F> */
- { "fst.p", {A_GREG_M,A_IMMS10BY8,A_FPREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xb8000000
- },
-/* 101101mmmmmmsssssssssszzzzzz0000 fst.s <A_GREG_M>,<A_IMMS10BY4>,<A_FREG_F> */
- { "fst.s", {A_GREG_M,A_IMMS10BY4,A_FREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xb4000000
- },
-/* 001111mmmmmm1001nnnnnnzzzzzz0000 fstx.d <A_GREG_M>,<A_GREG_N>,<A_DREG_F> */
- { "fstx.d", {A_GREG_M,A_GREG_N,A_DREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x3c090000
- },
-/* 001111mmmmmm1101nnnnnnzzzzzz0000 fstx.p <A_GREG_M>,<A_GREG_N>,<A_FPREG_F> */
- { "fstx.p", {A_GREG_M,A_GREG_N,A_FPREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x3c0d0000
- },
-/* 001111mmmmmm1000nnnnnnzzzzzz0000 fstx.s <A_GREG_M>,<A_GREG_N>,<A_FREG_F> */
- { "fstx.s", {A_GREG_M,A_GREG_N,A_FREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x3c080000
- },
-/* 001101gggggg0011hhhhhhffffff0000 fsub.d <A_DREG_G>,<A_DREG_H>,<A_DREG_F> */
- { "fsub.d", {A_DREG_G,A_DREG_H,A_DREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x34030000
- },
-/* 001101gggggg0010hhhhhhffffff0000 fsub.s <A_FREG_G>,<A_FREG_H>,<A_FREG_F> */
- { "fsub.s", {A_FREG_G,A_FREG_H,A_FREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x34020000
- },
-/* 001110gggggg1011ggggggffffff0000 ftrc.dl <A_DREG_G>,<A_FREG_F> */
- { "ftrc.dl", {A_DREG_G,A_REUSE_PREV,A_FREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x380b0000
- },
-/* 001110gggggg1001ggggggffffff0000 ftrc.dq <A_DREG_G>,<A_DREG_F> */
- { "ftrc.dq", {A_DREG_G,A_REUSE_PREV,A_DREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x38090000
- },
-/* 001110gggggg1000ggggggffffff0000 ftrc.sl <A_FREG_G>,<A_FREG_F> */
- { "ftrc.sl", {A_FREG_G,A_REUSE_PREV,A_FREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x38080000
- },
-/* 001110gggggg1010ggggggffffff0000 ftrc.sq <A_FREG_G>,<A_DREG_F> */
- { "ftrc.sq", {A_FREG_G,A_REUSE_PREV,A_DREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x380a0000
- },
-/* 000101gggggg1110hhhhhhffffff0000 ftrv.s <A_FMREG_G>,<A_FVREG_H>,<A_FVREG_F> */
- { "ftrv.s", {A_FMREG_G,A_FVREG_H,A_FVREG_F}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x140e0000
- },
-/* 110000mmmmmm1111ssssssdddddd0000 getcfg <A_GREG_M>,<A_IMMS6>,<A_GREG_D> */
- { "getcfg", {A_GREG_M,A_IMMS6,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xc00f0000
- },
-/* 001001kkkkkk1111111111dddddd0000 getcon <A_CREG_K>,<A_GREG_M> */
- { "getcon", {A_CREG_K,A_GREG_D}, {OFFSET_20,OFFSET_4}, 0x240ffc00
- },
-/* 010001rrrbbb0101111111dddddd0000 gettr <A_TREG_A>,<A_GREG_D> */
- { "gettr", {A_TREG_B,A_GREG_D}, {OFFSET_20,OFFSET_4}, 0x4405fc00
- },
-/* 111000mmmmmm0101ssssss1111110000 icbi <A_GREG_M>,<A_IMMS6BY32> */
- { "icbi", {A_GREG_M,A_IMMS6BY32}, {OFFSET_20,OFFSET_10}, 0xe00503f0
- },
-/* 100000mmmmmmssssssssssdddddd0000 ld.b <A_GREG_M>,<A_IMMS10BY1>,<A_GREG_D> */
- { "ld.b", {A_GREG_M,A_IMMS10BY1,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x80000000
- },
-/* 100010mmmmmmssssssssssdddddd0000 ld.l <A_GREG_M>,<A_IMMS10BY4>,<A_GREG_D> */
- { "ld.l", {A_GREG_M,A_IMMS10BY4,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x88000000
- },
-/* 100011mmmmmmssssssssssdddddd0000 ld.q <A_GREG_M>,<A_IMMS10BY8>,<A_GREG_D> */
- { "ld.q", {A_GREG_M,A_IMMS10BY8,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x8c000000
- },
-/* 100100mmmmmmssssssssssdddddd0000 ld.ub <A_GREG_M>,<A_IMMS10BY1>,<A_GREG_D> */
- { "ld.ub", {A_GREG_M,A_IMMS10BY1,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x90000000
- },
-/* 101100mmmmmmssssssssssdddddd0000 ld.uw <A_GREG_M>,<A_IMMS10BY2>,<A_GREG_D> */
- { "ld.uw", {A_GREG_M,A_IMMS10BY2,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xb0000000
- },
-/* 100001mmmmmmssssssssssdddddd0000 ld.w <A_GREG_M>,<A_IMMS10BY2>,<A_GREG_D> */
- { "ld.w", {A_GREG_M,A_IMMS10BY2,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x84000000
- },
-/* 110000mmmmmm0110ssssssdddddd0000 ldhi.l <A_GREG_M>,<A_IMMS6>,<A_GREG_D> */
- { "ldhi.l", {A_GREG_M,A_IMMS6,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xc0060000
- },
-/* 110000mmmmmm0111ssssssdddddd0000 ldhi.q <A_GREG_M>,<A_IMMS6>,<A_GREG_D> */
- { "ldhi.q", {A_GREG_M,A_IMMS6,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xc0070000
- },
-/* 110000mmmmmm0010ssssssdddddd0000 ldlo.l <A_GREG_M>,<A_IMMS6>,<A_GREG_D> */
- { "ldlo.l", {A_GREG_M,A_IMMS6,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xc0020000
- },
-/* 110000mmmmmm0011ssssssdddddd0000 ldlo.q <A_GREG_M>,<A_IMMS6>,<A_GREG_D> */
- { "ldlo.q", {A_GREG_M,A_IMMS6,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xc0030000
- },
-/* 010000mmmmmm0000nnnnnndddddd0000 ldx.b <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "ldx.b", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x40000000
- },
-/* 010000mmmmmm0010nnnnnndddddd0000 ldx.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "ldx.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x40020000
- },
-/* 010000mmmmmm0011nnnnnndddddd0000 ldx.q <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "ldx.q", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x40030000
- },
-/* 010000mmmmmm0100nnnnnndddddd0000 ldx.ub <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "ldx.ub", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x40040000
- },
-/* 010000mmmmmm0101nnnnnndddddd0000 ldx.uw <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "ldx.uw", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x40050000
- },
-/* 010000mmmmmm0001nnnnnndddddd0000 ldx.w <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "ldx.w", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x40010000
- },
-/* 001010mmmmmm1010111111dddddd0000 mabs.l <A_GREG_M>,<A_GREG_D> */
- { "mabs.l", {A_GREG_M,A_GREG_D}, {OFFSET_20,OFFSET_4}, 0x280afc00
- },
-/* 001010mmmmmm1001111111dddddd0000 mabs.w <A_GREG_M>,<A_GREG_D> */
- { "mabs.w", {A_GREG_M,A_GREG_D}, {OFFSET_20,OFFSET_4}, 0x2809fc00
- },
-/* 000010mmmmmm0010nnnnnndddddd0000 madd.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "madd.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x08020000
- },
-/* 000010mmmmmm0001nnnnnndddddd0000 madd.w <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "madd.w", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x08010000
- },
-/* 000010mmmmmm0110nnnnnndddddd0000 madds.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "madds.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x08060000
- },
-/* 000010mmmmmm0100nnnnnndddddd0000 madds.ub <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "madds.ub", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x08040000
- },
-/* 000010mmmmmm0101nnnnnndddddd0000 madds.w <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "madds.w", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x08050000
- },
-/* 001010mmmmmm0000nnnnnndddddd0000 mcmpeq.b <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mcmpeq.b", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x28000000
- },
-/* 001010mmmmmm0010nnnnnndddddd0000 mcmpeq.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mcmpeq.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x28020000
- },
-/* 001010mmmmmm0001nnnnnndddddd0000 mcmpeq.w <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mcmpeq.w", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x28010000
- },
-/* 001010mmmmmm0110nnnnnndddddd0000 mcmpgt.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mcmpgt.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x28060000
- },
-/* 001010mmmmmm0100nnnnnndddddd0000 mcmpgt.ub <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mcmpgt.ub", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x28040000
- },
-/* 001010mmmmmm0101nnnnnndddddd0000 mcmpgt.w <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mcmpgt.w", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x28050000
- },
-/* 010010mmmmmm0011nnnnnnwwwwww0000 mcmv <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mcmv", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x48030000
- },
-/* 010011mmmmmm1101nnnnnndddddd0000 mcnvs.lw <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mcnvs.lw", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x4c0d0000
- },
-/* 010011mmmmmm1000nnnnnndddddd0000 mcnvs.wb <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mcnvs.wb", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x4c080000
- },
-/* 010011mmmmmm1100nnnnnndddddd0000 mcnvs.wub <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mcnvs.wub", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x4c0c0000
- },
-/* 001010mmmmmm0111nnnnnndddddd0000 mextr1 <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mextr1", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x28070000
- },
-/* 001010mmmmmm1011nnnnnndddddd0000 mextr2 <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mextr2", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x280b0000
- },
-/* 001010mmmmmm1111nnnnnndddddd0000 mextr3 <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mextr3", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x280f0000
- },
-/* 001011mmmmmm0011nnnnnndddddd0000 mextr4 <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mextr4", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x2c030000
- },
-/* 001011mmmmmm0111nnnnnndddddd0000 mextr5 <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mextr5", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x2c070000
- },
-/* 001011mmmmmm1011nnnnnndddddd0000 mextr6 <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mextr6", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x2c0b0000
- },
-/* 001011mmmmmm1111nnnnnndddddd0000 mextr7 <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mextr7", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x2c0f0000
- },
-/* 010010mmmmmm0001nnnnnnwwwwww0000 mmacfx.wl <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mmacfx.wl", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x48010000
- },
-/* 010010mmmmmm0101nnnnnnwwwwww0000 mmacnfx.wl <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mmacnfx.wl", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x48050000
- },
-/* 010011mmmmmm0010nnnnnndddddd0000 mmul.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mmul.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x4c020000
- },
-/* 010011mmmmmm0001nnnnnndddddd0000 mmul.m <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mmul.w", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x4c010000
- },
-/* 010011mmmmmm0110nnnnnndddddd0000 mmulfx.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mmulfx.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x4c060000
- },
-/* 010011mmmmmm0101nnnnnndddddd0000 mmulfx.w <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mmulfx.w", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x4c050000
- },
-/* 010011mmmmmm1001nnnnnndddddd0000 mmulfxrp.w <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mmulfxrp.w", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x4c090000
- },
-/* 010011mmmmmm1110nnnnnndddddd0000 mmulhi.wl <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mmulhi.wl", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x4c0e0000
- },
-/* 010011mmmmmm1010nnnnnndddddd0000 mmullo.wl <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mmullo.wl", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x4c0a0000
- },
-/* 010010mmmmmm1001nnnnnnwwwwww0000 mmulsum.wq <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mmulsum.wq", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x48090000
- },
-/* 110011ssssssssssssssssdddddd0000 movi <A_IMMS16>,<A_GREG_D> */
- { "movi", {A_IMMS16,A_GREG_D}, {OFFSET_10,OFFSET_4}, SHMEDIA_MOVI_OPC
- },
-/* 001010mmmmmm1101nnnnnndddddd0000 mperm.w <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mperm.w", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x280d0000
- },
-/* 010010mmmmmm0000nnnnnnwwwwww0000 msad.ubq <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "msad.ubq", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x48000000
- },
-/* 000011mmmmmm1010nnnnnndddddd0000 mshard.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mshard.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x0c0a0000
- },
-/* 000011mmmmmm1001nnnnnndddddd0000 mshard.w <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mshard.w", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x0c090000
- },
-/* 000011mmmmmm1011nnnnnndddddd0000 mshards.q <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mshards.q", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x0c0b0000
- },
-/* 001011mmmmmm0100nnnnnndddddd0000 mshfhi.b <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mshfhi.b", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x2c040000
- },
-/* 001011mmmmmm0110nnnnnndddddd0000 mshfhi.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mshfhi.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x2c060000
- },
-/* 001011mmmmmm0101nnnnnndddddd0000 mshfhi.w <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mshfhi.w", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x2c050000
- },
-/* 001011mmmmmm0000nnnnnndddddd0000 mshflo.b <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mshflo.b", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x2c000000
- },
-/* 001011mmmmmm0010nnnnnndddddd0000 mshflo.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mshflo.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x2c020000
- },
-/* 001011mmmmmm0001nnnnnndddddd0000 mshflo.w <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mshflo.w", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x2c010000
- },
-/* 000011mmmmmm0010nnnnnndddddd0000 mshlld.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mshlld.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x0c020000
- },
-/* 000011mmmmmm0001nnnnnndddddd0000 mshlld.w <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mshlld.w", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x0c010000
- },
-/* 000011mmmmmm0110nnnnnndddddd0000 mshalds.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mshalds.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x0c060000
- },
-/* 000011mmmmmm0101nnnnnndddddd0000 mshalds.w <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mshalds.w", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x0c050000
- },
-/* 000011mmmmmm1110nnnnnndddddd0000 mshlrd.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mshlrd.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x0c0e0000
- },
-/* 000011mmmmmm1101nnnnnndddddd0000 mshlrd.w <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mshlrd.w", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x0c0d0000
- },
-/* 000010mmmmmm1010nnnnnndddddd0000 msub.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "msub.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x080a0000
- },
-/* 000010mmmmmm1001nnnnnndddddd0000 msub.w <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "msub.w", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x08090000
- },
-/* 000010mmmmmm1110nnnnnndddddd0000 msubs.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "msubs.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x080e0000
- },
-/* 000010mmmmmm1100nnnnnndddddd0000 msubs.ub <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "msubs.ub", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x080c0000
- },
-/* 000010mmmmmm1101nnnnnndddddd0000 msubs.w <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "msubs.w", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x080d0000
- },
-/* 000001mmmmmm1110nnnnnndddddd0000 muls.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "muls.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x040e0000
- },
-/* 000000mmmmmm1110nnnnnndddddd0000 mulu.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "mulu.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x000e0000
- },
-/* 01101111111100001111111111110000 nop */
- { "nop", {A_NONE}, {OFFSET_NONE},
- SHMEDIA_NOP_OPC
- },
-/* 000000mmmmmm1101111111dddddd0000 nsb <A_GREG_M>,<A_GREG_D> */
- { "nsb", {A_GREG_M,A_GREG_D}, {OFFSET_20,OFFSET_4}, 0x000dfc00
- },
-/* 111000mmmmmm1001ssssss1111110000 ocbi <A_GREG_M>,<A_IMMS6BY32> */
- { "ocbi", {A_GREG_M,A_IMMS6BY32}, {OFFSET_20,OFFSET_10}, 0xe00903f0
- },
-/* 111000mmmmmm1000ssssss1111110000 ocbp <A_GREG_M>,<A_IMMS6BY32> */
- { "ocbp", {A_GREG_M,A_IMMS6BY32}, {OFFSET_20,OFFSET_10}, 0xe00803f0
- },
-/* 111000mmmmmm1100ssssss1111110000 ocbwb <A_GREG_M>,<A_IMMS6BY32> */
- { "ocbwb", {A_GREG_M,A_IMMS6BY32}, {OFFSET_20,OFFSET_10}, 0xe00c03f0
- },
-/* 000001mmmmmm1001nnnnnndddddd0000 or <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "or", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x04090000
- },
-/* 110111mmmmmmssssssssssdddddd0000 ori <A_GREG_M>,<A_IMMS10>,<A_GREG_D> */
- { "ori", {A_GREG_M,A_IMMS10,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xdc000000
- },
-/* 111000mmmmmm0001ssssss1111110000 prefi <A_GREG_M>,<A_IMMS6BY32> */
- { "prefi", {A_GREG_M,A_IMMS6BY32}, {OFFSET_20,OFFSET_10}, 0xe00103f0
- },
-/* 111010sssssssssssssssslrraaa0000 pta <A_PCIMMS16BY4>,<A_TREG_A> */
- { "pta/l", {A_PCIMMS16BY4,A_TREG_A}, {OFFSET_10,OFFSET_4},
- SHMEDIA_PTA_OPC | SHMEDIA_LIKELY_BIT
- },
-/* 111010sssssssssssssssslrraaa0000 pta <A_PCIMMS16BY4>,<A_TREG_A> */
- { "pta", {A_PCIMMS16BY4,A_TREG_A}, {OFFSET_10,OFFSET_4},
- SHMEDIA_PTA_OPC | SHMEDIA_LIKELY_BIT
- },
-/* 111010ssssssssssssssss0rraaa0000 pta/u <A_PCIMMS16BY4>,<A_TREG_A> */
- { "pta/u", {A_PCIMMS16BY4,A_TREG_A}, {OFFSET_10,OFFSET_4},
- SHMEDIA_PTA_OPC
- },
-/* 0110101111110001nnnnnnl00aaa0000 ptabs <A_GREG_M>,<A_TREG_A> */
- { "ptabs/l", {A_GREG_N,A_TREG_A}, {OFFSET_10,OFFSET_4}, 0x6bf10200
- },
-/* 0110101111110001nnnnnnl00aaa0000 ptabs <A_GREG_M>,<A_TREG_A> */
- { "ptabs", {A_GREG_N,A_TREG_A}, {OFFSET_10,OFFSET_4}, 0x6bf10200
- },
-/* 0110101111110001nnnnnn000aaa0000 ptabs/u <A_GREG_M>,<A_TREG_A> */
- { "ptabs/u", {A_GREG_N,A_TREG_A}, {OFFSET_10,OFFSET_4}, 0x6bf10000
- },
-/* 111011sssssssssssssssslrraaa0000 ptb <A_PCIMMS16BY4>,<A_TREG_A> */
- { "ptb/l", {A_PCIMMS16BY4,A_TREG_A}, {OFFSET_10,OFFSET_4},
- SHMEDIA_PTB_OPC | SHMEDIA_LIKELY_BIT
- },
-/* 111011sssssssssssssssslrraaa0000 ptb <A_PCIMMS16BY4>,<A_TREG_A> */
- { "ptb", {A_PCIMMS16BY4,A_TREG_A}, {OFFSET_10,OFFSET_4},
- SHMEDIA_PTB_OPC | SHMEDIA_LIKELY_BIT
- },
-/* 111011ssssssssssssssss0rraaa0000 ptb/u <A_PCIMMS16BY4>,<A_TREG_A> */
- { "ptb/u", {A_PCIMMS16BY4,A_TREG_A}, {OFFSET_10,OFFSET_4},
- SHMEDIA_PTB_OPC
- },
-/* 111010sssssssssssssssslrraaa0000 pt/l <A_PCIMMS16BY4>,<A_TREG_A> */
- { "pt/l", {A_PCIMMS16BY4_PT,A_TREG_A},
- {OFFSET_10,OFFSET_4}, SHMEDIA_PT_OPC | SHMEDIA_LIKELY_BIT
- },
-/* 111010sssssssssssssssslrraaa0000 pt <A_PCIMMS16BY4>,<A_TREG_A> */
- { "pt", {A_PCIMMS16BY4_PT,A_TREG_A},
- {OFFSET_10,OFFSET_4}, SHMEDIA_PT_OPC | SHMEDIA_LIKELY_BIT
- },
-/* 111010ssssssssssssssss0rraaa0000 pt/u <A_PCIMMS16BY4>,<A_TREG_A> */
- { "pt/u", {A_PCIMMS16BY4_PT,A_TREG_A},
- {OFFSET_10,OFFSET_4}, SHMEDIA_PT_OPC
- },
-/* 0110101111110101nnnnnnl00aaa0000 ptrel <A_GREG_M>,<A_TREG_A> */
- { "ptrel/l", {A_GREG_N,A_TREG_A}, {OFFSET_10,OFFSET_4},
- SHMEDIA_PTREL_OPC | SHMEDIA_LIKELY_BIT
- },
-/* 0110101111110101nnnnnnl00aaa0000 ptrel <A_GREG_M>,<A_TREG_A> */
- { "ptrel", {A_GREG_N,A_TREG_A}, {OFFSET_10,OFFSET_4},
- SHMEDIA_PTREL_OPC | SHMEDIA_LIKELY_BIT
- },
-/* 0110101111110101nnnnnn000aaa0000 ptrel/u <A_GREG_M>,<A_TREG_A> */
- { "ptrel/u", {A_GREG_N,A_TREG_A}, {OFFSET_10,OFFSET_4},
- SHMEDIA_PTREL_OPC
- },
-/* 111000mmmmmm1111ssssssyyyyyy0000 putcfg <A_GREG_M>,<A_IMMS6>,<A_GREG_D> */
- { "putcfg", {A_GREG_M,A_IMMS6,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xe00f0000
- },
-/* 011011mmmmmm1111111111jjjjjj0000 putcon <A_GREG_M>,<A_CREG_J> */
- { "putcon", {A_GREG_M,A_CREG_J}, {OFFSET_20,OFFSET_4}, 0x6c0ffc00
- },
-/* 01101111111100111111111111110000 rte */
- { "rte", {A_NONE}, {OFFSET_NONE}, 0x6ff3fff0
- },
-/* 000001mmmmmm0111nnnnnndddddd0000 shard <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "shard", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x04070000
- },
-/* 000001mmmmmm0110nnnnnndddddd0000 shard.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "shard.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x04060000
- },
-/* 110001mmmmmm0111ssssssdddddd0000 shari <A_GREG_M>,<A_IMMU6>,<A_GREG_D> */
- { "shari", {A_GREG_M,A_IMMU6,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xc4070000
- },
-/* 110001mmmmmm0110ssssssdddddd0000 shari <A_GREG_M>,<A_IMMU6>,<A_GREG_D> */
- { "shari.l", {A_GREG_M,A_IMMU6,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xc4060000
- },
-/* 000001mmmmmm0001nnnnnndddddd0000 shlld <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "shlld", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x04010000
- },
-/* 000001mmmmmm0000nnnnnndddddd0000 shlld.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "shlld.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x04000000
- },
-/* 110001mmmmmm0001ssssssdddddd0000 shlli <A_GREG_M>,<A_IMMU6>,<A_GREG_D> */
- { "shlli", {A_GREG_M,A_IMMU6,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xc4010000
- },
-/* 110001mmmmmm0000ssssssdddddd0000 shlli.l <A_GREG_M>,<A_IMMU5>,<A_GREG_D> */
- { "shlli.l", {A_GREG_M,A_IMMU5,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xc4000000
- },
-/* 000001mmmmmm0011nnnnnndddddd0000 shlrd <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "shlrd", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x04030000
- },
-/* 000001mmmmmm0010nnnnnndddddd0000 shlrd.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "shlrd.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x04020000
- },
-/* 110001mmmmmm0011ssssssdddddd0000 shlri <A_GREG_M>,<A_IMMU6>,<A_GREG_D> */
- { "shlri", {A_GREG_M,A_IMMU6,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xc4030000
- },
-/* 110001mmmmmm0010ssssssdddddd0000 shlri.l <A_GREG_M>,<A_IMMU5>,<A_GREG_D> */
- { "shlri.l", {A_GREG_M,A_IMMU5,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xc4020000
- },
-/* 110010sssssssssssssssswwwwww0000 shori <A_IMMU16>,<A_GREG_D> */
- { "shori", {A_IMMU16,A_GREG_D}, {OFFSET_10,OFFSET_4}, SHMEDIA_SHORI_OPC
- },
-/* 01101111111101111111111111110000 sleep */
- { "sleep", {A_NONE}, {OFFSET_NONE}, 0x6ff7fff0
- },
-/* 101000mmmmmmssssssssssdddddd0000 st.b <A_GREG_M>,<A_IMMS10BY1>,<A_GREG_D> */
- { "st.b", {A_GREG_M,A_IMMS10BY1,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xa0000000
- },
-/* 101010mmmmmmssssssssssdddddd0000 st.l <A_GREG_M>,<A_IMMS10BY4>,<A_GREG_D> */
- { "st.l", {A_GREG_M,A_IMMS10BY4,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xa8000000
- },
-/* 101011mmmmmmssssssssssdddddd0000 st.q <A_GREG_M>,<A_IMMS10BY8>,<A_GREG_D> */
- { "st.q", {A_GREG_M,A_IMMS10BY8,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xac000000
- },
-/* 101001mmmmmmssssssssssdddddd0000 st.w <A_GREG_M>,<A_IMMS10BY2>,<A_GREG_D> */
- { "st.w", {A_GREG_M,A_IMMS10BY2,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xa4000000
- },
-/* 111000mmmmmm0110ssssssdddddd0000 sthi.l <A_GREG_M>,<A_IMMS6>,<A_GREG_D> */
- { "sthi.l", {A_GREG_M,A_IMMS6,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xe0060000
- },
-/* 111000mmmmmm0111ssssssdddddd0000 sthi.q <A_GREG_M>,<A_IMMS6>,<A_GREG_D> */
- { "sthi.q", {A_GREG_M,A_IMMS6,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xe0070000
- },
-/* 111000mmmmmm0010ssssssdddddd0000 stlo.l <A_GREG_M>,<A_IMMS6>,<A_GREG_D> */
- { "stlo.l", {A_GREG_M,A_IMMS6,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xe0020000
- },
-/* 111000mmmmmm0011ssssssdddddd0000 stlo.q <A_GREG_M>,<A_IMMS6>,<A_GREG_D> */
- { "stlo.q", {A_GREG_M,A_IMMS6,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xe0030000
- },
-/* 011000mmmmmm0000nnnnnndddddd0000 stx.b <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "stx.b", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x60000000
- },
-/* 011000mmmmmm0010nnnnnndddddd0000 stx.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "stx.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x60020000
- },
-/* 011000mmmmmm0011nnnnnndddddd0000 stx.q <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "stx.q", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x60030000
- },
-/* 011000mmmmmm0001nnnnnndddddd0000 stx.w <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "stx.w", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x60010000
- },
-/* 000000mmmmmm1011nnnnnndddddd0000 sub <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "sub", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x000b0000
- },
-/* 000000mmmmmm1010nnnnnndddddd0000 sub.l <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "sub.l", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x000a0000
- },
-/* 001000mmmmmm0011nnnnnnwwwwww0000 swap.q <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "swap.q", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x20030000
- },
-/* 01101111111100101111111111110000 synci */
- { "synci", {A_NONE}, {OFFSET_NONE}, 0x6ff2fff0
- },
-/* 01101111111101101111111111110000 synco */
- { "synco", {A_NONE}, {OFFSET_NONE}, 0x6ff6fff0
- },
-/* 011011mmmmmm00011111111111110000 trapa <A_GREG_M> */
- { "trapa", {A_GREG_M}, {OFFSET_20}, 0x6c01fff0
- },
-/* 000001mmmmmm1101nnnnnndddddd0000 xor <A_GREG_M>,<A_GREG_N>,<A_GREG_D> */
- { "xor", {A_GREG_M,A_GREG_N,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0x040d0000
- },
-/* 110001mmmmmm1101ssssssdddddd0000 xori <A_GREG_M>,<A_IMMS6>,<A_GREG_D> */
- { "xori", {A_GREG_M,A_IMMS6,A_GREG_D}, {OFFSET_20,OFFSET_10,OFFSET_4}, 0xc40d0000
- },
-
- { NULL, {}, {}, 0 }
-};
-
-/* Predefined control register names as per SH-5/ST50-005-08. */
-const shmedia_creg_info shmedia_creg_table[] = {
- { 0, "sr" },
- { 1, "ssr" },
- { 2, "pssr" },
-
- { 4, "intevt" },
- { 5, "expevt" },
- { 6, "pexpevt" },
- { 7, "tra" },
- { 8, "spc" },
- { 9, "pspc" },
- { 10, "resvec" },
- { 11, "vbr" },
-
- { 13, "tea" },
-
- { 16, "dcr" },
- { 17, "kcr0" },
- { 18, "kcr1" },
-
- { 62, "ctc" },
- { 63, "usr" },
- { -1, (char *) 0 }
-};
-
diff --git a/opcodes/sh64-opc.h b/opcodes/sh64-opc.h
deleted file mode 100644
index ef8df98..0000000
--- a/opcodes/sh64-opc.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/* Declarations for SH64 opcodes.
- Copyright (C) 2000-2018 Free Software Foundation, Inc.
-
- This file is part of the GNU opcodes library.
-
- This library is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- It is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
- License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this file; see the file COPYING. If not, write to the
- Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
- MA 02110-1301, USA. */
-
-#ifndef _SH64_OPC_INCLUDED_H
-#define _SH64_OPC_INCLUDED_H
-
-typedef enum
-{
- /* A placeholder. */
- OFFSET_NONE = 0,
-
- /* Bit number for where to insert operand. */
- OFFSET_4 = 4,
- OFFSET_9 = 9,
- OFFSET_10 = 10,
- OFFSET_20 = 20
-} shmedia_nibble_type;
-
-typedef enum {
- /* First a placeholder. */
- A_NONE = 0,
-
- /* Registers. */
- A_GREG_M,
- A_GREG_N,
- A_GREG_D,
- A_FREG_G,
- A_FREG_H,
- A_FREG_F,
- A_DREG_G,
- A_DREG_H,
- A_DREG_F,
- A_FVREG_G,
- A_FVREG_H,
- A_FVREG_F,
- A_FMREG_G,
- A_FMREG_H,
- A_FMREG_F,
- A_FPREG_G,
- A_FPREG_H,
- A_FPREG_F,
- A_TREG_A,
- A_TREG_B,
- A_CREG_K,
- A_CREG_J,
-
- /* This one is only used in a shmedia_get_operand. */
- A_IMMM,
-
- /* Copy of previous register. */
- A_REUSE_PREV,
-
- /* Unsigned 5-bit operand. */
- A_IMMU5,
-
- /* Signed 6-bit operand. */
- A_IMMS6,
-
- /* Signed operand, 6 bits << 5. */
- A_IMMS6BY32,
-
- /* Unsigned 6-bit operand. */
- A_IMMU6,
-
- /* Signed 10-bit operand. */
- A_IMMS10,
-
- /* Signed operand, 10 bits << 0. */
- A_IMMS10BY1,
-
- /* Signed operand, 10 bits << 1. */
- A_IMMS10BY2,
-
- /* Signed operand, 10 bits << 2. */
- A_IMMS10BY4,
-
- /* Signed operand, 10 bits << 3. */
- A_IMMS10BY8,
-
- /* Signed 16-bit operand. */
- A_IMMS16,
-
- /* Unsigned 16-bit operand. */
- A_IMMU16,
-
- /* PC-relative signed operand, 16 bits << 2, for PTA and PTB insns. */
- A_PCIMMS16BY4,
-
- /* PC relative signed operand, 16 bits << 2, for PT insns. Also adjusts
- the opcode to be PTA or PTB. */
- A_PCIMMS16BY4_PT,
-} shmedia_arg_type;
-
-typedef struct {
- char *name;
- shmedia_arg_type arg[4];
- shmedia_nibble_type nibbles[4];
- unsigned long opcode_base;
-} shmedia_opcode_info;
-
-extern const shmedia_opcode_info shmedia_table[];
-
-typedef struct {
- int cregno;
- char *name;
-} shmedia_creg_info;
-
-extern const shmedia_creg_info shmedia_creg_table[];
-
-#define SHMEDIA_LIKELY_BIT 0x00000200
-#define SHMEDIA_PT_OPC 0xe8000000
-#define SHMEDIA_PTB_BIT 0x04000000
-#define SHMEDIA_PTA_OPC 0xe8000000
-#define SHMEDIA_PTB_OPC 0xec000000
-
-/* Note that this is ptrel/u. "Or" in SHMEDIA_LIKELY_BIT for ptrel/l. */
-#define SHMEDIA_PTREL_OPC 0x6bf50000
-#define SHMEDIA_MOVI_OPC 0xcc000000
-#define SHMEDIA_SHORI_OPC 0xc8000000
-#define SHMEDIA_ADDI_OPC 0xd0000000
-#define SHMEDIA_ADD_OPC 0x00090000
-#define SHMEDIA_NOP_OPC 0x6ff0fff0
-#define SHMEDIA_TEMP_REG 25
-
-#endif /* _SH64_OPC_INCLUDED_H */