mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
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.
This commit is contained in:
parent
4db9937a27
commit
211dc24b87
@ -1,3 +1,22 @@
|
||||
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.
|
||||
|
@ -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 \
|
||||
|
@ -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@
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
targ_selvecs="sh_elf32_nbsd_vec sh_coff_vec sh_coff_le_vec"
|
||||
;;
|
||||
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
|
||||
;;
|
||||
#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
|
||||
|
12
bfd/configure
vendored
12
bfd/configure
vendored
@ -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" ;;
|
||||
|
@ -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" ;;
|
||||
|
18
bfd/cpu-sh.c
18
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 =
|
||||
|
@ -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
|
||||
|
643
bfd/elf32-sh.c
643
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 */
|
||||
|
@ -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;
|
||||
}
|
814
bfd/elf32-sh64.c
814
bfd/elf32-sh64.c
@ -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"
|
||||
|
@ -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 */
|
3987
bfd/elf64-sh64.c
3987
bfd/elf64-sh64.c
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
@ -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,
|
||||
|
@ -1,3 +1,7 @@
|
||||
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.
|
||||
|
@ -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.
|
||||
|
158
gas/ChangeLog
158
gas/ChangeLog
@ -1,3 +1,161 @@
|
||||
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.
|
||||
|
@ -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 \
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
3526
gas/config/tc-sh64.c
3526
gas/config/tc-sh64.c
File diff suppressed because it is too large
Load Diff
@ -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 *);
|
@ -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 ;;
|
||||
|
@ -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 \
|
||||
|
@ -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 \
|
||||
|
@ -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
|
||||
|
@ -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
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -1,7 +0,0 @@
|
||||
! Check successful .abi assertion for 32-bit ABI.
|
||||
|
||||
.text
|
||||
.abi 32
|
||||
.mode SHmedia
|
||||
start:
|
||||
nop
|
@ -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
|
@ -1,7 +0,0 @@
|
||||
! Check successful .abi assertion for 64-bit ABI.
|
||||
|
||||
.text
|
||||
.abi 64
|
||||
|
||||
start:
|
||||
nop
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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 .*
|
@ -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 .*
|
@ -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:
|
@ -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
|
@ -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 .*
|
@ -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
|
@ -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
|
@ -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 .*
|
@ -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
|
@ -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 .*
|
@ -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
|
@ -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 .*
|
@ -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
|
||||
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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 .*
|
@ -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
|
@ -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
|
@ -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 .*
|
@ -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 .*
|
@ -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 .*
|
@ -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 .*
|
@ -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 .*
|
@ -1,7 +0,0 @@
|
||||
! PR gas/6043
|
||||
|
||||
.text
|
||||
.LFB1:
|
||||
.section .eh_frame,"a",@progbits
|
||||
.LASFDE1:
|
||||
.uaquad .LFB1-.
|
@ -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.*
|
||||
|
@ -1,7 +0,0 @@
|
||||
.text
|
||||
.mode shmedia
|
||||
start:
|
||||
|
||||
movi 0x1234,r0
|
||||
.long 0x12345678
|
||||
.word 0x1234, 0
|
@ -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.*
|
||||
|
||||
|
@ -1,7 +0,0 @@
|
||||
.text
|
||||
.mode shmedia
|
||||
start:
|
||||
|
||||
movi 0x1234,r0
|
||||
.long 0x12345678
|
||||
.word 0x1234, 0
|
@ -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" }
|
@ -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" }
|
||||
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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" }
|
@ -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
|
@ -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
|
@ -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" }
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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:
|
||||
|
@ -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
|
||||
[ ]\.\.\.
|
@ -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 .*
|
@ -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
|
||||
[ ]\.\.\.
|
||||
|
@ -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 .*
|
@ -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[ ]*
|
@ -1,7 +0,0 @@
|
||||
.text
|
||||
|
||||
start:
|
||||
movi 1,r1
|
||||
movi 100000,r1
|
||||
nop
|
||||
nop
|
@ -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 .*
|
||||
|
@ -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
|
@ -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
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user