diff options
author | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-02 14:33:56 +0000 |
---|---|---|
committer | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-02 14:33:56 +0000 |
commit | 237490bf10db39b859bd28598ff64f1bd2c84421 (patch) | |
tree | 2c5dd5cdcff32ca9e25b38d3c331376a3158c6ba /gcc/config | |
parent | f34bff8083f5498f4ea019a6fbbf1b1b8e2e37d2 (diff) | |
download | gcc-237490bf10db39b859bd28598ff64f1bd2c84421.tar.gz |
Move crtstuff support to toplevel libgcc
gcc:
* config.gcc (extra_parts): Remove.
(*-*-freebsd*): Remove extra_parts.
(*-*-linux*, frv-*-*linux*, *-*-kfreebsd*-gnu, *-*-knetbsd*-gnu,
*-*-gnu*, *-*-kopensolaris*-gnu): Likewise.
(*-*-netbsd*): Remove t-libc-ok, t-netbsd from tmake_file.
Remove extra_parts for *-*-netbsd*1.[7-9]*, *-*-netbsd[2-9]*,
*-*-netbsdelf[2-9]*.
(*-*-openbsd*): Remove t-libc-ok from tmake_file.
(alpha*-*-linux*): Remove extra_parts.
(alpha*-*-freebsd*): Likewise.
(bfin*-linux-uclibc*): Likewise.
(fr30-*-elf): Likewise.
(moxie-*-elf): Likewise.
(moxie-*-uclinux*): Likewise.
(h8300-*-rtems*): Remove h8300/t-elf from tmake_file.
(h8300-*-elf*): Likewise.
(hppa*64*-*-hpux11*): Remove extra_parts.
(i[34567]86-*-elf*): Remove i386/t-i386elf, i386/t-crtstuff from
tmake_file.
(x86_64-*-elf*): Likewise.
(i[34567]86-*-freebsd*): Remove tmake_file.
(x86_64-*-freebsd*): Likewise.
(x86_64-*-netbsd*): Likewise.
(i[34567]86-*-openbsd2.*, i[34567]86-*openbsd3.[0123]): Remove
t-libc-ok from tmake_file.
(i[34567]86-*-linux*, i[34567]86-*-kfreebsd*-gnu,
i[34567]86-*-knetbsd*-gnu, i[34567]86-*-gnu*,
i[34567]86-*-kopensolaris*-gnu): Remove i386/t-crtstuff from tmake_file.
Remove extra_parts.
(x86_64-*-linux*, x86_64-*-kfreebsd*-gnu, x86_64-*-knetbsd*-gnu):
Remove i386/t-crtstuff from tmake_file.
(i[34567]86-*-lynxos*): Likewise.
Remove extra_parts.
(ia64*-*-elf*): Remove extra_parts.
(ia64*-*-freebsd*): Likewise.
(ia64*-*-linux*): Likewise.
(ia64-hp-*vms*): Remove ia64/t-vms from tmake_file.
(m32r-*-elf*): Remove extra_parts.
(m32rle-*-elf*): Likewise.
(m32r-*-rtems*): Likewise.
(m68k-*-elf*, fido-*-elf*): Likewise.
(m68k*-*-openbsd*): Remove t-libc-ok from tmake_file.
(m68k-*-rtems*): Remove extra_parts.
(mep-*-*): Likewise.
(microblaze*-linux*): Likewise.
(mips64*-*-linux*, mipsisa64*-*-linux*): Likewise.
(mips*-*-linux*): Likewise.
(powerpc-*-lynxos*): Likewise.
(s390x-ibm-tpf*): Likewise.
(score-*-elf): Likewise.
Remove tmake_file.
(sh-*-elf*, sh[12346l]*-*-elf*, sh-*-linux*, sh[2346lbe]*-*-linux*,
sh-*-netbsdelf*, shl*-*-netbsdelf*, sh5-*-netbsd*, sh5l*-*-netbsd*,
sh64-*-netbsd*, sh64l*-*-netbsd*): Remove sh/t-elf from tmake_file.
Remove sh/t-superh from tmake_file for sh*-superh-elf.
Remove sh/t-linux64 from tmake_file for sh64*-*-linux*.
(sh-*-rtems*): Remove sh/t-elf from tmake_file.
(sh-wrs-vxworks): Likewise.
(sparc-*-linux*): Remove extra_parts.
(sparc64-*-linux*): Likewise.
(sparc64-*-freebsd*, ultrasparc-*-freebsd*): Likewise.
(xstormy16-*-elf): Likewise.
(xtensa*-*-linux*): Remove xtensa/t-linux from tmake_file.
(am33_2.0-*-linux*): Remove extra_parts.
* configure.ac (extra_parts): Don't substitute.
* configure: Regenerate.
* crtstuff.c: Move to ../libgcc.
* Makefile.in (CRTSTUFF_CFLAGS): Remove.
(EXTRA_PARTS): Remove.
(CRTSTUFF_T_CFLAGS): Remove.
(MOSTLYCLEANFILES): Remove $(EXTRA_PARTS).
(GCC_EXTRA_PARTS): Remove.
(libgcc.mvars): Remove GCC_EXTRA_PARTS, CRTSTUFF_CFLAGS,
CRTSTUFF_T_CFLAGS, CRTSTUFF_T_CFLAGS_S.
Emit GCC_CFLAGS, INHIBIT_LIBC_CFLAGS.
($(T)crtbegin.o, $(T)crtend.o, $(T)crtbeginS.o, $(T)crtendS.o)
($(T)crtbeginT.o): Remove.
* config/alpha/t-vms (EXTRA_PARTS): Remove.
($(T)vms-dwarf2.o, $(T)vms-dwarf2eh.o): Remove.
* config/alpha/vms-dwarf2.asm: Move to
../libgcc/config/alpha/vms-dwarf2.S.
* config/alpha/vms-dwarf2eh.asm: Move to
../libgcc/config/alpha/vms-dwarf2eh.S.
* config/arm/crti.asm: Move to ../libgcc/config/arm/crti.S.
* config/arm/crtn.asm: Move to ../libgcc/config/arm/crtn.S.
* config/arm/t-arm-elf (EXTRA_MULTILIB_PARTS): Remove.
($(T)crti.o, $(T)crtn.o): Remove.
* config/arm/t-linux: Remove comment.
* config/arm/t-linux-eabi (EXTRA_MULTILIB_PARTS): Remove.
* config/arm/t-strongarm-elf (EXTRA_MULTILIB_PARTS): Remove.
($(T)crti.o, $(T)crtn.o): Remove.
* config/arm/t-symbian (EXTRA_MULTILIB_PARTS): Remove.
* config/bfin/crti.s: Move to ../libgcc/config/bfin/crti.S.
* config/bfin/crtn.s: Move to ../libgcc/config/bfin/crtn.S.
* config/bfin/crtlibid.s: Move to ../libgcc/config/bfin/crtlibid.S.
* config/bfin/t-bfin (EXTRA_PARTS): Remove.
($(T)crti.o, $(T)crtn.o): Remove.
* config/bfin/t-bfin-elf (CRTSTUFF_T_CFLAGS): Remove.
($(T)crti.o, $(T)crtn.o, $(T)crtlibid.o): Remove
(EXTRA_MULTILIB_PARTS): Remove.
* config/bfin/t-bfin-linux (CRTSTUFF_T_CFLAGS,
EXTRA_MULTILIB_PARTS): Remove.
* config/bfin/t-bfin-uclinux (CRTSTUFF_T_CFLAGS): Remove.
($(T)crtlibid.o): Remove.
(EXTRA_MULTILIB_PARTS): Remove.
* config/c6x/crti.s: Move to ../libgcc/config/c6x/crti.S.
* config/c6x/crtn.s: Move to ../libgcc/config/c6x/crtn.S.
* config/c6x/t-c6x-elf ($(T)crti.o, $(T)crtn.o): Remove.
(EXTRA_MULTILIB_PARTS): Remove.
(CRTSTUFF_T_CFLAGS, CRTSTUFF_T_CFLAGS_S): Remove.
* config/c6x/t-c6x-uclinux (CRTSTUFF_T_CFLAGS,
CRTSTUFF_T_CFLAGS_S): Remove.
* config/cris/t-elfmulti (CRTSTUFF_T_CFLAGS): Remove.
* config/cris/t-linux (CRTSTUFF_T_CFLAGS_S): Remove.
* config/fr30/crti.asm: Move to ../libgcc/config/fr30/crti.S.
* config/fr30/crtn.asm: Move to ../libgcc/config/fr30/crtn.S.
* config/fr30/t-fr30 ($(T)crti.o, $(T)crtn.o): Remove.
* config/frv/frvbegin.c, config/frv/frvend.c: Move to
../libgcc/config/frv.
* config/frv/t-frv (EXTRA_MULTILIB_PARTS): Remove.
(FRVSTUFF_CFLAGS, $(T)frvbegin$(objext), $(T)frvend$(objext)): Remove.
* config/frv/t-linux (EXTRA_MULTILIB_PARTS): Remove.
(CRTSTUFF_T_CFLAGS): Remove.
* config/h8300/crti.asm: Move to ../libgcc/config/h8300/crti.S.
* config/h8300/crtn.asm: Move to ../libgcc/config/h8300/crtn.S.
* config/h8300/t-elf: Remove.
* config/i386/cygming-crtbegin.c, config/i386/cygming-crtend.c:
Move to ../libgcc/config/i386.
* config/i386/t-crtstuff: Remove.
* config/i386/t-i386elf: Remove.
* config/i386/t-linux64 (EXTRA_MULTILIB_PARTS): Remove.
* config/i386/t-nto (CRTSTUFF_T_CFLAGS, EXTRA_PARTS): Remove.
* config/ia64/crtbegin.asm: Move to
../libgcc/config/ia64/crtbegin.S.
* config/ia64/crtend.asm: Move to
../libgcc/config/ia64/crtend.S.
* config/ia64/crti.asm: Move to ../libgcc/config/ia64/crti.S.
* config/ia64/crtn.asm: Move to ../libgcc/config/ia64/crtn.S.
* config/ia64/t-vms: Remove.
* config/ia64/vms-crtinit.asm: Move to
../libgcc/config/ia64/vms-crtinit.S.
* config/m32c/t-m32c (EXTRA_MULTILIB_PARTS): Remove.
* config/m32r/initfini.c: Move to ../libgcc/config/m32r.
* config/m32r/t-linux (CRTSTUFF_T_CFLAGS_S): Remove.
* config/m32r/t-m32r (CRTSTUFF_T_CFLAGS): Remove.
($(T)crtinit.o, $(T)crtfini.o): Remove.
(m32rx, m32r2): Remove.
(EXTRA_MULTILIB_PARTS): Remove.
* config/m68k/crti.s: Move to ../libgcc/config/m68k/crti.S.
* config/m68k/crtn.s: Move to ../libgcc/config/m68k/crtn.S.
* config/m68k/t-crtstuff: Remove.
* config/m68k/t-linux (EXTRA_MULTILIB_PARTS): Remove.
* config/m68k/t-m68kelf: Remove.
* config/m68k/t-uclinux (EXTRA_MULTILIB_PARTS): Remove.
* config/mcore/crti.asm: Move to ../libgcc/config/mcore/crti.S.
* config/mcore/crtn.asm: Move to ../libgcc/config/mcore/crtn.S.
* config/mcore/t-mcore ($(T)crti.o, $(T)crtn.o): Remove.
(EXTRA_PARTS, EXTRA_MULTILIB_PARTS): Remove.
* config/mep/t-mep (CRTSTUFF_CFLAGS): Remove.
(EXTRA_MULTILIB_PARTS): Remove.
* config/microblaze/crti.s: Move to ../libgcc/config/microblaze/crti.S.
* config/microblaze/crtn.s: Move to ../libgcc/config/microblaze/crtn.S.
* config/microblaze/t-microblaze (EXTRA_MULTILIB_PARTS,
EXTRA_PARTS): Remove.
($(T)crti$(objext), $(T)crtn$(objext)): Remove.
* config/mips/crti.asm: Move to ../libgcc/config/mips/crti.S.
* config/mips/crtn.asm: Move to ../libgcc/config/mips/crtn.S.
* config/mips/t-elf (CRTSTUFF_T_CFLAGS): Remove.
($(T)crti.o, $(T)crtn.o): Remove.
(EXTRA_MULTILIB_PARTS): Remove.
* config/mips/t-isa3264: Likewise.
* config/mips/t-linux64 (EXTRA_MULTILIB_PARTS): Remove.
* config/mips/t-r3900 (EXTRA_MULTILIB_PARTS): Remove.
(CRTSTUFF_T_CFLAGS): Remove.
* config/mips/t-sde (CRTSTUFF_T_CFLAGS): Remove.
($(T)crti.o, $(T)crtn.o): Remove.
(EXTRA_MULTILIB_PARTS): Remove.
* config/mips/t-sr71k (EXTRA_MULTILIB_PARTS, CRTSTUFF_T_CFLAGS):
Remove.
($(T)crti.o, $(T)crtn.o): Remove.
* config/mips/t-st (EXTRA_MULTILIB_PARTS): Remove.
* config/mips/t-vr (CRTSTUFF_T_CFLAGS): Remove.
(EXTRA_MULTILIB_PARTS): Remove.
($(T)crti.o, $(T)crtn.o): Remove.
* config/mmix/crti.asm: Move to ../libgcc/config/crti.S.
* config/mmix/crtn.asm: Move to ../libgcc/config/crtn.S.
* config/mmix/t-mmix (CRTSTUFF_T_CFLAGS): Remove.
* config/moxie/crti.asm, config/moxie/crtn.asm: Remove.
* config/pa/stublib.c: Move to libgcc/config/pa.
* config/pa/t-linux (CRTSTUFF_T_CFLAGS_S): Remove.
* config/pa/t-linux64 (CRTSTUFF_T_CFLAGS_S): Remove.
* config/pa/t-pa-hpux11 (LIBGCCSTUB_OBJS, stublib.c): Remove.
(pthread_default_stacksize_np-stub.o, pthread_mutex_lock-stub.o)
(pthread_mutex_unlock-stub.o, pthread_once-stub.o)
($(T)libgcc_stub.a): Remove.
* config/pa/t-pa64 (LIBGCCSTUB_OBJS, stublib.c): Remove.
(rfi-stub.o, dfi-stub.o, cxaf-stub.o, jvrc-stub.o)
(pthread_default_stacksize_np-stub.o, pthread_mutex_lock-stub.o)
(pthread_mutex_unlock-stub.o, pthread_once-stub.o)
($(T)libgcc_stub.a): Remove.
* config/rs6000/eabi-cn.asm: Move to
../../../libgcc/config/rs6000/eabi-cn.S.
* config/rs6000/eabi-ci.asm: Move to
../../../libgcc/config/rs6000/eabi-ci.S.
* config/rs6000/sol-ci.asm: Move to
../../../libgcc/config/rs6000/sol-ci.S.
* config/rs6000/sol-cn.asm: Move to
../../../libgcc/config/rs6000/sol-cn.S.
* config/rs6000/t-lynx (EXTRA_MULTILIB_PARTS): Remove.
(CRTSTUFF_T_CFLAGS, CRTSTUFF_T_CFLAGS_S): Remove.
* config/rs6000/t-netbsd (CRTSTUFF_T_CFLAGS, CRTSTUFF_T_CFLAGS_S):
Remove.
(EXTRA_MULTILIB_PARTS): Remove.
* config/rs6000/t-ppccomm (EXTRA_MULTILIB_PARTS): Remove.
(ecrti.S, ecrtn.S, ncrti.S, ncrtn.S): Remove.
($(T)ecrti$(objext), $(T)ecrtn$(objext), $(T)ncrti$(objext),
$(T)ncrtn$(objext)): Remove.
(CRTSTUFF_T_CFLAGS, CRTSTUFF_T_CFLAGS_S): Remove.
* config/rs6000/t-vxworks (EXTRA_MULTILIB_PARTS): Remove.
* config/rx/t-rx (EXTRA_MULTILIB_PARTS): Remove.
* config/score/crti.asm: Move to ../libgcc/config/score/crti.S.
* config/score/crtn.asm: Move to ../libgcc/config/score/crtn.S.
* config/score/t-score-elf: Remove.
* config/sh/crt1.asm: Move to ../libgcc/config/sh/crt1.S.
* config/sh/crti.asm: Move to ../libgcc/config/sh/crti.S.
* config/sh/crtn.asm: Move to ../libgcc/config/sh/crtn.S.
* config/sh/lib1funcs-4-300.asm: Move to
../../../libgcc/config/sh/lib1funcs-4-300.S.
* config/sh/lib1funcs-Os-4-200.asm: Move to
../libgcc/config/sh/lib1funcs-Os-4-200.S.
* config/sh/t-elf: Remove.
* config/sh/t-linux (EXTRA_MULTILIB_PARTS): Remove.
* config/sh/t-linux64: Remove.
* config/sh/t-netbsd (EXTRA_MULTILIB_PARTS): Remove.
* config/sh/t-sh ($(T)crt1.o, $(T)crti.o, $(T)crtn.o): Remove.
(IC_EXTRA_PARTS, OPT_EXTRA_PARTS, EXTRA_MULTILIB_PARTS): Remove.
($(T)ic_invalidate_array_4-100.o)
($(T)libic_invalidate_array_4-100.a)
($(T)ic_invalidate_array_4-200.o)
($(T)libic_invalidate_array_4-200.a, $(T)ic_invalidate_array_4a.o)
($(T)libic_invalidate_array_4a.a, $(T)sdivsi3_i4i-Os-4-200.o)
($(T)udivsi3_i4i-Os-4-200.o, $(T)unwind-dw2-Os-4-200.o)
($(T)libgcc-Os-4-200.a, $(T)div_table-4-300.o)
($(T)libgcc-4-300.a): Remove.
* config/sh/t-superh: Remove.
* config/sh/t-vxworks (EXTRA_MULTILIB_PARTS): Remove.
* config/sparc/t-linux64 (CRTSTUFF_T_CFLAGS): Remove.
* config/spu/cache.S: Move to ../libgcc/config/spu.
* config/spu/cachemgr.c: Move to ../libgcc/config/spu.
* config/spu/t-spu-elf (CRTSTUFF_T_CFLAGS): Remove.
(EXTRA_MULTILIB_PARTS): Remove.
($(T)cachemgr.o, $(T)cachemgr_nonatomic.o, $(T)libgcc_%.a): Remove.
($(T)cache8k.o, $(T)cache16k.o, $(T)cache32k.o, $(T)cache32k.o)
($(T)cache64k.o, $(T)cache128k.o): Remove.
* config/t-freebsd (CRTSTUFF_T_CFLAGS_S): Remove.
* config/t-libc-ok: Remove.
* config/t-linux (CRTSTUFF_T_CFLAGS_S): Remove.
* config/t-lynx (CRTSTUFF_T_CFLAGS_S): Remove.
* config/t-netbsd: Remove.
* config/t-svr4 (CRTSTUFF_T_CFLAGS_S): Remove.
* config/t-vxworks (EXTRA_MULTILIB_PARTS): Remove.
* config/vms/t-vms (VMS_EXTRA_PARTS): Remove.
($(T)vcrt0.o, $(T)pcrt0.o): Remove.
* config/vms/vms-ucrt0.c: Move to ../libgcc/config/vms.
* config/xtensa/crti.asm: Move to ../libgcc/config/xtensa/crti.S.
* config/xtensa/crtn.asm: Move to ../libgcc/config/xtensa/crtn.S.
* config/xtensa/t-elf (CRTSTUFF_T_CFLAGS, CRTSTUFF_T_CFLAGS_S):
Remove.
(EXTRA_MULTILIB_PARTS): Remove.
* config/xtensa/t-linux: Remove.
* config/xtensa/t-xtensa ($(T)crti.o, $(T)crtn.o): Remove.
gcc/po:
* EXCLUDES (crtstuff.c): Remove.
libgcc:
* crtstuff.c: New file.
* Makefile.in (CRTSTUFF_CFLAGS): Define.
(CRTSTUFF_T_CFLAGS): Define.
(extra-parts, INSTALL_PARTS): Remove conditional assignments.
(crtbegin$(objext), crtend$(objext), crtbeginS$(objext))
(crtendS$(objext), crtbeginT.o): Use $(srcdir) to refer to
crtstuff.c.
Use $<.
(crtbeginT.o): Use $(objext).
[!CUSTOM_CRTIN] (crti$(objext), crtn$(objext)): New rules.
(libgcc-extra-parts): Don't compare EXTRA_PARTS, GCC_EXTRA_PARTS.
(gcc-extra-parts): Remove.
* config.host (*-*-freebsd*): Add t-crtstuff-pic to tmake_file.
Set extra_parts.
(*-*-linux*, frv-*-*linux*, *-*-kfreebsd*-gnu, *-*-knetbsd*-gnu,
*-*-gnu*): Also handle *-*-kopensolaris*-gnu.
Add t-crtstuff-pic to tmake_file.
(*-*-lynxos*): New case.
Set tmake_file, extra_parts.
(*-*-netbsd*): Add t-crtstuff-pic to tmake_file.
Set extra_parts for *-*-netbsd*1.[7-9]*, *-*-netbsd[2-9]*,
*-*-netbsdelf[2-9]*.
(*-*-openbsd*): Add t-crtstuff-pic to tmake_file.
(*-*-rtems*): Set extra_parts.
(*-*-solaris2*): Remove t-crtin from tmake_file for Solaris < 10.
(*-*-uclinux*): New case.
Set extra_parts.
(*-*-vms*): New case.
Set tmake_file, extra_parts.
(*-*-elf): Set extra_parts.
(alpha*-*-freebsd*): Add crtbeginT.o to extra_parts.
(alpha64-dec-*vms*): Append to tmake_file, remove vms/t-vms,
vms/t-vms64.
Set extra_parts.
(alpha*-dec-*vms*): Append to tmake_file, remove vms/t-vms.
Set extra_parts.
(arm*-*-freebsd*): Add t-crtin to tmake_file.
Add crtbegin.o, crtend.o, crti.o, crtn.o to extra_parts.
(arm-wrs-vxworks): Append to tmake_file.
Set extra_parts.
(arm*-*-uclinux*): Set extra_parts.
(arm*-*-ecos-elf): Likewise.
(arm*-*-eabi*, arm*-*-symbianelf*): Set extra_parts for
arm*-*-eabi*.
(arm*-*-rtems*): Set extra_parts.
(arm*-*-elf): Likewise.
(avr-*-rtems*): Clear extra_parts.
(bfin*-elf*): Add bfin/t-crtlibid, bfin/t-crtstuff to extra_parts.
Set extra_parts.
(bfin*-uclinux*): Likewise.
(bfin*-linux-uclibc*): Add bfin/t-crtstuff to tmake_file.
(bfin*-rtems*): Append to tmake_file.
Set extra_parts.
(bfin*-*): Likewise.
(crisv32-*-elf, crisv32-*-none, cris-*-elf, cris-*-none): Split into ...
(crisv32-*-elf): ... this.
(crisv32-*-none): ... this.
(cris-*-elf, cris-*-none): New cases.
Add cris/t-elfmulti to tmake_file.
(fr30-*-elf): Append to tmake_file.
Set extra_parts.
(frv-*-elf): Append to tmake_file, add frv/t-frv.
Set extra_parts.
(h8300-*-rtems*): Append to tmake_file.
Set extra_parts.
(h8300-*-elf*): Likewise.
(hppa*64*-*-hpux11*): Add pa/t-stublib, pa/t-stublib64 to tmake_file.
Set extra_parts.
(hppa[12]*-*-hpux11*): Add pa/t-stublib to tmake_file.
Set extra_parts.
(i[34567]86-*-elf*): Add i386/t-crtstuff, t-crtstuff-pic to tmake_file.
(x86_64-*-elf*): Likewise.
(i[34567]86-*-freebsd*): Add i386/t-crtstuff to tmake_file.
(x86_64-*-freebsd*): Likewise.
(x86_64-*-netbsd*): Likewise.
(i[34567]86-*-linux*): Likewise.
(i[34567]86-*-kfreebsd*-gnu, i[34567]86-*-knetbsd*-gnu)
(i[34567]86-*-gnu*, i[34567]86-*-kopensolaris*-gnu): Likewise.
(x86_64-*-linux*): Likewise.
(x86_64-*-kfreebsd*-gnu, x86_64-*-knetbsd*-gnu): Likewise.
(i[34567]86-*-lynxos*): Add t-crtstuff-pic, i386/t-crtstuff to
tmake_file.
Set extra_parts.
(i[34567]86-*-nto-qnx*): Set tmake_file, extra_parts.
(i[34567]86-*-rtems*): Append to tmake_file, remove t-crtin.
Append to extra_parts, remove crtbegin.o, crtend.o.
(ia64*-*-elf*): Append to extra_parts, remove crtbegin.o, crtend.o.
(ia64*-*-freebsd*): Append to extra_parts, remove crtbegin.o,
crtend.o, crtbeginS.o, crtendS.o.
(ia64*-*-linux*): Comment extra_parts.
(ia64-hp-*vms*): Append to tmake_file, remove vms/t-vms, vms/t-vms64.
Set extra_parts.
(iq2000*-*-elf*): Clear extra_parts.
(lm32-*-elf*, lm32-*-rtems*): Add t-crtin to tmake_file.
(lm32-*-uclinux*): Add to extra_parts, remove crtbegin.o, crtend.o
(m32r-*-elf*, m32r-*-rtems*): Split off ...
(m32r-*-rtems*): ... this.
Add m32r/t-m32r to tmake_file.
(m68k-*-elf*): Add t-crtin to tmake_file.
(m68k-*-rtems*): Add crti.o, crtn.o to extra_parts.
(mcore-*-elf): Likewise.
(microblaze*-*-*): Set extra_parts.
(mips*-sde-elf*): New case.
Set tmake_file, extra_parts.
(mipsisa32-*-elf*, mipsisa32el-*-elf*, mipsisa32r2-*-elf*)
(mipsisa32r2el-*-elf*, mipsisa64-*-elf*, mipsisa64el-*-elf*)
(mipsisa64r2-*-elf*, mipsisa64r2el-*-elf*): Add mips/t-crtstuff to
tmake_file.
Set extra_parts.
(mipsisa64sr71k-*-elf*): Likewise.
(mipsisa64sb1-*-elf*, mipsisa64sb1el-*-elf*): Likewise.
(mips-*-elf*, mipsel-*-elf*): Likewise.
(mips64-*-elf*, mips64el-*-elf*): Likewise.
(mips64vr-*-elf*, mips64vrel-*-elf*): Likewise.
(mips64orion-*-elf*, mips64orionel-*-elf*): Likewise.
(mips*-*-rtems*): Likewise.
(mipstx39-*-elf*, mipstx39el-*-elf*): Likewise.
(moxie-*-*): Split into ...
(moxie-*-elf, moxie-*-uclinux*): ... this.
Add to extra_parts, remove crtbegin.o, crtend.o.
(moxie-*-rtems*): New case.
Set tmake_file.
Clear extra_parts.
(powerpc-*-freebsd*): Add rs6000/t-crtstuff to tmake_file.
Set extra_parts.
(powerpc-*-netbsd*): Add rs6000/t-netbsd to tmake_file.
(powerpc-*-eabispe*): Add rs6000/t-crtstuff, t-crtstuff-pic to
tmake_file.
Set extra_parts.
(powerpc-*-eabisimaltivec*): Add to tmake_file, add rs6000/t-ppccomm,
rs6000/t-crtstuff, t-crtstuff-pic to tmake_file.
Set extra_parts.
(powerpc-*-eabisim*): Likewise.
(powerpc-*-elf*): Likewise.
(powerpc-*-eabialtivec*): Likewise.
(powerpc-xilinx-eabi*): Likewise.
(powerpc-*-eabi*): Likewise.
(powerpc-*-rtems*): Likewise.
(powerpc-*-linux*, powerpc64-*-linux*): Add rs6000/t-crtstuff to
tmake_file.
Set extra_parts.
(powerpc-*-lynxos*): Add to tmake_file.
(powerpcle-*-elf*): Add to tmake_file, add rs6000/t-ppccomm,
rs6000/t-crtstuff, t-crtstuff-pic.
Set extra_parts.
(powerpcle-*-eabisim*): Likewise.
(powerpcle-*-eabi*): Likewise.
(rx-*-elf): Remove extra_parts.
(s390x-ibm-tpf*): Set extra_parts.
(score-*-elf): Set extra_parts.
(sh-*-elf*, sh[12346l]*-*-elf*, sh-*-linux*)
(sh[2346lbe]*-*-linux*, sh-*-netbsdelf*, shl*-*-netbsdelf*)
(sh5-*-netbsd*, sh5l*-*-netbsd*, sh64-*-netbsd*)
(sh64l*-*-netbsd*): Split into ...
(sh-*-elf*, sh[12346l]*-*-elf*): ... this.
Add t-crtstuff-pic to tmake_file.
Set extra_parts.
(sh-*-rtems*): Add to tmake_file, add t-crtstuff-pic.
Set extra_parts.
(sh-wrs-vxworks): Add to tmake_file, add t-crtstuff-pic.
(sparc-*-elf*): Remove t-crtin from tmake_file.
Add to extra_parts, remove crtbegin.o, crtend.o.
(sparc-*-linux*): Add sparc/t-linux64 to tmake_file.
(sparc64-*-linux*): Likewise.
(sparc-*-rtems*): Remove sparc/t-elf from tmake_file.
Add to extra_parts, remove crtbegin.o, crtend.o.
(sparc64-*-elf*): Remove t-crtin from tmake_file.
Add to extra_parts, remove crtbegin.o, crtend.o.
(sparc64-*-rtems*): Remove t-crtin from tmake_file.
Add to extra_parts, remove crtbegin.o, crtend.o.
(sparc64-*-freebsd*, ultrasparc-*-freebsd*): Add to extra_parts.
(sparc64-*-linux*): Add sparc/t-linux64 to tmake_file.
(spu-*-elf*): Add to tmake_file, add spu/t-elf.
Set extra_parts.
(tic6x-*-uclinux): Add c6x/t-uxlinux, t-crtstuff-pic to tmake_file.
Set extra_parts.
(tic6x-*-*): Change to ...
(tic6x-*-elf): ... this.
Set extra_parts.
(xtensa*-*-elf*): Add to tmake_file, add xtensa/t-elf.
Set extra_parts.
(am33_2.0-*-linux*): Add comment.
(mep*-*-*): Add mep/t-mep to tmake_file.
Set extra_parts.
* config/alpha/t-vms: New file.
* config/alpha/vms-dwarf2.S, config/alpha/vms-dwarf2eh.S: New files.
* config/arm/crti.S, config/arm/crtn.S: New files.
* config/bfin/crti.S, config/bfin/crtn.S: New files.
* config/bfin/crtlibid.S: New file.
* config/bfin/t-crtlibid, config/bfin/t-crtstuff: New files.
* config/c6x/crti.S, config/c6x/crtn.S: New files.
* config/c6x/t-elf (CUSTOM_CRTIN): Set.
(crti.o, crtin.o): New rules.
(CRTSTUFF_T_CFLAGS, CRTSTUFF_T_CFLAGS_S): Set.
* config/c6x/t-uclinux: New file.
* config/cris/t-elfmulti: New file.
* config/cris/t-linux (CRTSTUFF_T_CFLAGS_S): Set.
* config/fr30/crti.S, config/fr30/crtn.S: New files.
* config/frv/frvbegin.c, config/frv/frvend.c: New files.
* config/frv/t-frv: New file.
* config/frv/t-linux (CRTSTUFF_T_CFLAGS): Set.
* config/h8300/crti.S, config/h8300/crtn.S: New files.
* config/i386/cygming-crtbegin.c, config/i386/cygming-crtend.c:
New files.
* config/i386/t-cygming (crtbegin.o, crtend.o): Use $(srcdir) to
refer to cygming-crtbegin.c, cygming-crtend.c.
Use $<.
* config/i386/t-nto: New file.
* config/ia64/crtbegin.S, config/ia64/crtend.S: New files.
* config/ia64/crti.S, config/ia64/crtn.S: New files.
* config/ia64/t-ia64 (crtbegin.o, crtend.o, crtbeginS.o,
crtendS.o): Use $(srcdir) to refer to crtbegin.S, crtend.S.
Use .S extension.
Use $<.
* config/ia64/t-vms (CRTSTUFF_T_CFLAGS, CRTSTUFF_T_CFLAGS_S): Set.
(crtinitS.o): New rule.
* config/ia64/vms-crtinit.S: New file.
* config/lm32/t-elf ($(T)crti.o, $(T)crtn.o): Remove.
* config/m32r/initfini.c: New file.
* config/m32r/t-linux, config/m32r/t-m32r: New files.
* config/m68k/crti.S, config/m68k/crtn.S: New files.
* config/mcore/crti.S, config/mcore/crtn.S: New files.
* config/mep/t-mep: New file.
* config/microblaze/crti.S, config/microblaze/crtn.S: New files.
* config/microblaze/t-microblaze (MULTILIB_OPTIONS): Remove.
* config/mips/crti.S, config/mips/crtn.S: New files.
* config/mips/t-crtstuff: New file.
* config/mmix/crti.S, config/mmix/crtn.S: New files.
* config/mmix/t-mmix (CRTSTUFF_T_CFLAGS): Set.
(CUSTOM_CRTIN): Set.
($(T)crti.o, $(T)crtn.o): Remove $(T),
dependencies.
Use $(srcdir) to refer to crti.S, crtn.S.
Use .S extension, $<.
* config/moxie/crti.asm: Rename to ...
* config/moxie/crti.S: ... this.
* config/moxie/crtn.asm: Rename to ...
* config/moxie/crtn.S: ... this.
* config/moxie/t-moxie: Remove.
* config/pa/stublib.c: New file.
* config/pa/t-stublib, config/pa/t-stublib64: New files.
* config/rs6000/eabi-ci.S, config/rs6000/eabi-cn.S: New files.
* config/rs6000/sol-ci.S, config/rs6000/sol-cn.S: New files.
* config/rs6000/t-crtstuff: New file.
* config/rs6000/t-ppccomm (EXTRA_PARTS): Remove.
(ecrti.S, ecrtn.S, ncrti.S, ncrtn.S): Remove.
(ecrti$(objext)): Depend on $(srcdir)/config/rs6000/eabi-ci.S.
Make output file explicit.
(ecrtn$(objext)): Depend on $(srcdir)/config/rs6000/eabi-cn.S.
Make output file explicit.
(ncrti$(objext): Depend on $(srcdir)/config/rs6000/sol-ci.S.
Make output file explicit.
(ncrtn$(objext)): Depend on $(srcdir)/config/rs6000/sol-cn.S.
Make output file explicit.
* config/score/crti.S, config/score/crtn.S: New files.
* config/sh/crt1.S, config/sh/crti.S, config/sh/crtn.S: New files.
* config/sh/lib1funcs-4-300.S, config/sh/lib1funcs-Os-4-200.S: New
files.
* config/sh/t-sh, config/sh/t-superh: New files.
* config/sparc/t-linux64: New file.
* config/spu/cache.S, config/spu/cachemgr.c: New files.
* config/spu/t-elf (CRTSTUFF_T_CFLAGS): Set.
(cachemgr.o, cachemgr_nonatomic.o, libgcc_%.a, cache8k.o)
(cache16k.o, cache32k.o, cache64k.o, cache128k.o): New rules.
* config/t-crtin: Remove.
* config/t-crtstuff-pic: New file.
* config/t-sol2 (CUSTOM_CRTIN): Set.
(crti.o, crtn.o): New rules.
* config/vms/t-vms: New file.
* config/vms/vms-ucrt0.c: New file.
* config/xtensa/t-elf: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180771 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
125 files changed, 18 insertions, 7394 deletions
diff --git a/gcc/config/alpha/t-vms b/gcc/config/alpha/t-vms index 9dab1229f45..d6850053597 100644 --- a/gcc/config/alpha/t-vms +++ b/gcc/config/alpha/t-vms @@ -19,17 +19,6 @@ LIB2FUNCS_EXTRA = $(srcdir)/config/alpha/vms-gcc_shell_handler.c -EXTRA_PARTS = vms-dwarf2.o vms-dwarf2eh.o $(VMS_EXTRA_PARTS) \ - crtbegin.o crtbeginS.o crtend.o crtendS.o - -# This object must be linked with in order to make the executable debuggable. -# vms-ld handles it automatically when passed -g. -$(T)vms-dwarf2.o : $(srcdir)/config/alpha/vms-dwarf2.asm - $(GCC_FOR_TARGET) -c -x assembler $< -o $@ - -$(T)vms-dwarf2eh.o : $(srcdir)/config/alpha/vms-dwarf2eh.asm - $(GCC_FOR_TARGET) -c -x assembler $< -o $@ - MULTILIB_OPTIONS = mcpu=ev6 MULTILIB_DIRNAMES = ev6 MULTILIB_OSDIRNAMES = ev6 diff --git a/gcc/config/alpha/vms-dwarf2.asm b/gcc/config/alpha/vms-dwarf2.asm deleted file mode 100644 index 531c7aa9984..00000000000 --- a/gcc/config/alpha/vms-dwarf2.asm +++ /dev/null @@ -1,77 +0,0 @@ -/* VMS dwarf2 section sequentializer. - Copyright (C) 2001, 2009 Free Software Foundation, Inc. - Contributed by Douglas B. Rupp (rupp@gnat.com). - -This file is part of GCC. - -GCC 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. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* Linking with this file forces Dwarf2 debug sections to be - sequentially loaded by the VMS linker, enabling GDB to read them. */ - -.section .debug_abbrev,NOWRT - .align 0 - .globl $dwarf2.debug_abbrev -$dwarf2.debug_abbrev: - -.section .debug_aranges,NOWRT - .align 0 - .globl $dwarf2.debug_aranges -$dwarf2.debug_aranges: - -.section .debug_frame,NOWRT - .align 0 - .globl $dwarf2.debug_frame -$dwarf2.debug_frame: - -.section .debug_info,NOWRT - .align 0 - .globl $dwarf2.debug_info -$dwarf2.debug_info: - -.section .debug_line,NOWRT - .align 0 - .globl $dwarf2.debug_line -$dwarf2.debug_line: - -.section .debug_loc,NOWRT - .align 0 - .globl $dwarf2.debug_loc -$dwarf2.debug_loc: - -.section .debug_macinfo,NOWRT - .align 0 - .globl $dwarf2.debug_macinfo -$dwarf2.debug_macinfo: - -.section .debug_pubnames,NOWRT - .align 0 - .globl $dwarf2.debug_pubnames -$dwarf2.debug_pubnames: - -.section .debug_str,NOWRT - .align 0 - .globl $dwarf2.debug_str -$dwarf2.debug_str: - -.section .debug_zzzzzz,NOWRT - .align 0 - .globl $dwarf2.debug_zzzzzz -$dwarf2.debug_zzzzzz: diff --git a/gcc/config/alpha/vms-dwarf2eh.asm b/gcc/config/alpha/vms-dwarf2eh.asm deleted file mode 100644 index e0eaf9d3741..00000000000 --- a/gcc/config/alpha/vms-dwarf2eh.asm +++ /dev/null @@ -1,30 +0,0 @@ -/* VMS dwarf2 exception handling section sequentializer. - Copyright (C) 2002, 2009 Free Software Foundation, Inc. - Contributed by Douglas B. Rupp (rupp@gnat.com). - -This file is part of GCC. - -GCC 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. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* Linking with this file forces the Dwarf2 EH section to be - individually loaded by the VMS linker an the unwinder to read it. */ - -.section .eh_frame,NOWRT - .align 0 diff --git a/gcc/config/arm/crti.asm b/gcc/config/arm/crti.asm deleted file mode 100644 index 9454273dd29..00000000000 --- a/gcc/config/arm/crti.asm +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright (C) 2001, 2008, 2009, 2010 Free Software Foundation, Inc. -# Written By Nick Clifton -# -# This file 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. -# -# This file 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. -# -# Under Section 7 of GPL version 3, you are granted additional -# permissions described in the GCC Runtime Library Exception, version -# 3.1, as published by the Free Software Foundation. -# -# You should have received a copy of the GNU General Public License and -# a copy of the GCC Runtime Library Exception along with this program; -# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -# <http://www.gnu.org/licenses/>. - -/* An executable stack is *not* required for these functions. */ -#if defined(__ELF__) && defined(__linux__) -.section .note.GNU-stack,"",%progbits -.previous -#endif - -# This file just make a stack frame for the contents of the .fini and -# .init sections. Users may put any desired instructions in those -# sections. - -#ifdef __ELF__ -#define TYPE(x) .type x,function -#else -#define TYPE(x) -#endif -#ifdef __ARM_EABI__ -/* Some attributes that are common to all routines in this file. */ - /* Tag_ABI_align_needed: This code does not require 8-byte - alignment from the caller. */ - /* .eabi_attribute 24, 0 -- default setting. */ - /* Tag_ABI_align_preserved: This code preserves 8-byte - alignment in any callee. */ - .eabi_attribute 25, 1 -#endif /* __ARM_EABI__ */ - - # Note - this macro is complemented by the FUNC_END macro - # in crtn.asm. If you change this macro you must also change - # that macro match. -.macro FUNC_START -#ifdef __thumb__ - .thumb - - push {r3, r4, r5, r6, r7, lr} -#else - .arm - # Create a stack frame and save any call-preserved registers - mov ip, sp - stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, ip, lr, pc} - sub fp, ip, #4 -#endif -.endm - - .section ".init" - .align 2 - .global _init -#ifdef __thumb__ - .thumb_func -#endif - TYPE(_init) -_init: - FUNC_START - - - .section ".fini" - .align 2 - .global _fini -#ifdef __thumb__ - .thumb_func -#endif - TYPE(_fini) -_fini: - FUNC_START - -# end of crti.asm diff --git a/gcc/config/arm/crtn.asm b/gcc/config/arm/crtn.asm deleted file mode 100644 index c7f90814d79..00000000000 --- a/gcc/config/arm/crtn.asm +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright (C) 2001, 2004, 2008, 2009, 2010 Free Software Foundation, Inc. -# Written By Nick Clifton -# -# This file 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. -# -# This file 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. -# -# Under Section 7 of GPL version 3, you are granted additional -# permissions described in the GCC Runtime Library Exception, version -# 3.1, as published by the Free Software Foundation. -# -# You should have received a copy of the GNU General Public License and -# a copy of the GCC Runtime Library Exception along with this program; -# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -# <http://www.gnu.org/licenses/>. - -/* An executable stack is *not* required for these functions. */ -#if defined(__ELF__) && defined(__linux__) -.section .note.GNU-stack,"",%progbits -.previous -#endif - -#ifdef __ARM_EABI__ -/* Some attributes that are common to all routines in this file. */ - /* Tag_ABI_align_needed: This code does not require 8-byte - alignment from the caller. */ - /* .eabi_attribute 24, 0 -- default setting. */ - /* Tag_ABI_align_preserved: This code preserves 8-byte - alignment in any callee. */ - .eabi_attribute 25, 1 -#endif /* __ARM_EABI__ */ - -# This file just makes sure that the .fini and .init sections do in -# fact return. Users may put any desired instructions in those sections. -# This file is the last thing linked into any executable. - - # Note - this macro is complemented by the FUNC_START macro - # in crti.asm. If you change this macro you must also change - # that macro match. - # - # Note - we do not try any fancy optimizations of the return - # sequences here, it is just not worth it. Instead keep things - # simple. Restore all the save resgisters, including the link - # register and then perform the correct function return instruction. - # We also save/restore r3 to ensure stack alignment. -.macro FUNC_END -#ifdef __thumb__ - .thumb - - pop {r3, r4, r5, r6, r7} - pop {r3} - mov lr, r3 -#else - .arm - - sub sp, fp, #40 - ldmfd sp, {r4, r5, r6, r7, r8, r9, sl, fp, sp, lr} -#endif - -#if defined __THUMB_INTERWORK__ || defined __thumb__ - bx lr -#else - mov pc, lr -#endif -.endm - - - .section ".init" - ;; - FUNC_END - - .section ".fini" - ;; - FUNC_END - -# end of crtn.asm diff --git a/gcc/config/arm/t-arm-elf b/gcc/config/arm/t-arm-elf index ab85293ee91..bfcf6ffd939 100644 --- a/gcc/config/arm/t-arm-elf +++ b/gcc/config/arm/t-arm-elf @@ -104,11 +104,6 @@ MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard* # MULTILIB_MATCHES += mcpu?arm7=mcpu?arm610 # MULTILIB_MATCHES += mcpu?arm7=mcpu?arm620 -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o - -# If EXTRA_MULTILIB_PARTS is not defined above then define EXTRA_PARTS here -# EXTRA_PARTS = crtbegin.o crtend.o crti.o crtn.o - LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib @@ -116,13 +111,3 @@ INSTALL_LIBGCC = install-multilib # or scheduling code that is breaking _fpmul_parts in fp-bit.c. # Disabling function inlining is a workaround for this problem. TARGET_LIBGCC2_CFLAGS = -fno-inline - -# Assemble startup files. -$(T)crti.o: $(srcdir)/config/arm/crti.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/arm/crti.asm - -$(T)crtn.o: $(srcdir)/config/arm/crtn.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/arm/crtn.asm - diff --git a/gcc/config/arm/t-linux b/gcc/config/arm/t-linux index 9a2cb1aed10..a0c5110f0c0 100644 --- a/gcc/config/arm/t-linux +++ b/gcc/config/arm/t-linux @@ -28,7 +28,5 @@ LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ # MULTILIB_OPTIONS = mfloat-abi=hard/mfloat-abi=soft # MULTILIB_DIRNAMES = hard-float soft-float -# EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o - # LIBGCC = stmp-multilib # INSTALL_LIBGCC = install-multilib diff --git a/gcc/config/arm/t-linux-eabi b/gcc/config/arm/t-linux-eabi index 3814cc09b81..fed979e980b 100644 --- a/gcc/config/arm/t-linux-eabi +++ b/gcc/config/arm/t-linux-eabi @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc. +# Copyright (C) 2005, 2009, 2010, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -31,9 +31,5 @@ MULTILIB_DIRNAMES = # Use a version of div0 which raises SIGFPE, and a special __clear_cache. LIB1ASMFUNCS := $(filter-out _dvmd_tls,$(LIB1ASMFUNCS)) _dvmd_lnx _clear_cache -# Multilib the standard Linux files. Don't include crti.o or crtn.o, -# which are provided by glibc. -EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o - LIB2FUNCS_STATIC_EXTRA += $(srcdir)/config/arm/linux-atomic.c LIB2FUNCS_STATIC_EXTRA += $(srcdir)/config/arm/linux-atomic-64bit.c diff --git a/gcc/config/arm/t-strongarm-elf b/gcc/config/arm/t-strongarm-elf index 4a4f4533ec1..95680031e54 100644 --- a/gcc/config/arm/t-strongarm-elf +++ b/gcc/config/arm/t-strongarm-elf @@ -23,7 +23,6 @@ MULTILIB_OPTIONS = mlittle-endian/mbig-endian mfloat-abi=hard/mfloat-abi=sof MULTILIB_DIRNAMES = le be fpu soft MULTILIB_EXCEPTIONS = MULTILIB_MATCHES = mbig-endian=mbe mlittle-endian=mle -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib @@ -32,12 +31,3 @@ INSTALL_LIBGCC = install-multilib # or scheduling code that is breaking _fpmul_parts in fp-bit.c. # Disabling function inlining is a workaround for this problem. TARGET_LIBGCC2_CFLAGS = -fno-inline - -# Assemble startup files. -$(T)crti.o: $(srcdir)/config/arm/crti.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/arm/crti.asm - -$(T)crtn.o: $(srcdir)/config/arm/crtn.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/arm/crtn.asm diff --git a/gcc/config/arm/t-symbian b/gcc/config/arm/t-symbian index a0d6f7de887..cf716147849 100644 --- a/gcc/config/arm/t-symbian +++ b/gcc/config/arm/t-symbian @@ -40,6 +40,3 @@ LIB2FUNCS_STATIC_EXTRA = $(srcdir)/config/arm/fp16.c # enabled, so there are no separate thumb-mode libraries. MULTILIB_OPTIONS = mfloat-abi=softfp MULTILIB_DIRNAMES = softfp - -# Symbian OS provides its own startup code. -EXTRA_MULTILIB_PARTS= diff --git a/gcc/config/bfin/crti.s b/gcc/config/bfin/crti.s deleted file mode 100644 index b6f20fc9e6b..00000000000 --- a/gcc/config/bfin/crti.s +++ /dev/null @@ -1,59 +0,0 @@ -/* Specialized code needed to support construction and destruction of - file-scope objects in C++ and Java code, and to support exception handling. - Copyright (C) 2005, 2008, 2009 Free Software Foundation, Inc. - Contributed by Analog Devices. - -This file is part of GCC. - -GCC 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. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* - * This file just supplies function prologues for the .init and .fini - * sections. It is linked in before crtbegin.o. - */ - - .ident "GNU C crti.o" - - .section .init - .globl __init - .type __init,@function -__init: -#if defined __ID_SHARED_LIB__ - [--SP] = P5; -#elif defined __BFIN_FDPIC__ - [--SP] = P3; -#endif - LINK 12; -#if defined __ID_SHARED_LIB__ - P5 = [P5 + _current_shared_library_p5_offset_] -#endif - .section .fini - .globl __fini - .type __fini,@function -__fini: -#if defined __ID_SHARED_LIB__ - [--SP] = P5; -#elif defined __BFIN_FDPIC__ - [--SP] = P3; -#endif - LINK 12; -#if defined __ID_SHARED_LIB__ - P5 = [P5 + _current_shared_library_p5_offset_] -#endif diff --git a/gcc/config/bfin/crtlibid.s b/gcc/config/bfin/crtlibid.s deleted file mode 100644 index beab8093810..00000000000 --- a/gcc/config/bfin/crtlibid.s +++ /dev/null @@ -1,29 +0,0 @@ -/* Provide a weak definition of the library ID, for the benefit of certain - configure scripts. - Copyright (C) 2005, 2008, 2009 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC 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. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - - .ident "GNU C crtlibid.o" - -.weak _current_shared_library_p5_offset_ -.set _current_shared_library_p5_offset_, 0 diff --git a/gcc/config/bfin/crtn.s b/gcc/config/bfin/crtn.s deleted file mode 100644 index 7fcd27bfade..00000000000 --- a/gcc/config/bfin/crtn.s +++ /dev/null @@ -1,50 +0,0 @@ -/* Specialized code needed to support construction and destruction of - file-scope objects in C++ and Java code, and to support exception handling. - Copyright (C) 2005, 2008, 2009 Free Software Foundation, Inc. - Contributed by Analog Devices. - -This file is part of GCC. - -GCC 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. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* - * This file supplies function epilogues for the .init and .fini sections. - * It is linked in after all other files. - */ - - .ident "GNU C crtn.o" - - .section .init - unlink; -#if defined __ID_SHARED_LIB__ - P5 = [SP++]; -#elif defined __BFIN_FDPIC__ - P3 = [SP++]; -#endif - rts; - - .section .fini - unlink; -#if defined __ID_SHARED_LIB__ - P5 = [SP++]; -#elif defined __BFIN_FDPIC__ - P3 = [SP++]; -#endif - rts; diff --git a/gcc/config/bfin/t-bfin b/gcc/config/bfin/t-bfin index 730043e4b63..bb95ab4139e 100644 --- a/gcc/config/bfin/t-bfin +++ b/gcc/config/bfin/t-bfin @@ -21,14 +21,3 @@ LIB1ASMSRC = bfin/lib1funcs.asm LIB1ASMFUNCS = _divsi3 _udivsi3 _umodsi3 _modsi3 _muldi3 _umulsi3_highpart LIB1ASMFUNCS += _smulsi3_highpart - -EXTRA_PARTS = crtbegin.o crtend.o crti.o crtn.o - -# Assemble startup files. -$(T)crti.o: $(srcdir)/config/bfin/crti.s $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/bfin/crti.s - -$(T)crtn.o: $(srcdir)/config/bfin/crtn.s $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/bfin/crtn.s diff --git a/gcc/config/bfin/t-bfin-elf b/gcc/config/bfin/t-bfin-elf index 61797bfad2a..fcf76c4ddfe 100644 --- a/gcc/config/bfin/t-bfin-elf +++ b/gcc/config/bfin/t-bfin-elf @@ -22,7 +22,6 @@ LIB1ASMSRC = bfin/lib1funcs.asm LIB1ASMFUNCS = _divsi3 _udivsi3 _umodsi3 _modsi3 _muldi3 _umulsi3_highpart LIB1ASMFUNCS += _smulsi3_highpart -CRTSTUFF_T_CFLAGS = -fpic TARGET_LIBGCC2_CFLAGS = -fpic MULTILIB_OPTIONS=mcpu=bf532-none @@ -54,19 +53,3 @@ MULTILIB_EXCEPTIONS=mleaf-id-shared-library* MULTILIB_EXCEPTIONS+=mcpu=bf532-none/mleaf-id-shared-library* MULTILIB_EXCEPTIONS+=*mfdpic/mleaf-id-shared-library* MULTILIB_EXCEPTIONS+=*msep-data/mleaf-id-shared-library* - -# Assemble startup files. -$(T)crti.o: $(srcdir)/config/bfin/crti.s $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/bfin/crti.s - -$(T)crtn.o: $(srcdir)/config/bfin/crtn.s $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/bfin/crtn.s - -$(T)crtlibid.o: $(srcdir)/config/bfin/crtlibid.s $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crtlibid.o -x assembler-with-cpp \ - $(srcdir)/config/bfin/crtlibid.s - -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crtbeginS.o crtendS.o crti.o crtn.o crtlibid.o diff --git a/gcc/config/bfin/t-bfin-linux b/gcc/config/bfin/t-bfin-linux index d6f67f05445..a83f9f2da83 100644 --- a/gcc/config/bfin/t-bfin-linux +++ b/gcc/config/bfin/t-bfin-linux @@ -22,7 +22,6 @@ LIB1ASMSRC = bfin/lib1funcs.asm LIB1ASMFUNCS = _divsi3 _udivsi3 _umodsi3 _modsi3 _muldi3 _umulsi3_highpart LIB1ASMFUNCS += _smulsi3_highpart -CRTSTUFF_T_CFLAGS = -fpic TARGET_LIBGCC2_CFLAGS = -fpic MULTILIB_OPTIONS=mcpu=bf532-none @@ -49,8 +48,6 @@ MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf549m-none MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf561-none MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf592-none -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crtbeginS.o crtendS.o - # This rule uses MULTILIB_MATCHES to generate a definition of # SYSROOT_SUFFIX_SPEC. linux-sysroot-suffix.h: $(srcdir)/config/bfin/print-sysroot-suffix.sh diff --git a/gcc/config/bfin/t-bfin-uclinux b/gcc/config/bfin/t-bfin-uclinux index a46d7b3ac15..1be0796987b 100644 --- a/gcc/config/bfin/t-bfin-uclinux +++ b/gcc/config/bfin/t-bfin-uclinux @@ -22,7 +22,6 @@ LIB1ASMSRC = bfin/lib1funcs.asm LIB1ASMFUNCS = _divsi3 _udivsi3 _umodsi3 _modsi3 _muldi3 _umulsi3_highpart LIB1ASMFUNCS += _smulsi3_highpart -CRTSTUFF_T_CFLAGS = -fpic TARGET_LIBGCC2_CFLAGS = -fpic MULTILIB_OPTIONS=mcpu=bf532-none @@ -53,11 +52,3 @@ MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf592-none MULTILIB_EXCEPTIONS=mleaf-id-shared-library* MULTILIB_EXCEPTIONS+=mcpu=bf532-none/mleaf-id-shared-library* MULTILIB_EXCEPTIONS+=*msep-data/mleaf-id-shared-library* - -# Assemble startup files. -$(T)crtlibid.o: $(srcdir)/config/bfin/crtlibid.s $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crtlibid.o -x assembler-with-cpp \ - $(srcdir)/config/bfin/crtlibid.s - -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crtbeginS.o crtendS.o crtlibid.o diff --git a/gcc/config/c6x/crti.s b/gcc/config/c6x/crti.s deleted file mode 100644 index 8fe35c1f121..00000000000 --- a/gcc/config/c6x/crti.s +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2010, 2011 Free Software Foundation, Inc. - Contributed by Bernd Schmidt <bernds@codesourcery.com>. - -This file 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. - -This file 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* - * This file just supplies function prologues for the .init and .fini - * sections. It is linked in before crtbegin.o. - */ - - .section .init - .globl _init - .type _init,@function -_init: - add .l2 -8, B15, B15 - stw .d2t2 B3,*+B15(4) - .section .fini - .globl _fini - .type _fini,@function -_fini: - add .l2 -8, B15, B15 - stw .d2t2 B3,*+B15(4) diff --git a/gcc/config/c6x/crtn.s b/gcc/config/c6x/crtn.s deleted file mode 100644 index 5900a4b14c4..00000000000 --- a/gcc/config/c6x/crtn.s +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright 2010, 2011 Free Software Foundation, Inc. - Contributed by Bernd Schmidt <bernds@codesourcery.com>. - -This file 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. - -This file 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* - * This file supplies function epilogues for the .init and .fini sections. - * It is linked in after all other files. - */ - - .section .init - ldw .d2t2 *+B15(4), B3 - add .d2 B15, 8, B15 - nop 3 - ret .s2 B3 - nop 5 - - .section .fini - ldw .d2t2 *+B15(4), B3 - add .d2 B15, 8, B15 - nop 3 - ret .s2 B3 - nop 5 - diff --git a/gcc/config/c6x/t-c6x-elf b/gcc/config/c6x/t-c6x-elf index 98146150d32..b3b4b850fe8 100644 --- a/gcc/config/c6x/t-c6x-elf +++ b/gcc/config/c6x/t-c6x-elf @@ -46,20 +46,5 @@ MULTILIB_DIRNAMES = be c674x MULTILIB_EXCEPTIONS = MULTILIB_MATCHES = -# Assemble startup files. -$(T)crti.o: $(srcdir)/config/c6x/crti.s $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crti.o $(CRTSTUFF_T_CFLAGS) -x assembler-with-cpp \ - $(srcdir)/config/c6x/crti.s - -$(T)crtn.o: $(srcdir)/config/c6x/crtn.s $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crtn.o $(CRTSTUFF_T_CFLAGS) -x assembler-with-cpp \ - $(srcdir)/config/c6x/crtn.s - -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crtbeginS.o crtendS.o crti.o crtn.o - # Avoid failures when the user's GOT becomes too large. -CRTSTUFF_T_CFLAGS = -msdata=none -CRTSTUFF_T_CFLAGS_S = -msdata=none TARGET_LIBGCC2_CFLAGS = -msdata=none diff --git a/gcc/config/c6x/t-c6x-uclinux b/gcc/config/c6x/t-c6x-uclinux index fdc447ac62c..c904f8f4d7c 100644 --- a/gcc/config/c6x/t-c6x-uclinux +++ b/gcc/config/c6x/t-c6x-uclinux @@ -2,6 +2,4 @@ MULTILIB_OSDIRNAMES = march.c674x=!c674x MULTILIB_OSDIRNAMES += mbig-endian=!be MULTILIB_OSDIRNAMES += mbig-endian/march.c674x=!be/c674x -CRTSTUFF_T_CFLAGS = -fPIC -msdata=none -CRTSTUFF_T_CFLAGS_S = -fPIC -msdata=none TARGET_LIBGCC2_CFLAGS = -fPIC -msdata=none diff --git a/gcc/config/cris/t-elfmulti b/gcc/config/cris/t-elfmulti index 90eeaaedf44..29ab9beeb94 100644 --- a/gcc/config/cris/t-elfmulti +++ b/gcc/config/cris/t-elfmulti @@ -31,4 +31,3 @@ MULTILIB_MATCHES = \ MULTILIB_EXTRA_OPTS = mbest-lib-options INSTALL_LIBGCC = install-multilib LIBGCC = stmp-multilib -CRTSTUFF_T_CFLAGS = -moverride-best-lib-options diff --git a/gcc/config/cris/t-linux b/gcc/config/cris/t-linux index e10d083f565..6505c37e1d1 100644 --- a/gcc/config/cris/t-linux +++ b/gcc/config/cris/t-linux @@ -1,5 +1,4 @@ TARGET_LIBGCC2_CFLAGS += -fPIC -CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS) # We *know* we have a limits.h in the glibc library, with extra # definitions needed for e.g. libgfortran. diff --git a/gcc/config/fr30/crti.asm b/gcc/config/fr30/crti.asm deleted file mode 100644 index 4ce61231bd7..00000000000 --- a/gcc/config/fr30/crti.asm +++ /dev/null @@ -1,61 +0,0 @@ -# crti.s for ELF - -# Copyright (C) 1992, 1998, 1999, 2008, 2009 Free Software Foundation, Inc. -# Written By David Vinayak Henkel-Wallace, June 1992 -# -# This file 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. -# -# This file 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. -# -# Under Section 7 of GPL version 3, you are granted additional -# permissions described in the GCC Runtime Library Exception, version -# 3.1, as published by the Free Software Foundation. -# -# You should have received a copy of the GNU General Public License and -# a copy of the GCC Runtime Library Exception along with this program; -# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -# <http://www.gnu.org/licenses/>. - -# This file just make a stack frame for the contents of the .fini and -# .init sections. Users may put any desired instructions in those -# sections. - - .section ".init" - .global _init - .type _init,#function - .align 4 -_init: - st rp, @-r15 - enter #4 - - # These nops are here to align the end of this code with a 16 byte - # boundary. The linker will start inserting code into the .init - # section at such a boundary. - - nop - nop - nop - nop - nop - nop - - - .section ".fini" - .global _fini - .type _fini,#function - .align 4 -_fini: - st rp, @-r15 - enter #4 - nop - nop - nop - nop - nop - nop diff --git a/gcc/config/fr30/crtn.asm b/gcc/config/fr30/crtn.asm deleted file mode 100644 index ac2712186c3..00000000000 --- a/gcc/config/fr30/crtn.asm +++ /dev/null @@ -1,44 +0,0 @@ -# crtn.asm for ELF - -# Copyright (C) 1992, 1999, 2008, 2009 Free Software Foundation, Inc. -# Written By David Vinayak Henkel-Wallace, June 1992 -# -# This file 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. -# -# This file 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. -# -# Under Section 7 of GPL version 3, you are granted additional -# permissions described in the GCC Runtime Library Exception, version -# 3.1, as published by the Free Software Foundation. -# -# You should have received a copy of the GNU General Public License and -# a copy of the GCC Runtime Library Exception along with this program; -# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -# <http://www.gnu.org/licenses/>. - -# This file just makes sure that the .fini and .init sections do in -# fact return. Users may put any desired instructions in those sections. -# This file is the last thing linked into any executable. - - .section ".init" - .align 4 - - leave - ld @r15+,rp - ret - - - .section ".fini" - .align 4 - - leave - ld @r15+,rp - ret - -# Th-th-th-that is all folks! diff --git a/gcc/config/fr30/t-fr30 b/gcc/config/fr30/t-fr30 index fa786d6e50a..75009d4eb70 100644 --- a/gcc/config/fr30/t-fr30 +++ b/gcc/config/fr30/t-fr30 @@ -19,13 +19,6 @@ LIB1ASMSRC = fr30/lib1funcs.asm LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 -# Assemble startup files. -$(T)crti.o: $(srcdir)/config/fr30/crti.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) -c -o $(T)crti.o -x assembler $(srcdir)/config/fr30/crti.asm - -$(T)crtn.o: $(srcdir)/config/fr30/crtn.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) -c -o $(T)crtn.o -x assembler $(srcdir)/config/fr30/crtn.asm - # If any special flags are necessary when building libgcc2 put them here. # # TARGET_LIBGCC2_CFLAGS diff --git a/gcc/config/frv/frvbegin.c b/gcc/config/frv/frvbegin.c deleted file mode 100644 index 23cbf1ecc93..00000000000 --- a/gcc/config/frv/frvbegin.c +++ /dev/null @@ -1,157 +0,0 @@ -/* Frv initialization file linked before all user modules - Copyright (C) 1999, 2000, 2003, 2004, 2009 Free Software Foundation, Inc. - Contributed by Red Hat, Inc. - - This file is part of GCC. - - GCC 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. - - GCC 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. - - Under Section 7 of GPL version 3, you are granted additional - permissions described in the GCC Runtime Library Exception, version - 3.1, as published by the Free Software Foundation. - - You should have received a copy of the GNU General Public License and - a copy of the GCC Runtime Library Exception along with this program; - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - <http://www.gnu.org/licenses/>. - - This file was originally taken from the file crtstuff.c in the - main compiler directory, and simplified. */ - -#include "defaults.h" -#include <stddef.h> -#include "../libgcc/unwind-dw2-fde.h" -#include "gbl-ctors.h" - -/* Declare a pointer to void function type. */ -#define STATIC static - -#ifdef __FRV_UNDERSCORE__ -#define UNDERSCORE "_" -#else -#define UNDERSCORE "" -#endif - -#define INIT_SECTION_NEG_ONE(SECTION, FLAGS, NAME) \ -__asm__ (".section " SECTION "," FLAGS "\n\t" \ - ".globl " UNDERSCORE NAME "\n\t" \ - ".type " UNDERSCORE NAME ",@object\n\t" \ - ".p2align 2\n" \ - UNDERSCORE NAME ":\n\t" \ - ".word -1\n\t" \ - ".previous") - -#define INIT_SECTION(SECTION, FLAGS, NAME) \ -__asm__ (".section " SECTION "," FLAGS "\n\t" \ - ".globl " UNDERSCORE NAME "\n\t" \ - ".type " UNDERSCORE NAME ",@object\n\t" \ - ".p2align 2\n" \ - UNDERSCORE NAME ":\n\t" \ - ".previous") - -/* Beginning of .ctor/.dtor sections that provides a list of constructors and - destructors to run. */ - -INIT_SECTION_NEG_ONE (".ctors", "\"aw\"", "__CTOR_LIST__"); -INIT_SECTION_NEG_ONE (".dtors", "\"aw\"", "__DTOR_LIST__"); - -/* Beginning of .eh_frame section that provides all of the exception handling - tables. */ - -INIT_SECTION (".eh_frame", "\"aw\"", "__EH_FRAME_BEGIN__"); - -#if ! __FRV_FDPIC__ -/* In FDPIC, the linker itself generates this. */ -/* Beginning of .rofixup section that provides a list of pointers that we - need to adjust. */ - -INIT_SECTION (".rofixup", "\"a\"", "__ROFIXUP_LIST__"); -#endif /* __FRV_FDPIC__ */ - -extern void __frv_register_eh(void) __attribute__((__constructor__)); -extern void __frv_deregister_eh(void) __attribute__((__destructor__)); - -extern func_ptr __EH_FRAME_BEGIN__[]; - -/* Register the exception handling table as the first constructor. */ -void -__frv_register_eh (void) -{ - static struct object object; - if (__register_frame_info) - __register_frame_info (__EH_FRAME_BEGIN__, &object); -} - -/* Note, do not declare __{,de}register_frame_info weak as it seems - to interfere with the pic support. */ - -/* Unregister the exception handling table as a deconstructor. */ -void -__frv_deregister_eh (void) -{ - static int completed = 0; - - if (completed) - return; - - if (__deregister_frame_info) - __deregister_frame_info (__EH_FRAME_BEGIN__); - - completed = 1; -} - -/* Run the global destructors. */ -void -__do_global_dtors (void) -{ - static func_ptr *p = __DTOR_LIST__ + 1; - while (*p) - { - p++; - (*(p-1)) (); - } -} - -/* Run the global constructors. */ -void -__do_global_ctors (void) -{ - unsigned long nptrs = (unsigned long) __CTOR_LIST__[0]; - unsigned i; - - if (nptrs == (unsigned long)-1) - for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++); - - for (i = nptrs; i >= 1; i--) - __CTOR_LIST__[i] (); - - atexit (__do_global_dtors); -} - -/* Subroutine called automatically by `main'. - Compiling a global function named `main' - produces an automatic call to this function at the beginning. - - For many systems, this routine calls __do_global_ctors. - For systems which support a .init section we use the .init section - to run __do_global_ctors, so we need not do anything here. */ - -void -__main (void) -{ - /* Support recursive calls to `main': run initializers just once. */ - static int initialized; - if (! initialized) - { - initialized = 1; - __do_global_ctors (); - } -} diff --git a/gcc/config/frv/frvend.c b/gcc/config/frv/frvend.c deleted file mode 100644 index 0bb07b56b4a..00000000000 --- a/gcc/config/frv/frvend.c +++ /dev/null @@ -1,70 +0,0 @@ -/* Frv initialization file linked after all user modules - Copyright (C) 1999, 2000, 2003, 2004, 2009 Free Software Foundation, Inc. - Contributed by Red Hat, Inc. - - This file is part of GCC. - - GCC 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. - - GCC 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. - - Under Section 7 of GPL version 3, you are granted additional - permissions described in the GCC Runtime Library Exception, version - 3.1, as published by the Free Software Foundation. - - You should have received a copy of the GNU General Public License and - a copy of the GCC Runtime Library Exception along with this program; - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - <http://www.gnu.org/licenses/>. */ - -#include "defaults.h" -#include <stddef.h> -#include "../libgcc/unwind-dw2-fde.h" - -#ifdef __FRV_UNDERSCORE__ -#define UNDERSCORE "_" -#else -#define UNDERSCORE "" -#endif - -#define FINI_SECTION_ZERO(SECTION, FLAGS, NAME) \ -__asm__ (".section " SECTION "," FLAGS "\n\t" \ - ".globl " UNDERSCORE NAME "\n\t" \ - ".type " UNDERSCORE NAME ",@object\n\t" \ - ".p2align 2\n" \ - UNDERSCORE NAME ":\n\t" \ - ".word 0\n\t" \ - ".previous") - -#define FINI_SECTION(SECTION, FLAGS, NAME) \ -__asm__ (".section " SECTION "," FLAGS "\n\t" \ - ".globl " UNDERSCORE NAME "\n\t" \ - ".type " UNDERSCORE NAME ",@object\n\t" \ - ".p2align 2\n" \ - UNDERSCORE NAME ":\n\t" \ - ".previous") - -/* End of .ctor/.dtor sections that provides a list of constructors and - destructors to run. */ - -FINI_SECTION_ZERO (".ctors", "\"aw\"", "__CTOR_END__"); -FINI_SECTION_ZERO (".dtors", "\"aw\"", "__DTOR_END__"); - -/* End of .eh_frame section that provides all of the exception handling - tables. */ - -FINI_SECTION_ZERO (".eh_frame", "\"aw\"", "__FRAME_END__"); - -#if ! __FRV_FDPIC__ -/* In FDPIC, the linker itself generates this. */ -/* End of .rofixup section that provides a list of pointers that we - need to adjust. */ - -FINI_SECTION (".rofixup", "\"a\"", "__ROFIXUP_END__"); -#endif /* __FRV_FDPIC__ */ diff --git a/gcc/config/frv/t-frv b/gcc/config/frv/t-frv index 395a679747a..03f3cd8cde1 100644 --- a/gcc/config/frv/t-frv +++ b/gcc/config/frv/t-frv @@ -57,25 +57,6 @@ ulltof.c: $(srcdir)/config/frv/ulltof.c ulltod.c: $(srcdir)/config/frv/ulltod.c $(LN_S) $(srcdir)/config/frv/ulltod.c . -# Build frvbegin.o and frvend.o -EXTRA_MULTILIB_PARTS=frvbegin.o frvend.o - -# Compile two additional files that are linked with every program -# linked using GCC on systems using COFF or ELF, for the sake of C++ -# constructors. - -FRVSTUFF_CFLAGS = $(TARGET_LIBGCC2_CFLAGS) - -$(T)frvbegin$(objext): $(srcdir)/config/frv/frvbegin.c $(GCC_PASSES) \ - $(CONFIG_H) defaults.h $(srcdir)/../libgcc/unwind-dw2-fde.h gbl-ctors.h - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) $(FRVSTUFF_CFLAGS) \ - -c $(srcdir)/config/frv/frvbegin.c -o $(T)frvbegin$(objext) - -$(T)frvend$(objext): $(srcdir)/config/frv/frvend.c $(GCC_PASSES) \ - $(CONFIG_H) defaults.h $(srcdir)/../libgcc/unwind-dw2-fde.h gbl-ctors.h - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) $(FRVSTUFF_CFLAGS) \ - -c $(srcdir)/config/frv/frvend.c -o $(T)frvend$(objext) - # Enable the following if multilibs are needed. # See gcc/genmultilib, gcc/gcc.texi and gcc/tm.texi for a # description of the options and their values. diff --git a/gcc/config/frv/t-linux b/gcc/config/frv/t-linux index 305d3e6de4b..10800e9bdc1 100644 --- a/gcc/config/frv/t-linux +++ b/gcc/config/frv/t-linux @@ -23,8 +23,4 @@ MULTILIB_MATCHES= MULTILIB_EXCEPTIONS= MULTILIB_EXTRA_OPTS= -# We don't use frvbegin.o or frvend.o. -EXTRA_MULTILIB_PARTS = - -CRTSTUFF_T_CFLAGS = -fPIC TARGET_LIBGCC2_CFLAGS = -fPIC diff --git a/gcc/config/h8300/crti.asm b/gcc/config/h8300/crti.asm deleted file mode 100644 index 7ee3ae74503..00000000000 --- a/gcc/config/h8300/crti.asm +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (C) 2001, 2002, 2009 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC 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. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* The code in sections .init and .fini is supposed to be a single - regular function. The function in .init is called directly from - start in crt0.asm. The function in .fini is atexit()ed in crt0.asm - too. - - crti.asm contributes the prologue of a function to these sections, - and crtn.asm comes up the epilogue. STARTFILE_SPEC should list - crti.o before any other object files that might add code to .init - or .fini sections, and ENDFILE_SPEC should list crtn.o after any - such object files. */ - -#ifdef __H8300H__ -#ifdef __NORMAL_MODE__ - .h8300hn -#else - .h8300h -#endif -#endif - -#ifdef __H8300S__ -#ifdef __NORMAL_MODE__ - .h8300sn -#else - .h8300s -#endif -#endif -#ifdef __H8300SX__ -#ifdef __NORMAL_MODE__ - .h8300sxn -#else - .h8300sx -#endif -#endif - - .section .init, "ax", @progbits - .global __init -__init: - .section .fini, "ax", @progbits - .global __fini -__fini: diff --git a/gcc/config/h8300/crtn.asm b/gcc/config/h8300/crtn.asm deleted file mode 100644 index 173fde13b5b..00000000000 --- a/gcc/config/h8300/crtn.asm +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 2001, 2009 Free Software Foundation, Inc. - This file was adapted from glibc sources. - -This file is part of GCC. - -GCC 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. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* See an explanation about .init and .fini in crti.asm. */ - -#ifdef __H8300H__ -#ifdef __NORMAL_MODE__ - .h8300hn -#else - .h8300h -#endif -#endif - -#ifdef __H8300S__ -#ifdef __NORMAL_MODE__ - .h8300sn -#else - .h8300s -#endif -#endif -#ifdef __H8300SX__ -#ifdef __NORMAL_MODE__ - .h8300sxn -#else - .h8300sx -#endif -#endif - .section .init, "ax", @progbits - rts - - .section .fini, "ax", @progbits - rts diff --git a/gcc/config/h8300/t-elf b/gcc/config/h8300/t-elf deleted file mode 100644 index c1f1dac32c7..00000000000 --- a/gcc/config/h8300/t-elf +++ /dev/null @@ -1,6 +0,0 @@ -EXTRA_MULTILIB_PARTS= crti.o crtn.o crtbegin.o crtend.o - -$(T)crti.o: $(srcdir)/config/h8300/crti.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/h8300/crti.asm -$(T)crtn.o: $(srcdir)/config/h8300/crtn.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/h8300/crtn.asm diff --git a/gcc/config/i386/cygming-crtbegin.c b/gcc/config/i386/cygming-crtbegin.c deleted file mode 100644 index fc36cce257d..00000000000 --- a/gcc/config/i386/cygming-crtbegin.c +++ /dev/null @@ -1,135 +0,0 @@ -/* crtbegin object for windows32 targets. - Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. - - Contributed by Danny Smith <dannysmith@users.sourceforge.net> - -This file is part of GCC. - -GCC 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. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* Target machine header files require this define. */ -#define IN_LIBGCC2 - -#include "auto-host.h" -#include "tconfig.h" -#include "tsystem.h" -#include "coretypes.h" -#include "tm.h" -#include "unwind-dw2-fde.h" - -#define WIN32_LEAN_AND_MEAN -#include <windows.h> - -#ifndef LIBGCC_SONAME -#define LIBGCC_SONAME "libgcc_s.dll" -#endif - -#ifndef LIBGCJ_SONAME -#define LIBGCJ_SONAME "libgcj_s.dll" -#endif - - -/* Make the declarations weak. This is critical for - _Jv_RegisterClasses because it lives in libgcj.a */ -extern void __register_frame_info (const void *, struct object *) - TARGET_ATTRIBUTE_WEAK; -extern void *__deregister_frame_info (const void *) - TARGET_ATTRIBUTE_WEAK; -extern void _Jv_RegisterClasses (const void *) TARGET_ATTRIBUTE_WEAK; - -#if defined(HAVE_LD_RO_RW_SECTION_MIXING) -# define EH_FRAME_SECTION_CONST const -#else -# define EH_FRAME_SECTION_CONST -#endif - -/* Stick a label at the beginning of the frame unwind info so we can - register/deregister it with the exception handling library code. */ -#if DWARF2_UNWIND_INFO -static EH_FRAME_SECTION_CONST char __EH_FRAME_BEGIN__[] - __attribute__((used, section(EH_FRAME_SECTION_NAME), aligned(4))) - = { }; - -static struct object obj; -#endif - -#if TARGET_USE_JCR_SECTION -static void *__JCR_LIST__[] - __attribute__ ((used, section(JCR_SECTION_NAME), aligned(4))) - = { }; -#endif - -/* Pull in references from libgcc.a(unwind-dw2-fde.o) in the - startfile. These are referenced by a ctor and dtor in crtend.o. */ -extern void __gcc_register_frame (void); -extern void __gcc_deregister_frame (void); - -void -__gcc_register_frame (void) -{ -#if DWARF2_UNWIND_INFO -/* Weak undefined symbols won't be pulled in from dlls; hence - we first test if the dll is already loaded and, if so, - get the symbol's address at run-time. If the dll is not loaded, - fallback to weak linkage to static archive. */ - - void (*register_frame_fn) (const void *, struct object *); - HANDLE h = GetModuleHandle (LIBGCC_SONAME); - if (h) - register_frame_fn = (void (*) (const void *, struct object *)) - GetProcAddress (h, "__register_frame_info"); - else - register_frame_fn = __register_frame_info; - if (register_frame_fn) - register_frame_fn (__EH_FRAME_BEGIN__, &obj); -#endif - -#if TARGET_USE_JCR_SECTION - if (__JCR_LIST__[0]) - { - void (*register_class_fn) (const void *); - HANDLE h = GetModuleHandle (LIBGCJ_SONAME); - if (h) - register_class_fn = (void (*) (const void *)) - GetProcAddress (h, "_Jv_RegisterClasses"); - else - register_class_fn = _Jv_RegisterClasses; - - if (register_class_fn) - register_class_fn (__JCR_LIST__); - } -#endif -} - -void -__gcc_deregister_frame (void) -{ -#if DWARF2_UNWIND_INFO - void * (*deregister_frame_fn) (const void *); - HANDLE h = GetModuleHandle (LIBGCC_SONAME); - if (h) - deregister_frame_fn = (void* (*) (const void *)) - GetProcAddress (h, "__deregister_frame_info"); - else - deregister_frame_fn = __deregister_frame_info; - if (deregister_frame_fn) - deregister_frame_fn (__EH_FRAME_BEGIN__); -#endif -} diff --git a/gcc/config/i386/cygming-crtend.c b/gcc/config/i386/cygming-crtend.c deleted file mode 100644 index 8545420b271..00000000000 --- a/gcc/config/i386/cygming-crtend.c +++ /dev/null @@ -1,88 +0,0 @@ -/* crtend object for windows32 targets. - Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. - - Contributed by Danny Smith <dannysmith@users.sourceforge.net> - -This file is part of GCC. - -GCC 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. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* Target machine header files require this define. */ -#define IN_LIBGCC2 - -/* auto-host.h is needed by cygming.h for HAVE_GAS_WEAK and here - for HAVE_LD_RO_RW_SECTION_MIXING. */ -#include "auto-host.h" -#include "tconfig.h" -#include "tsystem.h" -#include "coretypes.h" -#include "tm.h" -#include "unwind-dw2-fde.h" - -#if defined(HAVE_LD_RO_RW_SECTION_MIXING) -# define EH_FRAME_SECTION_CONST const -#else -# define EH_FRAME_SECTION_CONST -#endif - -#if DWARF2_UNWIND_INFO -/* Terminate the frame unwind info section with a 0 as a sentinel; - this would be the 'length' field in a real FDE. */ - -static EH_FRAME_SECTION_CONST int __FRAME_END__[] - __attribute__ ((used, section(EH_FRAME_SECTION_NAME), - aligned(4))) - = { 0 }; -#endif - -#if TARGET_USE_JCR_SECTION -/* Null terminate the .jcr section array. */ -static void *__JCR_END__[1] - __attribute__ ((used, section(JCR_SECTION_NAME), - aligned(sizeof(void *)))) - = { 0 }; -#endif - -extern void __gcc_register_frame (void); -extern void __gcc_deregister_frame (void); - -static void register_frame_ctor (void) __attribute__ ((constructor (0))); - -static void -register_frame_ctor (void) -{ - __gcc_register_frame (); -#if DEFAULT_USE_CXA_ATEXIT - /* If we use the __cxa_atexit method to register C++ dtors - at object construction, also use atexit to register eh frame - info cleanup. */ - atexit (__gcc_deregister_frame); -#endif -} - -#if !DEFAULT_USE_CXA_ATEXIT -static void deregister_frame_dtor (void) __attribute__ ((destructor (0))); - -static void -deregister_frame_dtor (void) -{ - __gcc_deregister_frame (); -} -#endif diff --git a/gcc/config/i386/t-crtstuff b/gcc/config/i386/t-crtstuff deleted file mode 100644 index c14dd9411ae..00000000000 --- a/gcc/config/i386/t-crtstuff +++ /dev/null @@ -1,7 +0,0 @@ -# The pushl in CTOR initialization interferes with frame pointer elimination. -# crtend*.o cannot be compiled without -fno-asynchronous-unwind-tables, -# because then __FRAME_END__ might not be the last thing in .eh_frame -# section. -fno-asynchronous-unwind-tables is off by default for i386 -# and is on by default for x86-64. We turn it off for both i386 and -# x86-64. -CRTSTUFF_T_CFLAGS += -fno-omit-frame-pointer -fno-asynchronous-unwind-tables diff --git a/gcc/config/i386/t-i386elf b/gcc/config/i386/t-i386elf deleted file mode 100644 index 9560d905521..00000000000 --- a/gcc/config/i386/t-i386elf +++ /dev/null @@ -1,4 +0,0 @@ -# For svr4 we build crtbegin.o and crtend.o which serve to add begin and -# end labels to the .ctors and .dtors section when we link using gcc. - -EXTRA_PARTS=crtbegin.o crtend.o diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64 index ea8f5e9d7ae..4db41ea51ee 100644 --- a/gcc/config/i386/t-linux64 +++ b/gcc/config/i386/t-linux64 @@ -40,7 +40,3 @@ MULTILIB_OSDIRNAMES+= mx32=../libx32 LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib - -EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o \ - crtbeginT.o crtprec32.o crtprec64.o crtprec80.o \ - crtfastmath.o diff --git a/gcc/config/i386/t-nto b/gcc/config/i386/t-nto index b80ff802927..b72c00d04a6 100644 --- a/gcc/config/i386/t-nto +++ b/gcc/config/i386/t-nto @@ -1,4 +1 @@ -CRTSTUFF_T_CFLAGS = -fno-omit-frame-pointer -fPIC TARGET_LIBGCC2_CFLAGS = -fPIC -fexceptions - -EXTRA_PARTS = crtbegin.o diff --git a/gcc/config/ia64/crtbegin.asm b/gcc/config/ia64/crtbegin.asm deleted file mode 100644 index 638489990d5..00000000000 --- a/gcc/config/ia64/crtbegin.asm +++ /dev/null @@ -1,254 +0,0 @@ -/* Copyright (C) 2000, 2001, 2003, 2005, 2009 Free Software Foundation, Inc. - Contributed by Jes Sorensen, <Jes.Sorensen@cern.ch> - - This file is part of GCC. - - GCC 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. - - GCC 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. - - Under Section 7 of GPL version 3, you are granted additional - permissions described in the GCC Runtime Library Exception, version - 3.1, as published by the Free Software Foundation. - - You should have received a copy of the GNU General Public License and - a copy of the GCC Runtime Library Exception along with this program; - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - <http://www.gnu.org/licenses/>. */ - -#include "auto-host.h" - -.section .ctors,"aw","progbits" - .align 8 -__CTOR_LIST__: - data8 -1 - -.section .dtors,"aw","progbits" - .align 8 -__DTOR_LIST__: - data8 -1 - -.section .jcr,"aw","progbits" - .align 8 -__JCR_LIST__: - -.section .sdata - .type dtor_ptr,@object - .size dtor_ptr,8 -dtor_ptr: - data8 @gprel(__DTOR_LIST__ + 8) - - /* A handle for __cxa_finalize to manage c++ local destructors. */ - .global __dso_handle - .type __dso_handle,@object - .size __dso_handle,8 -#ifdef SHARED - .section .data -__dso_handle: - data8 __dso_handle -#else - .section .bss - .align 8 -__dso_handle: - .skip 8 -#endif - .hidden __dso_handle - - -#ifdef HAVE_INITFINI_ARRAY - -.section .fini_array, "a" - data8 @fptr(__do_global_dtors_aux) - -.section .init_array, "a" - data8 @fptr(__do_jv_register_classes) - data8 @fptr(__do_global_ctors_aux) - -#else /* !HAVE_INITFINI_ARRAY */ -/* - * Fragment of the ELF _fini routine that invokes our dtor cleanup. - * - * We make the call by indirection, because in large programs the - * .fini and .init sections are not in range of the destination, and - * we cannot allow the linker to insert a stub at the end of this - * fragment of the _fini function. Further, Itanium does not implement - * the long branch instructions, and we do not wish every program to - * trap to the kernel for emulation. - * - * Note that we require __do_global_dtors_aux to preserve the GP, - * so that the next fragment in .fini gets the right value. - */ -.section .fini,"ax","progbits" - { .mlx - movl r2 = @pcrel(__do_global_dtors_aux - 16) - } - { .mii - mov r3 = ip - ;; - add r2 = r2, r3 - ;; - } - { .mib - nop 0 - mov b6 = r2 - br.call.sptk.many b0 = b6 - } - -/* Likewise for _init. */ - -.section .init,"ax","progbits" - { .mlx - movl r2 = @pcrel(__do_jv_register_classes - 16) - } - { .mii - mov r3 = ip - ;; - add r2 = r2, r3 - ;; - } - { .mib - nop 0 - mov b6 = r2 - br.call.sptk.many b0 = b6 - } -#endif /* !HAVE_INITFINI_ARRAY */ - -.section .text - .align 32 - .proc __do_global_dtors_aux -__do_global_dtors_aux: - .prologue -#ifndef SHARED - .save ar.pfs, r35 - alloc loc3 = ar.pfs, 0, 4, 1, 0 - addl loc0 = @gprel(dtor_ptr), gp - .save rp, loc1 - mov loc1 = rp - .body - - mov loc2 = gp - nop 0 - br.sptk.many .entry -#else - /* - if (__cxa_finalize) - __cxa_finalize(__dso_handle) - */ - .save ar.pfs, r35 - alloc loc3 = ar.pfs, 0, 4, 1, 0 - addl loc0 = @gprel(dtor_ptr), gp - addl r16 = @ltoff(@fptr(__cxa_finalize)), gp - ;; - - ld8 r16 = [r16] - ;; - addl out0 = @ltoff(__dso_handle), gp - cmp.ne p7, p0 = r0, r16 - ;; - - ld8 out0 = [out0] -(p7) ld8 r18 = [r16], 8 - .save rp, loc1 - mov loc1 = rp - .body - ;; - - mov loc2 = gp -(p7) ld8 gp = [r16] -(p7) mov b6 = r18 - - nop 0 - nop 0 -(p7) br.call.sptk.many rp = b6 - ;; - - nop 0 - nop 0 - br.sptk.many .entry -#endif - /* - do { - dtor_ptr++; - (*(dtor_ptr-1)) (); - } while (dtor_ptr); - */ -.loop: - st8 [loc0] = r15 // update dtor_ptr (in memory) - ld8 r17 = [r16], 8 // r17 <- dtor's entry-point - nop 0 - ;; - - ld8 gp = [r16] // gp <- dtor's gp - mov b6 = r17 - br.call.sptk.many rp = b6 - -.entry: ld8 r15 = [loc0] // r15 <- dtor_ptr (gp-relative) - ;; - add r16 = r15, loc2 // r16 <- dtor_ptr (absolute) - adds r15 = 8, r15 - ;; - - ld8 r16 = [r16] // r16 <- pointer to dtor's fdesc - mov rp = loc1 - mov ar.pfs = loc3 - ;; - - cmp.ne p6, p0 = r0, r16 -(p6) br.cond.sptk.few .loop - br.ret.sptk.many rp - .endp __do_global_dtors_aux - - .align 32 - .proc __do_jv_register_classes -__do_jv_register_classes: - .prologue - .save ar.pfs, r33 - alloc loc1 = ar.pfs, 0, 3, 1, 0 - movl out0 = @gprel(__JCR_LIST__) - ;; - - addl r14 = @ltoff(@fptr(_Jv_RegisterClasses)), gp - add out0 = out0, gp - .save rp, loc0 - mov loc0 = rp - .body - ;; - - ld8 r14 = [r14] - ld8 r15 = [out0] - cmp.ne p6, p0 = r0, r0 - ;; - - cmp.eq.or p6, p0 = r0, r14 - cmp.eq.or p6, p0 = r0, r15 -(p6) br.ret.sptk.many rp - - ld8 r15 = [r14], 8 - ;; - nop 0 - mov b6 = r15 - - mov loc2 = gp - ld8 gp = [r14] - br.call.sptk.many rp = b6 - ;; - - mov gp = loc2 - mov rp = loc0 - mov ar.pfs = loc1 - - nop 0 - nop 0 - br.ret.sptk.many rp - .endp __do_jv_register_classes - -#ifdef SHARED -.weak __cxa_finalize -#endif -.weak _Jv_RegisterClasses diff --git a/gcc/config/ia64/crtend.asm b/gcc/config/ia64/crtend.asm deleted file mode 100644 index a904af9cfd9..00000000000 --- a/gcc/config/ia64/crtend.asm +++ /dev/null @@ -1,121 +0,0 @@ -/* Copyright (C) 2000, 2001, 2003, 2005, 2009 Free Software Foundation, Inc. - Contributed by Jes Sorensen, <Jes.Sorensen@cern.ch> - - This file is part of GCC. - - GCC 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. - - GCC 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. - - Under Section 7 of GPL version 3, you are granted additional - permissions described in the GCC Runtime Library Exception, version - 3.1, as published by the Free Software Foundation. - - You should have received a copy of the GNU General Public License and - a copy of the GCC Runtime Library Exception along with this program; - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - <http://www.gnu.org/licenses/>. */ - -#include "auto-host.h" - -.section .ctors,"aw","progbits" - .align 8 -__CTOR_END__: - data8 0 - -.section .dtors,"aw","progbits" - .align 8 -__DTOR_END__: - data8 0 - -.section .jcr,"aw","progbits" - .align 8 -__JCR_END__: - data8 0 - -#ifdef HAVE_INITFINI_ARRAY - .global __do_global_ctors_aux - .hidden __do_global_ctors_aux -#else /* !HAVE_INITFINI_ARRAY */ -/* - * Fragment of the ELF _init routine that invokes our dtor cleanup. - * - * We make the call by indirection, because in large programs the - * .fini and .init sections are not in range of the destination, and - * we cannot allow the linker to insert a stub at the end of this - * fragment of the _fini function. Further, Itanium does not implement - * the long branch instructions, and we do not wish every program to - * trap to the kernel for emulation. - * - * Note that we require __do_global_ctors_aux to preserve the GP, - * so that the next fragment in .fini gets the right value. - */ -.section .init,"ax","progbits" - { .mlx - movl r2 = @pcrel(__do_global_ctors_aux - 16) - } - { .mii - mov r3 = ip - ;; - add r2 = r2, r3 - ;; - } - { .mib - mov b6 = r2 - br.call.sptk.many b0 = b6 - ;; - } -#endif /* !HAVE_INITFINI_ARRAY */ - -.text - .align 32 - .proc __do_global_ctors_aux -__do_global_ctors_aux: - .prologue - /* - for (loc0 = __CTOR_END__-1; *p != -1; --p) - (*p) (); - */ - .save ar.pfs, r34 - alloc loc2 = ar.pfs, 0, 5, 0, 0 - movl loc0 = @gprel(__CTOR_END__ - 8) - ;; - - add loc0 = loc0, gp - ;; - ld8 loc3 = [loc0], -8 - .save rp, loc1 - mov loc1 = rp - .body - ;; - - cmp.eq p6, p0 = -1, loc3 - mov loc4 = gp -(p6) br.cond.spnt.few .exit - -.loop: ld8 r15 = [loc3], 8 - ;; - ld8 gp = [loc3] - mov b6 = r15 - - ld8 loc3 = [loc0], -8 - nop 0 - br.call.sptk.many rp = b6 - ;; - - cmp.ne p6, p0 = -1, loc3 - nop 0 -(p6) br.cond.sptk.few .loop - -.exit: mov gp = loc3 - mov rp = loc1 - mov ar.pfs = loc2 - - br.ret.sptk.many rp - .endp __do_global_ctors_aux diff --git a/gcc/config/ia64/crti.asm b/gcc/config/ia64/crti.asm deleted file mode 100644 index a9d51509782..00000000000 --- a/gcc/config/ia64/crti.asm +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright (C) 2000, 2001, 2008, 2009 Free Software Foundation, Inc. -# Written By Timothy Wall -# -# This file 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. -# -# This file 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. -# -# Under Section 7 of GPL version 3, you are granted additional -# permissions described in the GCC Runtime Library Exception, version -# 3.1, as published by the Free Software Foundation. -# -# You should have received a copy of the GNU General Public License and -# a copy of the GCC Runtime Library Exception along with this program; -# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -# <http://www.gnu.org/licenses/>. - -# This file just make a stack frame for the contents of the .fini and -# .init sections. Users may put any desired instructions in those -# sections. - - .section ".init" - .align 16 - .global _init -_init: - .prologue 14, 33 - .save ar.pfs, r34 - alloc r34 = ar.pfs, 0, 4, 0, 0 - .vframe r35 - mov r35 = r12 - .save rp, r33 - mov r33 = b0 - .body - - .section ".fini" - .align 16 - .global _fini -_fini: - .prologue 14, 33 - .save ar.pfs, r34 - alloc r34 = ar.pfs, 0, 4, 0, 0 - .vframe r35 - mov r35 = r12 - .save rp, r33 - mov r33 = b0 - .body - -# end of crti.asm diff --git a/gcc/config/ia64/crtn.asm b/gcc/config/ia64/crtn.asm deleted file mode 100644 index e1a18795f79..00000000000 --- a/gcc/config/ia64/crtn.asm +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (C) 2000, 2001, 2008, 2009 Free Software Foundation, Inc. -# Written By Timothy Wall -# -# This file 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. -# -# This file 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. -# -# Under Section 7 of GPL version 3, you are granted additional -# permissions described in the GCC Runtime Library Exception, version -# 3.1, as published by the Free Software Foundation. -# -# You should have received a copy of the GNU General Public License and -# a copy of the GCC Runtime Library Exception along with this program; -# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -# <http://www.gnu.org/licenses/>. - -# This file just makes sure that the .fini and .init sections do in -# fact return. Users may put any desired instructions in those sections. -# This file is the last thing linked into any executable. - - .section ".init" - ;; - mov ar.pfs = r34 - mov b0 = r33 - .restore sp - mov r12 = r35 - br.ret.sptk.many b0 - - .section ".fini" - ;; - mov ar.pfs = r34 - mov b0 = r33 - .restore sp - mov r12 = r35 - br.ret.sptk.many b0 - -# end of crtn.asm diff --git a/gcc/config/ia64/t-ia64 b/gcc/config/ia64/t-ia64 index 874e9ecf107..a143d43d56c 100644 --- a/gcc/config/ia64/t-ia64 +++ b/gcc/config/ia64/t-ia64 @@ -38,9 +38,6 @@ LIB1ASMFUNCS = __divxf3 __divdf3 __divsf3 \ # to support the Intel assembler. #LIBGCC2_DEBUG_CFLAGS = -g1 -P -# Effectively disable the crtbegin/end rules using crtstuff.c -T = disable - ia64-c.o: $(srcdir)/config/ia64/ia64-c.c $(CONFIG_H) $(SYSTEM_H) \ coretypes.h $(TM_H) $(TREE_H) $(CPPLIB_H) $(C_COMMON_H) $(C_PRAGMA_H) $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ diff --git a/gcc/config/ia64/t-vms b/gcc/config/ia64/t-vms deleted file mode 100644 index e834aea1ab0..00000000000 --- a/gcc/config/ia64/t-vms +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2009, 2011 -# Free Software Foundation, Inc. -# -# This file is part of GCC. -# -# GCC 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. -# -# GCC 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 GCC; see the file COPYING3. If not see -# <http://www.gnu.org/licenses/>. - -# Enable the crtbegin/end rules disabled in t-ia64 -T = - -# VMS_EXTRA_PARTS is defined in x-vms and represent object files that -# are only needed for VMS targets, but can only be compiled on a VMS host -# (because they need DEC C). -EXTRA_PARTS = $(VMS_EXTRA_PARTS) crtbegin.o crtbeginS.o crtend.o crtendS.o crtinitS.o - -CRTSTUFF_T_CFLAGS = -O0 -CRTSTUFF_T_CFLAGS_S = -O0 - -$(T)crtinitS.o: $(srcdir)/config/ia64/vms-crtinit.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) -I. -c -o $(T)crtinitS.o -x assembler-with-cpp \ - $(srcdir)/config/ia64/vms-crtinit.asm diff --git a/gcc/config/ia64/vms-crtinit.asm b/gcc/config/ia64/vms-crtinit.asm deleted file mode 100644 index 322b2927347..00000000000 --- a/gcc/config/ia64/vms-crtinit.asm +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 2009 Free Software Foundation, Inc. - - This file is part of GCC. - - GCC 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. - - GCC 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. - - Under Section 7 of GPL version 3, you are granted additional - permissions described in the GCC Runtime Library Exception, version - 3.1, as published by the Free Software Foundation. - - You should have received a copy of the GNU General Public License and - a copy of the GCC Runtime Library Exception along with this program; - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - <http://www.gnu.org/licenses/>. */ - - .global LIB$INITIALIZE# diff --git a/gcc/config/m32c/t-m32c b/gcc/config/m32c/t-m32c index e39fdf3a0aa..b11f34d674f 100644 --- a/gcc/config/m32c/t-m32c +++ b/gcc/config/m32c/t-m32c @@ -53,5 +53,3 @@ m32c-pragma.o: $(srcdir)/config/m32c/m32c-pragma.c $(RTL_H) $(TREE_H) $(CONFIG_H MULTILIB_OPTIONS = mcpu=m32cm MULTILIB_DIRNAMES = m32cm MULTILIB_MATCHES = mcpu?m32cm=mcpu?m32c mcpu?r8c=mcpu?m16c - -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o diff --git a/gcc/config/m32r/initfini.c b/gcc/config/m32r/initfini.c deleted file mode 100644 index 6e7d58614c7..00000000000 --- a/gcc/config/m32r/initfini.c +++ /dev/null @@ -1,168 +0,0 @@ -/* .init/.fini section handling + C++ global constructor/destructor handling. - This file is based on crtstuff.c, sol2-crti.asm, sol2-crtn.asm. - - Copyright (C) 1996, 1997, 1998, 2006, 2009 Free Software Foundation, Inc. - - This file is part of GCC. - - GCC 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. - - GCC 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. - - Under Section 7 of GPL version 3, you are granted additional - permissions described in the GCC Runtime Library Exception, version - 3.1, as published by the Free Software Foundation. - - You should have received a copy of the GNU General Public License and - a copy of the GCC Runtime Library Exception along with this program; - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - <http://www.gnu.org/licenses/>. */ - -/* Declare a pointer to void function type. */ -typedef void (*func_ptr) (void); - -#ifdef CRT_INIT - -/* NOTE: In order to be able to support SVR4 shared libraries, we arrange - to have one set of symbols { __CTOR_LIST__, __DTOR_LIST__, __CTOR_END__, - __DTOR_END__ } per root executable and also one set of these symbols - per shared library. So in any given whole process image, we may have - multiple definitions of each of these symbols. In order to prevent - these definitions from conflicting with one another, and in order to - ensure that the proper lists are used for the initialization/finalization - of each individual shared library (respectively), we give these symbols - only internal (i.e. `static') linkage, and we also make it a point to - refer to only the __CTOR_END__ symbol in crtfini.o and the __DTOR_LIST__ - symbol in crtinit.o, where they are defined. */ - -static func_ptr __CTOR_LIST__[1] - __attribute__ ((used, section (".ctors"))) - = { (func_ptr) (-1) }; - -static func_ptr __DTOR_LIST__[1] - __attribute__ ((used, section (".dtors"))) - = { (func_ptr) (-1) }; - -/* Run all the global destructors on exit from the program. */ - -/* Some systems place the number of pointers in the first word of the - table. On SVR4 however, that word is -1. In all cases, the table is - null-terminated. On SVR4, we start from the beginning of the list and - invoke each per-compilation-unit destructor routine in order - until we find that null. - - Note that this function MUST be static. There will be one of these - functions in each root executable and one in each shared library, but - although they all have the same code, each one is unique in that it - refers to one particular associated `__DTOR_LIST__' which belongs to the - same particular root executable or shared library file. */ - -static void __do_global_dtors (void) -asm ("__do_global_dtors") __attribute__ ((used, section (".text"))); - -static void -__do_global_dtors (void) -{ - func_ptr *p; - - for (p = __DTOR_LIST__ + 1; *p; p++) - (*p) (); -} - -/* .init section start. - This must appear at the start of the .init section. */ - -asm ("\n\ - .section .init,\"ax\",@progbits\n\ - .balign 4\n\ - .global __init\n\ -__init:\n\ - push fp\n\ - push lr\n\ - mv fp,sp\n\ - seth r0, #shigh(__fini)\n\ - add3 r0, r0, #low(__fini)\n\ - bl atexit\n\ - .fillinsn\n\ -"); - -/* .fini section start. - This must appear at the start of the .init section. */ - -asm ("\n\ - .section .fini,\"ax\",@progbits\n\ - .balign 4\n\ - .global __fini\n\ -__fini:\n\ - push fp\n\ - push lr\n\ - mv fp,sp\n\ - bl __do_global_dtors\n\ - .fillinsn\n\ -"); - -#endif /* CRT_INIT */ - -#ifdef CRT_FINI - -/* Put a word containing zero at the end of each of our two lists of function - addresses. Note that the words defined here go into the .ctors and .dtors - sections of the crtend.o file, and since that file is always linked in - last, these words naturally end up at the very ends of the two lists - contained in these two sections. */ - -static func_ptr __CTOR_END__[1] - __attribute__ ((used, section (".ctors"))) - = { (func_ptr) 0 }; - -static func_ptr __DTOR_END__[1] - __attribute__ ((used, section (".dtors"))) - = { (func_ptr) 0 }; - -/* Run all global constructors for the program. - Note that they are run in reverse order. */ - -static void __do_global_ctors (void) -asm ("__do_global_ctors") __attribute__ ((used, section (".text"))); - -static void -__do_global_ctors (void) -{ - func_ptr *p; - - for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--) - (*p) (); -} - -/* .init section end. - This must live at the end of the .init section. */ - -asm ("\n\ - .section .init,\"ax\",@progbits\n\ - bl __do_global_ctors\n\ - mv sp,fp\n\ - pop lr\n\ - pop fp\n\ - jmp lr\n\ - .fillinsn\n\ -"); - -/* .fini section end. - This must live at the end of the .fini section. */ - -asm ("\n\ - .section .fini,\"ax\",@progbits\n\ - mv sp,fp\n\ - pop lr\n\ - pop fp\n\ - jmp lr\n\ - .fillinsn\n\ -"); - -#endif /* CRT_FINI */ diff --git a/gcc/config/m32r/t-linux b/gcc/config/m32r/t-linux index 6697e7bd10a..487c0198786 100644 --- a/gcc/config/m32r/t-linux +++ b/gcc/config/m32r/t-linux @@ -24,15 +24,6 @@ CROSS_LIBGCC1 = TARGET_LIBGCC2_CFLAGS = -G 0 -fPIC -# We need to use -fpic when we are using gcc to compile the routines in -# initfini.c. This is only really needed when we are going to use gcc/g++ -# to produce a shared library, but since we don't know ahead of time when -# we will be doing that, we just always use -fpic when compiling the -# routines in initfini.c. -# -fpic currently isn't supported for the m32r. - -CRTSTUFF_T_CFLAGS_S = -fPIC - # Don't install "assert.h" in gcc. We use the one in glibc. INSTALL_ASSERT_H = diff --git a/gcc/config/m32r/t-m32r b/gcc/config/m32r/t-m32r index 44090658838..81f0247694e 100644 --- a/gcc/config/m32r/t-m32r +++ b/gcc/config/m32r/t-m32r @@ -22,35 +22,6 @@ TARGET_LIBGCC2_CFLAGS = -G 0 -# We need to use -fpic when we are using gcc to compile the routines in -# initfini.c. This is only really needed when we are going to use gcc/g++ -# to produce a shared library, but since we don't know ahead of time when -# we will be doing that, we just always use -fpic when compiling the -# routines in initfini.c. -# -fpic currently isn't supported for the m32r. - -CRTSTUFF_T_CFLAGS = - -# .init/.fini section routines - -$(T)crtinit.o: $(srcdir)/config/m32r/initfini.c $(GCC_PASSES) $(CONFIG_H) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) \ - $(CRTSTUFF_T_CFLAGS) $(INCLUDES) -DCRT_INIT \ - -finhibit-size-directive -fno-inline-functions -g0 \ - -mmodel=medium -c $(srcdir)/config/m32r/initfini.c \ - -o $(T)crtinit.o - -$(T)crtfini.o: $(srcdir)/config/m32r/initfini.c $(GCC_PASSES) $(CONFIG_H) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) \ - $(CRTSTUFF_T_CFLAGS) $(INCLUDES) -DCRT_FINI \ - -finhibit-size-directive -fno-inline-functions -g0 \ - -mmodel=medium -c $(srcdir)/config/m32r/initfini.c \ - -o $(T)crtfini.o -m32rx: - mkdir $@ -m32r2: - mkdir $@ - # -mmodel={small,medium} requires separate libraries. # We don't build libraries for the large model, instead we use the medium # libraries. The only difference is that the large model can handle jumps @@ -65,7 +36,5 @@ MULTILIB_MATCHES = mmodel?medium=mmodel?large # This is important for objects referenced in system header files. MULTILIB_EXTRA_OPTS = msdata=sdata -EXTRA_MULTILIB_PARTS = crtinit.o crtfini.o - LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib diff --git a/gcc/config/m68k/crti.s b/gcc/config/m68k/crti.s deleted file mode 100644 index 12fb59f4130..00000000000 --- a/gcc/config/m68k/crti.s +++ /dev/null @@ -1,44 +0,0 @@ -/* Specialized code needed to support construction and destruction of - file-scope objects in C++ and Java code, and to support exception handling. - Copyright (C) 1999, 2008, 2009 Free Software Foundation, Inc. - Contributed by Charles-Antoine Gauthier (charles.gauthier@iit.nrc.ca). - -This file is part of GCC. - -GCC 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. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* - * This file just supplies function prologues for the .init and .fini - * sections. It is linked in before crtbegin.o. - */ - - .ident "GNU C crti.o" - - .section .init - .globl _init - .type _init,@function -_init: - linkw %fp,#0 - - .section .fini - .globl _fini - .type _fini,@function -_fini: - linkw %fp,#0 diff --git a/gcc/config/m68k/crtn.s b/gcc/config/m68k/crtn.s deleted file mode 100644 index b7d70f02ed5..00000000000 --- a/gcc/config/m68k/crtn.s +++ /dev/null @@ -1,40 +0,0 @@ -/* Specialized code needed to support construction and destruction of - file-scope objects in C++ and Java code, and to support exception handling. - Copyright (C) 1999, 2008, 2009 Free Software Foundation, Inc. - Contributed by Charles-Antoine Gauthier (charles.gauthier@iit.nrc.ca). - -This file is part of GCC. - -GCC 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. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* - * This file supplies function epilogues for the .init and .fini sections. - * It is linked in after all other files. - */ - - .ident "GNU C crtn.o" - - .section .init - unlk %fp - rts - - .section .fini - unlk %fp - rts diff --git a/gcc/config/m68k/t-crtstuff b/gcc/config/m68k/t-crtstuff deleted file mode 100644 index a8bdb502d66..00000000000 --- a/gcc/config/m68k/t-crtstuff +++ /dev/null @@ -1,10 +0,0 @@ -EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crti.o crtn.o - -# Add flags here as required. -CRTSTUFF_T_CFLAGS = - -# Assemble startup files. -$(T)crti.o: $(srcdir)/config/m68k/crti.s $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crti.o $(srcdir)/config/m68k/crti.s -$(T)crtn.o: $(srcdir)/config/m68k/crtn.s $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crtn.o $(srcdir)/config/m68k/crtn.s diff --git a/gcc/config/m68k/t-linux b/gcc/config/m68k/t-linux index a8cb563a2e2..3fa29474693 100644 --- a/gcc/config/m68k/t-linux +++ b/gcc/config/m68k/t-linux @@ -1,4 +1,4 @@ -# Copyright (C) 2008, 2010 Free Software Foundation, Inc. +# Copyright (C) 2008, 2010, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -16,8 +16,6 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o - # Only include multilibs for 680x0 and ColdFire CPUs with an MMU. M68K_MLIB_CPU += && ((CPU ~ "^m680") || (CPU ~ "^mcf")) && (FLAGS ~ "FL_MMU") diff --git a/gcc/config/m68k/t-m68kelf b/gcc/config/m68k/t-m68kelf deleted file mode 100644 index bea01dc4f49..00000000000 --- a/gcc/config/m68k/t-m68kelf +++ /dev/null @@ -1,4 +0,0 @@ -# from ../t-svr4 -EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o -# no pic for now -#CRTSTUFF_T_CFLAGS=-fpic diff --git a/gcc/config/m68k/t-uclinux b/gcc/config/m68k/t-uclinux index e1711a3443e..6994359dcce 100644 --- a/gcc/config/m68k/t-uclinux +++ b/gcc/config/m68k/t-uclinux @@ -1,4 +1,4 @@ -# Copyright (C) 2003, 2005, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2003, 2005, 2007, 2008, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -16,9 +16,6 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -# crti and crtn are provided by uClibc. -EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o - # Include multilibs for CPUs without an MMU or with FL_UCLINUX M68K_MLIB_CPU += && (!match(FLAGS, "FL_MMU") || match(FLAGS, "FL_UCLINUX")) diff --git a/gcc/config/mcore/crti.asm b/gcc/config/mcore/crti.asm deleted file mode 100644 index 03f59292896..00000000000 --- a/gcc/config/mcore/crti.asm +++ /dev/null @@ -1,62 +0,0 @@ -# crti.asm for ELF based systems - -# Copyright (C) 1992, 1998, 1999, 2008, 2009 Free Software Foundation, Inc. -# Written By David Vinayak Henkel-Wallace, June 1992 -# -# This file 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. -# -# This file 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. -# -# Under Section 7 of GPL version 3, you are granted additional -# permissions described in the GCC Runtime Library Exception, version -# 3.1, as published by the Free Software Foundation. -# -# You should have received a copy of the GNU General Public License and -# a copy of the GCC Runtime Library Exception along with this program; -# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -# <http://www.gnu.org/licenses/>. - - -# This file just makes a stack frame for the contents of the .fini and -# .init sections. Users may put any desired instructions in those -# sections. - - .section ".init" - .global _init - .type _init,@function - .align 4 -_init: - subi r0, 16 - st.w r15, (r0, 12) - - # These nops are here to align the end of this code with a 16 byte - # boundary. The linker will start inserting code into the .init - # section at such a boundary. - - nop - nop - nop - nop - nop - nop - - - .section ".fini" - .global _fini - .type _fini,@function - .align 4 -_fini: - subi r0, 16 - st.w r15, (r0, 12) - nop - nop - nop - nop - nop - nop diff --git a/gcc/config/mcore/crtn.asm b/gcc/config/mcore/crtn.asm deleted file mode 100644 index b764441e721..00000000000 --- a/gcc/config/mcore/crtn.asm +++ /dev/null @@ -1,44 +0,0 @@ -# crtn.asm for ELF based systems - -# Copyright (C) 1992, 1999, 2000, 2008, 2009 Free Software Foundation, Inc. -# Written By David Vinayak Henkel-Wallace, June 1992 -# -# This file 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. -# -# This file 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. -# -# Under Section 7 of GPL version 3, you are granted additional -# permissions described in the GCC Runtime Library Exception, version -# 3.1, as published by the Free Software Foundation. -# -# You should have received a copy of the GNU General Public License and -# a copy of the GCC Runtime Library Exception along with this program; -# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -# <http://www.gnu.org/licenses/>. - -# This file just makes sure that the .fini and .init sections do in -# fact return. Users may put any desired instructions in those sections. -# This file is the last thing linked into any executable. - - .section ".init" - .align 4 - - ldw r15,(r0, 12) - addi r0,16 - jmp r15 - - .section ".fini" - .align 4 - - ldw r15, (r0, 12) - addi r0,16 - jmp r15 - -# Th-th-th-that is all folks! - diff --git a/gcc/config/mcore/t-mcore b/gcc/config/mcore/t-mcore index 5533211a5d2..9c84d850f20 100644 --- a/gcc/config/mcore/t-mcore +++ b/gcc/config/mcore/t-mcore @@ -19,15 +19,6 @@ LIB1ASMSRC = mcore/lib1.asm LIB1ASMFUNCS = _divsi3 _udivsi3 _modsi3 _umodsi3 -# Assemble startup files. -$(T)crti.o: $(srcdir)/config/mcore/crti.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/mcore/crti.asm - -$(T)crtn.o: $(srcdir)/config/mcore/crtn.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/mcore/crtn.asm - # could use -msifilter to be safe from interrupt/jmp interactions and others. TARGET_LIBGCC2_CFLAGS=-O3 -DNO_FLOATLIB_FIXUNSDFSI #-msifilter @@ -37,21 +28,16 @@ CROSS_FLOAT_H = $(srcdir)/config/mcore/gfloat.h # If support for -m4align is ever re-enabled then comment out the # following line and uncomment the mutlilib lines below. -EXTRA_PARTS = crtbegin.o crtend.o crti.o crtn.o - # MULTILIB_OPTIONS = m8align/m4align # MULTILIB_DIRNAMES = align8 align4 # MULTILIB_MATCHES = # MULTILIB_EXTRA_OPTS = # MULTILIB_EXCEPTIONS = -# EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o # LIBGCC = stmp-multilib # INSTALL_LIBGCC = install-multilib MULTILIB_OPTIONS = mbig-endian/mlittle-endian m210/m340 MULTILIB_DIRNAMES = big little m210 m340 -EXTRA_PARTS = -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib diff --git a/gcc/config/mep/t-mep b/gcc/config/mep/t-mep index 29c75457241..d560db0aa4b 100644 --- a/gcc/config/mep/t-mep +++ b/gcc/config/mep/t-mep @@ -24,12 +24,6 @@ GTM_H = tm.h $(tm_file_list) $(srcdir)/config/mep/mep-intrin.h insn-constants.h -# Use -O0 instead of -O2 so we don't get complex relocations - -CRTSTUFF_CFLAGS = -O0 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ - -finhibit-size-directive -fno-inline-functions -fno-exceptions \ - -fno-zero-initialized-in-bss -fno-unit-at-a-time - TCFLAGS = -mlibrary mep-pragma.o: $(srcdir)/config/mep/mep-pragma.c $(CONFIG_H) $(SYSTEM_H) \ @@ -57,8 +51,6 @@ LIB2FUNCS_EXTRA = \ MULTILIB_OPTIONS = mel mall-opts mfar MULTILIB_DIRNAMES = el allopt far -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o - MD_INCLUDES = \ $(srcdir)/config/mep/intrinsics.md \ $(srcdir)/config/mep/predicates.md \ diff --git a/gcc/config/microblaze/crti.s b/gcc/config/microblaze/crti.s deleted file mode 100644 index 3944443b437..00000000000 --- a/gcc/config/microblaze/crti.s +++ /dev/null @@ -1,39 +0,0 @@ -/* crti.s for __init, __fini - This file supplies the prologue for __init and __fini routines - - Copyright 2009, 2010 Free Software Foundation, Inc. - - Contributed by Michael Eager <eager@eagercon.com>. - - This file 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. - - GCC 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. - - Under Section 7 of GPL version 3, you are granted additional - permissions described in the GCC Runtime Library Exception, version - 3.1, as published by the Free Software Foundation. - - You should have received a copy of the GNU General Public License and - a copy of the GCC Runtime Library Exception along with this program; - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - <http://www.gnu.org/licenses/>. */ - - .section .init, "ax" - .global __init - .align 2 -__init: - addik r1, r1, -8 - sw r15, r0, r1 - - .section .fini, "ax" - .global __fini - .align 2 -__fini: - addik r1, r1, -8 - sw r15, r0, r1 diff --git a/gcc/config/microblaze/crtn.s b/gcc/config/microblaze/crtn.s deleted file mode 100644 index 7970dee1c93..00000000000 --- a/gcc/config/microblaze/crtn.s +++ /dev/null @@ -1,35 +0,0 @@ -/* crtn.s for __init, __fini - This file supplies the epilogue for __init and __fini routines - - Copyright 2009, 2010 Free Software Foundation, Inc. - - Contributed by Michael Eager <eager@eagercon.com>. - - This file 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. - - GCC 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. - - Under Section 7 of GPL version 3, you are granted additional - permissions described in the GCC Runtime Library Exception, version - 3.1, as published by the Free Software Foundation. - - You should have received a copy of the GNU General Public License and - a copy of the GCC Runtime Library Exception along with this program; - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - <http://www.gnu.org/licenses/>. */ - - .section .init, "ax" - lw r15, r0, r1 - rtsd r15, 8 - addik r1, r1, 8 - - .section .fini, "ax" - lw r15, r0, r1 - rtsd r15, 8 - addik r1, r1, 8 diff --git a/gcc/config/microblaze/t-microblaze b/gcc/config/microblaze/t-microblaze index 8c8767f9baa..cb49636b9ac 100644 --- a/gcc/config/microblaze/t-microblaze +++ b/gcc/config/microblaze/t-microblaze @@ -1,8 +1,3 @@ -# For C++ crtstuff -EXTRA_MULTILIB_PARTS = crtbegin$(objext) crtend$(objext) - -EXTRA_PARTS += crti$(objext) crtn$(objext) - MULTILIB_OPTIONS = mxl-barrel-shift mno-xl-soft-mul mxl-multiply-high MULTILIB_DIRNAMES = bs m mh MULTILIB_EXCEPTIONS = *mxl-barrel-shift/mxl-multiply-high mxl-multiply-high @@ -13,10 +8,3 @@ microblaze-c.o: $(srcdir)/config/microblaze/microblaze-c.c \ $(CONFIG_H) $(SYSTEM_H) $(CPPLIB_H) $(TM_P_H) $(TREE_H) errors.h $(TM_H) $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $(srcdir)/config/microblaze/microblaze-c.c - -# Assemble startup files -$(T)crti$(objext): $(srcdir)/config/microblaze/crti.s - $(GCC_FOR_TARGET) -c $(srcdir)/config/microblaze/crti.s -o $(T)crti$(objext) - -$(T)crtn$(objext): $(srcdir)/config/microblaze/crtn.s - $(GCC_FOR_TARGET) -c $(srcdir)/config/microblaze/crtn.s -o $(T)crtn$(objext) diff --git a/gcc/config/mips/crti.asm b/gcc/config/mips/crti.asm deleted file mode 100644 index ac04271c598..00000000000 --- a/gcc/config/mips/crti.asm +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 2001, 2002 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC 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. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - - .section .init,"ax",@progbits - .globl _init - .type _init,@function -_init: -#ifdef __mips64 - daddu $sp,$sp,-48 - sd $31,40($sp) -#else - addu $sp,$sp,-32 - sw $31,20($sp) -#endif - - .section .fini,"ax",@progbits - .globl _fini - .type _fini,@function -_fini: -#ifdef __mips64 - daddu $sp,$sp,-48 - sd $31,40($sp) -#else - addu $sp,$sp,-32 - sw $31,20($sp) -#endif diff --git a/gcc/config/mips/crtn.asm b/gcc/config/mips/crtn.asm deleted file mode 100644 index 03a6b68c9cf..00000000000 --- a/gcc/config/mips/crtn.asm +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 2001, 2002 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC 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. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - -#ifdef __mips16 -#define RA $7 -#else -#define RA $31 -#endif - - .section .init,"ax",@progbits -#ifdef __mips64 - ld RA,40($sp) - daddu $sp,$sp,48 -#else - lw RA,20($sp) - addu $sp,$sp,32 -#endif - j RA - - .section .fini,"ax",@progbits -#ifdef __mips64 - ld RA,40($sp) - daddu $sp,$sp,48 -#else - lw RA,20($sp) - addu $sp,$sp,32 -#endif - j RA - diff --git a/gcc/config/mips/t-elf b/gcc/config/mips/t-elf index 4ed36da659b..d6c18e6b819 100644 --- a/gcc/config/mips/t-elf +++ b/gcc/config/mips/t-elf @@ -1,5 +1,5 @@ # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, -# 2007 Free Software Foundation, Inc. +# 2007, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -17,18 +17,6 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -# Don't let CTOR_LIST end up in sdata section. -CRTSTUFF_T_CFLAGS = -G 0 - -# Assemble startup files. -$(T)crti.o: $(srcdir)/config/mips/crti.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/mips/crti.asm - -$(T)crtn.o: $(srcdir)/config/mips/crtn.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/mips/crtn.asm - # We must build libgcc2.a with -G 0, in case the user wants to link # without the $gp register. TARGET_LIBGCC2_CFLAGS = -G 0 @@ -38,7 +26,6 @@ TARGET_LIBGCC2_CFLAGS = -G 0 MULTILIB_OPTIONS = msoft-float EL/EB MULTILIB_DIRNAMES = soft-float el eb MULTILIB_MATCHES = EL=mel EB=meb msingle-float=m4650 -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib diff --git a/gcc/config/mips/t-isa3264 b/gcc/config/mips/t-isa3264 index f6dce325562..3ac98389c8f 100644 --- a/gcc/config/mips/t-isa3264 +++ b/gcc/config/mips/t-isa3264 @@ -1,5 +1,5 @@ # Copyright (C) 2001, 2002, 2003, 2004, 2007, -# 2008 Free Software Foundation, Inc. +# 2008, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -17,18 +17,6 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -# Don't let CTOR_LIST end up in sdata section. -CRTSTUFF_T_CFLAGS = -G 0 - -# Assemble startup files. -$(T)crti.o: $(srcdir)/config/mips/crti.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/mips/crti.asm - -$(T)crtn.o: $(srcdir)/config/mips/crtn.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/mips/crtn.asm - # We must build libgcc2.a with -G 0, in case the user wants to link # without the $gp register. TARGET_LIBGCC2_CFLAGS = -G 0 @@ -48,7 +36,6 @@ MULTILIB_EXCLUSIONS = !mips32r2/mfp64 endif endif MULTILIB_MATCHES = EL=mel EB=meb -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64 index 0e695172f55..5197e5ee209 100644 --- a/gcc/config/mips/t-linux64 +++ b/gcc/config/mips/t-linux64 @@ -19,5 +19,3 @@ MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64 MULTILIB_DIRNAMES = n32 32 64 MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64 - -EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o diff --git a/gcc/config/mips/t-r3900 b/gcc/config/mips/t-r3900 index 2c4216399c5..d46c4d59433 100644 --- a/gcc/config/mips/t-r3900 +++ b/gcc/config/mips/t-r3900 @@ -1,5 +1,5 @@ # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2007 Free Software Foundation, Inc. +# 2007, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -21,10 +21,6 @@ # without the $gp register. TARGET_LIBGCC2_CFLAGS = -G 0 -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o -# Don't let CTOR_LIST end up in sdata section. -CRTSTUFF_T_CFLAGS = -G 0 - # Build the libraries for both hard and soft floating point MULTILIB_OPTIONS = msoft-float EL/EB diff --git a/gcc/config/mips/t-sde b/gcc/config/mips/t-sde index 0fa2277d573..3a6473441f2 100644 --- a/gcc/config/mips/t-sde +++ b/gcc/config/mips/t-sde @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2007, 2008, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -16,18 +16,6 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -# Don't let CTOR_LIST end up in sdata section. -CRTSTUFF_T_CFLAGS = -G 0 - -# Assemble startup files. -$(T)crti.o: $(srcdir)/config/mips/crti.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/mips/crti.asm - -$(T)crtn.o: $(srcdir)/config/mips/crtn.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/mips/crtn.asm - MULTILIB_OPTIONS = EL/EB mips32/mips32r2/mips64/mips64r2 mips16 msoft-float/mfp64 mcode-readable=no MULTILIB_DIRNAMES = el eb mips32 mips32r2 mips64 mips64r2 mips16 sof f64 spram MULTILIB_MATCHES = EL=mel EB=meb @@ -46,8 +34,6 @@ else MULTILIB_EXCLUSIONS += mips64/mips16 mips64r2/mips16 endif -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o - # Build the multilibs. LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib diff --git a/gcc/config/mips/t-sr71k b/gcc/config/mips/t-sr71k index 44b69402e62..7b8669fefd2 100644 --- a/gcc/config/mips/t-sr71k +++ b/gcc/config/mips/t-sr71k @@ -21,19 +21,6 @@ LIBGCC1 = CROSS_LIBGCC1 = -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o -# Don't let CTOR_LIST end up in sdata section. -CRTSTUFF_T_CFLAGS = -G 0 - -# Assemble startup files. -$(T)crti.o: $(srcdir)/config/mips/crti.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/mips/crti.asm - -$(T)crtn.o: $(srcdir)/config/mips/crtn.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/mips/crtn.asm - # We must build libgcc2.a with -G 0, in case the user wants to link # without the $gp register. TARGET_LIBGCC2_CFLAGS = -G 0 diff --git a/gcc/config/mips/t-st b/gcc/config/mips/t-st index 83115f6fdd5..b0a8933c32b 100644 --- a/gcc/config/mips/t-st +++ b/gcc/config/mips/t-st @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Free Software Foundation, Inc. +# Copyright (C) 2008, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -28,5 +28,3 @@ MULTILIB_OSDIRNAMES += march.loongson2f/mabi.64=../lib64/2f MULTILIB_OSDIRNAMES += mabi.n32=../lib32 MULTILIB_OSDIRNAMES += mabi.32=../lib MULTILIB_OSDIRNAMES += mabi.64=../lib64 - -EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o diff --git a/gcc/config/mips/t-vr b/gcc/config/mips/t-vr index 81efef9b865..16623ced564 100644 --- a/gcc/config/mips/t-vr +++ b/gcc/config/mips/t-vr @@ -1,4 +1,4 @@ -# Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2002, 2004, 2005, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -18,25 +18,12 @@ # BEGIN boiler-plate MIPS stuff -# Don't let CTOR_LIST end up in sdata section. -CRTSTUFF_T_CFLAGS = -G 0 - # We must build libgcc2.a with -G 0, in case the user wants to link # without the $gp register. TARGET_LIBGCC2_CFLAGS = -G 0 LIB2FUNCS_STATIC_EXTRA = $(srcdir)/config/mips/mips16.S \ $(srcdir)/config/mips/vr4120-div.S -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o - -# Assemble startup files. -$(T)crti.o: $(srcdir)/config/mips/crti.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/mips/crti.asm - -$(T)crtn.o: $(srcdir)/config/mips/crtn.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/mips/crtn.asm # END boiler-plate diff --git a/gcc/config/mmix/crti.asm b/gcc/config/mmix/crti.asm deleted file mode 100644 index f5f4c5d68c4..00000000000 --- a/gcc/config/mmix/crti.asm +++ /dev/null @@ -1,116 +0,0 @@ -/* Copyright (C) 2001, 2002 Free Software Foundation, Inc. - Contributed by Hans-Peter Nilsson <hp@bitrange.com> - -This file 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. - -This file 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -% This is the crt0 equivalent for mmix-knuth-mmixware, for setting up -% things for compiler-generated assembly-code and for setting up things -% between where the simulator calls and main, and shutting things down on -% the way back. There's an actual crt0.o elsewhere, but that's a dummy. - -% This file and the GCC output are supposed to be *reasonably* -% mmixal-compatible to enable people to re-use output with Knuth's mmixal. -% However, forward references are used more freely: we are using the -% binutils tools. Users of mmixal beware; you will sometimes have to -% re-order things or use temporary variables. - -% Users of mmixal will want to set up 8H and 9H to be .text and .data -% respectively, so the compiler can switch between them pretending they're -% segments. - -% This little treasure is here so the 32 lowest address bits of user data -% will not be zero. Because of truncation, that would cause testcase -% gcc.c-torture/execute/980701-1.c to incorrectly fail. - - .data ! mmixal:= 8H LOC Data_Segment - .p2align 3 - LOC @+(8-@)@7 - OCTA 2009 - - .text ! mmixal:= 9H LOC 8B; LOC #100 - .global Main - -% The __Stack_start symbol is provided by the link script. -stackpp OCTA __Stack_start - -% "Main" is the magic symbol the simulator jumps to. We want to go -% on to "main". -% We need to set rG explicitly to avoid hard-to-debug situations. -Main SETL $255,32 - PUT rG,$255 - -% Initialize the stack pointer. It is supposedly made a global -% zero-initialized (allowed to change) register in crtn.asm; we use the -% explicit number. - GETA $255,stackpp - LDOU $254,$255,0 - -% Make sure we get more than one mem, to simplify counting cycles. - LDBU $255,$1,0 - LDBU $255,$1,1 - - PUSHJ $2,_init - -#ifdef __MMIX_ABI_GNU__ -% Copy argc and argv from their initial position to argument registers -% where necessary. - SET $231,$0 - SET $232,$1 -#else -% For the mmixware ABI, we need to move arguments. The return value will -% appear in $0. - SET $2,$1 - SET $1,$0 -#endif - - PUSHJ $0,main - JMP exit - -% Provide the first part of _init and _fini. Save the return address on the -% register stack. We eventually ignore the return address of these -% PUSHJ:s, so it doesn't matter that whether .init and .fini code calls -% functions or where they store rJ. We shouldn't get there, so die -% (TRAP Halt) if that happens. - - .section .init,"ax",@progbits - .global _init -_init: - GET $0,:rJ - PUSHJ $1,0F - SETL $255,255 - TRAP 0,0,0 -0H IS @ - -% Register _fini to be executed as the last atexit function. -#ifdef __MMIX_ABI_GNU__ - GETA $231,_fini -#else - GETA $1,_fini -#endif - PUSHJ $0,atexit - - .section .fini,"ax",@progbits - .global _fini -_fini: - GET $0,:rJ - PUSHJ $1,0F - SETL $255,255 - TRAP 0,0,0 -0H IS @ diff --git a/gcc/config/mmix/crtn.asm b/gcc/config/mmix/crtn.asm deleted file mode 100644 index c109e54db01..00000000000 --- a/gcc/config/mmix/crtn.asm +++ /dev/null @@ -1,87 +0,0 @@ -/* Copyright (C) 2001, 2002, 2009 Free Software Foundation, Inc. - Contributed by Hans-Peter Nilsson <hp@bitrange.com> - -This file 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. - -This file 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -% This must be the last file on the link-line, allocating global registers -% from the top. - -% Register $254 is the stack-pointer. -sp GREG - -% Register $253 is frame-pointer. It's not supposed to be used in most -% functions. -fp GREG - -% $252 is the static chain register; nested functions receive the -% context of the surrounding function through a pointer passed in this -% register. -static_chain GREG -struct_value_reg GREG - -% These registers are used to pass state at an exceptional return (C++). -eh_state_3 GREG -eh_state_2 GREG -eh_state_1 GREG -eh_state_0 GREG - -#ifdef __MMIX_ABI_GNU__ - -% Allocate global registers used by the GNU ABI. -gnu_parm_reg_16 GREG -gnu_parm_reg_15 GREG -gnu_parm_reg_14 GREG -gnu_parm_reg_13 GREG -gnu_parm_reg_12 GREG -gnu_parm_reg_11 GREG -gnu_parm_reg_10 GREG -gnu_parm_reg_9 GREG -gnu_parm_reg_8 GREG -gnu_parm_reg_7 GREG -gnu_parm_reg_6 GREG -gnu_parm_reg_5 GREG -gnu_parm_reg_4 GREG -gnu_parm_reg_3 GREG -gnu_parm_reg_2 GREG -gnu_parm_reg_1 GREG - -#endif /* __MMIX_ABI_GNU__ */ - -% Provide last part of _init and _fini. - -% The return address is stored in the topmost stored register in the -% register-stack. We ignore the current value in rJ. It is probably -% garbage because each fragment of _init and _fini may have their own idea -% of the current stack frame, if they're cut out from a "real" function -% like in gcc/crtstuff.c. - - .section .init,"ax",@progbits - GETA $255,0F - PUT rJ,$255 - POP 0,0 -0H PUT rJ,$0 - POP 0,0 - - .section .fini,"ax",@progbits - GETA $255,0F - PUT rJ,$255 - POP 0,0 -0H PUT rJ,$0 - POP 0,0 diff --git a/gcc/config/mmix/t-mmix b/gcc/config/mmix/t-mmix index dc05c8e82f5..bb2aabf83d2 100644 --- a/gcc/config/mmix/t-mmix +++ b/gcc/config/mmix/t-mmix @@ -1,4 +1,4 @@ -# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2010, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -20,12 +20,5 @@ TARGET_LIBGCC2_CFLAGS = -mlibfuncs -O2 -# We need to turn off some assumptions on normality for code in crtstuff.c -# and crt{i,n}.asm, specifically about execution not continuing past the -# end of the section in the file being compiled. Thus we must stop the -# assembler from generating stubbable PUSHJ relocs, because that will add -# stubs at the end of the current section when necessary. -CRTSTUFF_T_CFLAGS = -Wa,--no-stubs - MULTILIB_OPTIONS = mabi=gnu MULTILIB_DIRNAMES = gnuabi diff --git a/gcc/config/moxie/crti.asm b/gcc/config/moxie/crti.asm deleted file mode 100644 index f44582799a3..00000000000 --- a/gcc/config/moxie/crti.asm +++ /dev/null @@ -1,40 +0,0 @@ -# crti.asm for moxie -# -# Copyright (C) 2009 Free Software Foundation -# -# This file 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. -# -# This file 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. -# -# Under Section 7 of GPL version 3, you are granted additional -# permissions described in the GCC Runtime Library Exception, version -# 3.1, as published by the Free Software Foundation. -# -# You should have received a copy of the GNU General Public License and -# a copy of the GCC Runtime Library Exception along with this program; -# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -# <http://www.gnu.org/licenses/>. - -# This file just make a stack frame for the contents of the .fini and -# .init sections. Users may put any desired instructions in those -# sections. - - .file "crti.asm" - - .section ".init" - .global _init - .type _init, @function - .p2align 1 -_init: - - .section ".fini" - .global _fini - .type _fini,@function - .p2align 1 -_fini: diff --git a/gcc/config/moxie/crtn.asm b/gcc/config/moxie/crtn.asm deleted file mode 100644 index 3ac9d31eed8..00000000000 --- a/gcc/config/moxie/crtn.asm +++ /dev/null @@ -1,34 +0,0 @@ -# crtn.asm for moxie -# -# Copyright (C) 2009 Free Software Foundation -# -# This file 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. -# -# This file 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. -# -# Under Section 7 of GPL version 3, you are granted additional -# permissions described in the GCC Runtime Library Exception, version -# 3.1, as published by the Free Software Foundation. -# -# You should have received a copy of the GNU General Public License and -# a copy of the GCC Runtime Library Exception along with this program; -# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -# <http://www.gnu.org/licenses/>. - -# This file just makes sure that the .fini and .init sections do in -# fact return. Users may put any desired instructions in those sections. -# This file is the last thing linked into any executable. - - .file "crtn.asm" - - .section ".init" - ret - - .section ".fini" - ret diff --git a/gcc/config/pa/stublib.c b/gcc/config/pa/stublib.c deleted file mode 100644 index d3cf559c8ab..00000000000 --- a/gcc/config/pa/stublib.c +++ /dev/null @@ -1,97 +0,0 @@ -/* Stub functions. - Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC 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. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -#ifdef L_register_frame_info -struct object; -void __register_frame_info (const void * __attribute__((unused)), - struct object * __attribute__((unused))); -void -__register_frame_info (const void *p, struct object *ob) -{ -} -#endif - -#ifdef L_deregister_frame_info -void *__deregister_frame_info (const void * __attribute__((unused))); -void * -__deregister_frame_info (const void *p) -{ - return (void *)0; -} -#endif - -#ifdef L_cxa_finalize -void __cxa_finalize (void * __attribute__((unused))); -void -__cxa_finalize (void *p) -{ -} -#endif - -#ifdef L_Jv_RegisterClasses -void _Jv_RegisterClasses (void * __attribute__((unused))); -void -_Jv_RegisterClasses (void *p) -{ -} -#endif - -#ifdef L_pthread_default_stacksize_np -int pthread_default_stacksize_np (unsigned long __attribute__((unused)), - unsigned long *); -int -pthread_default_stacksize_np (unsigned long new, unsigned long *old) -{ - if (old) - *old = 0; - return 0; -} -#endif - -#ifdef L_pthread_mutex_lock -int pthread_mutex_lock (void); -int -pthread_mutex_lock (void) -{ - return 0; -} -#endif - -#ifdef L_pthread_mutex_unlock -int pthread_mutex_unlock (void); -int -pthread_mutex_unlock (void) -{ - return 0; -} -#endif - -#ifdef L_pthread_once -int pthread_once (void); -int -pthread_once (void) -{ - return 0; -} -#endif diff --git a/gcc/config/pa/t-linux b/gcc/config/pa/t-linux index fbbcfe29fd7..df351e11458 100644 --- a/gcc/config/pa/t-linux +++ b/gcc/config/pa/t-linux @@ -1,4 +1,4 @@ -# Copyright (C) 1999, 2001, 2002, 2008 Free Software Foundation, Inc. +# Copyright (C) 1999, 2001, 2002, 2008, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -32,6 +32,3 @@ LIB2FUNCS_STATIC_EXTRA = $(srcdir)/config/pa/linux-atomic.c fptr.c: $(srcdir)/config/pa/fptr.c rm -f fptr.c cp $(srcdir)/config/pa/fptr.c . - -# Compile crtbeginS.o and crtendS.o as PIC. -CRTSTUFF_T_CFLAGS_S = -fPIC diff --git a/gcc/config/pa/t-linux64 b/gcc/config/pa/t-linux64 index 1658f6d8aae..d40546cabcc 100644 --- a/gcc/config/pa/t-linux64 +++ b/gcc/config/pa/t-linux64 @@ -1,4 +1,4 @@ -# Copyright (C) 2001, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2008, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -22,10 +22,6 @@ LIB1ASMFUNCS = _divI _divU _remI _remU _div_const _mulI LIB1ASMSRC = pa/milli64.S -# Compile crtbeginS.o and crtendS.o as PIC. -# Actually, hppa64 is always PIC but adding -fPIC does no harm. -CRTSTUFF_T_CFLAGS_S = -fPIC - LIB2FUNCS_STATIC_EXTRA = $(srcdir)/config/pa/linux-atomic.c # Compile libgcc2.a as PIC. diff --git a/gcc/config/pa/t-pa-hpux11 b/gcc/config/pa/t-pa-hpux11 index 4436b4ca640..2773828ac39 100644 --- a/gcc/config/pa/t-pa-hpux11 +++ b/gcc/config/pa/t-pa-hpux11 @@ -1,31 +1,2 @@ TARGET_LIBGCC2_CFLAGS = -fPIC -frandom-seed=fixed-seed LIB2FUNCS_EXTRA=lib2funcs.asm quadlib.c -LIBGCCSTUB_OBJS = pthread_default_stacksize_np-stub.o \ - pthread_mutex_lock-stub.o \ - pthread_mutex_unlock-stub.o \ - pthread_once-stub.o - -stublib.c: $(srcdir)/config/pa/stublib.c - rm -f stublib.c - cp $(srcdir)/config/pa/stublib.c . - -pthread_default_stacksize_np-stub.o: stublib.c $(GCC_PASSES) - $(GCC_FOR_TARGET) -c -O2 -DL_pthread_default_stacksize_np stublib.c \ - -o pthread_default_stacksize_np-stub.o - -pthread_mutex_lock-stub.o: stublib.c $(GCC_PASSES) - $(GCC_FOR_TARGET) -c -O2 -DL_pthread_mutex_lock stublib.c \ - -o pthread_mutex_lock-stub.o - -pthread_mutex_unlock-stub.o: stublib.c $(GCC_PASSES) - $(GCC_FOR_TARGET) -c -O2 -DL_pthread_mutex_unlock stublib.c \ - -o pthread_mutex_unlock-stub.o - -pthread_once-stub.o: stublib.c $(GCC_PASSES) - $(GCC_FOR_TARGET) -c -O2 -DL_pthread_once stublib.c \ - -o pthread_once-stub.o - -$(T)libgcc_stub.a: $(LIBGCCSTUB_OBJS) - -rm -rf $(T)libgcc_stub.a - $(AR) rc $(T)libgcc_stub.a $(LIBGCCSTUB_OBJS) - $(RANLIB) $(T)libgcc_stub.a diff --git a/gcc/config/pa/t-pa64 b/gcc/config/pa/t-pa64 index e6ac7a5bb7d..ce21808e056 100644 --- a/gcc/config/pa/t-pa64 +++ b/gcc/config/pa/t-pa64 @@ -1,5 +1,5 @@ # Copyright (C) 2000, 2001, 2002, 2004, 2006, -# 2007, 2010 Free Software Foundation, Inc. +# 2007, 2010, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -19,49 +19,3 @@ TARGET_LIBGCC2_CFLAGS = -fPIC -Dpa64=1 -DELF=1 -mlong-calls LIB2FUNCS_EXTRA = quadlib.c -LIBGCCSTUB_OBJS = rfi-stub.o dfi-stub.o jvrc-stub.o cxaf-stub.o \ - pthread_default_stacksize_np-stub.o \ - pthread_mutex_lock-stub.o \ - pthread_mutex_unlock-stub.o \ - pthread_once-stub.o - -stublib.c: $(srcdir)/config/pa/stublib.c - rm -f stublib.c - cp $(srcdir)/config/pa/stublib.c . - -rfi-stub.o: stublib.c $(GCC_PASSES) - $(GCC_FOR_TARGET) -c -O2 -DL_register_frame_info stublib.c \ - -o rfi-stub.o - -dfi-stub.o: stublib.c $(GCC_PASSES) - $(GCC_FOR_TARGET) -c -O2 -DL_deregister_frame_info stublib.c \ - -o dfi-stub.o - -cxaf-stub.o: stublib.c $(GCC_PASSES) - $(GCC_FOR_TARGET) -c -O2 -DL_cxa_finalize stublib.c \ - -o cxaf-stub.o - -jvrc-stub.o: stublib.c $(GCC_PASSES) - $(GCC_FOR_TARGET) -c -O2 -DL_Jv_RegisterClasses stublib.c \ - -o jvrc-stub.o - -pthread_default_stacksize_np-stub.o: stublib.c $(GCC_PASSES) - $(GCC_FOR_TARGET) -c -O2 -DL_pthread_default_stacksize_np stublib.c \ - -o pthread_default_stacksize_np-stub.o - -pthread_mutex_lock-stub.o: stublib.c $(GCC_PASSES) - $(GCC_FOR_TARGET) -c -O2 -DL_pthread_mutex_lock stublib.c \ - -o pthread_mutex_lock-stub.o - -pthread_mutex_unlock-stub.o: stublib.c $(GCC_PASSES) - $(GCC_FOR_TARGET) -c -O2 -DL_pthread_mutex_unlock stublib.c \ - -o pthread_mutex_unlock-stub.o - -pthread_once-stub.o: stublib.c $(GCC_PASSES) - $(GCC_FOR_TARGET) -c -O2 -DL_pthread_once stublib.c \ - -o pthread_once-stub.o - -$(T)libgcc_stub.a: $(LIBGCCSTUB_OBJS) - -rm -rf $(T)libgcc_stub.a - $(AR) rc $(T)libgcc_stub.a $(LIBGCCSTUB_OBJS) - $(RANLIB) $(T)libgcc_stub.a diff --git a/gcc/config/rs6000/eabi-ci.asm b/gcc/config/rs6000/eabi-ci.asm deleted file mode 100644 index 696f33d394f..00000000000 --- a/gcc/config/rs6000/eabi-ci.asm +++ /dev/null @@ -1,113 +0,0 @@ -/* crti.s for eabi - Copyright (C) 1996, 2000, 2008, 2009 Free Software Foundation, Inc. - Written By Michael Meissner - -This file 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. - -This file 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* This file just supplies labeled starting points for the .got* and other - special sections. It is linked in first before other modules. */ - - .ident "GNU C crti.s" - -#include <ppc-asm.h> - -#ifndef __powerpc64__ - .section ".got","aw" - .globl __GOT_START__ - .type __GOT_START__,@object -__GOT_START__: - - .section ".got1","aw" - .globl __GOT1_START__ - .type __GOT1_START__,@object -__GOT1_START__: - - .section ".got2","aw" - .globl __GOT2_START__ - .type __GOT2_START__,@object -__GOT2_START__: - - .section ".fixup","aw" - .globl __FIXUP_START__ - .type __FIXUP_START__,@object -__FIXUP_START__: - - .section ".ctors","aw" - .globl __CTOR_LIST__ - .type __CTOR_LIST__,@object -__CTOR_LIST__: - - .section ".dtors","aw" - .globl __DTOR_LIST__ - .type __DTOR_LIST__,@object -__DTOR_LIST__: - - .section ".sdata","aw" - .globl __SDATA_START__ - .type __SDATA_START__,@object - .weak _SDA_BASE_ - .type _SDA_BASE_,@object -__SDATA_START__: -_SDA_BASE_: - - .section ".sbss","aw",@nobits - .globl __SBSS_START__ - .type __SBSS_START__,@object -__SBSS_START__: - - .section ".sdata2","a" - .weak _SDA2_BASE_ - .type _SDA2_BASE_,@object - .globl __SDATA2_START__ - .type __SDATA2_START__,@object -__SDATA2_START__: -_SDA2_BASE_: - - .section ".sbss2","a" - .globl __SBSS2_START__ - .type __SBSS2_START__,@object -__SBSS2_START__: - - .section ".gcc_except_table","aw" - .globl __EXCEPT_START__ - .type __EXCEPT_START__,@object -__EXCEPT_START__: - - .section ".eh_frame","aw" - .globl __EH_FRAME_BEGIN__ - .type __EH_FRAME_BEGIN__,@object -__EH_FRAME_BEGIN__: - -/* Head of __init function used for static constructors. */ - .section ".init","ax" - .align 2 -FUNC_START(__init) - stwu 1,-16(1) - mflr 0 - stw 0,20(1) - -/* Head of __fini function used for static destructors. */ - .section ".fini","ax" - .align 2 -FUNC_START(__fini) - stwu 1,-16(1) - mflr 0 - stw 0,20(1) -#endif diff --git a/gcc/config/rs6000/eabi-cn.asm b/gcc/config/rs6000/eabi-cn.asm deleted file mode 100644 index 68774097c7c..00000000000 --- a/gcc/config/rs6000/eabi-cn.asm +++ /dev/null @@ -1,104 +0,0 @@ -/* crtn.s for eabi - Copyright (C) 1996, 2000, 2007, 2008, 2009 Free Software Foundation, Inc. - Written By Michael Meissner - -This file 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. - -This file 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* This file just supplies labeled ending points for the .got* and other - special sections. It is linked in last after other modules. */ - - .ident "GNU C crtn.s" - -#ifndef __powerpc64__ - .section ".got","aw" - .globl __GOT_END__ - .type __GOT_END__,@object -__GOT_END__: - - .section ".got1","aw" - .globl __GOT1_END__ - .type __GOT1_END__,@object -__GOT1_END__: - - .section ".got2","aw" - .globl __GOT2_END__ - .type __GOT2_END__,@object -__GOT2_END__: - - .section ".fixup","aw" - .globl __FIXUP_END__ - .type __FIXUP_END__,@object -__FIXUP_END__: - - .section ".ctors","aw" - .globl __CTOR_END__ - .type __CTOR_END__,@object -__CTOR_END__: - - .section ".dtors","aw" - .weak __DTOR_END__ - .type __DTOR_END__,@object -__DTOR_END__: - - .section ".sdata","aw" - .globl __SDATA_END__ - .type __SDATA_END__,@object -__SDATA_END__: - - .section ".sbss","aw",@nobits - .globl __SBSS_END__ - .type __SBSS_END__,@object -__SBSS_END__: - - .section ".sdata2","a" - .globl __SDATA2_END__ - .type __SDATA2_END__,@object -__SDATA2_END__: - - .section ".sbss2","a" - .globl __SBSS2_END__ - .type __SBSS2_END__,@object -__SBSS2_END__: - - .section ".gcc_except_table","aw" - .globl __EXCEPT_END__ - .type __EXCEPT_END__,@object -__EXCEPT_END__: - - .section ".eh_frame","aw" - .globl __EH_FRAME_END__ - .type __EH_FRAME_END__,@object -__EH_FRAME_END__: - .long 0 - -/* Tail of __init function used for static constructors. */ - .section ".init","ax" - lwz 0,20(1) - mtlr 0 - addi 1,1,16 - blr - -/* Tail of __fini function used for static destructors. */ - .section ".fini","ax" - lwz 0,20(1) - mtlr 0 - addi 1,1,16 - blr -#endif diff --git a/gcc/config/rs6000/sol-ci.asm b/gcc/config/rs6000/sol-ci.asm deleted file mode 100644 index 7c2fbae9747..00000000000 --- a/gcc/config/rs6000/sol-ci.asm +++ /dev/null @@ -1,94 +0,0 @@ -# crti.s for sysv4 - -# Copyright (C) 1996, 2008, 2009 Free Software Foundation, Inc. -# Written By Michael Meissner -# -# This file 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. -# -# This file 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. -# -# Under Section 7 of GPL version 3, you are granted additional -# permissions described in the GCC Runtime Library Exception, version -# 3.1, as published by the Free Software Foundation. -# -# You should have received a copy of the GNU General Public License and -# a copy of the GCC Runtime Library Exception along with this program; -# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -# <http://www.gnu.org/licenses/>. - -# This file just supplies labeled starting points for the .got* and other -# special sections. It is linked in first before other modules. - - .ident "GNU C scrti.s" - -#ifndef __powerpc64__ -# Start of .text - .section ".text" - .globl _ex_text0 -_ex_text0: - -# Exception range - .section ".exception_ranges","aw" - .globl _ex_range0 -_ex_range0: - -# List of C++ constructors - .section ".ctors","aw" - .globl __CTOR_LIST__ - .type __CTOR_LIST__,@object -__CTOR_LIST__: - -# List of C++ destructors - .section ".dtors","aw" - .globl __DTOR_LIST__ - .type __DTOR_LIST__,@object -__DTOR_LIST__: - -# Head of _init function used for static constructors - .section ".init","ax" - .align 2 - .globl _init - .type _init,@function -_init: stwu %r1,-16(%r1) - mflr %r0 - stw %r31,12(%r1) - stw %r0,16(%r1) - - bl _GLOBAL_OFFSET_TABLE_-4 # get the GOT address - mflr %r31 - -# lwz %r3,_ex_shared0@got(%r31) -# lwz %r4,-8(%r3) # _ex_register or 0 -# cmpi %cr0,%r4,0 -# beq .Lno_reg -# mtlr %r4 -# blrl -#.Lno_reg: - -# Head of _fini function used for static destructors - .section ".fini","ax" - .align 2 - .globl _fini - .type _fini,@function -_fini: stwu %r1,-16(%r1) - mflr %r0 - stw %r31,12(%r1) - stw %r0,16(%r1) - - bl _GLOBAL_OFFSET_TABLE_-4 # get the GOT address - mflr %r31 - -# _environ and its evil twin environ, pointing to the environment - .section ".sdata","aw" - .align 2 - .globl _environ - .space 4 - .weak environ - .set environ,_environ -#endif diff --git a/gcc/config/rs6000/sol-cn.asm b/gcc/config/rs6000/sol-cn.asm deleted file mode 100644 index 4aeacaf2cff..00000000000 --- a/gcc/config/rs6000/sol-cn.asm +++ /dev/null @@ -1,72 +0,0 @@ -# crtn.s for sysv4 - -# Copyright (C) 1996, 2007, 2008, 2009 Free Software Foundation, Inc. -# Written By Michael Meissner -# -# This file 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. -# -# This file 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. -# -# Under Section 7 of GPL version 3, you are granted additional -# permissions described in the GCC Runtime Library Exception, version -# 3.1, as published by the Free Software Foundation. -# -# You should have received a copy of the GNU General Public License and -# a copy of the GCC Runtime Library Exception along with this program; -# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -# <http://www.gnu.org/licenses/>. - -# This file just supplies labeled ending points for the .got* and other -# special sections. It is linked in last after other modules. - - .ident "GNU C scrtn.s" - -#ifndef __powerpc64__ -# Default versions of exception handling register/deregister - .weak _ex_register - .weak _ex_deregister - .set _ex_register,0 - .set _ex_deregister,0 - -# End list of C++ constructors - .section ".ctors","aw" - .globl __CTOR_END__ - .type __CTOR_END__,@object -__CTOR_END__: - -# End list of C++ destructors - .section ".dtors","aw" - .weak __DTOR_END__ - .type __DTOR_END__,@object -__DTOR_END__: - - .section ".text" - .globl _ex_text1 -_ex_text1: - - .section ".exception_ranges","aw" - .globl _ex_range1 -_ex_range1: - -# Tail of _init used for static constructors - .section ".init","ax" - lwz %r0,16(%r1) - lwz %r31,12(%r1) - mtlr %r0 - addi %r1,%r1,16 - blr - -# Tail of _fini used for static destructors - .section ".fini","ax" - lwz %r0,16(%r1) - lwz %r31,12(%r1) - mtlr %r0 - addi %r1,%r1,16 - blr -#endif diff --git a/gcc/config/rs6000/t-lynx b/gcc/config/rs6000/t-lynx index 768856e06eb..8eef22351a3 100644 --- a/gcc/config/rs6000/t-lynx +++ b/gcc/config/rs6000/t-lynx @@ -32,15 +32,6 @@ MULTILIB_DIRNAMES += altivec MULTILIB_EXCEPTIONS = *msoft-float/*maltivec* -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o - -# If .sdata is enabled __CTOR_{LIST,END}__ go into .sdata instead of -# .ctors. -CRTSTUFF_T_CFLAGS = -mno-sdata - -# Compile crtbeginS.o and crtendS.o with pic. -CRTSTUFF_T_CFLAGS_S = -fPIC -mno-sdata - Local Variables: mode: makefile End: diff --git a/gcc/config/rs6000/t-netbsd b/gcc/config/rs6000/t-netbsd index bad21beaac6..bde74190328 100644 --- a/gcc/config/rs6000/t-netbsd +++ b/gcc/config/rs6000/t-netbsd @@ -1,6 +1,6 @@ # Support for NetBSD PowerPC ELF targets (SVR4 ABI). # -# Copyright (C) 2002, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002, 2008, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -45,10 +45,6 @@ crtresxfpr.S: $(srcdir)/config/rs6000/crtresxfpr.asm crtresxgpr.S: $(srcdir)/config/rs6000/crtresxgpr.asm cat $(srcdir)/config/rs6000/crtresxgpr.asm >crtresxgpr.S -# It is important that crtbegin.o, etc., aren't surprised by stuff in .sdata. -CRTSTUFF_T_CFLAGS += -msdata=none -CRTSTUFF_T_CFLAGS_S += -msdata=none - # Switch synonyms MULTILIB_MATCHES_FLOAT = msoft-float=mcpu?401 \ msoft-float=mcpu?403 \ @@ -68,8 +64,6 @@ MULTILIB_MATCHES = ${MULTILIB_MATCHES_FLOAT} LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib -EXTRA_MULTILIB_PARTS = crtbegin$(objext) crtend$(objext) \ - crtbeginS$(objext) crtendS$(objext) crtbeginT$(objext) $(T)crtsavfpr$(objext): crtsavfpr.S $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c crtsavfpr.S -o $(T)crtsavfpr$(objext) diff --git a/gcc/config/rs6000/t-ppccomm b/gcc/config/rs6000/t-ppccomm index b7e07a9b4c9..89716bc08c4 100644 --- a/gcc/config/rs6000/t-ppccomm +++ b/gcc/config/rs6000/t-ppccomm @@ -33,43 +33,3 @@ tramp.S: $(srcdir)/config/rs6000/tramp.asm # Switch synonyms MULTILIB_MATCHES_ENDIAN = mlittle=mlittle-endian mbig=mbig-endian MULTILIB_MATCHES_SYSV = mcall-sysv=mcall-sysv-eabi mcall-sysv=mcall-sysv-noeabi mcall-sysv=mcall-linux mcall-sysv=mcall-netbsd - -EXTRA_MULTILIB_PARTS = crtbegin$(objext) crtend$(objext) \ - crtbeginS$(objext) crtendS$(objext) crtbeginT$(objext) \ - ecrti$(objext) ecrtn$(objext) \ - ncrti$(objext) ncrtn$(objext) - -# We build {e,n}crti.o and {e,n}crtn.o, which serve to add begin and -# end labels to all of the special sections used when we link using gcc. - -# Assemble startup files. -ecrti.S: $(srcdir)/config/rs6000/eabi-ci.asm - cat $(srcdir)/config/rs6000/eabi-ci.asm >ecrti.S - -ecrtn.S: $(srcdir)/config/rs6000/eabi-cn.asm - cat $(srcdir)/config/rs6000/eabi-cn.asm >ecrtn.S - -ncrti.S: $(srcdir)/config/rs6000/sol-ci.asm - cat $(srcdir)/config/rs6000/sol-ci.asm >ncrti.S - -ncrtn.S: $(srcdir)/config/rs6000/sol-cn.asm - cat $(srcdir)/config/rs6000/sol-cn.asm >ncrtn.S - -# Build multiple copies of ?crt{i,n}.o, one for each target switch. -$(T)ecrti$(objext): ecrti.S - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ecrti.S -o $(T)ecrti$(objext) - -$(T)ecrtn$(objext): ecrtn.S - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ecrtn.S -o $(T)ecrtn$(objext) - -$(T)ncrti$(objext): ncrti.S - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ncrti.S -o $(T)ncrti$(objext) - -$(T)ncrtn$(objext): ncrtn.S - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ncrtn.S -o $(T)ncrtn$(objext) - -# It is important that crtbegin.o, etc., aren't surprised by stuff in .sdata. -CRTSTUFF_T_CFLAGS = -msdata=none -# Make sure crt*.o are built with -fPIC even if configured with -# --enable-shared --disable-multilib -CRTSTUFF_T_CFLAGS_S = -fPIC -msdata=none diff --git a/gcc/config/rs6000/t-vxworks b/gcc/config/rs6000/t-vxworks index 8a3d394ed77..e6c67d731ec 100644 --- a/gcc/config/rs6000/t-vxworks +++ b/gcc/config/rs6000/t-vxworks @@ -24,10 +24,6 @@ MULTILIB_DIRNAMES = MULTILIB_MATCHES = fPIC=fpic MULTILIB_EXCEPTIONS = fPIC* -# This is set from the common config/t-vxworks but clobbered by t-ppccomm -# on this target. -EXTRA_MULTILIB_PARTS = - # Similarily, LIB2FUNCS_EXTRA is set from config/t-vxworks and # t-ppccomm *adds* to it, but the common contents are useful to us. # In particular the base trampoline_setup bits are expected to be diff --git a/gcc/config/rx/t-rx b/gcc/config/rx/t-rx index ad667bcc5c9..9d282b66b1a 100644 --- a/gcc/config/rx/t-rx +++ b/gcc/config/rx/t-rx @@ -30,5 +30,3 @@ MULTILIB_EXTRA_OPTS = LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib - -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o diff --git a/gcc/config/score/crti.asm b/gcc/config/score/crti.asm deleted file mode 100644 index 4cd00cf9914..00000000000 --- a/gcc/config/score/crti.asm +++ /dev/null @@ -1,131 +0,0 @@ -# crti.asm for Sunplus S+CORE -# -# Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc. -# -# This file 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. -# -# This file 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. -# -# Under Section 7 of GPL version 3, you are granted additional -# permissions described in the GCC Runtime Library Exception, version -# 3.1, as published by the Free Software Foundation. -# -# You should have received a copy of the GNU General Public License and -# a copy of the GCC Runtime Library Exception along with this program; -# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -# <http://www.gnu.org/licenses/>. - -# This file makes a stack frame for the contents of the .init and -# .fini sections. -.extern _stack - -#ifndef __pic__ -.section .init, "ax", @progbits - .weak _start - .ent _start - .frame r0, 0, r3, 0 - .mask 0x00000000, 0 -_start: - la r28, _gp - la r8, __bss_start - la r9, __bss_end__ - sub! r9, r8 - srli! r9, 2 - addi r9, -1 - mtsr r9, sr0 - li r9, 0 -1: - sw r9, [r8]+, 4 - bcnz 1b - la r0, _stack - jl _init - la r4, _end - jl _init_argv - jl exit - .end _start - - .weak _init_argv - .ent - .frame r0, 0, r3, 0 - .mask 0x00000000, 0 -_init_argv: - ldiu! r4, 0 - ldiu! r5, 0 - j main - .end _init_argv - - .globl _init - .type _init, %function -_init: - addi r0, -32 - sw r3, [r0, 20] - - .section .fini, "ax", @progbits - .globl _fini - .type _fini, %function -_fini: - addi r0, -32 - sw r3, [r0, 20] -#else -.section .init, "ax", @progbits - .set pic - .weak _start - .ent _start - .frame r0, 0, r3, 0 - .mask 0x00000000, 0 -_start: - mv r29, r3 - bl 0f -0: - .cpload r3 - mv r3, r29 - la r8, __bss_start - la r9, __bss_end__ - sub! r9, r8 - srli! r9, 2 - addi r9, -1 - mtsr r9, sr0 - li r9, 0 -1: - sw r9, [r8]+, 4 - bcnz 1b - la r0, _stack - bl _init - la r4, _end - la r29, _init_argv - brl r29 - la r29, exit - brl r29 - .end _start - - .weak _init_argv - .ent _init_argv - .frame r0, 0, r3, 0 - .mask 0x00000000, 0 -_init_argv: - ldiu! r4, 0 - ldiu! r5, 0 - la r29, main - brl r29 - .end _init_argv - - .globl _init - .type _init, %function -_init: - addi r0, -32 - sw r3, [r0, 20] - - .section .fini, "ax", @progbits - .globl _fini - .type _fini, %function -_fini: - addi r0, -32 - sw r3, [r0, 20] - -#endif diff --git a/gcc/config/score/crtn.asm b/gcc/config/score/crtn.asm deleted file mode 100644 index 8132388a0c7..00000000000 --- a/gcc/config/score/crtn.asm +++ /dev/null @@ -1,50 +0,0 @@ -# crtn.asm for Sunplus S+CORE - -# Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc. -# -# This file 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. -# -# This file 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. -# -# Under Section 7 of GPL version 3, you are granted additional -# permissions described in the GCC Runtime Library Exception, version -# 3.1, as published by the Free Software Foundation. -# -# You should have received a copy of the GNU General Public License and -# a copy of the GCC Runtime Library Exception along with this program; -# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -# <http://www.gnu.org/licenses/>. - -# This file makes sure that the .init and .fini sections do in -# fact return. - -#ifndef __pic__ -.section .init, "ax", @progbits - lw r3, [r0, 20] - addi r0, 32 - br r3 - -.section .fini, "ax", @progbits - lw r3, [r0, 20] - addi r0, 32 - br r3 -#else - .set pic -.section .init, "ax", @progbits - lw r3, [r0, 20] - addi r0, 32 - br r3 - - .set pic -.section .fini, "ax", @progbits - lw r3, [r0, 20] - addi r0, 32 - br r3 -#endif - diff --git a/gcc/config/score/t-score-elf b/gcc/config/score/t-score-elf deleted file mode 100644 index fd080c1b1fe..00000000000 --- a/gcc/config/score/t-score-elf +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. -# -# This file is part of GCC. -# -# GCC 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. -# -# GCC 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 GCC; see the file COPYING3. If not see -# <http://www.gnu.org/licenses/>. - -# Assemble startup files. -$(T)crti.o: $(srcdir)/config/score/crti.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/score/crti.asm - -$(T)crtn.o: $(srcdir)/config/score/crtn.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/score/crtn.asm diff --git a/gcc/config/sh/crt1.asm b/gcc/config/sh/crt1.asm deleted file mode 100644 index e2857904f86..00000000000 --- a/gcc/config/sh/crt1.asm +++ /dev/null @@ -1,1369 +0,0 @@ -/* Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2009 - Free Software Foundation, Inc. - This file was pretty much copied from newlib. - -This file is part of GCC. - -GCC 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. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - - -#ifdef MMU_SUPPORT - /* Section used for exception/timer interrupt stack area */ - .section .data.vbr.stack,"aw" - .align 4 - .global __ST_VBR -__ST_VBR: - .zero 1024 * 2 /* ; 2k for VBR handlers */ -/* Label at the highest stack address where the stack grows from */ -__timer_stack: -#endif /* MMU_SUPPORT */ - - /* ;---------------------------------------- - Normal newlib crt1.asm */ - -#ifdef __SH5__ - .section .data,"aw" - .global ___data -___data: - - .section .rodata,"a" - .global ___rodata -___rodata: - -#define ICCR_BASE 0x01600000 -#define OCCR_BASE 0x01e00000 -#define MMUIR_BASE 0x00000000 -#define MMUDR_BASE 0x00800000 - -#define PTE_ENABLED 1 -#define PTE_DISABLED 0 - -#define PTE_SHARED (1 << 1) -#define PTE_NOT_SHARED 0 - -#define PTE_CB_UNCACHEABLE 0 -#define PTE_CB_DEVICE 1 -#define PTE_CB_CACHEABLE_WB 2 -#define PTE_CB_CACHEABLE_WT 3 - -#define PTE_SZ_4KB (0 << 3) -#define PTE_SZ_64KB (1 << 3) -#define PTE_SZ_1MB (2 << 3) -#define PTE_SZ_512MB (3 << 3) - -#define PTE_PRR (1 << 6) -#define PTE_PRX (1 << 7) -#define PTE_PRW (1 << 8) -#define PTE_PRU (1 << 9) - -#define SR_MMU_BIT 31 -#define SR_BL_BIT 28 - -#define ALIGN_4KB (0xfff) -#define ALIGN_1MB (0xfffff) -#define ALIGN_512MB (0x1fffffff) - -#define DYNACON_BASE 0x0f000000 -#define DM_CB_DLINK_BASE 0x0c000000 -#define DM_DB_DLINK_BASE 0x0b000000 - -#define FEMI_AREA_0 0x00000000 -#define FEMI_AREA_1 0x04000000 -#define FEMI_AREA_2 0x05000000 -#define FEMI_AREA_3 0x06000000 -#define FEMI_AREA_4 0x07000000 -#define FEMI_CB 0x08000000 - -#define EMI_BASE 0X80000000 - -#define DMA_BASE 0X0e000000 - -#define CPU_BASE 0X0d000000 - -#define PERIPH_BASE 0X09000000 -#define DMAC_BASE 0x0e000000 -#define INTC_BASE 0x0a000000 -#define CPRC_BASE 0x0a010000 -#define TMU_BASE 0x0a020000 -#define SCIF_BASE 0x0a030000 -#define RTC_BASE 0x0a040000 - - - -#define LOAD_CONST32(val, reg) \ - movi ((val) >> 16) & 65535, reg; \ - shori (val) & 65535, reg - -#define LOAD_PTEH_VAL(sym, align, bits, scratch_reg, reg) \ - LOAD_ADDR (sym, reg); \ - LOAD_CONST32 ((align), scratch_reg); \ - andc reg, scratch_reg, reg; \ - LOAD_CONST32 ((bits), scratch_reg); \ - or reg, scratch_reg, reg - -#define LOAD_PTEL_VAL(sym, align, bits, scratch_reg, reg) \ - LOAD_ADDR (sym, reg); \ - LOAD_CONST32 ((align), scratch_reg); \ - andc reg, scratch_reg, reg; \ - LOAD_CONST32 ((bits), scratch_reg); \ - or reg, scratch_reg, reg - -#define SET_PTE(pte_addr_reg, pteh_val_reg, ptel_val_reg) \ - putcfg pte_addr_reg, 0, r63; \ - putcfg pte_addr_reg, 1, ptel_val_reg; \ - putcfg pte_addr_reg, 0, pteh_val_reg - -#if __SH5__ == 64 - .section .text,"ax" -#define LOAD_ADDR(sym, reg) \ - movi (sym >> 48) & 65535, reg; \ - shori (sym >> 32) & 65535, reg; \ - shori (sym >> 16) & 65535, reg; \ - shori sym & 65535, reg -#else - .mode SHmedia - .section .text..SHmedia32,"ax" -#define LOAD_ADDR(sym, reg) \ - movi (sym >> 16) & 65535, reg; \ - shori sym & 65535, reg -#endif - .global start -start: - LOAD_ADDR (_stack, r15) - -#ifdef MMU_SUPPORT - ! Set up the VM using the MMU and caches - - ! .vm_ep is first instruction to execute - ! after VM initialization - pt/l .vm_ep, tr1 - - ! Configure instruction cache (ICCR) - movi 3, r2 - movi 0, r3 - LOAD_ADDR (ICCR_BASE, r1) - putcfg r1, 0, r2 - putcfg r1, 1, r3 - - ! movi 7, r2 ! write through - ! Configure operand cache (OCCR) - LOAD_ADDR (OCCR_BASE, r1) - putcfg r1, 0, r2 - putcfg r1, 1, r3 - - ! Disable all PTE translations - LOAD_ADDR (MMUIR_BASE, r1) - LOAD_ADDR (MMUDR_BASE, r2) - movi 64, r3 - pt/l .disable_ptes_loop, tr0 -.disable_ptes_loop: - putcfg r1, 0, r63 - putcfg r2, 0, r63 - addi r1, 16, r1 - addi r2, 16, r2 - addi r3, -1, r3 - bgt r3, r63, tr0 - - LOAD_ADDR (MMUIR_BASE, r1) - - ! FEMI instruction mappings - ! Area 0 - 1Mb cacheable at 0x00000000 - ! Area 1 - None - ! Area 2 - 1Mb cacheable at 0x05000000 - ! - 1Mb cacheable at 0x05100000 - ! Area 3 - None - ! Area 4 - None - - ! Map a 1Mb page for instructions at 0x00000000 - LOAD_PTEH_VAL (FEMI_AREA_0, ALIGN_1MB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (FEMI_AREA_0, ALIGN_1MB, PTE_CB_CACHEABLE_WB | PTE_SZ_1MB | PTE_PRX | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map a 1Mb page for instructions at 0x05000000 - addi r1, 16, r1 - LOAD_PTEH_VAL (FEMI_AREA_2, ALIGN_1MB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (FEMI_AREA_2, ALIGN_1MB, PTE_CB_CACHEABLE_WB | PTE_SZ_1MB | PTE_PRX | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map a 1Mb page for instructions at 0x05100000 - addi r1, 16, r1 - LOAD_PTEH_VAL ((FEMI_AREA_2+0x100000), ALIGN_1MB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL ((FEMI_AREA_2+0x100000), ALIGN_1MB, PTE_CB_CACHEABLE_WB | PTE_SZ_1MB | PTE_PRX | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map a 512M page for instructions at EMI base - addi r1, 16, r1 - LOAD_PTEH_VAL (EMI_BASE, ALIGN_512MB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (EMI_BASE, ALIGN_512MB, PTE_CB_CACHEABLE_WB | PTE_SZ_512MB | PTE_PRX | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map a 4K page for instructions at DM_DB_DLINK_BASE - addi r1, 16, r1 - LOAD_PTEH_VAL (DM_DB_DLINK_BASE, ALIGN_4KB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (DM_DB_DLINK_BASE, ALIGN_4KB, PTE_CB_CACHEABLE_WB | PTE_SZ_4KB | PTE_PRX | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - LOAD_ADDR (MMUDR_BASE, r1) - - ! FEMI data mappings - ! Area 0 - 1Mb cacheable at 0x00000000 - ! Area 1 - 1Mb device at 0x04000000 - ! Area 2 - 1Mb cacheable at 0x05000000 - ! - 1Mb cacheable at 0x05100000 - ! Area 3 - None - ! Area 4 - None - ! CB - 1Mb device at 0x08000000 - - ! Map a 1Mb page for data at 0x00000000 - LOAD_PTEH_VAL (FEMI_AREA_0, ALIGN_1MB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (FEMI_AREA_0, ALIGN_1MB, PTE_CB_CACHEABLE_WB | PTE_SZ_1MB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map a 1Mb page for data at 0x04000000 - addi r1, 16, r1 - LOAD_PTEH_VAL (FEMI_AREA_1, ALIGN_1MB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (FEMI_AREA_1, ALIGN_1MB, PTE_CB_DEVICE | PTE_SZ_1MB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map a 1Mb page for data at 0x05000000 - addi r1, 16, r1 - LOAD_PTEH_VAL (FEMI_AREA_2, ALIGN_1MB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (FEMI_AREA_2, ALIGN_1MB, PTE_CB_CACHEABLE_WB | PTE_SZ_1MB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map a 1Mb page for data at 0x05100000 - addi r1, 16, r1 - LOAD_PTEH_VAL ((FEMI_AREA_2+0x100000), ALIGN_1MB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL ((FEMI_AREA_2+0x100000), ALIGN_1MB, PTE_CB_CACHEABLE_WB | PTE_SZ_1MB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map a 4K page for registers at 0x08000000 - addi r1, 16, r1 - LOAD_PTEH_VAL (FEMI_CB, ALIGN_4KB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (FEMI_CB, ALIGN_4KB, PTE_CB_DEVICE | PTE_SZ_4KB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map a 512M page for data at EMI - addi r1, 16, r1 - LOAD_PTEH_VAL (EMI_BASE, ALIGN_512MB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (EMI_BASE, ALIGN_512MB, PTE_CB_CACHEABLE_WB | PTE_SZ_512MB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map a 4K page for DYNACON at DYNACON_BASE - addi r1, 16, r1 - LOAD_PTEH_VAL (DYNACON_BASE, ALIGN_4KB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (DYNACON_BASE, ALIGN_4KB, PTE_CB_DEVICE | PTE_SZ_4KB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map a 4K page for instructions at DM_DB_DLINK_BASE - addi r1, 16, r1 - LOAD_PTEH_VAL (DM_DB_DLINK_BASE, ALIGN_4KB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (DM_DB_DLINK_BASE, ALIGN_4KB, PTE_CB_CACHEABLE_WB | PTE_SZ_4KB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map a 4K page for data at DM_DB_DLINK_BASE+0x1000 - addi r1, 16, r1 - LOAD_PTEH_VAL ((DM_DB_DLINK_BASE+0x1000), ALIGN_4KB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL ((DM_DB_DLINK_BASE+0x1000), ALIGN_4KB, PTE_CB_UNCACHEABLE | PTE_SZ_4KB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map a 4K page for stack DM_DB_DLINK_BASE+0x2000 - addi r1, 16, r1 - LOAD_PTEH_VAL ((DM_DB_DLINK_BASE+0x2000), ALIGN_4KB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL ((DM_DB_DLINK_BASE+0x2000), ALIGN_4KB, PTE_CB_CACHEABLE_WB | PTE_SZ_4KB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map a 1M page for DM_CB_BASE2 at DM_CB_DLINK - ! 0x0c000000 - 0x0c0fffff - addi r1, 16, r1 - LOAD_PTEH_VAL (DM_CB_DLINK_BASE, ALIGN_1MB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (DM_CB_DLINK_BASE, ALIGN_1MB, PTE_CB_DEVICE | PTE_SZ_1MB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map a 1M page for DM_CB_BASE2 at DM_CB_DLINK - ! 0x0c100000 - 0x0c1fffff - addi r1, 16, r1 - LOAD_PTEH_VAL ((DM_CB_DLINK_BASE+0x100000), ALIGN_1MB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL ((DM_CB_DLINK_BASE+0x100000), ALIGN_1MB, PTE_CB_DEVICE | PTE_SZ_1MB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map a 1M page for DM_CB_BASE2 at DM_CB_DLINK - ! 0x0c200000 - 0x0c2fffff - addi r1, 16, r1 - LOAD_PTEH_VAL ((DM_CB_DLINK_BASE+0x200000), ALIGN_1MB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL ((DM_CB_DLINK_BASE+0x200000), ALIGN_1MB, PTE_CB_DEVICE | PTE_SZ_1MB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map a 1M page for DM_CB_BASE2 at DM_CB_DLINK - ! 0x0c400000 - 0x0c4fffff - addi r1, 16, r1 - LOAD_PTEH_VAL ((DM_CB_DLINK_BASE+0x400000), ALIGN_1MB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL ((DM_CB_DLINK_BASE+0x400000), ALIGN_1MB, PTE_CB_DEVICE | PTE_SZ_1MB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map a 1M page for DM_CB_BASE2 at DM_CB_DLINK - ! 0x0c800000 - 0x0c8fffff - addi r1, 16, r1 - LOAD_PTEH_VAL ((DM_CB_DLINK_BASE+0x800000), ALIGN_1MB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL ((DM_CB_DLINK_BASE+0x800000), ALIGN_1MB, PTE_CB_DEVICE | PTE_SZ_1MB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map a 4K page for DMA control registers - addi r1, 16, r1 - LOAD_PTEH_VAL (DMA_BASE, ALIGN_4KB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (DMA_BASE, ALIGN_4KB, PTE_CB_DEVICE | PTE_SZ_4KB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map lots of 4K pages for peripherals - - ! /* peripheral */ - addi r1, 16, r1 - LOAD_PTEH_VAL (PERIPH_BASE, ALIGN_4KB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (PERIPH_BASE, ALIGN_4KB, PTE_CB_DEVICE | PTE_SZ_4KB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - ! /* dmac */ - addi r1, 16, r1 - LOAD_PTEH_VAL (DMAC_BASE, ALIGN_4KB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (DMAC_BASE, ALIGN_4KB, PTE_CB_DEVICE | PTE_SZ_4KB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - ! /* intc */ - addi r1, 16, r1 - LOAD_PTEH_VAL (INTC_BASE, ALIGN_4KB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (INTC_BASE, ALIGN_4KB, PTE_CB_DEVICE | PTE_SZ_4KB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - ! /* rtc */ - addi r1, 16, r1 - LOAD_PTEH_VAL (RTC_BASE, ALIGN_4KB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (RTC_BASE, ALIGN_4KB, PTE_CB_DEVICE | PTE_SZ_4KB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - ! /* dmac */ - addi r1, 16, r1 - LOAD_PTEH_VAL (TMU_BASE, ALIGN_4KB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (TMU_BASE, ALIGN_4KB, PTE_CB_DEVICE | PTE_SZ_4KB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - ! /* scif */ - addi r1, 16, r1 - LOAD_PTEH_VAL (SCIF_BASE, ALIGN_4KB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (SCIF_BASE, ALIGN_4KB, PTE_CB_DEVICE | PTE_SZ_4KB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - ! /* cprc */ - addi r1, 16, r1 - LOAD_PTEH_VAL (CPRC_BASE, ALIGN_4KB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (CPRC_BASE, ALIGN_4KB, PTE_CB_DEVICE | PTE_SZ_4KB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Map CPU WPC registers - addi r1, 16, r1 - LOAD_PTEH_VAL (CPU_BASE, ALIGN_1MB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL (CPU_BASE, ALIGN_1MB, PTE_CB_DEVICE | PTE_SZ_1MB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - addi r1, 16, r1 - - LOAD_PTEH_VAL ((CPU_BASE+0x100000), ALIGN_1MB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL ((CPU_BASE+0x100000), ALIGN_1MB, PTE_CB_DEVICE | PTE_SZ_1MB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - addi r1, 16, r1 - LOAD_PTEH_VAL ((CPU_BASE+0x200000), ALIGN_1MB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL ((CPU_BASE+0x200000), ALIGN_1MB, PTE_CB_DEVICE | PTE_SZ_1MB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - addi r1, 16, r1 - LOAD_PTEH_VAL ((CPU_BASE+0x400000), ALIGN_1MB, PTE_ENABLED | PTE_NOT_SHARED, r25, r2) - LOAD_PTEL_VAL ((CPU_BASE+0x400000), ALIGN_1MB, PTE_CB_DEVICE | PTE_SZ_1MB | PTE_PRR | PTE_PRW | PTE_PRU, r25, r3) - SET_PTE (r1, r2, r3) - - ! Switch over to virtual addressing and enabled cache - getcon sr, r1 - movi 1, r2 - shlli r2, SR_BL_BIT, r2 - or r1, r2, r1 - putcon r1, ssr - getcon sr, r1 - movi 1, r2 - shlli r2, SR_MMU_BIT, r2 - or r1, r2, r1 - putcon r1, ssr - gettr tr1, r1 - putcon r1, spc - synco - rte - - ! VM entry point. From now on, we are in VM mode. -.vm_ep: - - ! Install the trap handler, by seeding vbr with the - ! correct value, and by assigning sr.bl = 0. - - LOAD_ADDR (vbr_start, r1) - putcon r1, vbr - movi ~(1<<28), r1 - getcon sr, r2 - and r1, r2, r2 - putcon r2, sr -#endif /* MMU_SUPPORT */ - - pt/l .Lzero_bss_loop, tr0 - pt/l _init, tr5 - pt/l ___setup_argv_and_call_main, tr6 - pt/l _exit, tr7 - - ! zero out bss - LOAD_ADDR (_edata, r0) - LOAD_ADDR (_end, r1) -.Lzero_bss_loop: - stx.q r0, r63, r63 - addi r0, 8, r0 - bgt/l r1, r0, tr0 - - LOAD_ADDR (___data, r26) - LOAD_ADDR (___rodata, r27) - -#ifdef __SH_FPU_ANY__ - getcon sr, r0 - ! enable the FP unit, by resetting SR.FD - ! also zero out SR.FR, SR.SZ and SR.PR, as mandated by the ABI - movi 0, r1 - shori 0xf000, r1 - andc r0, r1, r0 - putcon r0, sr -#if __SH5__ == 32 - pt/l ___set_fpscr, tr0 - movi 0, r4 - blink tr0, r18 -#endif -#endif - - ! arrange for exit to call fini - pt/l _atexit, tr1 - LOAD_ADDR (_fini, r2) - blink tr1, r18 - - ! call init - blink tr5, r18 - - ! call the mainline - blink tr6, r18 - - ! call exit - blink tr7, r18 - ! We should never return from _exit but in case we do we would enter the - ! the following tight loop. This avoids executing any data that might follow. -limbo: - pt/l limbo, tr0 - blink tr0, r63 - -#ifdef MMU_SUPPORT - ! All these traps are handled in the same place. - .balign 256 -vbr_start: - pt/l handler, tr0 ! tr0 trashed. - blink tr0, r63 - .balign 256 -vbr_100: - pt/l handler, tr0 ! tr0 trashed. - blink tr0, r63 -vbr_100_end: - .balign 256 -vbr_200: - pt/l handler, tr0 ! tr0 trashed. - blink tr0, r63 - .balign 256 -vbr_300: - pt/l handler, tr0 ! tr0 trashed. - blink tr0, r63 - .balign 256 -vbr_400: ! Should be at vbr+0x400 -handler: - /* If the trap handler is there call it */ - LOAD_ADDR (__superh_trap_handler, r2) - pta chandler,tr2 - beq r2, r63, tr2 /* If zero, ie not present branch around to chandler */ - /* Now call the trap handler with as much of the context unchanged as possible. - Move trapping address into R18 to make it look like the trap point */ - getcon spc, r18 - pt/l __superh_trap_handler, tr0 - blink tr0, r7 -chandler: - getcon spc, r62 - getcon expevt, r2 - pt/l _exit, tr0 - blink tr0, r63 - - /* Simulated trap handler */ - .section .text..SHmedia32,"ax" -gcc2_compiled.: - .section .debug_abbrev -.Ldebug_abbrev0: - .section .text..SHmedia32 -.Ltext0: - .section .debug_info -.Ldebug_info0: - .section .debug_line -.Ldebug_line0: - .section .text..SHmedia32,"ax" - .align 5 - .global __superh_trap_handler - .type __superh_trap_handler,@function -__superh_trap_handler: -.LFB1: - ptabs r18, tr0 - addi.l r15, -8, r15 - st.l r15, 4, r14 - addi.l r15, -8, r15 - add.l r15, r63, r14 - st.l r14, 0, r2 - ptabs r7, tr0 - addi.l r14, 8, r14 - add.l r14, r63, r15 - ld.l r15, 4, r14 - addi.l r15, 8, r15 - blink tr0, r63 -.LFE1: -.Lfe1: - .size __superh_trap_handler,.Lfe1-__superh_trap_handler - - .section .text..SHmedia32 -.Letext0: - - .section .debug_info - .ualong 0xa7 - .uaword 0x2 - .ualong .Ldebug_abbrev0 - .byte 0x4 - .byte 0x1 - .ualong .Ldebug_line0 - .ualong .Letext0 - .ualong .Ltext0 - .string "trap_handler.c" - - .string "xxxxxxxxxxxxxxxxxxxxxxxxxxxx" - - .string "GNU C 2.97-sh5-010522" - - .byte 0x1 - .byte 0x2 - .ualong 0x9a - .byte 0x1 - .string "_superh_trap_handler" - - .byte 0x1 - .byte 0x2 - .byte 0x1 - .ualong .LFB1 - .ualong .LFE1 - .byte 0x1 - .byte 0x5e - .byte 0x3 - .string "trap_reason" - - .byte 0x1 - .byte 0x1 - .ualong 0x9a - .byte 0x2 - .byte 0x91 - .byte 0x0 - .byte 0x0 - .byte 0x4 - .string "unsigned int" - - .byte 0x4 - .byte 0x7 - .byte 0x0 - - .section .debug_abbrev - .byte 0x1 - .byte 0x11 - .byte 0x1 - .byte 0x10 - .byte 0x6 - .byte 0x12 - .byte 0x1 - .byte 0x11 - .byte 0x1 - .byte 0x3 - .byte 0x8 - .byte 0x1b - .byte 0x8 - .byte 0x25 - .byte 0x8 - .byte 0x13 - .byte 0xb - .byte 0,0 - .byte 0x2 - .byte 0x2e - .byte 0x1 - .byte 0x1 - .byte 0x13 - .byte 0x3f - .byte 0xc - .byte 0x3 - .byte 0x8 - .byte 0x3a - .byte 0xb - .byte 0x3b - .byte 0xb - .byte 0x27 - .byte 0xc - .byte 0x11 - .byte 0x1 - .byte 0x12 - .byte 0x1 - .byte 0x40 - .byte 0xa - .byte 0,0 - .byte 0x3 - .byte 0x5 - .byte 0x0 - .byte 0x3 - .byte 0x8 - .byte 0x3a - .byte 0xb - .byte 0x3b - .byte 0xb - .byte 0x49 - .byte 0x13 - .byte 0x2 - .byte 0xa - .byte 0,0 - .byte 0x4 - .byte 0x24 - .byte 0x0 - .byte 0x3 - .byte 0x8 - .byte 0xb - .byte 0xb - .byte 0x3e - .byte 0xb - .byte 0,0 - .byte 0 - - .section .debug_pubnames - .ualong 0x27 - .uaword 0x2 - .ualong .Ldebug_info0 - .ualong 0xab - .ualong 0x5b - .string "_superh_trap_handler" - - .ualong 0x0 - - .section .debug_aranges - .ualong 0x1c - .uaword 0x2 - .ualong .Ldebug_info0 - .byte 0x4 - .byte 0x0 - .uaword 0x0,0 - .ualong .Ltext0 - .ualong .Letext0-.Ltext0 - .ualong 0x0 - .ualong 0x0 - .ident "GCC: (GNU) 2.97-sh5-010522" -#endif /* MMU_SUPPORT */ -#else /* ! __SH5__ */ - - ! make a place to keep any previous value of the vbr register - ! this will only have a value if it has been set by redboot (for example) - .section .bss -old_vbr: - .long 0 -#ifdef PROFILE -profiling_enabled: - .long 0 -#endif - - - .section .text - .global start - .import ___rtos_profiler_start_timer - .weak ___rtos_profiler_start_timer -start: - mov.l stack_k,r15 - -#if defined (__SH3__) || (defined (__SH_FPU_ANY__) && ! defined (__SH2A__)) || defined (__SH4_NOFPU__) -#define VBR_SETUP - ! before zeroing the bss ... - ! if the vbr is already set to vbr_start then the program has been restarted - ! (i.e. it is not the first time the program has been run since reset) - ! reset the vbr to its old value before old_vbr (in bss) is wiped - ! this ensures that the later code does not create a circular vbr chain - stc vbr, r1 - mov.l vbr_start_k, r2 - cmp/eq r1, r2 - bf 0f - ! reset the old vbr value - mov.l old_vbr_k, r1 - mov.l @r1, r2 - ldc r2, vbr -0: -#endif /* VBR_SETUP */ - - ! zero out bss - mov.l edata_k,r0 - mov.l end_k,r1 - mov #0,r2 -start_l: - mov.l r2,@r0 - add #4,r0 - cmp/ge r0,r1 - bt start_l - -#if defined (__SH_FPU_ANY__) - mov.l set_fpscr_k, r1 - mov #4,r4 - jsr @r1 - shll16 r4 ! Set DN bit (flush denormal inputs to zero) - lds r3,fpscr ! Switch to default precision -#endif /* defined (__SH_FPU_ANY__) */ - -#ifdef VBR_SETUP - ! save the existing contents of the vbr - ! there will only be a prior value when using something like redboot - ! otherwise it will be zero - stc vbr, r1 - mov.l old_vbr_k, r2 - mov.l r1, @r2 - ! setup vbr - mov.l vbr_start_k, r1 - ldc r1,vbr -#endif /* VBR_SETUP */ - - ! if an rtos is exporting a timer start fn, - ! then pick up an SR which does not enable ints - ! (the rtos will take care of this) - mov.l rtos_start_fn, r0 - mov.l sr_initial_bare, r1 - tst r0, r0 - bt set_sr - - mov.l sr_initial_rtos, r1 - -set_sr: - ! Set status register (sr) - ldc r1, sr - - ! arrange for exit to call fini - mov.l atexit_k,r0 - mov.l fini_k,r4 - jsr @r0 - nop - -#ifdef PROFILE - ! arrange for exit to call _mcleanup (via stop_profiling) - mova stop_profiling,r0 - mov.l atexit_k,r1 - jsr @r1 - mov r0, r4 - - ! Call profiler startup code - mov.l monstartup_k, r0 - mov.l start_k, r4 - mov.l etext_k, r5 - jsr @r0 - nop - - ! enable profiling trap - ! until now any trap 33s will have been ignored - ! This means that all library functions called before this point - ! (directly or indirectly) may have the profiling trap at the start. - ! Therefore, only mcount itself may not have the extra header. - mov.l profiling_enabled_k2, r0 - mov #1, r1 - mov.l r1, @r0 -#endif /* PROFILE */ - - ! call init - mov.l init_k,r0 - jsr @r0 - nop - - ! call the mainline - mov.l main_k,r0 - jsr @r0 - nop - - ! call exit - mov r0,r4 - mov.l exit_k,r0 - jsr @r0 - nop - - .balign 4 -#ifdef PROFILE -stop_profiling: - # stop mcount counting - mov.l profiling_enabled_k2, r0 - mov #0, r1 - mov.l r1, @r0 - - # call mcleanup - mov.l mcleanup_k, r0 - jmp @r0 - nop - - .balign 4 -mcleanup_k: - .long __mcleanup -monstartup_k: - .long ___monstartup -profiling_enabled_k2: - .long profiling_enabled -start_k: - .long _start -etext_k: - .long __etext -#endif /* PROFILE */ - - .align 2 -#if defined (__SH_FPU_ANY__) -set_fpscr_k: - .long ___set_fpscr -#endif /* defined (__SH_FPU_ANY__) */ - -stack_k: - .long _stack -edata_k: - .long _edata -end_k: - .long _end -main_k: - .long ___setup_argv_and_call_main -exit_k: - .long _exit -atexit_k: - .long _atexit -init_k: - .long _init -fini_k: - .long _fini -#ifdef VBR_SETUP -old_vbr_k: - .long old_vbr -vbr_start_k: - .long vbr_start -#endif /* VBR_SETUP */ - -sr_initial_rtos: - ! Privileged mode RB 1 BL 0. Keep BL 0 to allow default trap handlers to work. - ! Whether profiling or not, keep interrupts masked, - ! the RTOS will enable these if required. - .long 0x600000f1 - -rtos_start_fn: - .long ___rtos_profiler_start_timer - -#ifdef PROFILE -sr_initial_bare: - ! Privileged mode RB 1 BL 0. Keep BL 0 to allow default trap handlers to work. - ! For bare machine, we need to enable interrupts to get profiling working - .long 0x60000001 -#else - -sr_initial_bare: - ! Privileged mode RB 1 BL 0. Keep BL 0 to allow default trap handlers to work. - ! Keep interrupts disabled - the application will enable as required. - .long 0x600000f1 -#endif - - ! supplied for backward compatibility only, in case of linking - ! code whose main() was compiled with an older version of GCC. - .global ___main -___main: - rts - nop -#ifdef VBR_SETUP -! Exception handlers - .section .text.vbr, "ax" -vbr_start: - - .org 0x100 -vbr_100: -#ifdef PROFILE - ! Note on register usage. - ! we use r0..r3 as scratch in this code. If we are here due to a trapa for profiling - ! then this is OK as we are just before executing any function code. - ! The other r4..r7 we save explicityl on the stack - ! Remaining registers are saved by normal ABI conventions and we assert we do not - ! use floating point registers. - mov.l expevt_k1, r1 - mov.l @r1, r1 - mov.l event_mask, r0 - and r0,r1 - mov.l trapcode_k, r2 - cmp/eq r1,r2 - bt 1f - bra handler_100 ! if not a trapa, go to default handler - nop -1: - mov.l trapa_k, r0 - mov.l @r0, r0 - shlr2 r0 ! trapa code is shifted by 2. - cmp/eq #33, r0 - bt 2f - bra handler_100 - nop -2: - - ! If here then it looks like we have trap #33 - ! Now we need to call mcount with the following convention - ! Save and restore r4..r7 - mov.l r4,@-r15 - mov.l r5,@-r15 - mov.l r6,@-r15 - mov.l r7,@-r15 - sts.l pr,@-r15 - - ! r4 is frompc. - ! r5 is selfpc - ! r0 is the branch back address. - ! The code sequence emitted by gcc for the profiling trap is - ! .align 2 - ! trapa #33 - ! .align 2 - ! .long lab Where lab is planted by the compiler. This is the address - ! of a datum that needs to be incremented. - sts pr, r4 ! frompc - stc spc, r5 ! selfpc - mov #2, r2 - not r2, r2 ! pattern to align to 4 - and r2, r5 ! r5 now has aligned address -! add #4, r5 ! r5 now has address of address - mov r5, r2 ! Remember it. -! mov.l @r5, r5 ! r5 has value of lable (lab in above example) - add #8, r2 - ldc r2, spc ! our return address avoiding address word - - ! only call mcount if profiling is enabled - mov.l profiling_enabled_k, r0 - mov.l @r0, r0 - cmp/eq #0, r0 - bt 3f - ! call mcount - mov.l mcount_k, r2 - jsr @r2 - nop -3: - lds.l @r15+,pr - mov.l @r15+,r7 - mov.l @r15+,r6 - mov.l @r15+,r5 - mov.l @r15+,r4 - rte - nop - .balign 4 -event_mask: - .long 0xfff -trapcode_k: - .long 0x160 -expevt_k1: - .long 0xff000024 ! Address of expevt -trapa_k: - .long 0xff000020 -mcount_k: - .long __call_mcount -profiling_enabled_k: - .long profiling_enabled -#endif - ! Non profiling case. -handler_100: - mov.l 2f, r0 ! load the old vbr setting (if any) - mov.l @r0, r0 - cmp/eq #0, r0 - bf 1f - ! no previous vbr - jump to own generic handler - bra handler - nop -1: ! there was a previous handler - chain them - add #0x7f, r0 ! 0x7f - add #0x7f, r0 ! 0xfe - add #0x2, r0 ! add 0x100 without corrupting another register - jmp @r0 - nop - .balign 4 -2: - .long old_vbr - - .org 0x400 -vbr_400: ! Should be at vbr+0x400 - mov.l 2f, r0 ! load the old vbr setting (if any) - mov.l @r0, r0 - cmp/eq #0, r0 - ! no previous vbr - jump to own generic handler - bt handler - ! there was a previous handler - chain them - rotcr r0 - rotcr r0 - add #0x7f, r0 ! 0x1fc - add #0x7f, r0 ! 0x3f8 - add #0x02, r0 ! 0x400 - rotcl r0 - rotcl r0 ! Add 0x400 without corrupting another register - jmp @r0 - nop - .balign 4 -2: - .long old_vbr -handler: - /* If the trap handler is there call it */ - mov.l superh_trap_handler_k, r0 - cmp/eq #0, r0 ! True if zero. - bf 3f - bra chandler - nop -3: - ! Here handler available, call it. - /* Now call the trap handler with as much of the context unchanged as possible. - Move trapping address into PR to make it look like the trap point */ - stc spc, r1 - lds r1, pr - mov.l expevt_k, r4 - mov.l @r4, r4 ! r4 is value of expevt, first parameter. - mov r1, r5 ! Remember trapping pc. - mov r1, r6 ! Remember trapping pc. - mov.l chandler_k, r1 - mov.l superh_trap_handler_k, r2 - ! jmp to trap handler to avoid disturbing pr. - jmp @r2 - nop - - .org 0x600 -vbr_600: -#ifdef PROFILE - ! Should be at vbr+0x600 - ! Now we are in the land of interrupts so need to save more state. - ! Save register state - mov.l interrupt_stack_k, r15 ! r15 has been saved to sgr. - mov.l r0,@-r15 - mov.l r1,@-r15 - mov.l r2,@-r15 - mov.l r3,@-r15 - mov.l r4,@-r15 - mov.l r5,@-r15 - mov.l r6,@-r15 - mov.l r7,@-r15 - sts.l pr,@-r15 - sts.l mach,@-r15 - sts.l macl,@-r15 -#if defined(__SH_FPU_ANY__) - ! Save fpul and fpscr, save fr0-fr7 in 64 bit mode - ! and set the pervading precision for the timer_handler - mov #0,r0 - sts.l fpul,@-r15 - sts.l fpscr,@-r15 - lds r0,fpscr ! Clear fpscr - fmov fr0,@-r15 - fmov fr1,@-r15 - fmov fr2,@-r15 - fmov fr3,@-r15 - mov.l pervading_precision_k,r0 - fmov fr4,@-r15 - fmov fr5,@-r15 - mov.l @r0,r0 - fmov fr6,@-r15 - fmov fr7,@-r15 - lds r0,fpscr -#endif /* __SH_FPU_ANY__ */ - ! Pass interrupted pc to timer_handler as first parameter (r4). - stc spc, r4 - mov.l timer_handler_k, r0 - jsr @r0 - nop -#if defined(__SH_FPU_ANY__) - mov #0,r0 - lds r0,fpscr ! Clear the fpscr - fmov @r15+,fr7 - fmov @r15+,fr6 - fmov @r15+,fr5 - fmov @r15+,fr4 - fmov @r15+,fr3 - fmov @r15+,fr2 - fmov @r15+,fr1 - fmov @r15+,fr0 - lds.l @r15+,fpscr - lds.l @r15+,fpul -#endif /* __SH_FPU_ANY__ */ - lds.l @r15+,macl - lds.l @r15+,mach - lds.l @r15+,pr - mov.l @r15+,r7 - mov.l @r15+,r6 - mov.l @r15+,r5 - mov.l @r15+,r4 - mov.l @r15+,r3 - mov.l @r15+,r2 - mov.l @r15+,r1 - mov.l @r15+,r0 - stc sgr, r15 ! Restore r15, destroyed by this sequence. - rte - nop -#if defined(__SH_FPU_ANY__) - .balign 4 -pervading_precision_k: -#define CONCAT1(A,B) A##B -#define CONCAT(A,B) CONCAT1(A,B) - .long CONCAT(__USER_LABEL_PREFIX__,__fpscr_values)+4 -#endif -#else - mov.l 2f, r0 ! Load the old vbr setting (if any). - mov.l @r0, r0 - cmp/eq #0, r0 - ! no previous vbr - jump to own handler - bt chandler - ! there was a previous handler - chain them - rotcr r0 - rotcr r0 - add #0x7f, r0 ! 0x1fc - add #0x7f, r0 ! 0x3f8 - add #0x7f, r0 ! 0x5f4 - add #0x03, r0 ! 0x600 - rotcl r0 - rotcl r0 ! Add 0x600 without corrupting another register - jmp @r0 - nop - .balign 4 -2: - .long old_vbr -#endif /* PROFILE code */ -chandler: - mov.l expevt_k, r4 - mov.l @r4, r4 ! r4 is value of expevt hence making this the return code - mov.l handler_exit_k,r0 - jsr @r0 - nop - ! We should never return from _exit but in case we do we would enter the - ! the following tight loop -limbo: - bra limbo - nop - .balign 4 -#ifdef PROFILE -interrupt_stack_k: - .long __timer_stack ! The high end of the stack -timer_handler_k: - .long __profil_counter -#endif -expevt_k: - .long 0xff000024 ! Address of expevt -chandler_k: - .long chandler -superh_trap_handler_k: - .long __superh_trap_handler -handler_exit_k: - .long _exit - .align 2 -! Simulated compile of trap handler. - .section .debug_abbrev,"",@progbits -.Ldebug_abbrev0: - .section .debug_info,"",@progbits -.Ldebug_info0: - .section .debug_line,"",@progbits -.Ldebug_line0: - .text -.Ltext0: - .align 5 - .type __superh_trap_handler,@function -__superh_trap_handler: -.LFB1: - mov.l r14,@-r15 -.LCFI0: - add #-4,r15 -.LCFI1: - mov r15,r14 -.LCFI2: - mov.l r4,@r14 - lds r1, pr - add #4,r14 - mov r14,r15 - mov.l @r15+,r14 - rts - nop -.LFE1: -.Lfe1: - .size __superh_trap_handler,.Lfe1-__superh_trap_handler - .section .debug_frame,"",@progbits -.Lframe0: - .ualong .LECIE0-.LSCIE0 -.LSCIE0: - .ualong 0xffffffff - .byte 0x1 - .string "" - .uleb128 0x1 - .sleb128 -4 - .byte 0x11 - .byte 0xc - .uleb128 0xf - .uleb128 0x0 - .align 2 -.LECIE0: -.LSFDE0: - .ualong .LEFDE0-.LASFDE0 -.LASFDE0: - .ualong .Lframe0 - .ualong .LFB1 - .ualong .LFE1-.LFB1 - .byte 0x4 - .ualong .LCFI0-.LFB1 - .byte 0xe - .uleb128 0x4 - .byte 0x4 - .ualong .LCFI1-.LCFI0 - .byte 0xe - .uleb128 0x8 - .byte 0x8e - .uleb128 0x1 - .byte 0x4 - .ualong .LCFI2-.LCFI1 - .byte 0xd - .uleb128 0xe - .align 2 -.LEFDE0: - .text -.Letext0: - .section .debug_info - .ualong 0xb3 - .uaword 0x2 - .ualong .Ldebug_abbrev0 - .byte 0x4 - .uleb128 0x1 - .ualong .Ldebug_line0 - .ualong .Letext0 - .ualong .Ltext0 - .string "trap_handler.c" - .string "xxxxxxxxxxxxxxxxxxxxxxxxxxxx" - .string "GNU C 3.2 20020529 (experimental)" - .byte 0x1 - .uleb128 0x2 - .ualong 0xa6 - .byte 0x1 - .string "_superh_trap_handler" - .byte 0x1 - .byte 0x2 - .byte 0x1 - .ualong .LFB1 - .ualong .LFE1 - .byte 0x1 - .byte 0x5e - .uleb128 0x3 - .string "trap_reason" - .byte 0x1 - .byte 0x1 - .ualong 0xa6 - .byte 0x2 - .byte 0x91 - .sleb128 0 - .byte 0x0 - .uleb128 0x4 - .string "unsigned int" - .byte 0x4 - .byte 0x7 - .byte 0x0 - .section .debug_abbrev - .uleb128 0x1 - .uleb128 0x11 - .byte 0x1 - .uleb128 0x10 - .uleb128 0x6 - .uleb128 0x12 - .uleb128 0x1 - .uleb128 0x11 - .uleb128 0x1 - .uleb128 0x3 - .uleb128 0x8 - .uleb128 0x1b - .uleb128 0x8 - .uleb128 0x25 - .uleb128 0x8 - .uleb128 0x13 - .uleb128 0xb - .byte 0x0 - .byte 0x0 - .uleb128 0x2 - .uleb128 0x2e - .byte 0x1 - .uleb128 0x1 - .uleb128 0x13 - .uleb128 0x3f - .uleb128 0xc - .uleb128 0x3 - .uleb128 0x8 - .uleb128 0x3a - .uleb128 0xb - .uleb128 0x3b - .uleb128 0xb - .uleb128 0x27 - .uleb128 0xc - .uleb128 0x11 - .uleb128 0x1 - .uleb128 0x12 - .uleb128 0x1 - .uleb128 0x40 - .uleb128 0xa - .byte 0x0 - .byte 0x0 - .uleb128 0x3 - .uleb128 0x5 - .byte 0x0 - .uleb128 0x3 - .uleb128 0x8 - .uleb128 0x3a - .uleb128 0xb - .uleb128 0x3b - .uleb128 0xb - .uleb128 0x49 - .uleb128 0x13 - .uleb128 0x2 - .uleb128 0xa - .byte 0x0 - .byte 0x0 - .uleb128 0x4 - .uleb128 0x24 - .byte 0x0 - .uleb128 0x3 - .uleb128 0x8 - .uleb128 0xb - .uleb128 0xb - .uleb128 0x3e - .uleb128 0xb - .byte 0x0 - .byte 0x0 - .byte 0x0 - .section .debug_pubnames,"",@progbits - .ualong 0x27 - .uaword 0x2 - .ualong .Ldebug_info0 - .ualong 0xb7 - .ualong 0x67 - .string "_superh_trap_handler" - .ualong 0x0 - .section .debug_aranges,"",@progbits - .ualong 0x1c - .uaword 0x2 - .ualong .Ldebug_info0 - .byte 0x4 - .byte 0x0 - .uaword 0x0 - .uaword 0x0 - .ualong .Ltext0 - .ualong .Letext0-.Ltext0 - .ualong 0x0 - .ualong 0x0 -#endif /* VBR_SETUP */ -#endif /* ! __SH5__ */ diff --git a/gcc/config/sh/crti.asm b/gcc/config/sh/crti.asm deleted file mode 100644 index ef5cd719d82..00000000000 --- a/gcc/config/sh/crti.asm +++ /dev/null @@ -1,125 +0,0 @@ -/* Copyright (C) 2000, 2001, 2009 Free Software Foundation, Inc. - This file was adapted from glibc sources. - -This file is part of GCC. - -GCC 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. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - - -/* The code in sections .init and .fini is supposed to be a single - regular function. The function in .init is called directly from - start in crt1.asm. The function in .fini is atexit()ed in crt1.asm - too. - - crti.asm contributes the prologue of a function to these sections, - and crtn.asm comes up the epilogue. STARTFILE_SPEC should list - crti.o before any other object files that might add code to .init - or .fini sections, and ENDFILE_SPEC should list crtn.o after any - such object files. */ - - .section .init -/* The alignment below can't be smaller, otherwise the mova below - breaks. Yes, we might align just the label, but then we'd be - exchanging an alignment here for one there, since the code fragment - below ensures 4-byte alignment on __ELF__. */ -#ifdef __ELF__ - .p2align 2 -#else - .p2align 1 -#endif - .global _init -_init: -#if __SHMEDIA__ - addi r15, -16, r15 - st.q r15, 8, r14 - st.q r15, 0, r18 - add r15, r63, r14 -#elif __SH5__ && ! __SHMEDIA__ - mov r15,r0 - add #-8,r15 - mov.l r14,@-r0 - sts.l pr,@-r0 - mov r15,r14 - nop -#else -#ifdef __ELF__ - mov.l r12,@-r15 - mova 0f,r0 - mov.l 0f,r12 -#endif - mov.l r14,@-r15 -#ifdef __ELF__ - add r0,r12 -#endif - sts.l pr,@-r15 -#ifdef __ELF__ - bra 1f -#endif - mov r15,r14 -#ifdef __ELF__ -0: .long _GLOBAL_OFFSET_TABLE_ -1: -#endif -#endif /* __SHMEDIA__ */ - - .section .fini -/* The alignment below can't be smaller, otherwise the mova below - breaks. Yes, we might align just the label, but then we'd be - exchanging an alignment here for one there, since the code fragment - below ensures 4-byte alignment on __ELF__. */ -#ifdef __ELF__ - .p2align 2 -#else - .p2align 1 -#endif - .global _fini -_fini: -#if __SHMEDIA__ - addi r15, -16, r15 - st.q r15, 8, r14 - st.q r15, 0, r18 - add r15, r63, r14 -#elif __SH5__ && ! __SHMEDIA__ - mov r15,r0 - add #-8,r15 - mov.l r14,@-r0 - sts.l pr,@-r0 - mov r15,r14 - nop -#else -#ifdef __ELF__ - mov.l r12,@-r15 - mova 0f,r0 - mov.l 0f,r12 -#endif - mov.l r14,@-r15 -#ifdef __ELF__ - add r0,r12 -#endif - sts.l pr,@-r15 -#ifdef __ELF__ - bra 1f -#endif - mov r15,r14 -#ifdef __ELF__ -0: .long _GLOBAL_OFFSET_TABLE_ -1: -#endif -#endif /* __SHMEDIA__ */ diff --git a/gcc/config/sh/crtn.asm b/gcc/config/sh/crtn.asm deleted file mode 100644 index 670d90f7b6a..00000000000 --- a/gcc/config/sh/crtn.asm +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (C) 2000, 2001, 2009 Free Software Foundation, Inc. - This file was adapted from glibc sources. - -This file is part of GCC. - -GCC 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. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* See an explanation about .init and .fini in crti.asm. */ - - .section .init -#if __SHMEDIA__ - add r14, r63, r15 - ld.q r15, 0, r18 - ptabs r18, tr0 - ld.q r15, 8, r14 - addi r15, 16, r15 - blink tr0, r63 -#elif __SH5__ && ! __SHMEDIA__ - mov r14,r15 - lds.l @r14+,pr - mov.l @r14,r14 - rts - add #8,r15 -#else - mov r14,r15 - lds.l @r15+,pr - mov.l @r15+,r14 - rts -#ifdef __ELF__ - mov.l @r15+,r12 -#else - nop -#endif -#endif /* __SHMEDIA__ */ - - .section .fini -#if __SHMEDIA__ - add r14, r63, r15 - ld.q r15, 0, r18 - ptabs r18, tr0 - ld.q r15, 8, r14 - addi r15, 16, r15 - blink tr0, r63 -#elif __SH5__ && ! __SHMEDIA__ - mov r14,r15 - lds.l @r14+,pr - mov.l @r14,r14 - rts - add #8,r15 -#else - mov r14,r15 - lds.l @r15+,pr - mov.l @r15+,r14 - rts -#ifdef __ELF__ - mov.l @r15+,r12 -#else - nop -#endif -#endif /* __SHMEDIA__ */ diff --git a/gcc/config/sh/lib1funcs-4-300.asm b/gcc/config/sh/lib1funcs-4-300.asm deleted file mode 100644 index b131877f121..00000000000 --- a/gcc/config/sh/lib1funcs-4-300.asm +++ /dev/null @@ -1,936 +0,0 @@ -/* Copyright (C) 2004, 2006, 2009 Free Software Foundation, Inc. - -This file 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. - -This file 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - - -/* libgcc routines for the STMicroelectronics ST40-300 CPU. - Contributed by J"orn Rennecke joern.rennecke@st.com. */ - -#include "lib1funcs.h" - -#if !__SHMEDIA__ -#ifdef L_div_table -#if defined (__SH3__) || defined (__SH3E__) || defined (__SH4__) || defined (__SH4_SINGLE__) || defined (__SH4_SINGLE_ONLY__) || defined (__SH4_NOFPU__) -/* This code used shld, thus is not suitable for SH1 / SH2. */ - -/* Signed / unsigned division without use of FPU, optimized for SH4-300. - Uses a lookup table for divisors in the range -128 .. +127, and - div1 with case distinction for larger divisors in three more ranges. - The code is lumped together with the table to allow the use of mova. */ -#ifdef __LITTLE_ENDIAN__ -#define L_LSB 0 -#define L_LSWMSB 1 -#define L_MSWLSB 2 -#else -#define L_LSB 3 -#define L_LSWMSB 2 -#define L_MSWLSB 1 -#endif - - .global GLOBAL(udivsi3_i4i) - .global GLOBAL(sdivsi3_i4i) - FUNC(GLOBAL(udivsi3_i4i)) - FUNC(GLOBAL(sdivsi3_i4i)) - - .balign 4 -LOCAL(div_ge8m): ! 10 cycles up to here - rotcr r1 ! signed shift must use original sign from r4 - div0s r5,r4 - mov #24,r7 - shld r7,r6 - shad r0,r1 - rotcl r6 - div1 r5,r1 - swap.w r5,r0 ! detect -0x80000000 : 0x800000 - rotcl r6 - swap.w r4,r7 - div1 r5,r1 - swap.b r7,r7 - rotcl r6 - or r7,r0 - div1 r5,r1 - swap.w r0,r7 - rotcl r6 - or r7,r0 - div1 r5,r1 - add #-0x80,r0 - rotcl r6 - extu.w r0,r0 - div1 r5,r1 - neg r0,r0 - rotcl r6 - swap.w r0,r0 - div1 r5,r1 - mov.l @r15+,r7 - and r6,r0 - rotcl r6 - div1 r5,r1 - shll2 r0 - rotcl r6 - exts.b r0,r0 - div1 r5,r1 - swap.w r0,r0 - exts.w r0,r1 - exts.b r6,r0 - mov.l @r15+,r6 - rotcl r0 - rts - sub r1,r0 - ! 31 cycles up to here - - .balign 4 -LOCAL(udiv_ge64k): ! 3 cycles up to here - mov r4,r0 - shlr8 r0 - div0u - cmp/hi r0,r5 - bt LOCAL(udiv_r8) - mov.l r5,@-r15 - shll8 r5 - ! 7 cycles up to here - .rept 8 - div1 r5,r0 - .endr - extu.b r4,r1 ! 15 cycles up to here - extu.b r0,r6 - xor r1,r0 - xor r6,r0 - swap.b r6,r6 - .rept 8 - div1 r5,r0 - .endr ! 25 cycles up to here - extu.b r0,r0 - mov.l @r15+,r5 - or r6,r0 - mov.l @r15+,r6 - rts - rotcl r0 ! 28 cycles up to here - - .balign 4 -LOCAL(udiv_r8): ! 6 cycles up to here - mov.l r4,@-r15 - shll16 r4 - shll8 r4 - ! - shll r4 - mov r0,r1 - div1 r5,r1 - mov r4,r0 - rotcl r0 - mov.l @r15+,r4 - div1 r5,r1 - ! 12 cycles up to here - .rept 6 - rotcl r0; div1 r5,r1 - .endr - mov.l @r15+,r6 ! 24 cycles up to here - rts - rotcl r0 - - .balign 4 -LOCAL(div_ge32k): ! 6 cycles up to here - mov.l r7,@-r15 - swap.w r5,r6 - exts.b r6,r7 - exts.w r6,r6 - cmp/eq r6,r7 - extu.b r1,r6 - bf/s LOCAL(div_ge8m) - cmp/hi r1,r4 ! copy sign bit of r4 into T - rotcr r1 ! signed shift must use original sign from r4 - div0s r5,r4 - shad r0,r1 - shll8 r5 - div1 r5,r1 - mov r5,r7 ! detect r4 == 0x80000000 && r5 == 0x8000(00) - div1 r5,r1 - shlr8 r7 - div1 r5,r1 - swap.w r4,r0 - div1 r5,r1 - swap.b r0,r0 - div1 r5,r1 - or r0,r7 - div1 r5,r1 - add #-80,r7 - div1 r5,r1 - swap.w r7,r0 - div1 r5,r1 - or r0,r7 - extu.b r1,r0 - xor r6,r1 - xor r0,r1 - exts.b r0,r0 - div1 r5,r1 - extu.w r7,r7 - div1 r5,r1 - neg r7,r7 ! upper 16 bit of r7 == 0 if r4 == 0x80000000 && r5 == 0x8000 - div1 r5,r1 - and r0,r7 - div1 r5,r1 - swap.w r7,r7 ! 26 cycles up to here. - div1 r5,r1 - shll8 r0 - div1 r5,r1 - exts.w r7,r7 - div1 r5,r1 - add r0,r0 - div1 r5,r1 - sub r7,r0 - extu.b r1,r1 - mov.l @r15+,r7 - rotcl r1 - mov.l @r15+,r6 - add r1,r0 - mov #-8,r1 - rts - shad r1,r5 ! 34 cycles up to here - - .balign 4 -GLOBAL(udivsi3_i4i): - mov.l r6,@-r15 - extu.w r5,r6 - cmp/eq r5,r6 - mov #0x7f,r0 - bf LOCAL(udiv_ge64k) - cmp/hi r0,r5 - bf LOCAL(udiv_le128) - mov r4,r1 - shlr8 r1 - div0u - shlr r1 - shll16 r6 - div1 r6,r1 - extu.b r4,r0 ! 7 cycles up to here - .rept 8 - div1 r6,r1 - .endr ! 15 cycles up to here - xor r1,r0 ! xor dividend with result lsb - .rept 6 - div1 r6,r1 - .endr - mov.l r7,@-r15 ! 21 cycles up to here - div1 r6,r1 - extu.b r0,r7 - div1 r6,r1 - shll8 r7 - extu.w r1,r0 - xor r7,r1 ! replace lsb of result with lsb of dividend - div1 r6,r1 - mov #0,r7 - div1 r6,r1 - ! - div1 r6,r1 - bra LOCAL(div_end) - div1 r6,r1 ! 28 cycles up to here - - /* This is link-compatible with a GLOBAL(sdivsi3) call, - but we effectively clobber only r1, macl and mach */ - /* Because negative quotients are calculated as one's complements, - -0x80000000 divided by the smallest positive number of a number - range (0x80, 0x8000, 0x800000) causes saturation in the one's - complement representation, and we have to suppress the - one's -> two's complement adjustment. Since positive numbers - don't get such an adjustment, it's OK to also compute one's -> two's - complement adjustment suppression for a dividend of 0. */ - .balign 4 -GLOBAL(sdivsi3_i4i): - mov.l r6,@-r15 - exts.b r5,r6 - cmp/eq r5,r6 - mov #-1,r1 - bt/s LOCAL(div_le128) - cmp/pz r4 - addc r4,r1 - exts.w r5,r6 - cmp/eq r5,r6 - mov #-7,r0 - bf/s LOCAL(div_ge32k) - cmp/hi r1,r4 ! copy sign bit of r4 into T - rotcr r1 - shll16 r6 ! 7 cycles up to here - shad r0,r1 - div0s r5,r4 - div1 r6,r1 - mov.l r7,@-r15 - div1 r6,r1 - mov r4,r0 ! re-compute adjusted dividend - div1 r6,r1 - mov #-31,r7 - div1 r6,r1 - shad r7,r0 - div1 r6,r1 - add r4,r0 ! adjusted dividend - div1 r6,r1 - mov.l r8,@-r15 - div1 r6,r1 - swap.w r4,r8 ! detect special case r4 = 0x80000000, r5 = 0x80 - div1 r6,r1 - swap.b r8,r8 - xor r1,r0 ! xor dividend with result lsb - div1 r6,r1 - div1 r6,r1 - or r5,r8 - div1 r6,r1 - add #-0x80,r8 ! r8 is 0 iff there is a match - div1 r6,r1 - swap.w r8,r7 ! or upper 16 bits... - div1 r6,r1 - or r7,r8 !...into lower 16 bits - div1 r6,r1 - extu.w r8,r8 - div1 r6,r1 - extu.b r0,r7 - div1 r6,r1 - shll8 r7 - exts.w r1,r0 - xor r7,r1 ! replace lsb of result with lsb of dividend - div1 r6,r1 - neg r8,r8 ! upper 16 bits of r8 are now 0xffff iff we want end adjm. - div1 r6,r1 - and r0,r8 - div1 r6,r1 - swap.w r8,r7 - div1 r6,r1 - mov.l @r15+,r8 ! 58 insns, 29 cycles up to here -LOCAL(div_end): - div1 r6,r1 - shll8 r0 - div1 r6,r1 - exts.w r7,r7 - div1 r6,r1 - add r0,r0 - div1 r6,r1 - sub r7,r0 - extu.b r1,r1 - mov.l @r15+,r7 - rotcl r1 - mov.l @r15+,r6 - rts - add r1,r0 - - .balign 4 -LOCAL(udiv_le128): ! 4 cycles up to here (or 7 for mispredict) - mova LOCAL(div_table_inv),r0 - shll2 r6 - mov.l @(r0,r6),r1 - mova LOCAL(div_table_clz),r0 - lds r4,mach - ! - ! - ! - tst r1,r1 - ! - bt 0f - dmulu.l r1,r4 -0: mov.b @(r0,r5),r1 - clrt - ! - ! - sts mach,r0 - addc r4,r0 - rotcr r0 - mov.l @r15+,r6 - rts - shld r1,r0 - - .balign 4 -LOCAL(div_le128): ! 3 cycles up to here (or 6 for mispredict) - mova LOCAL(div_table_inv),r0 - shll2 r6 - mov.l @(r0,r6),r1 - mova LOCAL(div_table_clz),r0 - neg r4,r6 - bf 0f - mov r4,r6 -0: lds r6,mach - tst r1,r1 - bt 0f - dmulu.l r1,r6 -0: div0s r4,r5 - mov.b @(r0,r5),r1 - bt/s LOCAL(le128_neg) - clrt - ! - sts mach,r0 - addc r6,r0 - rotcr r0 - mov.l @r15+,r6 - rts - shld r1,r0 - -/* Could trap divide by zero for the cost of one cycle more mispredict penalty: -... - dmulu.l r1,r6 -0: div0s r4,r5 - bt/s LOCAL(le128_neg) - tst r5,r5 - bt LOCAL(div_by_zero) - mov.b @(r0,r5),r1 - sts mach,r0 - addc r6,r0 -... -LOCAL(div_by_zero): - trapa # - .balign 4 -LOCAL(le128_neg): - bt LOCAL(div_by_zero) - mov.b @(r0,r5),r1 - sts mach,r0 - addc r6,r0 -... */ - - .balign 4 -LOCAL(le128_neg): - sts mach,r0 - addc r6,r0 - rotcr r0 - mov.l @r15+,r6 - shad r1,r0 - rts - neg r0,r0 - ENDFUNC(GLOBAL(udivsi3_i4i)) - ENDFUNC(GLOBAL(sdivsi3_i4i)) - -/* This table has been generated by divtab-sh4.c. */ - .balign 4 - .byte -7 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -3 - .byte -3 - .byte -3 - .byte -3 - .byte -3 - .byte -3 - .byte -3 - .byte -3 - .byte -2 - .byte -2 - .byte -2 - .byte -2 - .byte -1 - .byte -1 - .byte 0 -LOCAL(div_table_clz): - .byte 0 - .byte 0 - .byte -1 - .byte -1 - .byte -2 - .byte -2 - .byte -2 - .byte -2 - .byte -3 - .byte -3 - .byte -3 - .byte -3 - .byte -3 - .byte -3 - .byte -3 - .byte -3 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -4 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -5 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 - .byte -6 -/* 1/-128 .. 1/127, normalized. There is an implicit leading 1 in bit 32, - or in bit 33 for powers of two. */ - .balign 4 - .long 0x0 - .long 0x2040811 - .long 0x4104105 - .long 0x624DD30 - .long 0x8421085 - .long 0xA6810A7 - .long 0xC9714FC - .long 0xECF56BF - .long 0x11111112 - .long 0x135C8114 - .long 0x15B1E5F8 - .long 0x18118119 - .long 0x1A7B9612 - .long 0x1CF06ADB - .long 0x1F7047DD - .long 0x21FB7813 - .long 0x24924925 - .long 0x27350B89 - .long 0x29E4129F - .long 0x2C9FB4D9 - .long 0x2F684BDB - .long 0x323E34A3 - .long 0x3521CFB3 - .long 0x38138139 - .long 0x3B13B13C - .long 0x3E22CBCF - .long 0x41414142 - .long 0x446F8657 - .long 0x47AE147B - .long 0x4AFD6A06 - .long 0x4E5E0A73 - .long 0x51D07EAF - .long 0x55555556 - .long 0x58ED2309 - .long 0x5C9882BA - .long 0x60581606 - .long 0x642C8591 - .long 0x68168169 - .long 0x6C16C16D - .long 0x702E05C1 - .long 0x745D1746 - .long 0x78A4C818 - .long 0x7D05F418 - .long 0x81818182 - .long 0x86186187 - .long 0x8ACB90F7 - .long 0x8F9C18FA - .long 0x948B0FCE - .long 0x9999999A - .long 0x9EC8E952 - .long 0xA41A41A5 - .long 0xA98EF607 - .long 0xAF286BCB - .long 0xB4E81B4F - .long 0xBACF914D - .long 0xC0E07039 - .long 0xC71C71C8 - .long 0xCD856891 - .long 0xD41D41D5 - .long 0xDAE6076C - .long 0xE1E1E1E2 - .long 0xE9131AC0 - .long 0xF07C1F08 - .long 0xF81F81F9 - .long 0x0 - .long 0x4104105 - .long 0x8421085 - .long 0xC9714FC - .long 0x11111112 - .long 0x15B1E5F8 - .long 0x1A7B9612 - .long 0x1F7047DD - .long 0x24924925 - .long 0x29E4129F - .long 0x2F684BDB - .long 0x3521CFB3 - .long 0x3B13B13C - .long 0x41414142 - .long 0x47AE147B - .long 0x4E5E0A73 - .long 0x55555556 - .long 0x5C9882BA - .long 0x642C8591 - .long 0x6C16C16D - .long 0x745D1746 - .long 0x7D05F418 - .long 0x86186187 - .long 0x8F9C18FA - .long 0x9999999A - .long 0xA41A41A5 - .long 0xAF286BCB - .long 0xBACF914D - .long 0xC71C71C8 - .long 0xD41D41D5 - .long 0xE1E1E1E2 - .long 0xF07C1F08 - .long 0x0 - .long 0x8421085 - .long 0x11111112 - .long 0x1A7B9612 - .long 0x24924925 - .long 0x2F684BDB - .long 0x3B13B13C - .long 0x47AE147B - .long 0x55555556 - .long 0x642C8591 - .long 0x745D1746 - .long 0x86186187 - .long 0x9999999A - .long 0xAF286BCB - .long 0xC71C71C8 - .long 0xE1E1E1E2 - .long 0x0 - .long 0x11111112 - .long 0x24924925 - .long 0x3B13B13C - .long 0x55555556 - .long 0x745D1746 - .long 0x9999999A - .long 0xC71C71C8 - .long 0x0 - .long 0x24924925 - .long 0x55555556 - .long 0x9999999A - .long 0x0 - .long 0x55555556 - .long 0x0 - .long 0x0 -LOCAL(div_table_inv): - .long 0x0 - .long 0x0 - .long 0x0 - .long 0x55555556 - .long 0x0 - .long 0x9999999A - .long 0x55555556 - .long 0x24924925 - .long 0x0 - .long 0xC71C71C8 - .long 0x9999999A - .long 0x745D1746 - .long 0x55555556 - .long 0x3B13B13C - .long 0x24924925 - .long 0x11111112 - .long 0x0 - .long 0xE1E1E1E2 - .long 0xC71C71C8 - .long 0xAF286BCB - .long 0x9999999A - .long 0x86186187 - .long 0x745D1746 - .long 0x642C8591 - .long 0x55555556 - .long 0x47AE147B - .long 0x3B13B13C - .long 0x2F684BDB - .long 0x24924925 - .long 0x1A7B9612 - .long 0x11111112 - .long 0x8421085 - .long 0x0 - .long 0xF07C1F08 - .long 0xE1E1E1E2 - .long 0xD41D41D5 - .long 0xC71C71C8 - .long 0xBACF914D - .long 0xAF286BCB - .long 0xA41A41A5 - .long 0x9999999A - .long 0x8F9C18FA - .long 0x86186187 - .long 0x7D05F418 - .long 0x745D1746 - .long 0x6C16C16D - .long 0x642C8591 - .long 0x5C9882BA - .long 0x55555556 - .long 0x4E5E0A73 - .long 0x47AE147B - .long 0x41414142 - .long 0x3B13B13C - .long 0x3521CFB3 - .long 0x2F684BDB - .long 0x29E4129F - .long 0x24924925 - .long 0x1F7047DD - .long 0x1A7B9612 - .long 0x15B1E5F8 - .long 0x11111112 - .long 0xC9714FC - .long 0x8421085 - .long 0x4104105 - .long 0x0 - .long 0xF81F81F9 - .long 0xF07C1F08 - .long 0xE9131AC0 - .long 0xE1E1E1E2 - .long 0xDAE6076C - .long 0xD41D41D5 - .long 0xCD856891 - .long 0xC71C71C8 - .long 0xC0E07039 - .long 0xBACF914D - .long 0xB4E81B4F - .long 0xAF286BCB - .long 0xA98EF607 - .long 0xA41A41A5 - .long 0x9EC8E952 - .long 0x9999999A - .long 0x948B0FCE - .long 0x8F9C18FA - .long 0x8ACB90F7 - .long 0x86186187 - .long 0x81818182 - .long 0x7D05F418 - .long 0x78A4C818 - .long 0x745D1746 - .long 0x702E05C1 - .long 0x6C16C16D - .long 0x68168169 - .long 0x642C8591 - .long 0x60581606 - .long 0x5C9882BA - .long 0x58ED2309 - .long 0x55555556 - .long 0x51D07EAF - .long 0x4E5E0A73 - .long 0x4AFD6A06 - .long 0x47AE147B - .long 0x446F8657 - .long 0x41414142 - .long 0x3E22CBCF - .long 0x3B13B13C - .long 0x38138139 - .long 0x3521CFB3 - .long 0x323E34A3 - .long 0x2F684BDB - .long 0x2C9FB4D9 - .long 0x29E4129F - .long 0x27350B89 - .long 0x24924925 - .long 0x21FB7813 - .long 0x1F7047DD - .long 0x1CF06ADB - .long 0x1A7B9612 - .long 0x18118119 - .long 0x15B1E5F8 - .long 0x135C8114 - .long 0x11111112 - .long 0xECF56BF - .long 0xC9714FC - .long 0xA6810A7 - .long 0x8421085 - .long 0x624DD30 - .long 0x4104105 - .long 0x2040811 - /* maximum error: 0.987342 scaled: 0.921875*/ - -#endif /* SH3 / SH4 */ - -#endif /* L_div_table */ -#endif /* !__SHMEDIA__ */ diff --git a/gcc/config/sh/lib1funcs-Os-4-200.asm b/gcc/config/sh/lib1funcs-Os-4-200.asm deleted file mode 100644 index aae57ccd36c..00000000000 --- a/gcc/config/sh/lib1funcs-Os-4-200.asm +++ /dev/null @@ -1,322 +0,0 @@ -/* Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -This file 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. - -This file 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* Moderately Space-optimized libgcc routines for the Renesas SH / - STMicroelectronics ST40 CPUs. - Contributed by J"orn Rennecke joern.rennecke@st.com. */ - -#include "lib1funcs.h" - -#if !__SHMEDIA__ -#ifdef L_udivsi3_i4i - -/* 88 bytes; sh4-200 cycle counts: - divisor >= 2G: 11 cycles - dividend < 2G: 48 cycles - dividend >= 2G: divisor != 1: 54 cycles - dividend >= 2G, divisor == 1: 22 cycles */ -#if defined (__SH_FPU_DOUBLE__) || defined (__SH4_SINGLE_ONLY__) -!! args in r4 and r5, result in r0, clobber r1 - - .global GLOBAL(udivsi3_i4i) - FUNC(GLOBAL(udivsi3_i4i)) -GLOBAL(udivsi3_i4i): - mova L1,r0 - cmp/pz r5 - sts fpscr,r1 - lds.l @r0+,fpscr - sts.l fpul,@-r15 - bf LOCAL(huge_divisor) - mov.l r1,@-r15 - lds r4,fpul - cmp/pz r4 -#ifdef FMOVD_WORKS - fmov.d dr0,@-r15 - float fpul,dr0 - fmov.d dr2,@-r15 - bt LOCAL(dividend_adjusted) - mov #1,r1 - fmov.d @r0,dr2 - cmp/eq r1,r5 - bt LOCAL(div_by_1) - fadd dr2,dr0 -LOCAL(dividend_adjusted): - lds r5,fpul - float fpul,dr2 - fdiv dr2,dr0 -LOCAL(div_by_1): - fmov.d @r15+,dr2 - ftrc dr0,fpul - fmov.d @r15+,dr0 -#else /* !FMOVD_WORKS */ - fmov.s DR01,@-r15 - mov #1,r1 - fmov.s DR00,@-r15 - float fpul,dr0 - fmov.s DR21,@-r15 - bt/s LOCAL(dividend_adjusted) - fmov.s DR20,@-r15 - cmp/eq r1,r5 - bt LOCAL(div_by_1) - fmov.s @r0+,DR20 - fmov.s @r0,DR21 - fadd dr2,dr0 -LOCAL(dividend_adjusted): - lds r5,fpul - float fpul,dr2 - fdiv dr2,dr0 -LOCAL(div_by_1): - fmov.s @r15+,DR20 - fmov.s @r15+,DR21 - ftrc dr0,fpul - fmov.s @r15+,DR00 - fmov.s @r15+,DR01 -#endif /* !FMOVD_WORKS */ - lds.l @r15+,fpscr - sts fpul,r0 - rts - lds.l @r15+,fpul - -#ifdef FMOVD_WORKS - .p2align 3 ! make double below 8 byte aligned. -#endif -LOCAL(huge_divisor): - lds r1,fpscr - add #4,r15 - cmp/hs r5,r4 - rts - movt r0 - - .p2align 2 -L1: -#ifndef FMOVD_WORKS - .long 0x80000 -#else - .long 0x180000 -#endif - .double 4294967296 - - ENDFUNC(GLOBAL(udivsi3_i4i)) -#elif !defined (__sh1__) /* !__SH_FPU_DOUBLE__ */ - -#if 0 -/* With 36 bytes, the following would probably be the most compact - implementation, but with 139 cycles on an sh4-200, it is extremely slow. */ -GLOBAL(udivsi3_i4i): - mov.l r2,@-r15 - mov #0,r1 - div0u - mov r1,r2 - mov.l r3,@-r15 - mov r1,r3 - sett - mov r4,r0 -LOCAL(loop): - rotcr r2 - ; - bt/s LOCAL(end) - cmp/gt r2,r3 - rotcl r0 - bra LOCAL(loop) - div1 r5,r1 -LOCAL(end): - rotcl r0 - mov.l @r15+,r3 - rts - mov.l @r15+,r2 -#endif /* 0 */ - -/* Size: 186 bytes jointly for udivsi3_i4i and sdivsi3_i4i - sh4-200 run times: - udiv small divisor: 55 cycles - udiv large divisor: 52 cycles - sdiv small divisor, positive result: 59 cycles - sdiv large divisor, positive result: 56 cycles - sdiv small divisor, negative result: 65 cycles (*) - sdiv large divisor, negative result: 62 cycles (*) - (*): r2 is restored in the rts delay slot and has a lingering latency - of two more cycles. */ - .balign 4 - .global GLOBAL(udivsi3_i4i) - FUNC(GLOBAL(udivsi3_i4i)) - FUNC(GLOBAL(sdivsi3_i4i)) -GLOBAL(udivsi3_i4i): - sts pr,r1 - mov.l r4,@-r15 - extu.w r5,r0 - cmp/eq r5,r0 - swap.w r4,r0 - shlr16 r4 - bf/s LOCAL(large_divisor) - div0u - mov.l r5,@-r15 - shll16 r5 -LOCAL(sdiv_small_divisor): - div1 r5,r4 - bsr LOCAL(div6) - div1 r5,r4 - div1 r5,r4 - bsr LOCAL(div6) - div1 r5,r4 - xtrct r4,r0 - xtrct r0,r4 - bsr LOCAL(div7) - swap.w r4,r4 - div1 r5,r4 - bsr LOCAL(div7) - div1 r5,r4 - xtrct r4,r0 - mov.l @r15+,r5 - swap.w r0,r0 - mov.l @r15+,r4 - jmp @r1 - rotcl r0 -LOCAL(div7): - div1 r5,r4 -LOCAL(div6): - div1 r5,r4; div1 r5,r4; div1 r5,r4 - div1 r5,r4; div1 r5,r4; rts; div1 r5,r4 - -LOCAL(divx3): - rotcl r0 - div1 r5,r4 - rotcl r0 - div1 r5,r4 - rotcl r0 - rts - div1 r5,r4 - -LOCAL(large_divisor): - mov.l r5,@-r15 -LOCAL(sdiv_large_divisor): - xor r4,r0 - .rept 4 - rotcl r0 - bsr LOCAL(divx3) - div1 r5,r4 - .endr - mov.l @r15+,r5 - mov.l @r15+,r4 - jmp @r1 - rotcl r0 - ENDFUNC(GLOBAL(udivsi3_i4i)) - - .global GLOBAL(sdivsi3_i4i) -GLOBAL(sdivsi3_i4i): - mov.l r4,@-r15 - cmp/pz r5 - mov.l r5,@-r15 - bt/s LOCAL(pos_divisor) - cmp/pz r4 - neg r5,r5 - extu.w r5,r0 - bt/s LOCAL(neg_result) - cmp/eq r5,r0 - neg r4,r4 -LOCAL(pos_result): - swap.w r4,r0 - bra LOCAL(sdiv_check_divisor) - sts pr,r1 -LOCAL(pos_divisor): - extu.w r5,r0 - bt/s LOCAL(pos_result) - cmp/eq r5,r0 - neg r4,r4 -LOCAL(neg_result): - mova LOCAL(negate_result),r0 - ; - mov r0,r1 - swap.w r4,r0 - lds r2,macl - sts pr,r2 -LOCAL(sdiv_check_divisor): - shlr16 r4 - bf/s LOCAL(sdiv_large_divisor) - div0u - bra LOCAL(sdiv_small_divisor) - shll16 r5 - .balign 4 -LOCAL(negate_result): - neg r0,r0 - jmp @r2 - sts macl,r2 - ENDFUNC(GLOBAL(sdivsi3_i4i)) -#endif /* !__SH_FPU_DOUBLE__ */ -#endif /* L_udivsi3_i4i */ - -#ifdef L_sdivsi3_i4i -#if defined (__SH_FPU_DOUBLE__) || defined (__SH4_SINGLE_ONLY__) -/* 48 bytes, 45 cycles on sh4-200 */ -!! args in r4 and r5, result in r0, clobber r1 - - .global GLOBAL(sdivsi3_i4i) - FUNC(GLOBAL(sdivsi3_i4i)) -GLOBAL(sdivsi3_i4i): - sts.l fpscr,@-r15 - sts fpul,r1 - mova L1,r0 - lds.l @r0+,fpscr - lds r4,fpul -#ifdef FMOVD_WORKS - fmov.d dr0,@-r15 - float fpul,dr0 - lds r5,fpul - fmov.d dr2,@-r15 -#else - fmov.s DR01,@-r15 - fmov.s DR00,@-r15 - float fpul,dr0 - lds r5,fpul - fmov.s DR21,@-r15 - fmov.s DR20,@-r15 -#endif - float fpul,dr2 - fdiv dr2,dr0 -#ifdef FMOVD_WORKS - fmov.d @r15+,dr2 -#else - fmov.s @r15+,DR20 - fmov.s @r15+,DR21 -#endif - ftrc dr0,fpul -#ifdef FMOVD_WORKS - fmov.d @r15+,dr0 -#else - fmov.s @r15+,DR00 - fmov.s @r15+,DR01 -#endif - lds.l @r15+,fpscr - sts fpul,r0 - rts - lds r1,fpul - - .p2align 2 -L1: -#ifndef FMOVD_WORKS - .long 0x80000 -#else - .long 0x180000 -#endif - - ENDFUNC(GLOBAL(sdivsi3_i4i)) -#endif /* __SH_FPU_DOUBLE__ */ -#endif /* L_sdivsi3_i4i */ -#endif /* !__SHMEDIA__ */ diff --git a/gcc/config/sh/t-elf b/gcc/config/sh/t-elf deleted file mode 100644 index 333efb54e09..00000000000 --- a/gcc/config/sh/t-elf +++ /dev/null @@ -1,10 +0,0 @@ -EXTRA_MULTILIB_PARTS= crt1.o crti.o crtn.o \ - crtbegin.o crtend.o crtbeginS.o crtendS.o $(IC_EXTRA_PARTS) $(OPT_EXTRA_PARTS) - -# Compile crtbeginS.o and crtendS.o with pic. -CRTSTUFF_T_CFLAGS_S = -fPIC - -# Don't compile libgcc with -fpic for now. It's unlikely that we'll -# build shared libraries for embedded SH. -# Linux / Netbsd will already have set TARGET_LIBGCC2_CFLAGS. -# TARGET_LIBGCC2_CFLAGS = -fpic diff --git a/gcc/config/sh/t-linux b/gcc/config/sh/t-linux index 13ff848dd7c..a5c711618c6 100644 --- a/gcc/config/sh/t-linux +++ b/gcc/config/sh/t-linux @@ -4,5 +4,3 @@ LIB2FUNCS_EXTRA= $(srcdir)/config/sh/linux-atomic.asm MULTILIB_DIRNAMES= MULTILIB_MATCHES = - -EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o diff --git a/gcc/config/sh/t-linux64 b/gcc/config/sh/t-linux64 deleted file mode 100644 index 126b0163754..00000000000 --- a/gcc/config/sh/t-linux64 +++ /dev/null @@ -1 +0,0 @@ -EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o diff --git a/gcc/config/sh/t-netbsd b/gcc/config/sh/t-netbsd index 11bfe31458e..de172d3f73f 100644 --- a/gcc/config/sh/t-netbsd +++ b/gcc/config/sh/t-netbsd @@ -20,5 +20,3 @@ TARGET_LIBGCC2_CFLAGS = -fpic -mieee LIB1ASMFUNCS_CACHE = _ic_invalidate LIB2FUNCS_EXTRA= - -EXTRA_MULTILIB_PARTS= diff --git a/gcc/config/sh/t-sh b/gcc/config/sh/t-sh index e63131a5348..6eaf784e8ae 100644 --- a/gcc/config/sh/t-sh +++ b/gcc/config/sh/t-sh @@ -94,55 +94,9 @@ MULTILIB_OSDIRNAMES = \ LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib -$(T)crt1.o: $(srcdir)/config/sh/crt1.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crt1.o -x assembler-with-cpp $(srcdir)/config/sh/crt1.asm -$(T)crti.o: $(srcdir)/config/sh/crti.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/sh/crti.asm -$(T)crtn.o: $(srcdir)/config/sh/crtn.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/sh/crtn.asm - $(out_object_file): gt-sh.h gt-sh.h : s-gtype ; @true -# These are not suitable for COFF. -# EXTRA_MULTILIB_PARTS= crt1.o crti.o crtn.o crtbegin.o crtend.o - -IC_EXTRA_PARTS= libic_invalidate_array_4-100.a libic_invalidate_array_4-200.a \ -libic_invalidate_array_4a.a -OPT_EXTRA_PARTS= libgcc-Os-4-200.a libgcc-4-300.a -EXTRA_MULTILIB_PARTS= $(IC_EXTRA_PARTS) $(OPT_EXTRA_PARTS) - -$(T)ic_invalidate_array_4-100.o: $(srcdir)/config/sh/lib1funcs.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)ic_invalidate_array_4-100.o -DL_ic_invalidate_array -DWAYS=1 -DWAY_SIZE=0x2000 -x assembler-with-cpp $(srcdir)/config/sh/lib1funcs.asm -$(T)libic_invalidate_array_4-100.a: $(T)ic_invalidate_array_4-100.o $(GCC_PASSES) - $(AR_CREATE_FOR_TARGET) $(T)libic_invalidate_array_4-100.a $(T)ic_invalidate_array_4-100.o - -$(T)ic_invalidate_array_4-200.o: $(srcdir)/config/sh/lib1funcs.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)ic_invalidate_array_4-200.o -DL_ic_invalidate_array -DWAYS=2 -DWAY_SIZE=0x2000 -x assembler-with-cpp $(srcdir)/config/sh/lib1funcs.asm -$(T)libic_invalidate_array_4-200.a: $(T)ic_invalidate_array_4-200.o $(GCC_PASSES) - $(AR_CREATE_FOR_TARGET) $(T)libic_invalidate_array_4-200.a $(T)ic_invalidate_array_4-200.o - -$(T)ic_invalidate_array_4a.o: $(srcdir)/config/sh/lib1funcs.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)ic_invalidate_array_4a.o -DL_ic_invalidate_array -D__FORCE_SH4A__ -x assembler-with-cpp $(srcdir)/config/sh/lib1funcs.asm -$(T)libic_invalidate_array_4a.a: $(T)ic_invalidate_array_4a.o $(GCC_PASSES) - $(AR_CREATE_FOR_TARGET) $(T)libic_invalidate_array_4a.a $(T)ic_invalidate_array_4a.o - -$(T)sdivsi3_i4i-Os-4-200.o: $(srcdir)/config/sh/lib1funcs-Os-4-200.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $@ -DL_sdivsi3_i4i -x assembler-with-cpp $< -$(T)udivsi3_i4i-Os-4-200.o: $(srcdir)/config/sh/lib1funcs-Os-4-200.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $@ -DL_udivsi3_i4i -x assembler-with-cpp $< -$(T)unwind-dw2-Os-4-200.o: $(srcdir)/../libgcc/unwind-dw2.c $(srcdir)/../libgcc/unwind-generic.h $(srcdir)/../libgcc/unwind-pe.h $(srcdir)/../libgcc/unwind.inc $(srcdir)/../libgcc/unwind-dw2-fde.h $(srcdir)/../libgcc/unwind-dw2.h $(CONFIG_H) coretypes.h $(TM_H) $(MACHMODE_H) longlong.h config.status stmp-int-hdrs tsystem.h $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) $(LIBGCC2_CFLAGS) $(INCLUDES) $(vis_hide) -fexceptions -Os -c -o $@ $< -OBJS_Os_4_200=$(T)sdivsi3_i4i-Os-4-200.o $(T)udivsi3_i4i-Os-4-200.o $(T)unwind-dw2-Os-4-200.o -$(T)libgcc-Os-4-200.a: $(OBJS_Os_4_200) $(GCC_PASSES) - $(AR_CREATE_FOR_TARGET) $@ $(OBJS_Os_4_200) - -$(T)div_table-4-300.o: $(srcdir)/config/sh/lib1funcs-4-300.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $@ -DL_div_table -x assembler-with-cpp $< - -$(T)libgcc-4-300.a: $(T)div_table-4-300.o $(GCC_PASSES) - $(AR_CREATE_FOR_TARGET) $@ $(T)div_table-4-300.o - # Local Variables: # mode: Makefile # End: diff --git a/gcc/config/sh/t-superh b/gcc/config/sh/t-superh deleted file mode 100644 index 4e2d83dcba0..00000000000 --- a/gcc/config/sh/t-superh +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2005, 2006 Free Software Foundation, Inc. -# -# This file is part of GCC. -# -# GCC 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. -# -# GCC 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 GCC; see the file COPYING3. If not see -# <http://www.gnu.org/licenses/>. - -EXTRA_MULTILIB_PARTS= crt1.o crti.o crtn.o \ - crtbegin.o crtend.o crtbeginS.o crtendS.o \ - crt1-mmu.o gcrt1-mmu.o gcrt1.o $(IC_EXTRA_PARTS) $(OPT_EXTRA_PARTS) - -# Compile crt1-mmu.o as crt1.o with -DMMU_SUPPORT -$(T)crt1-mmu.o: $(srcdir)/config/sh/crt1.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crt1-mmu.o -DMMU_SUPPORT -x assembler-with-cpp $(srcdir)/config/sh/crt1.asm - -# Compile gcrt1-mmu.o as crt1-mmu.o with -DPROFILE -$(T)gcrt1-mmu.o: $(srcdir)/config/sh/crt1.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)gcrt1-mmu.o -DPROFILE -DMMU_SUPPORT -x assembler-with-cpp $(srcdir)/config/sh/crt1.asm - -# For sh4-400: Compile gcrt1.o as crt1.o with -DPROFILE -$(T)gcrt1.o: $(srcdir)/config/sh/crt1.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)gcrt1.o -DPROFILE -x assembler-with-cpp $(srcdir)/config/sh/crt1.asm diff --git a/gcc/config/sh/t-vxworks b/gcc/config/sh/t-vxworks index 66aa7091ab1..d7ccc9b7f59 100644 --- a/gcc/config/sh/t-vxworks +++ b/gcc/config/sh/t-vxworks @@ -4,6 +4,3 @@ MULTILIB_OPTIONS = mrtp fPIC m2/m3/m4/m4a ml # Don't build -fPIC without -mrtp, or -ml without -m3/-m4. MULTILIB_EXCEPTIONS = fPIC* ml* mrtp/ml* mrtp/fPIC/ml* *m2/ml* MULTILIB_MATCHES = m2=m4-nofpu fPIC=fpic - -# Restore a variable from t-vxworks clobbered by t-elf. -EXTRA_MULTILIB_PARTS = diff --git a/gcc/config/sparc/t-linux64 b/gcc/config/sparc/t-linux64 index 74d04898d9f..7d5781d32ed 100644 --- a/gcc/config/sparc/t-linux64 +++ b/gcc/config/sparc/t-linux64 @@ -1,5 +1,5 @@ # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, -# 2006, 2010 Free Software Foundation, Inc. +# 2006, 2010, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -30,7 +30,3 @@ MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR) LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib - -CRTSTUFF_T_CFLAGS = `if test x$$($(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) \ - -print-multi-os-directory) \ - = x../lib64; then echo -mcmodel=medany; fi` diff --git a/gcc/config/spu/cache.S b/gcc/config/spu/cache.S deleted file mode 100644 index 9ffb6a0d194..00000000000 --- a/gcc/config/spu/cache.S +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 2008, 2009 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC 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. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - - .data - .p2align 7 - .global __cache -__cache: - .rept __CACHE_SIZE__ * 8 - .fill 128 - .endr - - .p2align 7 - .global __cache_tag_array -__cache_tag_array: - .rept __CACHE_SIZE__ * 2 - .long 1, 1, 1, 1 - .fill 128-16 - .endr -__end_cache_tag_array: - - .globl __cache_tag_array_size - .set __cache_tag_array_size, __end_cache_tag_array-__cache_tag_array - diff --git a/gcc/config/spu/cachemgr.c b/gcc/config/spu/cachemgr.c deleted file mode 100644 index e7abd5e62db..00000000000 --- a/gcc/config/spu/cachemgr.c +++ /dev/null @@ -1,438 +0,0 @@ -/* Copyright (C) 2008, 2009 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC 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. - -GCC 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -#include <spu_mfcio.h> -#include <spu_internals.h> -#include <spu_intrinsics.h> -#include <spu_cache.h> - -extern unsigned long long __ea_local_store; -extern char __cache_tag_array_size; - -#define LINE_SIZE 128 -#define TAG_MASK (LINE_SIZE - 1) - -#define WAYS 4 -#define SET_MASK ((int) &__cache_tag_array_size - LINE_SIZE) - -#define CACHE_LINES ((int) &__cache_tag_array_size / \ - sizeof (struct __cache_tag_array) * WAYS) - -struct __cache_tag_array -{ - unsigned int tag_lo[WAYS]; - unsigned int tag_hi[WAYS]; - void *base[WAYS]; - int reserved[WAYS]; - vector unsigned short dirty_bits[WAYS]; -}; - -extern struct __cache_tag_array __cache_tag_array[]; -extern char __cache[]; - -/* In order to make the code seem a little cleaner, and to avoid having - 64/32 bit ifdefs all over the place, we use macros. */ - -#ifdef __EA64__ -typedef unsigned long long addr; - -#define CHECK_TAG(_entry, _way, _tag) \ - ((_entry)->tag_lo[(_way)] == ((_tag) & 0xFFFFFFFF) \ - && (_entry)->tag_hi[(_way)] == ((_tag) >> 32)) - -#define GET_TAG(_entry, _way) \ - ((unsigned long long)(_entry)->tag_hi[(_way)] << 32 \ - | (unsigned long long)(_entry)->tag_lo[(_way)]) - -#define SET_TAG(_entry, _way, _tag) \ - (_entry)->tag_lo[(_way)] = (_tag) & 0xFFFFFFFF; \ - (_entry)->tag_hi[(_way)] = (_tag) >> 32 - -#else /*__EA32__*/ -typedef unsigned long addr; - -#define CHECK_TAG(_entry, _way, _tag) \ - ((_entry)->tag_lo[(_way)] == (_tag)) - -#define GET_TAG(_entry, _way) \ - ((_entry)->tag_lo[(_way)]) - -#define SET_TAG(_entry, _way, _tag) \ - (_entry)->tag_lo[(_way)] = (_tag) - -#endif - -/* In GET_ENTRY, we cast away the high 32 bits, - as the tag is only in the low 32. */ - -#define GET_ENTRY(_addr) \ - ((struct __cache_tag_array *) \ - si_to_uint (si_a (si_and (si_from_uint ((unsigned int) (addr) (_addr)), \ - si_from_uint (SET_MASK)), \ - si_from_uint ((unsigned int) __cache_tag_array)))) - -#define GET_CACHE_LINE(_addr, _way) \ - ((void *) (__cache + ((_addr) & SET_MASK) * WAYS) + ((_way) * LINE_SIZE)); - -#define CHECK_DIRTY(_vec) (si_to_uint (si_orx ((qword) (_vec)))) -#define SET_EMPTY(_entry, _way) ((_entry)->tag_lo[(_way)] = 1) -#define CHECK_EMPTY(_entry, _way) ((_entry)->tag_lo[(_way)] == 1) - -#define LS_FLAG 0x80000000 -#define SET_IS_LS(_entry, _way) ((_entry)->reserved[(_way)] |= LS_FLAG) -#define CHECK_IS_LS(_entry, _way) ((_entry)->reserved[(_way)] & LS_FLAG) -#define GET_LRU(_entry, _way) ((_entry)->reserved[(_way)] & ~LS_FLAG) - -static int dma_tag = 32; - -static void -__cache_evict_entry (struct __cache_tag_array *entry, int way) -{ - addr tag = GET_TAG (entry, way); - - if (CHECK_DIRTY (entry->dirty_bits[way]) && !CHECK_IS_LS (entry, way)) - { -#ifdef NONATOMIC - /* Non-atomic writes. */ - unsigned int oldmask, mach_stat; - char *line = ((void *) 0); - - /* Enter critical section. */ - mach_stat = spu_readch (SPU_RdMachStat); - spu_idisable (); - - /* Issue DMA request. */ - line = GET_CACHE_LINE (entry->tag_lo[way], way); - mfc_put (line, tag, LINE_SIZE, dma_tag, 0, 0); - - /* Wait for DMA completion. */ - oldmask = mfc_read_tag_mask (); - mfc_write_tag_mask (1 << dma_tag); - mfc_read_tag_status_all (); - mfc_write_tag_mask (oldmask); - - /* Leave critical section. */ - if (__builtin_expect (mach_stat & 1, 0)) - spu_ienable (); -#else - /* Allocate a buffer large enough that we know it has 128 bytes - that are 128 byte aligned (for DMA). */ - - char buffer[LINE_SIZE + 127]; - qword *buf_ptr = (qword *) (((unsigned int) (buffer) + 127) & ~127); - qword *line = GET_CACHE_LINE (entry->tag_lo[way], way); - qword bits; - unsigned int mach_stat; - - /* Enter critical section. */ - mach_stat = spu_readch (SPU_RdMachStat); - spu_idisable (); - - do - { - /* We atomically read the current memory into a buffer - modify the dirty bytes in the buffer, and write it - back. If writeback fails, loop and try again. */ - - mfc_getllar (buf_ptr, tag, 0, 0); - mfc_read_atomic_status (); - - /* The method we're using to write 16 dirty bytes into - the buffer at a time uses fsmb which in turn uses - the least significant 16 bits of word 0, so we - load the bits and rotate so that the first bit of - the bitmap is in the first bit that fsmb will use. */ - - bits = (qword) entry->dirty_bits[way]; - bits = si_rotqbyi (bits, -2); - - /* Si_fsmb creates the mask of dirty bytes. - Use selb to nab the appropriate bits. */ - buf_ptr[0] = si_selb (buf_ptr[0], line[0], si_fsmb (bits)); - - /* Rotate to next 16 byte section of cache. */ - bits = si_rotqbyi (bits, 2); - - buf_ptr[1] = si_selb (buf_ptr[1], line[1], si_fsmb (bits)); - bits = si_rotqbyi (bits, 2); - buf_ptr[2] = si_selb (buf_ptr[2], line[2], si_fsmb (bits)); - bits = si_rotqbyi (bits, 2); - buf_ptr[3] = si_selb (buf_ptr[3], line[3], si_fsmb (bits)); - bits = si_rotqbyi (bits, 2); - buf_ptr[4] = si_selb (buf_ptr[4], line[4], si_fsmb (bits)); - bits = si_rotqbyi (bits, 2); - buf_ptr[5] = si_selb (buf_ptr[5], line[5], si_fsmb (bits)); - bits = si_rotqbyi (bits, 2); - buf_ptr[6] = si_selb (buf_ptr[6], line[6], si_fsmb (bits)); - bits = si_rotqbyi (bits, 2); - buf_ptr[7] = si_selb (buf_ptr[7], line[7], si_fsmb (bits)); - bits = si_rotqbyi (bits, 2); - - mfc_putllc (buf_ptr, tag, 0, 0); - } - while (mfc_read_atomic_status ()); - - /* Leave critical section. */ - if (__builtin_expect (mach_stat & 1, 0)) - spu_ienable (); -#endif - } - - /* In any case, marking the lo tag with 1 which denotes empty. */ - SET_EMPTY (entry, way); - entry->dirty_bits[way] = (vector unsigned short) si_from_uint (0); -} - -void -__cache_evict (__ea void *ea) -{ - addr tag = (addr) ea & ~TAG_MASK; - struct __cache_tag_array *entry = GET_ENTRY (ea); - int i = 0; - - /* Cycles through all the possible ways an address could be at - and evicts the way if found. */ - - for (i = 0; i < WAYS; i++) - if (CHECK_TAG (entry, i, tag)) - __cache_evict_entry (entry, i); -} - -static void * -__cache_fill (int way, addr tag) -{ - unsigned int oldmask, mach_stat; - char *line = ((void *) 0); - - /* Reserve our DMA tag. */ - if (dma_tag == 32) - dma_tag = mfc_tag_reserve (); - - /* Enter critical section. */ - mach_stat = spu_readch (SPU_RdMachStat); - spu_idisable (); - - /* Issue DMA request. */ - line = GET_CACHE_LINE (tag, way); - mfc_get (line, tag, LINE_SIZE, dma_tag, 0, 0); - - /* Wait for DMA completion. */ - oldmask = mfc_read_tag_mask (); - mfc_write_tag_mask (1 << dma_tag); - mfc_read_tag_status_all (); - mfc_write_tag_mask (oldmask); - - /* Leave critical section. */ - if (__builtin_expect (mach_stat & 1, 0)) - spu_ienable (); - - return (void *) line; -} - -static void -__cache_miss (__ea void *ea, struct __cache_tag_array *entry, int way) -{ - - addr tag = (addr) ea & ~TAG_MASK; - unsigned int lru = 0; - int i = 0; - int idx = 0; - - /* If way > 4, then there are no empty slots, so we must evict - the least recently used entry. */ - if (way >= 4) - { - for (i = 0; i < WAYS; i++) - { - if (GET_LRU (entry, i) > lru) - { - lru = GET_LRU (entry, i); - idx = i; - } - } - __cache_evict_entry (entry, idx); - way = idx; - } - - /* Set the empty entry's tag and fill it's cache line. */ - - SET_TAG (entry, way, tag); - entry->reserved[way] = 0; - - /* Check if the address is just an effective address within the - SPU's local store. */ - - /* Because the LS is not 256k aligned, we can't do a nice and mask - here to compare, so we must check the whole range. */ - - if ((addr) ea >= (addr) __ea_local_store - && (addr) ea < (addr) (__ea_local_store + 0x40000)) - { - SET_IS_LS (entry, way); - entry->base[way] = - (void *) ((unsigned int) ((addr) ea - - (addr) __ea_local_store) & ~0x7f); - } - else - { - entry->base[way] = __cache_fill (way, tag); - } -} - -void * -__cache_fetch_dirty (__ea void *ea, int n_bytes_dirty) -{ -#ifdef __EA64__ - unsigned int tag_hi; - qword etag_hi; -#endif - unsigned int tag_lo; - struct __cache_tag_array *entry; - - qword etag_lo; - qword equal; - qword bit_mask; - qword way; - - /* This first chunk, we merely fill the pointer and tag. */ - - entry = GET_ENTRY (ea); - -#ifndef __EA64__ - tag_lo = - si_to_uint (si_andc - (si_shufb - (si_from_uint ((addr) ea), si_from_uint (0), - si_from_uint (0x00010203)), si_from_uint (TAG_MASK))); -#else - tag_lo = - si_to_uint (si_andc - (si_shufb - (si_from_ullong ((addr) ea), si_from_uint (0), - si_from_uint (0x04050607)), si_from_uint (TAG_MASK))); - - tag_hi = - si_to_uint (si_shufb - (si_from_ullong ((addr) ea), si_from_uint (0), - si_from_uint (0x00010203))); -#endif - - /* Increment LRU in reserved bytes. */ - si_stqd (si_ai (si_lqd (si_from_ptr (entry), 48), 1), - si_from_ptr (entry), 48); - -missreturn: - /* Check if the entry's lo_tag is equal to the address' lo_tag. */ - etag_lo = si_lqd (si_from_ptr (entry), 0); - equal = si_ceq (etag_lo, si_from_uint (tag_lo)); -#ifdef __EA64__ - /* And the high tag too. */ - etag_hi = si_lqd (si_from_ptr (entry), 16); - equal = si_and (equal, (si_ceq (etag_hi, si_from_uint (tag_hi)))); -#endif - - if ((si_to_uint (si_orx (equal)) == 0)) - goto misshandler; - - if (n_bytes_dirty) - { - /* way = 0x40,0x50,0x60,0x70 for each way, which is also the - offset of the appropriate dirty bits. */ - way = si_shli (si_clz (si_gbb (equal)), 2); - - /* To create the bit_mask, we set it to all 1s (uint -1), then we - shift it over (128 - n_bytes_dirty) times. */ - - bit_mask = si_from_uint (-1); - - bit_mask = - si_shlqby (bit_mask, si_from_uint ((LINE_SIZE - n_bytes_dirty) / 8)); - - bit_mask = - si_shlqbi (bit_mask, si_from_uint ((LINE_SIZE - n_bytes_dirty) % 8)); - - /* Rotate it around to the correct offset. */ - bit_mask = - si_rotqby (bit_mask, - si_from_uint (-1 * ((addr) ea & TAG_MASK) / 8)); - - bit_mask = - si_rotqbi (bit_mask, - si_from_uint (-1 * ((addr) ea & TAG_MASK) % 8)); - - /* Update the dirty bits. */ - si_stqx (si_or (si_lqx (si_from_ptr (entry), way), bit_mask), - si_from_ptr (entry), way); - }; - - /* We've definitely found the right entry, set LRU (reserved) to 0 - maintaining the LS flag (MSB). */ - - si_stqd (si_andc - (si_lqd (si_from_ptr (entry), 48), - si_and (equal, si_from_uint (~(LS_FLAG)))), - si_from_ptr (entry), 48); - - return (void *) - si_to_uint (si_a - (si_orx - (si_and (si_lqd (si_from_ptr (entry), 32), equal)), - si_from_uint (((unsigned int) (addr) ea) & TAG_MASK))); - -misshandler: - equal = si_ceqi (etag_lo, 1); - __cache_miss (ea, entry, (si_to_uint (si_clz (si_gbb (equal))) - 16) >> 2); - goto missreturn; -} - -void * -__cache_fetch (__ea void *ea) -{ - return __cache_fetch_dirty (ea, 0); -} - -void -__cache_touch (__ea void *ea __attribute__ ((unused))) -{ - /* NO-OP for now. */ -} - -void __cache_flush (void) __attribute__ ((destructor)); -void -__cache_flush (void) -{ - struct __cache_tag_array *entry = __cache_tag_array; - unsigned int i; - int j; - - /* Cycle through each cache entry and evict all used ways. */ - - for (i = 0; i < CACHE_LINES / WAYS; i++) - { - for (j = 0; j < WAYS; j++) - if (!CHECK_EMPTY (entry, j)) - __cache_evict_entry (entry, j); - - entry++; - } -} diff --git a/gcc/config/spu/t-spu-elf b/gcc/config/spu/t-spu-elf index b48106efed2..b1660353ee6 100644 --- a/gcc/config/spu/t-spu-elf +++ b/gcc/config/spu/t-spu-elf @@ -43,43 +43,9 @@ LIB2FUNCS_STATIC_EXTRA = $(srcdir)/config/spu/float_unssidf.c \ # integer data types. LIB2_SIDITI_CONV_FUNCS=yes -# Don't let CTOR_LIST end up in sdata section. -CRTSTUFF_T_CFLAGS = - # Multi-lib support. MULTILIB_OPTIONS=mea64 -# Neither gcc or newlib seem to have a standard way to generate multiple -# crt*.o files. So we don't use the standard crt0.o name anymore. - -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o libgcc_cachemgr.a libgcc_cachemgr_nonatomic.a \ - libgcc_cache8k.a libgcc_cache16k.a libgcc_cache32k.a libgcc_cache64k.a libgcc_cache128k.a - -$(T)cachemgr.o: $(srcdir)/config/spu/cachemgr.c - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(MULTILIB_CFLAGS) -c $< -o $@ - -# Specialised rule to add a -D flag. -$(T)cachemgr_nonatomic.o: $(srcdir)/config/spu/cachemgr.c - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(MULTILIB_CFLAGS) -DNONATOMIC -c $< -o $@ - -$(T)libgcc_%.a: $(T)%.o - $(AR_FOR_TARGET) -rcs $@ $< - -$(T)cache8k.o: $(srcdir)/config/spu/cache.S - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -D__CACHE_SIZE__=8 -o $@ -c $< - -$(T)cache16k.o: $(srcdir)/config/spu/cache.S - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -D__CACHE_SIZE__=16 -o $@ -c $< - -$(T)cache32k.o: $(srcdir)/config/spu/cache.S - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -D__CACHE_SIZE__=32 -o $@ -c $< - -$(T)cache64k.o: $(srcdir)/config/spu/cache.S - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -D__CACHE_SIZE__=64 -o $@ -c $< - -$(T)cache128k.o: $(srcdir)/config/spu/cache.S - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -D__CACHE_SIZE__=128 -o $@ -c $< - LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib diff --git a/gcc/config/t-freebsd b/gcc/config/t-freebsd index 0680618a6ec..26316be1efb 100644 --- a/gcc/config/t-freebsd +++ b/gcc/config/t-freebsd @@ -1,5 +1,2 @@ -# Compile crtbeginS.o and crtendS.o with pic. -CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC - # Compile libgcc.a with pic. TARGET_LIBGCC2_CFLAGS += -fPIC diff --git a/gcc/config/t-libc-ok b/gcc/config/t-libc-ok deleted file mode 100644 index 561ee0b31d1..00000000000 --- a/gcc/config/t-libc-ok +++ /dev/null @@ -1 +0,0 @@ -CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC diff --git a/gcc/config/t-linux b/gcc/config/t-linux index 5fb71c98f9d..a5ef25c423b 100644 --- a/gcc/config/t-linux +++ b/gcc/config/t-linux @@ -17,7 +17,5 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -# Compile crtbeginS.o and crtendS.o with pic. -CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC # Compile libgcc2.a with pic. TARGET_LIBGCC2_CFLAGS = -fPIC diff --git a/gcc/config/t-lynx b/gcc/config/t-lynx index ab6d2675c4f..4825164ca31 100644 --- a/gcc/config/t-lynx +++ b/gcc/config/t-lynx @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2007 Free Software Foundation, Inc. +# Copyright (C) 2004, 2007, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -16,9 +16,6 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -# Compile crtbeginS.o and crtendS.o with pic. -CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC - # Compile libgcc2.a with pic. TARGET_LIBGCC2_CFLAGS = -fPIC diff --git a/gcc/config/t-netbsd b/gcc/config/t-netbsd deleted file mode 100644 index 34949e12858..00000000000 --- a/gcc/config/t-netbsd +++ /dev/null @@ -1,2 +0,0 @@ -# Always build crtstuff with PIC. -CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC diff --git a/gcc/config/t-svr4 b/gcc/config/t-svr4 index 6e75eea1f6e..5f38f56c9fe 100644 --- a/gcc/config/t-svr4 +++ b/gcc/config/t-svr4 @@ -4,5 +4,4 @@ # we will be doing that, we just always use -fPIC when compiling the # routines in crtstuff.c. Likewise for libgcc2.c. -CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC TARGET_LIBGCC2_CFLAGS = -fPIC diff --git a/gcc/config/t-vxworks b/gcc/config/t-vxworks index e200d932095..d29ab66d8bf 100644 --- a/gcc/config/t-vxworks +++ b/gcc/config/t-vxworks @@ -1,5 +1,5 @@ # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, -# 2009, 2010 Free Software Foundation, Inc. +# 2009, 2010, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -46,8 +46,6 @@ LIBGCC2_INCLUDES = -nostdinc -I \ # Both the kernel and RTP headers provide limits.h. LIMITS_H_TEST = true -EXTRA_MULTILIB_PARTS = - vxworks.o: $(srcdir)/config/vxworks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TARGET_H) output.h $(TM_H) $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff --git a/gcc/config/vms/t-vms b/gcc/config/vms/t-vms index 516435df1f9..2ebcfd713c9 100644 --- a/gcc/config/vms/t-vms +++ b/gcc/config/vms/t-vms @@ -1,4 +1,4 @@ -# Copyright (C) 2009, 2010 +# Copyright (C) 2009, 2010, 2011 # Free Software Foundation, Inc. # # This file is part of GCC. @@ -24,17 +24,6 @@ LIMITS_H_TEST = false # Under VMS, directory names cannot contain dots. version:=$(shell echo $(BASEVER_c) | sed -e 's/\./_/g') -VMS_EXTRA_PARTS=vcrt0.o pcrt0.o - -# Assemble startup files. -$(T)vcrt0.o: $(srcdir)/config/vms/vms-ucrt0.c $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)vcrt0.o $(srcdir)/config/vms/vms-ucrt0.c - -$(T)pcrt0.o: $(srcdir)/config/vms/vms-ucrt0.c $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)pcrt0.o -DCRT0_POSIX_EXIT $(srcdir)/config/vms/vms-ucrt0.c - vms-crtlmap.h: $(srcdir)/config/vms/vms-crtlmap.map \ $(srcdir)/config/vms/make-crtlmap.awk $(AWK) -f $(srcdir)/config/vms/make-crtlmap.awk \ diff --git a/gcc/config/vms/vms-ucrt0.c b/gcc/config/vms/vms-ucrt0.c deleted file mode 100644 index 344b59520e0..00000000000 --- a/gcc/config/vms/vms-ucrt0.c +++ /dev/null @@ -1,127 +0,0 @@ -/* VMS crt0 returning Unix style condition codes. - Copyright (C) 2001, 2009, 2010 Free Software Foundation, Inc. - Contributed by Douglas B. Rupp (rupp@gnat.com). - - This file is part of GCC. - - GCC 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. - - GCC 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. - - Under Section 7 of GPL version 3, you are granted additional - permissions described in the GCC Runtime Library Exception, version - 3.1, as published by the Free Software Foundation. - - You should have received a copy of the GNU General Public License and - a copy of the GCC Runtime Library Exception along with this program; - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - <http://www.gnu.org/licenses/>. */ - -#include <stdlib.h> - -/* Lots of cheat to handle 32bits/64bits pointer conversions. - We use 'long long' for 64 bits pointers and 'int' for 32 bits pointers. */ - -extern void decc$main (void *arg1, void *arg2, void *arg3, - void *image_file_desc, void *arg5, void *arg6, - int *, int *, int *); -extern int main (int, char **, char **); -extern int _malloc32 (int); - -#ifdef __ia64__ -#define MAIN_ASM_NAME asm ("ELF$TFRADR") -#else -#define MAIN_ASM_NAME -#endif - -int __main (void *arg1, void *arg2, void *arg3, - void *image_file_desc, void *arg5, void *arg6) MAIN_ASM_NAME; - -/* From errnodef.h, but we need to emulate the globalval. */ -extern int C$_EXIT1; - -/* From stsdef.h */ -#define STS$V_MSG_NO 0x03 -#define STS$M_INHIB_MSG 0x10000000 - -/* From ssdef.h */ -#define SS$_NORMAL 1 - -int -__main (void *arg1, void *arg2, void *arg3, - void *image_file_desc, void *arg5, void *arg6) -{ - int argc; - int argv; - int envp; - int status; - int i; - long long *long_argv; - long long *long_envp; - - /* The argv and envp arrays are 32 bits pointers to 32 bits pointers. */ - decc$main (arg1, arg2, arg3, image_file_desc, - arg5, arg6, &argc, &argv, &envp); - - if (sizeof (void *) == 8) - { - /* Reallocate argv and envp with 64 bit pointers. */ - long_argv = (long long *) - (long long) _malloc32 (sizeof (long long) * (argc + 1)); - - for (i = 0; i < argc; i++) - long_argv[i] = ((int *) (long long) argv)[i]; - - long_argv[argc] = 0; - - for (i = 0; ((int *) (long long) envp)[i]; i++) - ; - long_envp = (long long *) - (long long) _malloc32 (sizeof (long long) * (i + 1)); - - for (i = 0; ((int *) (long long) envp)[i]; i++) - long_envp[i] = ((int *) (long long) envp)[i]; - - long_envp[i] = 0; - } - else - { - long_argv = (long long *) argv; - long_envp = (long long *) envp; - } - status = main (argc, (char **)long_argv, (char **)long_envp); - -#ifdef CRT0_POSIX_EXIT - /* Map into a range of 0 - 255. */ - status = status & 255; - - if (status > 0) - { - int save_status = status; - - status = (long) &C$_EXIT1 + ((status - 1) << STS$V_MSG_NO); - - /* An exit failure status requires a "severe" error. All status values - are defined in errno with a successful (1) severity but can be - changed to an error (2) severity by adding 1. In addition for - compatibility with UNIX exit() routines we inhibit a run-time error - message from being generated on exit(1). */ - - if (save_status == 1) - { - status++; - status |= STS$M_INHIB_MSG; - } - } - else - status = SS$_NORMAL; -#endif /* CRT0_POSIX_EXIT */ - - return status; -} diff --git a/gcc/config/xtensa/crti.asm b/gcc/config/xtensa/crti.asm deleted file mode 100644 index cbe91b0e748..00000000000 --- a/gcc/config/xtensa/crti.asm +++ /dev/null @@ -1,51 +0,0 @@ -# Start .init and .fini sections. -# Copyright (C) 2003, 2009 Free Software Foundation, Inc. -# -# This file 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. -# -# GCC 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. -# -# Under Section 7 of GPL version 3, you are granted additional -# permissions described in the GCC Runtime Library Exception, version -# 3.1, as published by the Free Software Foundation. -# -# You should have received a copy of the GNU General Public License and -# a copy of the GCC Runtime Library Exception along with this program; -# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -# <http://www.gnu.org/licenses/>. - -# This file just makes a stack frame for the contents of the .fini and -# .init sections. Users may put any desired instructions in those -# sections. - -#include "xtensa-config.h" - - .section .init - .globl _init - .type _init,@function - .align 4 -_init: -#if XCHAL_HAVE_WINDOWED && !__XTENSA_CALL0_ABI__ - entry sp, 64 -#else - addi sp, sp, -32 - s32i a0, sp, 0 -#endif - - .section .fini - .globl _fini - .type _fini,@function - .align 4 -_fini: -#if XCHAL_HAVE_WINDOWED && !__XTENSA_CALL0_ABI__ - entry sp, 64 -#else - addi sp, sp, -32 - s32i a0, sp, 0 -#endif diff --git a/gcc/config/xtensa/crtn.asm b/gcc/config/xtensa/crtn.asm deleted file mode 100644 index 413cfa0ac10..00000000000 --- a/gcc/config/xtensa/crtn.asm +++ /dev/null @@ -1,46 +0,0 @@ -# End of .init and .fini sections. -# Copyright (C) 2003, 2009 Free Software Foundation, Inc. -# -# This file 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. -# -# GCC 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. -# -# Under Section 7 of GPL version 3, you are granted additional -# permissions described in the GCC Runtime Library Exception, version -# 3.1, as published by the Free Software Foundation. -# -# You should have received a copy of the GNU General Public License and -# a copy of the GCC Runtime Library Exception along with this program; -# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -# <http://www.gnu.org/licenses/>. - - -# This file just makes sure that the .fini and .init sections do in -# fact return. Users may put any desired instructions in those sections. -# This file is the last thing linked into any executable. - -#include "xtensa-config.h" - - .section .init -#if XCHAL_HAVE_WINDOWED && !__XTENSA_CALL0_ABI__ - retw -#else - l32i a0, sp, 0 - addi sp, sp, 32 - ret -#endif - - .section .fini -#if XCHAL_HAVE_WINDOWED && !__XTENSA_CALL0_ABI__ - retw -#else - l32i a0, sp, 0 - addi sp, sp, 32 - ret -#endif diff --git a/gcc/config/xtensa/t-elf b/gcc/config/xtensa/t-elf index 7d6cd1a3a9b..76f4ef3f304 100644 --- a/gcc/config/xtensa/t-elf +++ b/gcc/config/xtensa/t-elf @@ -1,6 +1 @@ -# Build CRT files and libgcc with the "longcalls" option -CRTSTUFF_T_CFLAGS += -mlongcalls -CRTSTUFF_T_CFLAGS_S += -mlongcalls TARGET_LIBGCC2_CFLAGS += -mlongcalls - -EXTRA_MULTILIB_PARTS = crti.o crtn.o crtbegin.o crtend.o diff --git a/gcc/config/xtensa/t-linux b/gcc/config/xtensa/t-linux deleted file mode 100644 index 7d39351fa66..00000000000 --- a/gcc/config/xtensa/t-linux +++ /dev/null @@ -1 +0,0 @@ -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o diff --git a/gcc/config/xtensa/t-xtensa b/gcc/config/xtensa/t-xtensa index 641e6fe7620..c0a7cb5202f 100644 --- a/gcc/config/xtensa/t-xtensa +++ b/gcc/config/xtensa/t-xtensa @@ -31,11 +31,4 @@ LIB1ASMFUNCS = _mulsi3 _divsi3 _modsi3 _udivsi3 _umodsi3 \ LIB2FUNCS_EXTRA = $(srcdir)/config/xtensa/lib2funcs.S -$(T)crti.o: $(srcdir)/config/xtensa/crti.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/xtensa/crti.asm -$(T)crtn.o: $(srcdir)/config/xtensa/crtn.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/xtensa/crtn.asm - $(out_object_file): gt-xtensa.h |