Commit 9129c8cf by Oleg Endo

crt1.S: Remove SH5 support.

libgcc/
	* config/sh/crt1.S: Remove SH5 support.
	* config/sh/crti.S: Likewise.
	* config/sh/crtn.S: Likewise.
	* config/sh/lib1funcs-4-300.S: Likewise.
	* config/sh/lib1funcs-Os-4-200.S: Likewise.
	* config/sh/lib1funcs.S: Likewise.
	* config/sh/linux-unwind.h: Likewise.
	* config/sh/t-sh64: Delete.

From-SVN: r235640
parent cca535a4
2016-04-29 Oleg Endo <olegendo@gcc.gnu.org>
* config/sh/crt1.S: Remove SH5 support.
* config/sh/crti.S: Likewise.
* config/sh/crtn.S: Likewise.
* config/sh/lib1funcs-4-300.S: Likewise.
* config/sh/lib1funcs-Os-4-200.S: Likewise.
* config/sh/lib1funcs.S: Likewise.
* config/sh/linux-unwind.h: Likewise.
* config/sh/t-sh64: Delete.
2016-04-29 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/ieee-754/eqdf2.S: Handle FPX NaN.
......
......@@ -47,19 +47,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#endif
.global GLOBAL(_init)
GLOBAL(_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
......@@ -78,7 +65,6 @@ GLOBAL(_init):
0: .long _GLOBAL_OFFSET_TABLE_
1:
#endif
#endif /* __SHMEDIA__ */
.section .fini
/* The alignment below can't be smaller, otherwise the mova below
......@@ -92,19 +78,6 @@ GLOBAL(_init):
#endif
.global GLOBAL(_fini)
GLOBAL(_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
......@@ -123,4 +96,3 @@ GLOBAL(_fini):
0: .long _GLOBAL_OFFSET_TABLE_
1:
#endif
#endif /* __SHMEDIA__ */
......@@ -25,20 +25,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
/* See an explanation about .init and .fini in crti.S. */
.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
......@@ -48,23 +34,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#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
......@@ -74,4 +45,3 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#else
nop
#endif
#endif /* __SHMEDIA__ */
......@@ -25,7 +25,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#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. */
......@@ -933,4 +932,3 @@ LOCAL(div_table_inv):
#endif /* SH3 / SH4 */
#endif /* L_div_table */
#endif /* !__SHMEDIA__ */
......@@ -25,7 +25,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "lib1funcs.h"
#if !__SHMEDIA__
#ifdef L_udivsi3_i4i
/* 88 bytes; sh4-200 cycle counts:
......@@ -319,4 +318,3 @@ L1:
ENDFUNC(GLOBAL(sdivsi3_i4i))
#endif /* __SH_FPU_DOUBLE__ */
#endif /* L_sdivsi3_i4i */
#endif /* !__SHMEDIA__ */
......@@ -33,14 +33,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include <sys/ucontext.h>
#include "insn-constants.h"
# if defined (__SH5__)
#define SH_DWARF_FRAME_GP0 0
#define SH_DWARF_FRAME_FP0 77
#define SH_DWARF_FRAME_BT0 68
#define SH_DWARF_FRAME_PR_MEDIA 18
#define SH_DWARF_FRAME_SR 65
#define SH_DWARF_FRAME_FPSCR 76
#else
#define SH_DWARF_FRAME_GP0 0
#define SH_DWARF_FRAME_FP0 25
#define SH_DWARF_FRAME_XD0 87
......@@ -52,96 +44,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define SH_DWARF_FRAME_SR 22
#define SH_DWARF_FRAME_FPUL 23
#define SH_DWARF_FRAME_FPSCR 24
#endif /* defined (__SH5__) */
#if defined (__SH5__)
#define MD_FALLBACK_FRAME_STATE_FOR shmedia_fallback_frame_state
static _Unwind_Reason_Code
shmedia_fallback_frame_state (struct _Unwind_Context *context,
_Unwind_FrameState *fs)
{
unsigned char *pc = context->ra;
struct sigcontext *sc;
long new_cfa;
int i, r;
/* movi 0x10,r9; shori 0x77,r9; trapa r9; nop (sigreturn) */
/* movi 0x10,r9; shori 0xad,r9; trapa r9; nop (rt_sigreturn) */
if ((*(unsigned long *) (pc-1) == 0xcc004090)
&& (*(unsigned long *) (pc+3) == 0xc801dc90)
&& (*(unsigned long *) (pc+7) == 0x6c91fff0)
&& (*(unsigned long *) (pc+11) == 0x6ff0fff0))
sc = context->cfa;
else if ((*(unsigned long *) (pc-1) == 0xcc004090)
&& (*(unsigned long *) (pc+3) == 0xc802b490)
&& (*(unsigned long *) (pc+7) == 0x6c91fff0)
&& (*(unsigned long *) (pc+11) == 0x6ff0fff0))
{
struct rt_sigframe {
siginfo_t *pinfo;
void *puc;
siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
The aliasing warning is correct, but should not be a problem
because it does not alias anything. */
sc = (struct sigcontext *) (void *) &rt_->uc.uc_mcontext;
}
else
return _URC_END_OF_STACK;
new_cfa = sc->sc_regs[15];
fs->regs.cfa_how = CFA_REG_OFFSET;
fs->regs.cfa_reg = 15;
fs->regs.cfa_offset = new_cfa - (long) context->cfa;
for (i = 0; i < 63; i++)
{
if (i == 15)
continue;
fs->regs.reg[i].how = REG_SAVED_OFFSET;
fs->regs.reg[i].loc.offset
= (long)&(sc->sc_regs[i]) - new_cfa;
}
fs->regs.reg[SH_DWARF_FRAME_SR].how = REG_SAVED_OFFSET;
fs->regs.reg[SH_DWARF_FRAME_SR].loc.offset
= (long)&(sc->sc_sr) - new_cfa;
r = SH_DWARF_FRAME_BT0;
for (i = 0; i < 8; i++)
{
fs->regs.reg[r+i].how = REG_SAVED_OFFSET;
fs->regs.reg[r+i].loc.offset
= (long)&(sc->sc_tregs[i]) - new_cfa;
}
r = SH_DWARF_FRAME_FP0;
for (i = 0; i < 32; i++)
{
fs->regs.reg[r+i].how = REG_SAVED_OFFSET;
fs->regs.reg[r+i].loc.offset
= (long)&(sc->sc_fpregs[i]) - new_cfa;
}
fs->regs.reg[SH_DWARF_FRAME_FPSCR].how = REG_SAVED_OFFSET;
fs->regs.reg[SH_DWARF_FRAME_FPSCR].loc.offset
= (long)&(sc->sc_fpscr) - new_cfa;
/* We use the slot for the zero register to save return address. */
fs->regs.reg[63].how = REG_SAVED_OFFSET;
fs->regs.reg[63].loc.offset
= (long)&(sc->sc_pc) - new_cfa;
fs->retaddr_column = 63;
fs->signal_frame = 1;
return _URC_NO_REASON;
}
#else /* defined (__SH5__) */
#define MD_FALLBACK_FRAME_STATE_FOR sh_fallback_frame_state
......@@ -250,6 +152,5 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
fs->signal_frame = 1;
return _URC_NO_REASON;
}
#endif /* defined (__SH5__) */
#endif /* inhibit_libc */
LIB1ASMFUNCS = \
_sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
_shcompact_call_trampoline _shcompact_return_trampoline \
_shcompact_incoming_args _ic_invalidate _nested_trampoline \
_push_pop_shmedia_regs \
_udivdi3 _divdi3 _umoddi3 _moddi3 _div_table
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment