aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/v850
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2011-11-02 15:03:19 +0000
committerRainer Orth <ro@gcc.gnu.org>2011-11-02 15:03:19 +0000
commit45b86625d7edd2278c0cdcf335e007a47671813f (patch)
treebfbde9a54f663fb7556b9dacd07709ef97c1961c /gcc/config/v850
parent5f73c6ccf0d9c54714b162b9d314594311747de9 (diff)
downloadgcc-45b86625d7edd2278c0cdcf335e007a47671813f.zip
gcc-45b86625d7edd2278c0cdcf335e007a47671813f.tar.gz
gcc-45b86625d7edd2278c0cdcf335e007a47671813f.tar.bz2
Move libgcc1 to toplevel libgcc
gcc: * Makefile.in (LIB1ASMSRC): Don't export. (libgcc.mvars): Don't emit LIB1ASMFUNCS, LIB1ASMSRC. * config/arm/arm.c: Update lib1funcs.asm filename. * config/arm/linux-eabi.h: Likewise. * config/arm/bpabi-v6m.S, config/arm/bpabi.S, config/arm/ieee754-df.S, config/arm/ieee754-sf.S: Move to ../libgcc/config/arm. * config/arm/lib1funcs.asm: Move to ../libgcc/config/arm/lib1funcs.S. * config/arm/t-arm (LIB1ASMSRC, LIB1ASMFUNCS): Remove. * config/arm/t-arm-elf (LIB1ASMFUNCS): Remove. * config/arm/t-bpabi: Likewise. * config/arm/t-linux (LIB1ASMSRC, LIB1ASMFUNCS): Remove. * config/arm/t-linux-eabi (LIB1ASMFUNCS): Remove. * config/arm/t-strongarm-elf: Likewise. * config/arm/t-symbian: Likewise. * config/arm/t-vxworks: Likewise. * config/arm/t-wince-pe: Likewise. * config/avr/libgcc.S: Move to ../libgcc/config/avr. * config/avr/t-avr (LIB1ASMSRC, LIB1ASMFUNCS): Remove. * config/bfin/lib1funcs.asm: Move to ../libgcc/config/bfin/lib1funcs.S. * config/bfin/t-bfin: Remove. * config/bfin/t-bfin-elf (LIB1ASMSRC, LIB1ASMFUNCS): Remove. * config/bfin/t-bfin-linux: Likewise. * config/bfin/t-bfin-uclinux: Likewise. * config/c6x/lib1funcs.asm: Move to ../libgcc/config/c6x/lib1funcs.S. * config/c6x/t-c6x-elf (LIB1ASMSRC, LIB1ASMFUNCS): Remove. * config/fr30/lib1funcs.asm: Move to ../libgcc/config/fr30/lib1funcs.S. * config/fr30/t-fr30 (LIB1ASMSRC, LIB1ASMFUNCS): Remove. * config/frv/lib1funcs.asm: Move to ../libgcc/config/frv/lib1funcs.S. * config/frv/t-frv (CROSS_LIBGCC1, LIB1ASMSRC, LIB1ASMFUNCS): Remove. * config/h8300/fixunssfsi.c: Update lib1funcs.asm filename. * config/h8300/lib1funcs.asm: Move to ../libgcc/config/h8300/lib1funcs.S. * config/h8300/t-h8300 (LIB1ASMSRC, LIB1ASMFUNCS): Remove. * config/i386/cygwin.asm: Move to ../libgcc/config/i386/cygwin.S. * config/i386/t-cygming (LIB1ASMSRC, LIB1ASMFUNCS): Remove. * config/i386/t-interix: Likewise. * config/ia64/lib1funcs.asm: Move to ../libgcc/config/ia64/lib1funcs.S. * config/ia64/t-hpux (LIB1ASMFUNCS, LIBGCC1_TEST): Remove. * config/ia64/t-ia64 (LIB1ASMSRC, LIB1ASMFUNCS): Remove. * config/iq2000/t-iq2000 (LIBGCC1, CROSS_LIBGCC1): Remove. * config/m32c/m32c.c: Update m32c-lib1.S filename. * config/m32c/m32c-lib1.S: Move to ../libgcc/config/m32c/lib1funcs.S. * config/m32c/t-m32c (LIB1ASMSRC, LIB1ASMFUNCS): Remove. * config/m32r/t-linux (CROSS_LIBGCC1, LIBGCC1, LIBGCC1_TEST): Remove. * config/m68k/lb1sf68.asm: Move to ../libgcc/config/m68k/lb1sf68.S. * config/m68k/t-floatlib (LIB1ASMSRC, LIB1ASMFUNCS): New file. * config/mcore/lib1.asm: Move to ../libgcc/config/mcore/lib1funcs.S. * config/mcore/t-mcore (LIB1ASMSRC, LIB1ASMFUNCS): Remove. * config/mep/mep-lib1.asm: Move to ../libgcc/config/mep/lib1funcs.S. * config/mep/t-mep (LIB1ASMSRC, LIB1ASMFUNCS): Remove. * config/mips/mips16.S: Move to ../libgcc/config/mips. * config/mips/t-libgcc-mips16: Remove. * config/mips/t-sr71k (LIBGCC1, CROSS_LIBGCC1): Remove. * config/pa/milli64.S: Move to ../libgcc/config/pa. * config/pa/t-linux (LIB1ASMFUNCS, LIB1ASMSRC): Remove. * config/pa/t-linux64: Likewise. * config/picochip/libgccExtras/fake_libgcc.asm: Move to ../libgcc/config/picochip/lib1funcs.S. * config/picochip/t-picochip (LIB1ASMFUNCS, LIB1ASMSRC): Remove. * config/sh/lib1funcs.asm: Move to ../libgcc/config/sh/lib1funcs.S. * config/sh/lib1funcs.h: Move to ../libgcc/config/sh. * config/sh/sh.h: Update lib1funcs.asm filename. * config/sh/t-linux (LIB1ASMFUNCS_CACHE): Remove. * config/sh/t-netbsd: Likewise. * config/sh/t-sh (LIB1ASMSRC, LIB1ASMFUNCS, LIB1ASMFUNCS_CACHE): Remove. * config/sh/t-sh64 (LIB1ASMFUNCS): Remove. * config/sparc/lb1spc.asm: Move to ../libgcc/config/sparc/lb1spc.S. * config/sparc/lb1spl.asm: Remove. * config/sparc/t-elf (LIB1ASMSRC, LIB1ASMFUNCS): Remove. * config/sparc/t-leon: Likewise. * config/spu/t-spu-elf (LIBGCC1, CROSS_LIBGCC1): Remove. * config/v850/lib1funcs.asm: Move to ../libgcc/config/v850/lib1funcs.S. * config/v850/t-v850 (LIB1ASMSRC, LIB1ASMFUNCS): Remove * config/vax/lib1funcs.asm: Move to ../libgcc/config/vax/lib1funcs.S. * config/vax/t-linux: Remove. * config/xtensa/ieee754-df.S, config/xtensa/ieee754-sf.S: Move to ../libgcc/config/xtensa. * config/xtensa/lib1funcs.asm: Move to ../libgcc/config/xtensa/lib1funcs.S. * config/xtensa/t-xtensa (LIB1ASMSRC, LIB1ASMFUNCS): Remove. * config.gcc (bfin*-rtems*): Remove bfin/t-bfin from tmake_file. (bfin*-*): Likewise. (mips64*-*-linux*, mipsisa64*-*-linux*): Remove mips/t-libgcc-mips16 from tmake_file. (mips*-*-linux*): Likewise. (mips*-sde-elf*): Likewise. (mipsisa32-*-elf*, mipsisa32el-*-elf*, mipsisa32r2-*-elf*) (mipsisa32r2el-*-elf*, mipsisa64-*-elf*, mipsisa64el-*-elf*) (mipsisa64r2-*-elf*, mipsisa64r2el-*-elf*): Likewise. (mipsisa64sb1-*-elf*, mipsisa64sb1el-*-elf*): Likewise. (mips-*-elf*, mipsel-*-elf*): Likewise. (mips64-*-elf*, mips64el-*-elf*): Likewise. (mips64orion-*-elf*, mips64orionel-*-elf*): Likewise. (mips*-*-rtems*): Likewise. (mipstx39-*-elf*, mipstx39el-*-elf*): Likewise. (vax-*-linux*): Remove vax/t-linux from tmake_file. libgcc: * Makefile.in ($(lib1asmfuncs-o), $(lib1asmfuncs-s-o)): Use $(srcdir) to refer to $(LIB1ASMSRC). Use $<. * config/arm/bpabi-v6m.S, config/arm/bpabi.S, config/arm/ieee754-df.S, config/arm/ieee754-sf.S, config/arm/lib1funcs.S: New files. * config/arm/libunwind.S [!__symbian__]: Use lib1funcs.S. * config/arm/t-arm: New file. * config/arm/t-bpabi (LIB1ASMFUNCS): Set. * config/arm/t-elf, config/arm/t-linux, config/arm/t-linux-eabi, config/arm/t-strongarm-elf: New files. * config/arm/t-symbian (LIB1ASMFUNCS): Set. * config/arm/t-vxworks, config/arm/t-wince-pe: New files. * config/avr/lib1funcs.S: New file. * config/avr/t-avr (LIB1ASMSRC, LIB1ASMFUNCS): Set. * config/bfin/lib1funcs.S, config/bfin/t-bfin: New files. * config/c6x/lib1funcs.S: New file. * config/c6x/t-elf (LIB1ASMSRC, LIB1ASMFUNCS): Set. * config/fr30/lib1funcs.S, config/fr30/t-fr30: New files. * config/frv/lib1funcs.S: New file. * config/frv/t-frv (LIB1ASMSRC, LIB1ASMFUNCS): Set. * config/h8300/lib1funcs.S, config/h8300/t-h8300: New files. * config/i386/cygwin.S, config/i386/t-chkstk: New files. * config/ia64/__divxf3.asm: Rename to ... * config/ia64/__divxf3.S: ... this. Adapt lib1funcs.asm filename. * config/ia64/_fixtfdi.asm: Rename to ... * config/ia64/_fixtfdi.S: ... this. Adapt lib1funcs.asm filename. * config/ia64/_fixunstfdi.asm: Rename to ... * config/ia64/_fixunstfdi.S: ... this. Adapt lib1funcs.asm filename. * config/ia64/_floatditf.asm: Rename to ... * config/ia64/_floatditf.S: ... this. Adapt lib1funcs.asm filename. * config/ia64/lib1funcs.S: New file. * config/ia64/t-hpux (LIB1ASMFUNCS): Set. * config/ia64/t-ia64 (LIB1ASMSRC, LIB1ASMFUNCS): Set. * config/ia64/t-softfp-compat (libgcc1-tf-compats): Adapt suffix. * config/m32c/lib1funcs.S, config/m32c/t-m32c: New files. * config/m68k/lb1sf68.S, config/m68k/t-floatlib: New files. * config/mcore/lib1funcs.S, config/mcore/t-mcore: New files. * config/mep/lib1funcs.S: New file. * config/mep/t-mep (LIB1ASMSRC, LIB1ASMFUNCS): Set. * config/mips/mips16.S: New file. * config/mips/t-mips16 (LIB1ASMSRC, LIB1ASMFUNCS): Set. * config/pa/milli64.S: New file. * config/pa/t-linux, config/pa/t-linux64: New files. * config/picochip/lib1funcs.S: New file. * config/picochip/t-picochip (LIB1ASMSRC, LIB1ASMFUNCS): Set. * config/sh/lib1funcs.S, config/sh/lib1funcs.h: New files. * config/sh/t-linux (LIB1ASMFUNCS_CACHE): Set. * config/sh/t-netbsd: New file. * config/sh/t-sh (LIB1ASMSRC, LIB1ASMFUNCS, LIB1ASMFUNCS_CACHE): Set. Use $(srcdir) to refer to lib1funcs.S, adapt filename. * config/sh/t-sh64: New file. * config/sparc/lb1spc.S: New file. * config/sparc/t-softmul (LIB1ASMSRC): Adapt sparc/lb1spc.asm filename. * config/v850/lib1funcs.S, config/v850/t-v850: New files. * config/vax/lib1funcs.S, config/vax/t-linux: New files. * config/xtensa/ieee754-df.S, config/xtensa/ieee754-sf.S, config/xtensa/lib1funcs.S: New files. * config/xtensa/t-xtensa (LIB1ASMSRC, LIB1ASMFUNCS): Set. * config.host (arm-wrs-vxworks): Add arm/t-arm, arm/t-vxworks to tmake_file. (arm*-*-freebsd*): Add arm/t-arm, arm/t-strongarm-elf to tmake_file. (arm*-*-netbsdelf*): Add arm/t-arm to tmake_file. (arm*-*-linux*): Likewise. Add arm/t-elf, arm/t-bpabi, arm/t-linux-eabi to tmake_file for arm*-*-linux-*eabi, add arm/t-linux otherwise. (arm*-*-uclinux*): Add arm/t-arm, arm/t-elf to tmake_file. (arm*-*-ecos-elf): Likewise. (arm*-*-eabi*, arm*-*-symbianelf*): Likewise. (arm*-*-rtems*): Likewise. (arm*-*-elf): Likewise. (arm*-wince-pe*): Add arm/t-arm, arm/t-wince-pe to tmake_file. (avr-*-rtems*): Add to tmake_file, add avr/t-avr. (bfin*-elf*): Add bfin/t-bfin to tmake_file. (bfin*-uclinux*): Likewise. (bfin*-linux-uclibc*): Likewise. (bfin*-rtems*): Likewise. (bfin*-*): Likewise. (fido-*-elf): Merge into m68k-*-elf*. (fr30-*-elf)): Add fr30/t-fr30 to tmake_file. (frv-*-*linux*): Add frv/t-frv to tmake_file. (h8300-*-rtems*): Add h8300/t-h8300 to tmake_file. (h8300-*-elf*): Likewise. (hppa*64*-*-linux*): Add pa/t-linux, pa/t-linux64 to tmake_file. (hppa*-*-linux*): Add pa/t-linux to tmake_file. (i[34567]86-*-cygwin*): Add i386/t-chkstk to tmake_file. (i[34567]86-*-mingw*): Likewise. (x86_64-*-mingw*): Likewise. (i[34567]86-*-interix3*): Likewise. (ia64*-*-hpux*): Add ia64/t-ia64, ia64/t-hpux to tmake_file. (ia64-hp-*vms*): Add ia64/t-ia64 to tmake_file. (m68k-*-elf*): Also handle fido-*-elf. Add m68k/t-floatlib to tmake_file. (m68k-*-uclinux*): Add m68k/t-floatlib to tmake_file. (m68k-*-linux*): Likewise. (m68k-*-rtems*): Likewise. (mcore-*-elf): Add mcore/t-mcore to tmake_file. (sh-*-elf*, sh[12346l]*-*-elf*): Add sh/t-sh64 to tmake_file for sh64*-*-*. (sh-*-linux*, sh[2346lbe]*-*-linux*): Add sh/t-sh to tmake_file. Add sh/t-sh64 to tmake_file for sh64*-*-linux*. (sh-*-netbsdelf*, shl*-*-netbsdelf*, sh5-*-netbsd*) (sh5l*-*-netbsd*, sh64-*-netbsd*, sh64l*-*-netbsd*): Add sh/t-sh, sh/t-netbsd to tmake_file. Add sh/t-sh64 to tmake_file for sh5*-*-netbsd*, sh64*-netbsd*. (sh-*-rtems*): Add sh/t-sh to tmake_file. (sh-wrs-vxworks): Likewise. (sparc-*-linux*): Add sparc/t-softmul to tmake_file except for *-leon[3-9]*. (v850*-*-*): Add v850/t-v850 to tmake_file. (vax-*-linux*): Add vax/t-linux to tmake_file. (m32c-*-elf*, m32c-*-rtems*): Add m32c/t-m32c to tmake_file. From-SVN: r180773
Diffstat (limited to 'gcc/config/v850')
-rw-r--r--gcc/config/v850/lib1funcs.asm2330
-rw-r--r--gcc/config/v850/t-v85061
2 files changed, 0 insertions, 2391 deletions
diff --git a/gcc/config/v850/lib1funcs.asm b/gcc/config/v850/lib1funcs.asm
deleted file mode 100644
index 04e9b1e..0000000
--- a/gcc/config/v850/lib1funcs.asm
+++ /dev/null
@@ -1,2330 +0,0 @@
-/* libgcc routines for NEC V850.
- Copyright (C) 1996, 1997, 2002, 2005, 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.
-
-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/>. */
-
-#ifdef L_mulsi3
- .text
- .globl ___mulsi3
- .type ___mulsi3,@function
-___mulsi3:
-#ifdef __v850__
-/*
- #define SHIFT 12
- #define MASK ((1 << SHIFT) - 1)
-
- #define STEP(i, j) \
- ({ \
- short a_part = (a >> (i)) & MASK; \
- short b_part = (b >> (j)) & MASK; \
- int res = (((int) a_part) * ((int) b_part)); \
- res; \
- })
-
- int
- __mulsi3 (unsigned a, unsigned b)
- {
- return STEP (0, 0) +
- ((STEP (SHIFT, 0) + STEP (0, SHIFT)) << SHIFT) +
- ((STEP (0, 2 * SHIFT) + STEP (SHIFT, SHIFT) + STEP (2 * SHIFT, 0))
- << (2 * SHIFT));
- }
-*/
- mov r6, r14
- movea lo(32767), r0, r10
- and r10, r14
- mov r7, r15
- and r10, r15
- shr 15, r6
- mov r6, r13
- and r10, r13
- shr 15, r7
- mov r7, r12
- and r10, r12
- shr 15, r6
- shr 15, r7
- mov r14, r10
- mulh r15, r10
- mov r14, r11
- mulh r12, r11
- mov r13, r16
- mulh r15, r16
- mulh r14, r7
- mulh r15, r6
- add r16, r11
- mulh r13, r12
- shl 15, r11
- add r11, r10
- add r12, r7
- add r6, r7
- shl 30, r7
- add r7, r10
- jmp [r31]
-#endif /* __v850__ */
-#if defined(__v850e__) || defined(__v850ea__) || defined(__v850e2__) || defined(__v850e2v3__)
- /* This routine is almost unneccesarry because gcc
- generates the MUL instruction for the RTX mulsi3.
- But if someone wants to link his application with
- previsously compiled v850 objects then they will
- need this function. */
-
- /* It isn't good to put the inst sequence as below;
- mul r7, r6,
- mov r6, r10, r0
- In this case, there is a RAW hazard between them.
- MUL inst takes 2 cycle in EX stage, then MOV inst
- must wait 1cycle. */
- mov r7, r10
- mul r6, r10, r0
- jmp [r31]
-#endif /* __v850e__ */
- .size ___mulsi3,.-___mulsi3
-#endif /* L_mulsi3 */
-
-
-#ifdef L_udivsi3
- .text
- .global ___udivsi3
- .type ___udivsi3,@function
-___udivsi3:
-#ifdef __v850__
- mov 1,r12
- mov 0,r10
- cmp r6,r7
- bnl .L12
- movhi hi(-2147483648),r0,r13
- cmp r0,r7
- blt .L12
-.L4:
- shl 1,r7
- shl 1,r12
- cmp r6,r7
- bnl .L12
- cmp r0,r12
- be .L8
- mov r7,r19
- and r13,r19
- be .L4
- br .L12
-.L9:
- cmp r7,r6
- bl .L10
- sub r7,r6
- or r12,r10
-.L10:
- shr 1,r12
- shr 1,r7
-.L12:
- cmp r0,r12
- bne .L9
-.L8:
- jmp [r31]
-
-#else /* defined(__v850e__) */
-
- /* See comments at end of __mulsi3. */
- mov r6, r10
- divu r7, r10, r0
- jmp [r31]
-
-#endif /* __v850e__ */
-
- .size ___udivsi3,.-___udivsi3
-#endif
-
-#ifdef L_divsi3
- .text
- .globl ___divsi3
- .type ___divsi3,@function
-___divsi3:
-#ifdef __v850__
- add -8,sp
- st.w r31,4[sp]
- st.w r22,0[sp]
- mov 1,r22
- tst r7,r7
- bp .L3
- subr r0,r7
- subr r0,r22
-.L3:
- tst r6,r6
- bp .L4
- subr r0,r6
- subr r0,r22
-.L4:
- jarl ___udivsi3,r31
- cmp r0,r22
- bp .L7
- subr r0,r10
-.L7:
- ld.w 0[sp],r22
- ld.w 4[sp],r31
- add 8,sp
- jmp [r31]
-
-#else /* defined(__v850e__) */
-
- /* See comments at end of __mulsi3. */
- mov r6, r10
- div r7, r10, r0
- jmp [r31]
-
-#endif /* __v850e__ */
-
- .size ___divsi3,.-___divsi3
-#endif
-
-#ifdef L_umodsi3
- .text
- .globl ___umodsi3
- .type ___umodsi3,@function
-___umodsi3:
-#ifdef __v850__
- add -12,sp
- st.w r31,8[sp]
- st.w r7,4[sp]
- st.w r6,0[sp]
- jarl ___udivsi3,r31
- ld.w 4[sp],r7
- mov r10,r6
- jarl ___mulsi3,r31
- ld.w 0[sp],r6
- subr r6,r10
- ld.w 8[sp],r31
- add 12,sp
- jmp [r31]
-
-#else /* defined(__v850e__) */
-
- /* See comments at end of __mulsi3. */
- divu r7, r6, r10
- jmp [r31]
-
-#endif /* __v850e__ */
-
- .size ___umodsi3,.-___umodsi3
-#endif /* L_umodsi3 */
-
-#ifdef L_modsi3
- .text
- .globl ___modsi3
- .type ___modsi3,@function
-___modsi3:
-#ifdef __v850__
- add -12,sp
- st.w r31,8[sp]
- st.w r7,4[sp]
- st.w r6,0[sp]
- jarl ___divsi3,r31
- ld.w 4[sp],r7
- mov r10,r6
- jarl ___mulsi3,r31
- ld.w 0[sp],r6
- subr r6,r10
- ld.w 8[sp],r31
- add 12,sp
- jmp [r31]
-
-#else /* defined(__v850e__) */
-
- /* See comments at end of __mulsi3. */
- div r7, r6, r10
- jmp [r31]
-
-#endif /* __v850e__ */
-
- .size ___modsi3,.-___modsi3
-#endif /* L_modsi3 */
-
-#ifdef L_save_2
- .text
- .align 2
- .globl __save_r2_r29
- .type __save_r2_r29,@function
- /* Allocate space and save registers 2, 20 .. 29 on the stack. */
- /* Called via: jalr __save_r2_r29,r10. */
-__save_r2_r29:
-#ifdef __EP__
- mov ep,r1
- addi -44,sp,sp
- mov sp,ep
- sst.w r29,0[ep]
- sst.w r28,4[ep]
- sst.w r27,8[ep]
- sst.w r26,12[ep]
- sst.w r25,16[ep]
- sst.w r24,20[ep]
- sst.w r23,24[ep]
- sst.w r22,28[ep]
- sst.w r21,32[ep]
- sst.w r20,36[ep]
- sst.w r2,40[ep]
- mov r1,ep
-#else
- addi -44,sp,sp
- st.w r29,0[sp]
- st.w r28,4[sp]
- st.w r27,8[sp]
- st.w r26,12[sp]
- st.w r25,16[sp]
- st.w r24,20[sp]
- st.w r23,24[sp]
- st.w r22,28[sp]
- st.w r21,32[sp]
- st.w r20,36[sp]
- st.w r2,40[sp]
-#endif
- jmp [r10]
- .size __save_r2_r29,.-__save_r2_r29
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r2_r29. */
- .align 2
- .globl __return_r2_r29
- .type __return_r2_r29,@function
-__return_r2_r29:
-#ifdef __EP__
- mov ep,r1
- mov sp,ep
- sld.w 0[ep],r29
- sld.w 4[ep],r28
- sld.w 8[ep],r27
- sld.w 12[ep],r26
- sld.w 16[ep],r25
- sld.w 20[ep],r24
- sld.w 24[ep],r23
- sld.w 28[ep],r22
- sld.w 32[ep],r21
- sld.w 36[ep],r20
- sld.w 40[ep],r2
- addi 44,sp,sp
- mov r1,ep
-#else
- ld.w 0[sp],r29
- ld.w 4[sp],r28
- ld.w 8[sp],r27
- ld.w 12[sp],r26
- ld.w 16[sp],r25
- ld.w 20[sp],r24
- ld.w 24[sp],r23
- ld.w 28[sp],r22
- ld.w 32[sp],r21
- ld.w 36[sp],r20
- ld.w 40[sp],r2
- addi 44,sp,sp
-#endif
- jmp [r31]
- .size __return_r2_r29,.-__return_r2_r29
-#endif /* L_save_2 */
-
-#ifdef L_save_20
- .text
- .align 2
- .globl __save_r20_r29
- .type __save_r20_r29,@function
- /* Allocate space and save registers 20 .. 29 on the stack. */
- /* Called via: jalr __save_r20_r29,r10. */
-__save_r20_r29:
-#ifdef __EP__
- mov ep,r1
- addi -40,sp,sp
- mov sp,ep
- sst.w r29,0[ep]
- sst.w r28,4[ep]
- sst.w r27,8[ep]
- sst.w r26,12[ep]
- sst.w r25,16[ep]
- sst.w r24,20[ep]
- sst.w r23,24[ep]
- sst.w r22,28[ep]
- sst.w r21,32[ep]
- sst.w r20,36[ep]
- mov r1,ep
-#else
- addi -40,sp,sp
- st.w r29,0[sp]
- st.w r28,4[sp]
- st.w r27,8[sp]
- st.w r26,12[sp]
- st.w r25,16[sp]
- st.w r24,20[sp]
- st.w r23,24[sp]
- st.w r22,28[sp]
- st.w r21,32[sp]
- st.w r20,36[sp]
-#endif
- jmp [r10]
- .size __save_r20_r29,.-__save_r20_r29
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r20_r29. */
- .align 2
- .globl __return_r20_r29
- .type __return_r20_r29,@function
-__return_r20_r29:
-#ifdef __EP__
- mov ep,r1
- mov sp,ep
- sld.w 0[ep],r29
- sld.w 4[ep],r28
- sld.w 8[ep],r27
- sld.w 12[ep],r26
- sld.w 16[ep],r25
- sld.w 20[ep],r24
- sld.w 24[ep],r23
- sld.w 28[ep],r22
- sld.w 32[ep],r21
- sld.w 36[ep],r20
- addi 40,sp,sp
- mov r1,ep
-#else
- ld.w 0[sp],r29
- ld.w 4[sp],r28
- ld.w 8[sp],r27
- ld.w 12[sp],r26
- ld.w 16[sp],r25
- ld.w 20[sp],r24
- ld.w 24[sp],r23
- ld.w 28[sp],r22
- ld.w 32[sp],r21
- ld.w 36[sp],r20
- addi 40,sp,sp
-#endif
- jmp [r31]
- .size __return_r20_r29,.-__return_r20_r29
-#endif /* L_save_20 */
-
-#ifdef L_save_21
- .text
- .align 2
- .globl __save_r21_r29
- .type __save_r21_r29,@function
- /* Allocate space and save registers 21 .. 29 on the stack. */
- /* Called via: jalr __save_r21_r29,r10. */
-__save_r21_r29:
-#ifdef __EP__
- mov ep,r1
- addi -36,sp,sp
- mov sp,ep
- sst.w r29,0[ep]
- sst.w r28,4[ep]
- sst.w r27,8[ep]
- sst.w r26,12[ep]
- sst.w r25,16[ep]
- sst.w r24,20[ep]
- sst.w r23,24[ep]
- sst.w r22,28[ep]
- sst.w r21,32[ep]
- mov r1,ep
-#else
- addi -36,sp,sp
- st.w r29,0[sp]
- st.w r28,4[sp]
- st.w r27,8[sp]
- st.w r26,12[sp]
- st.w r25,16[sp]
- st.w r24,20[sp]
- st.w r23,24[sp]
- st.w r22,28[sp]
- st.w r21,32[sp]
-#endif
- jmp [r10]
- .size __save_r21_r29,.-__save_r21_r29
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r21_r29. */
- .align 2
- .globl __return_r21_r29
- .type __return_r21_r29,@function
-__return_r21_r29:
-#ifdef __EP__
- mov ep,r1
- mov sp,ep
- sld.w 0[ep],r29
- sld.w 4[ep],r28
- sld.w 8[ep],r27
- sld.w 12[ep],r26
- sld.w 16[ep],r25
- sld.w 20[ep],r24
- sld.w 24[ep],r23
- sld.w 28[ep],r22
- sld.w 32[ep],r21
- addi 36,sp,sp
- mov r1,ep
-#else
- ld.w 0[sp],r29
- ld.w 4[sp],r28
- ld.w 8[sp],r27
- ld.w 12[sp],r26
- ld.w 16[sp],r25
- ld.w 20[sp],r24
- ld.w 24[sp],r23
- ld.w 28[sp],r22
- ld.w 32[sp],r21
- addi 36,sp,sp
-#endif
- jmp [r31]
- .size __return_r21_r29,.-__return_r21_r29
-#endif /* L_save_21 */
-
-#ifdef L_save_22
- .text
- .align 2
- .globl __save_r22_r29
- .type __save_r22_r29,@function
- /* Allocate space and save registers 22 .. 29 on the stack. */
- /* Called via: jalr __save_r22_r29,r10. */
-__save_r22_r29:
-#ifdef __EP__
- mov ep,r1
- addi -32,sp,sp
- mov sp,ep
- sst.w r29,0[ep]
- sst.w r28,4[ep]
- sst.w r27,8[ep]
- sst.w r26,12[ep]
- sst.w r25,16[ep]
- sst.w r24,20[ep]
- sst.w r23,24[ep]
- sst.w r22,28[ep]
- mov r1,ep
-#else
- addi -32,sp,sp
- st.w r29,0[sp]
- st.w r28,4[sp]
- st.w r27,8[sp]
- st.w r26,12[sp]
- st.w r25,16[sp]
- st.w r24,20[sp]
- st.w r23,24[sp]
- st.w r22,28[sp]
-#endif
- jmp [r10]
- .size __save_r22_r29,.-__save_r22_r29
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r22_r29. */
- .align 2
- .globl __return_r22_r29
- .type __return_r22_r29,@function
-__return_r22_r29:
-#ifdef __EP__
- mov ep,r1
- mov sp,ep
- sld.w 0[ep],r29
- sld.w 4[ep],r28
- sld.w 8[ep],r27
- sld.w 12[ep],r26
- sld.w 16[ep],r25
- sld.w 20[ep],r24
- sld.w 24[ep],r23
- sld.w 28[ep],r22
- addi 32,sp,sp
- mov r1,ep
-#else
- ld.w 0[sp],r29
- ld.w 4[sp],r28
- ld.w 8[sp],r27
- ld.w 12[sp],r26
- ld.w 16[sp],r25
- ld.w 20[sp],r24
- ld.w 24[sp],r23
- ld.w 28[sp],r22
- addi 32,sp,sp
-#endif
- jmp [r31]
- .size __return_r22_r29,.-__return_r22_r29
-#endif /* L_save_22 */
-
-#ifdef L_save_23
- .text
- .align 2
- .globl __save_r23_r29
- .type __save_r23_r29,@function
- /* Allocate space and save registers 23 .. 29 on the stack. */
- /* Called via: jalr __save_r23_r29,r10. */
-__save_r23_r29:
-#ifdef __EP__
- mov ep,r1
- addi -28,sp,sp
- mov sp,ep
- sst.w r29,0[ep]
- sst.w r28,4[ep]
- sst.w r27,8[ep]
- sst.w r26,12[ep]
- sst.w r25,16[ep]
- sst.w r24,20[ep]
- sst.w r23,24[ep]
- mov r1,ep
-#else
- addi -28,sp,sp
- st.w r29,0[sp]
- st.w r28,4[sp]
- st.w r27,8[sp]
- st.w r26,12[sp]
- st.w r25,16[sp]
- st.w r24,20[sp]
- st.w r23,24[sp]
-#endif
- jmp [r10]
- .size __save_r23_r29,.-__save_r23_r29
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r23_r29. */
- .align 2
- .globl __return_r23_r29
- .type __return_r23_r29,@function
-__return_r23_r29:
-#ifdef __EP__
- mov ep,r1
- mov sp,ep
- sld.w 0[ep],r29
- sld.w 4[ep],r28
- sld.w 8[ep],r27
- sld.w 12[ep],r26
- sld.w 16[ep],r25
- sld.w 20[ep],r24
- sld.w 24[ep],r23
- addi 28,sp,sp
- mov r1,ep
-#else
- ld.w 0[sp],r29
- ld.w 4[sp],r28
- ld.w 8[sp],r27
- ld.w 12[sp],r26
- ld.w 16[sp],r25
- ld.w 20[sp],r24
- ld.w 24[sp],r23
- addi 28,sp,sp
-#endif
- jmp [r31]
- .size __return_r23_r29,.-__return_r23_r29
-#endif /* L_save_23 */
-
-#ifdef L_save_24
- .text
- .align 2
- .globl __save_r24_r29
- .type __save_r24_r29,@function
- /* Allocate space and save registers 24 .. 29 on the stack. */
- /* Called via: jalr __save_r24_r29,r10. */
-__save_r24_r29:
-#ifdef __EP__
- mov ep,r1
- addi -24,sp,sp
- mov sp,ep
- sst.w r29,0[ep]
- sst.w r28,4[ep]
- sst.w r27,8[ep]
- sst.w r26,12[ep]
- sst.w r25,16[ep]
- sst.w r24,20[ep]
- mov r1,ep
-#else
- addi -24,sp,sp
- st.w r29,0[sp]
- st.w r28,4[sp]
- st.w r27,8[sp]
- st.w r26,12[sp]
- st.w r25,16[sp]
- st.w r24,20[sp]
-#endif
- jmp [r10]
- .size __save_r24_r29,.-__save_r24_r29
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r24_r29. */
- .align 2
- .globl __return_r24_r29
- .type __return_r24_r29,@function
-__return_r24_r29:
-#ifdef __EP__
- mov ep,r1
- mov sp,ep
- sld.w 0[ep],r29
- sld.w 4[ep],r28
- sld.w 8[ep],r27
- sld.w 12[ep],r26
- sld.w 16[ep],r25
- sld.w 20[ep],r24
- addi 24,sp,sp
- mov r1,ep
-#else
- ld.w 0[sp],r29
- ld.w 4[sp],r28
- ld.w 8[sp],r27
- ld.w 12[sp],r26
- ld.w 16[sp],r25
- ld.w 20[sp],r24
- addi 24,sp,sp
-#endif
- jmp [r31]
- .size __return_r24_r29,.-__return_r24_r29
-#endif /* L_save_24 */
-
-#ifdef L_save_25
- .text
- .align 2
- .globl __save_r25_r29
- .type __save_r25_r29,@function
- /* Allocate space and save registers 25 .. 29 on the stack. */
- /* Called via: jalr __save_r25_r29,r10. */
-__save_r25_r29:
-#ifdef __EP__
- mov ep,r1
- addi -20,sp,sp
- mov sp,ep
- sst.w r29,0[ep]
- sst.w r28,4[ep]
- sst.w r27,8[ep]
- sst.w r26,12[ep]
- sst.w r25,16[ep]
- mov r1,ep
-#else
- addi -20,sp,sp
- st.w r29,0[sp]
- st.w r28,4[sp]
- st.w r27,8[sp]
- st.w r26,12[sp]
- st.w r25,16[sp]
-#endif
- jmp [r10]
- .size __save_r25_r29,.-__save_r25_r29
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r25_r29. */
- .align 2
- .globl __return_r25_r29
- .type __return_r25_r29,@function
-__return_r25_r29:
-#ifdef __EP__
- mov ep,r1
- mov sp,ep
- sld.w 0[ep],r29
- sld.w 4[ep],r28
- sld.w 8[ep],r27
- sld.w 12[ep],r26
- sld.w 16[ep],r25
- addi 20,sp,sp
- mov r1,ep
-#else
- ld.w 0[ep],r29
- ld.w 4[ep],r28
- ld.w 8[ep],r27
- ld.w 12[ep],r26
- ld.w 16[ep],r25
- addi 20,sp,sp
-#endif
- jmp [r31]
- .size __return_r25_r29,.-__return_r25_r29
-#endif /* L_save_25 */
-
-#ifdef L_save_26
- .text
- .align 2
- .globl __save_r26_r29
- .type __save_r26_r29,@function
- /* Allocate space and save registers 26 .. 29 on the stack. */
- /* Called via: jalr __save_r26_r29,r10. */
-__save_r26_r29:
-#ifdef __EP__
- mov ep,r1
- add -16,sp
- mov sp,ep
- sst.w r29,0[ep]
- sst.w r28,4[ep]
- sst.w r27,8[ep]
- sst.w r26,12[ep]
- mov r1,ep
-#else
- add -16,sp
- st.w r29,0[sp]
- st.w r28,4[sp]
- st.w r27,8[sp]
- st.w r26,12[sp]
-#endif
- jmp [r10]
- .size __save_r26_r29,.-__save_r26_r29
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r26_r29. */
- .align 2
- .globl __return_r26_r29
- .type __return_r26_r29,@function
-__return_r26_r29:
-#ifdef __EP__
- mov ep,r1
- mov sp,ep
- sld.w 0[ep],r29
- sld.w 4[ep],r28
- sld.w 8[ep],r27
- sld.w 12[ep],r26
- addi 16,sp,sp
- mov r1,ep
-#else
- ld.w 0[sp],r29
- ld.w 4[sp],r28
- ld.w 8[sp],r27
- ld.w 12[sp],r26
- addi 16,sp,sp
-#endif
- jmp [r31]
- .size __return_r26_r29,.-__return_r26_r29
-#endif /* L_save_26 */
-
-#ifdef L_save_27
- .text
- .align 2
- .globl __save_r27_r29
- .type __save_r27_r29,@function
- /* Allocate space and save registers 27 .. 29 on the stack. */
- /* Called via: jalr __save_r27_r29,r10. */
-__save_r27_r29:
- add -12,sp
- st.w r29,0[sp]
- st.w r28,4[sp]
- st.w r27,8[sp]
- jmp [r10]
- .size __save_r27_r29,.-__save_r27_r29
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r27_r29. */
- .align 2
- .globl __return_r27_r29
- .type __return_r27_r29,@function
-__return_r27_r29:
- ld.w 0[sp],r29
- ld.w 4[sp],r28
- ld.w 8[sp],r27
- add 12,sp
- jmp [r31]
- .size __return_r27_r29,.-__return_r27_r29
-#endif /* L_save_27 */
-
-#ifdef L_save_28
- .text
- .align 2
- .globl __save_r28_r29
- .type __save_r28_r29,@function
- /* Allocate space and save registers 28,29 on the stack. */
- /* Called via: jalr __save_r28_r29,r10. */
-__save_r28_r29:
- add -8,sp
- st.w r29,0[sp]
- st.w r28,4[sp]
- jmp [r10]
- .size __save_r28_r29,.-__save_r28_r29
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r28_r29. */
- .align 2
- .globl __return_r28_r29
- .type __return_r28_r29,@function
-__return_r28_r29:
- ld.w 0[sp],r29
- ld.w 4[sp],r28
- add 8,sp
- jmp [r31]
- .size __return_r28_r29,.-__return_r28_r29
-#endif /* L_save_28 */
-
-#ifdef L_save_29
- .text
- .align 2
- .globl __save_r29
- .type __save_r29,@function
- /* Allocate space and save register 29 on the stack. */
- /* Called via: jalr __save_r29,r10. */
-__save_r29:
- add -4,sp
- st.w r29,0[sp]
- jmp [r10]
- .size __save_r29,.-__save_r29
-
- /* Restore saved register 29, deallocate stack and return to the user. */
- /* Called via: jr __return_r29. */
- .align 2
- .globl __return_r29
- .type __return_r29,@function
-__return_r29:
- ld.w 0[sp],r29
- add 4,sp
- jmp [r31]
- .size __return_r29,.-__return_r29
-#endif /* L_save_28 */
-
-#ifdef L_save_2c
- .text
- .align 2
- .globl __save_r2_r31
- .type __save_r2_r31,@function
- /* Allocate space and save registers 20 .. 29, 31 on the stack. */
- /* Also allocate space for the argument save area. */
- /* Called via: jalr __save_r2_r31,r10. */
-__save_r2_r31:
-#ifdef __EP__
- mov ep,r1
- addi -48,sp,sp
- mov sp,ep
- sst.w r29,0[ep]
- sst.w r28,4[ep]
- sst.w r27,8[ep]
- sst.w r26,12[ep]
- sst.w r25,16[ep]
- sst.w r24,20[ep]
- sst.w r23,24[ep]
- sst.w r22,28[ep]
- sst.w r21,32[ep]
- sst.w r20,36[ep]
- sst.w r2,40[ep]
- sst.w r31,44[ep]
- mov r1,ep
-#else
- addi -48,sp,sp
- st.w r29,0[sp]
- st.w r28,4[sp]
- st.w r27,8[sp]
- st.w r26,12[sp]
- st.w r25,16[sp]
- st.w r24,20[sp]
- st.w r23,24[sp]
- st.w r22,28[sp]
- st.w r21,32[sp]
- st.w r20,36[sp]
- st.w r2,40[sp]
- st.w r31,44[sp]
-#endif
- jmp [r10]
- .size __save_r2_r31,.-__save_r2_r31
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r20_r31. */
- .align 2
- .globl __return_r2_r31
- .type __return_r2_r31,@function
-__return_r2_r31:
-#ifdef __EP__
- mov ep,r1
- mov sp,ep
- sld.w 0[ep],r29
- sld.w 4[ep],r28
- sld.w 8[ep],r27
- sld.w 12[ep],r26
- sld.w 16[ep],r25
- sld.w 20[ep],r24
- sld.w 24[ep],r23
- sld.w 28[ep],r22
- sld.w 32[ep],r21
- sld.w 36[ep],r20
- sld.w 40[ep],r2
- sld.w 44[ep],r31
- addi 48,sp,sp
- mov r1,ep
-#else
- ld.w 44[sp],r29
- ld.w 40[sp],r28
- ld.w 36[sp],r27
- ld.w 32[sp],r26
- ld.w 28[sp],r25
- ld.w 24[sp],r24
- ld.w 20[sp],r23
- ld.w 16[sp],r22
- ld.w 12[sp],r21
- ld.w 8[sp],r20
- ld.w 4[sp],r2
- ld.w 0[sp],r31
- addi 48,sp,sp
-#endif
- jmp [r31]
- .size __return_r2_r31,.-__return_r2_r31
-#endif /* L_save_2c */
-
-#ifdef L_save_20c
- .text
- .align 2
- .globl __save_r20_r31
- .type __save_r20_r31,@function
- /* Allocate space and save registers 20 .. 29, 31 on the stack. */
- /* Also allocate space for the argument save area. */
- /* Called via: jalr __save_r20_r31,r10. */
-__save_r20_r31:
-#ifdef __EP__
- mov ep,r1
- addi -44,sp,sp
- mov sp,ep
- sst.w r29,0[ep]
- sst.w r28,4[ep]
- sst.w r27,8[ep]
- sst.w r26,12[ep]
- sst.w r25,16[ep]
- sst.w r24,20[ep]
- sst.w r23,24[ep]
- sst.w r22,28[ep]
- sst.w r21,32[ep]
- sst.w r20,36[ep]
- sst.w r31,40[ep]
- mov r1,ep
-#else
- addi -44,sp,sp
- st.w r29,0[sp]
- st.w r28,4[sp]
- st.w r27,8[sp]
- st.w r26,12[sp]
- st.w r25,16[sp]
- st.w r24,20[sp]
- st.w r23,24[sp]
- st.w r22,28[sp]
- st.w r21,32[sp]
- st.w r20,36[sp]
- st.w r31,40[sp]
-#endif
- jmp [r10]
- .size __save_r20_r31,.-__save_r20_r31
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r20_r31. */
- .align 2
- .globl __return_r20_r31
- .type __return_r20_r31,@function
-__return_r20_r31:
-#ifdef __EP__
- mov ep,r1
- mov sp,ep
- sld.w 0[ep],r29
- sld.w 4[ep],r28
- sld.w 8[ep],r27
- sld.w 12[ep],r26
- sld.w 16[ep],r25
- sld.w 20[ep],r24
- sld.w 24[ep],r23
- sld.w 28[ep],r22
- sld.w 32[ep],r21
- sld.w 36[ep],r20
- sld.w 40[ep],r31
- addi 44,sp,sp
- mov r1,ep
-#else
- ld.w 0[sp],r29
- ld.w 4[sp],r28
- ld.w 8[sp],r27
- ld.w 12[sp],r26
- ld.w 16[sp],r25
- ld.w 20[sp],r24
- ld.w 24[sp],r23
- ld.w 28[sp],r22
- ld.w 32[sp],r21
- ld.w 36[sp],r20
- ld.w 40[sp],r31
- addi 44,sp,sp
-#endif
- jmp [r31]
- .size __return_r20_r31,.-__return_r20_r31
-#endif /* L_save_20c */
-
-#ifdef L_save_21c
- .text
- .align 2
- .globl __save_r21_r31
- .type __save_r21_r31,@function
- /* Allocate space and save registers 21 .. 29, 31 on the stack. */
- /* Also allocate space for the argument save area. */
- /* Called via: jalr __save_r21_r31,r10. */
-__save_r21_r31:
-#ifdef __EP__
- mov ep,r1
- addi -40,sp,sp
- mov sp,ep
- sst.w r29,0[ep]
- sst.w r28,4[ep]
- sst.w r27,8[ep]
- sst.w r26,12[ep]
- sst.w r25,16[ep]
- sst.w r24,20[ep]
- sst.w r23,24[ep]
- sst.w r22,28[ep]
- sst.w r21,32[ep]
- sst.w r31,36[ep]
- mov r1,ep
- jmp [r10]
-#else
- addi -40,sp,sp
- st.w r29,0[sp]
- st.w r28,4[sp]
- st.w r27,8[sp]
- st.w r26,12[sp]
- st.w r25,16[sp]
- st.w r24,20[sp]
- st.w r23,24[sp]
- st.w r22,28[sp]
- st.w r21,32[sp]
- st.w r31,36[sp]
- jmp [r10]
-#endif
- .size __save_r21_r31,.-__save_r21_r31
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r21_r31. */
- .align 2
- .globl __return_r21_r31
- .type __return_r21_r31,@function
-__return_r21_r31:
-#ifdef __EP__
- mov ep,r1
- mov sp,ep
- sld.w 0[ep],r29
- sld.w 4[ep],r28
- sld.w 8[ep],r27
- sld.w 12[ep],r26
- sld.w 16[ep],r25
- sld.w 20[ep],r24
- sld.w 24[ep],r23
- sld.w 28[ep],r22
- sld.w 32[ep],r21
- sld.w 36[ep],r31
- addi 40,sp,sp
- mov r1,ep
-#else
- ld.w 0[sp],r29
- ld.w 4[sp],r28
- ld.w 8[sp],r27
- ld.w 12[sp],r26
- ld.w 16[sp],r25
- ld.w 20[sp],r24
- ld.w 24[sp],r23
- ld.w 28[sp],r22
- ld.w 32[sp],r21
- ld.w 36[sp],r31
- addi 40,sp,sp
-#endif
- jmp [r31]
- .size __return_r21_r31,.-__return_r21_r31
-#endif /* L_save_21c */
-
-#ifdef L_save_22c
- .text
- .align 2
- .globl __save_r22_r31
- .type __save_r22_r31,@function
- /* Allocate space and save registers 22 .. 29, 31 on the stack. */
- /* Also allocate space for the argument save area. */
- /* Called via: jalr __save_r22_r31,r10. */
-__save_r22_r31:
-#ifdef __EP__
- mov ep,r1
- addi -36,sp,sp
- mov sp,ep
- sst.w r29,0[ep]
- sst.w r28,4[ep]
- sst.w r27,8[ep]
- sst.w r26,12[ep]
- sst.w r25,16[ep]
- sst.w r24,20[ep]
- sst.w r23,24[ep]
- sst.w r22,28[ep]
- sst.w r31,32[ep]
- mov r1,ep
-#else
- addi -36,sp,sp
- st.w r29,0[sp]
- st.w r28,4[sp]
- st.w r27,8[sp]
- st.w r26,12[sp]
- st.w r25,16[sp]
- st.w r24,20[sp]
- st.w r23,24[sp]
- st.w r22,28[sp]
- st.w r31,32[sp]
-#endif
- jmp [r10]
- .size __save_r22_r31,.-__save_r22_r31
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r22_r31. */
- .align 2
- .globl __return_r22_r31
- .type __return_r22_r31,@function
-__return_r22_r31:
-#ifdef __EP__
- mov ep,r1
- mov sp,ep
- sld.w 0[ep],r29
- sld.w 4[ep],r28
- sld.w 8[ep],r27
- sld.w 12[ep],r26
- sld.w 16[ep],r25
- sld.w 20[ep],r24
- sld.w 24[ep],r23
- sld.w 28[ep],r22
- sld.w 32[ep],r31
- addi 36,sp,sp
- mov r1,ep
-#else
- ld.w 0[sp],r29
- ld.w 4[sp],r28
- ld.w 8[sp],r27
- ld.w 12[sp],r26
- ld.w 16[sp],r25
- ld.w 20[sp],r24
- ld.w 24[sp],r23
- ld.w 28[sp],r22
- ld.w 32[sp],r31
- addi 36,sp,sp
-#endif
- jmp [r31]
- .size __return_r22_r31,.-__return_r22_r31
-#endif /* L_save_22c */
-
-#ifdef L_save_23c
- .text
- .align 2
- .globl __save_r23_r31
- .type __save_r23_r31,@function
- /* Allocate space and save registers 23 .. 29, 31 on the stack. */
- /* Also allocate space for the argument save area. */
- /* Called via: jalr __save_r23_r31,r10. */
-__save_r23_r31:
-#ifdef __EP__
- mov ep,r1
- addi -32,sp,sp
- mov sp,ep
- sst.w r29,0[ep]
- sst.w r28,4[ep]
- sst.w r27,8[ep]
- sst.w r26,12[ep]
- sst.w r25,16[ep]
- sst.w r24,20[ep]
- sst.w r23,24[ep]
- sst.w r31,28[ep]
- mov r1,ep
-#else
- addi -32,sp,sp
- st.w r29,0[sp]
- st.w r28,4[sp]
- st.w r27,8[sp]
- st.w r26,12[sp]
- st.w r25,16[sp]
- st.w r24,20[sp]
- st.w r23,24[sp]
- st.w r31,28[sp]
-#endif
- jmp [r10]
- .size __save_r23_r31,.-__save_r23_r31
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r23_r31. */
- .align 2
- .globl __return_r23_r31
- .type __return_r23_r31,@function
-__return_r23_r31:
-#ifdef __EP__
- mov ep,r1
- mov sp,ep
- sld.w 0[ep],r29
- sld.w 4[ep],r28
- sld.w 8[ep],r27
- sld.w 12[ep],r26
- sld.w 16[ep],r25
- sld.w 20[ep],r24
- sld.w 24[ep],r23
- sld.w 28[ep],r31
- addi 32,sp,sp
- mov r1,ep
-#else
- ld.w 0[sp],r29
- ld.w 4[sp],r28
- ld.w 8[sp],r27
- ld.w 12[sp],r26
- ld.w 16[sp],r25
- ld.w 20[sp],r24
- ld.w 24[sp],r23
- ld.w 28[sp],r31
- addi 32,sp,sp
-#endif
- jmp [r31]
- .size __return_r23_r31,.-__return_r23_r31
-#endif /* L_save_23c */
-
-#ifdef L_save_24c
- .text
- .align 2
- .globl __save_r24_r31
- .type __save_r24_r31,@function
- /* Allocate space and save registers 24 .. 29, 31 on the stack. */
- /* Also allocate space for the argument save area. */
- /* Called via: jalr __save_r24_r31,r10. */
-__save_r24_r31:
-#ifdef __EP__
- mov ep,r1
- addi -28,sp,sp
- mov sp,ep
- sst.w r29,0[ep]
- sst.w r28,4[ep]
- sst.w r27,8[ep]
- sst.w r26,12[ep]
- sst.w r25,16[ep]
- sst.w r24,20[ep]
- sst.w r31,24[ep]
- mov r1,ep
-#else
- addi -28,sp,sp
- st.w r29,0[sp]
- st.w r28,4[sp]
- st.w r27,8[sp]
- st.w r26,12[sp]
- st.w r25,16[sp]
- st.w r24,20[sp]
- st.w r31,24[sp]
-#endif
- jmp [r10]
- .size __save_r24_r31,.-__save_r24_r31
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r24_r31. */
- .align 2
- .globl __return_r24_r31
- .type __return_r24_r31,@function
-__return_r24_r31:
-#ifdef __EP__
- mov ep,r1
- mov sp,ep
- sld.w 0[ep],r29
- sld.w 4[ep],r28
- sld.w 8[ep],r27
- sld.w 12[ep],r26
- sld.w 16[ep],r25
- sld.w 20[ep],r24
- sld.w 24[ep],r31
- addi 28,sp,sp
- mov r1,ep
-#else
- ld.w 0[sp],r29
- ld.w 4[sp],r28
- ld.w 8[sp],r27
- ld.w 12[sp],r26
- ld.w 16[sp],r25
- ld.w 20[sp],r24
- ld.w 24[sp],r31
- addi 28,sp,sp
-#endif
- jmp [r31]
- .size __return_r24_r31,.-__return_r24_r31
-#endif /* L_save_24c */
-
-#ifdef L_save_25c
- .text
- .align 2
- .globl __save_r25_r31
- .type __save_r25_r31,@function
- /* Allocate space and save registers 25 .. 29, 31 on the stack. */
- /* Also allocate space for the argument save area. */
- /* Called via: jalr __save_r25_r31,r10. */
-__save_r25_r31:
-#ifdef __EP__
- mov ep,r1
- addi -24,sp,sp
- mov sp,ep
- sst.w r29,0[ep]
- sst.w r28,4[ep]
- sst.w r27,8[ep]
- sst.w r26,12[ep]
- sst.w r25,16[ep]
- sst.w r31,20[ep]
- mov r1,ep
-#else
- addi -24,sp,sp
- st.w r29,0[sp]
- st.w r28,4[sp]
- st.w r27,8[sp]
- st.w r26,12[sp]
- st.w r25,16[sp]
- st.w r31,20[sp]
-#endif
- jmp [r10]
- .size __save_r25_r31,.-__save_r25_r31
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r25_r31. */
- .align 2
- .globl __return_r25_r31
- .type __return_r25_r31,@function
-__return_r25_r31:
-#ifdef __EP__
- mov ep,r1
- mov sp,ep
- sld.w 0[ep],r29
- sld.w 4[ep],r28
- sld.w 8[ep],r27
- sld.w 12[ep],r26
- sld.w 16[ep],r25
- sld.w 20[ep],r31
- addi 24,sp,sp
- mov r1,ep
-#else
- ld.w 0[sp],r29
- ld.w 4[sp],r28
- ld.w 8[sp],r27
- ld.w 12[sp],r26
- ld.w 16[sp],r25
- ld.w 20[sp],r31
- addi 24,sp,sp
-#endif
- jmp [r31]
- .size __return_r25_r31,.-__return_r25_r31
-#endif /* L_save_25c */
-
-#ifdef L_save_26c
- .text
- .align 2
- .globl __save_r26_r31
- .type __save_r26_r31,@function
- /* Allocate space and save registers 26 .. 29, 31 on the stack. */
- /* Also allocate space for the argument save area. */
- /* Called via: jalr __save_r26_r31,r10. */
-__save_r26_r31:
-#ifdef __EP__
- mov ep,r1
- addi -20,sp,sp
- mov sp,ep
- sst.w r29,0[ep]
- sst.w r28,4[ep]
- sst.w r27,8[ep]
- sst.w r26,12[ep]
- sst.w r31,16[ep]
- mov r1,ep
-#else
- addi -20,sp,sp
- st.w r29,0[sp]
- st.w r28,4[sp]
- st.w r27,8[sp]
- st.w r26,12[sp]
- st.w r31,16[sp]
-#endif
- jmp [r10]
- .size __save_r26_r31,.-__save_r26_r31
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r26_r31. */
- .align 2
- .globl __return_r26_r31
- .type __return_r26_r31,@function
-__return_r26_r31:
-#ifdef __EP__
- mov ep,r1
- mov sp,ep
- sld.w 0[ep],r29
- sld.w 4[ep],r28
- sld.w 8[ep],r27
- sld.w 12[ep],r26
- sld.w 16[ep],r31
- addi 20,sp,sp
- mov r1,ep
-#else
- ld.w 0[sp],r29
- ld.w 4[sp],r28
- ld.w 8[sp],r27
- ld.w 12[sp],r26
- ld.w 16[sp],r31
- addi 20,sp,sp
-#endif
- jmp [r31]
- .size __return_r26_r31,.-__return_r26_r31
-#endif /* L_save_26c */
-
-#ifdef L_save_27c
- .text
- .align 2
- .globl __save_r27_r31
- .type __save_r27_r31,@function
- /* Allocate space and save registers 27 .. 29, 31 on the stack. */
- /* Also allocate space for the argument save area. */
- /* Called via: jalr __save_r27_r31,r10. */
-__save_r27_r31:
-#ifdef __EP__
- mov ep,r1
- addi -16,sp,sp
- mov sp,ep
- sst.w r29,0[ep]
- sst.w r28,4[ep]
- sst.w r27,8[ep]
- sst.w r31,12[ep]
- mov r1,ep
-#else
- addi -16,sp,sp
- st.w r29,0[sp]
- st.w r28,4[sp]
- st.w r27,8[sp]
- st.w r31,12[sp]
-#endif
- jmp [r10]
- .size __save_r27_r31,.-__save_r27_r31
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r27_r31. */
- .align 2
- .globl __return_r27_r31
- .type __return_r27_r31,@function
-__return_r27_r31:
-#ifdef __EP__
- mov ep,r1
- mov sp,ep
- sld.w 0[ep],r29
- sld.w 4[ep],r28
- sld.w 8[ep],r27
- sld.w 12[ep],r31
- addi 16,sp,sp
- mov r1,ep
-#else
- ld.w 0[sp],r29
- ld.w 4[sp],r28
- ld.w 8[sp],r27
- ld.w 12[sp],r31
- addi 16,sp,sp
-#endif
- jmp [r31]
- .size __return_r27_r31,.-__return_r27_r31
-#endif /* L_save_27c */
-
-#ifdef L_save_28c
- .text
- .align 2
- .globl __save_r28_r31
- .type __save_r28_r31,@function
- /* Allocate space and save registers 28 .. 29, 31 on the stack. */
- /* Also allocate space for the argument save area. */
- /* Called via: jalr __save_r28_r31,r10. */
-__save_r28_r31:
- addi -12,sp,sp
- st.w r29,0[sp]
- st.w r28,4[sp]
- st.w r31,8[sp]
- jmp [r10]
- .size __save_r28_r31,.-__save_r28_r31
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r28_r31. */
- .align 2
- .globl __return_r28_r31
- .type __return_r28_r31,@function
-__return_r28_r31:
- ld.w 0[sp],r29
- ld.w 4[sp],r28
- ld.w 8[sp],r31
- addi 12,sp,sp
- jmp [r31]
- .size __return_r28_r31,.-__return_r28_r31
-#endif /* L_save_28c */
-
-#ifdef L_save_29c
- .text
- .align 2
- .globl __save_r29_r31
- .type __save_r29_r31,@function
- /* Allocate space and save registers 29 & 31 on the stack. */
- /* Also allocate space for the argument save area. */
- /* Called via: jalr __save_r29_r31,r10. */
-__save_r29_r31:
- addi -8,sp,sp
- st.w r29,0[sp]
- st.w r31,4[sp]
- jmp [r10]
- .size __save_r29_r31,.-__save_r29_r31
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r29_r31. */
- .align 2
- .globl __return_r29_r31
- .type __return_r29_r31,@function
-__return_r29_r31:
- ld.w 0[sp],r29
- ld.w 4[sp],r31
- addi 8,sp,sp
- jmp [r31]
- .size __return_r29_r31,.-__return_r29_r31
-#endif /* L_save_29c */
-
-#ifdef L_save_31c
- .text
- .align 2
- .globl __save_r31
- .type __save_r31,@function
- /* Allocate space and save register 31 on the stack. */
- /* Also allocate space for the argument save area. */
- /* Called via: jalr __save_r31,r10. */
-__save_r31:
- addi -4,sp,sp
- st.w r31,0[sp]
- jmp [r10]
- .size __save_r31,.-__save_r31
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: jr __return_r31. */
- .align 2
- .globl __return_r31
- .type __return_r31,@function
-__return_r31:
- ld.w 0[sp],r31
- addi 4,sp,sp
- jmp [r31]
- .size __return_r31,.-__return_r31
-#endif /* L_save_31c */
-
-#ifdef L_save_interrupt
- .text
- .align 2
- .globl __save_interrupt
- .type __save_interrupt,@function
- /* Save registers r1, r4 on stack and load up with expected values. */
- /* Note, 20 bytes of stack have already been allocated. */
- /* Called via: jalr __save_interrupt,r10. */
-__save_interrupt:
- /* add -20,sp ; st.w r11,16[sp] ; st.w r10,12[sp] ; */
- st.w ep,0[sp]
- st.w gp,4[sp]
- st.w r1,8[sp]
- movhi hi(__ep),r0,ep
- movea lo(__ep),ep,ep
- movhi hi(__gp),r0,gp
- movea lo(__gp),gp,gp
- jmp [r10]
- .size __save_interrupt,.-__save_interrupt
-
- /* Restore saved registers, deallocate stack and return from the interrupt. */
- /* Called via: jr __return_interrupt. */
- .align 2
- .globl __return_interrupt
- .type __return_interrupt,@function
-__return_interrupt:
- ld.w 0[sp],ep
- ld.w 4[sp],gp
- ld.w 8[sp],r1
- ld.w 12[sp],r10
- ld.w 16[sp],r11
- addi 20,sp,sp
- reti
- .size __return_interrupt,.-__return_interrupt
-#endif /* L_save_interrupt */
-
-#ifdef L_save_all_interrupt
- .text
- .align 2
- .globl __save_all_interrupt
- .type __save_all_interrupt,@function
- /* Save all registers except for those saved in __save_interrupt. */
- /* Allocate enough stack for all of the registers & 16 bytes of space. */
- /* Called via: jalr __save_all_interrupt,r10. */
-__save_all_interrupt:
- addi -104,sp,sp
-#ifdef __EP__
- mov ep,r1
- mov sp,ep
- sst.w r31,100[ep]
- sst.w r2,96[ep]
- sst.w gp,92[ep]
- sst.w r6,88[ep]
- sst.w r7,84[ep]
- sst.w r8,80[ep]
- sst.w r9,76[ep]
- sst.w r11,72[ep]
- sst.w r12,68[ep]
- sst.w r13,64[ep]
- sst.w r14,60[ep]
- sst.w r15,56[ep]
- sst.w r16,52[ep]
- sst.w r17,48[ep]
- sst.w r18,44[ep]
- sst.w r19,40[ep]
- sst.w r20,36[ep]
- sst.w r21,32[ep]
- sst.w r22,28[ep]
- sst.w r23,24[ep]
- sst.w r24,20[ep]
- sst.w r25,16[ep]
- sst.w r26,12[ep]
- sst.w r27,8[ep]
- sst.w r28,4[ep]
- sst.w r29,0[ep]
- mov r1,ep
-#else
- st.w r31,100[sp]
- st.w r2,96[sp]
- st.w gp,92[sp]
- st.w r6,88[sp]
- st.w r7,84[sp]
- st.w r8,80[sp]
- st.w r9,76[sp]
- st.w r11,72[sp]
- st.w r12,68[sp]
- st.w r13,64[sp]
- st.w r14,60[sp]
- st.w r15,56[sp]
- st.w r16,52[sp]
- st.w r17,48[sp]
- st.w r18,44[sp]
- st.w r19,40[sp]
- st.w r20,36[sp]
- st.w r21,32[sp]
- st.w r22,28[sp]
- st.w r23,24[sp]
- st.w r24,20[sp]
- st.w r25,16[sp]
- st.w r26,12[sp]
- st.w r27,8[sp]
- st.w r28,4[sp]
- st.w r29,0[sp]
-#endif
- jmp [r10]
- .size __save_all_interrupt,.-__save_all_interrupt
-
- .globl __restore_all_interrupt
- .type __restore_all_interrupt,@function
- /* Restore all registers saved in __save_all_interrupt and
- deallocate the stack space. */
- /* Called via: jalr __restore_all_interrupt,r10. */
-__restore_all_interrupt:
-#ifdef __EP__
- mov ep,r1
- mov sp,ep
- sld.w 100[ep],r31
- sld.w 96[ep],r2
- sld.w 92[ep],gp
- sld.w 88[ep],r6
- sld.w 84[ep],r7
- sld.w 80[ep],r8
- sld.w 76[ep],r9
- sld.w 72[ep],r11
- sld.w 68[ep],r12
- sld.w 64[ep],r13
- sld.w 60[ep],r14
- sld.w 56[ep],r15
- sld.w 52[ep],r16
- sld.w 48[ep],r17
- sld.w 44[ep],r18
- sld.w 40[ep],r19
- sld.w 36[ep],r20
- sld.w 32[ep],r21
- sld.w 28[ep],r22
- sld.w 24[ep],r23
- sld.w 20[ep],r24
- sld.w 16[ep],r25
- sld.w 12[ep],r26
- sld.w 8[ep],r27
- sld.w 4[ep],r28
- sld.w 0[ep],r29
- mov r1,ep
-#else
- ld.w 100[sp],r31
- ld.w 96[sp],r2
- ld.w 92[sp],gp
- ld.w 88[sp],r6
- ld.w 84[sp],r7
- ld.w 80[sp],r8
- ld.w 76[sp],r9
- ld.w 72[sp],r11
- ld.w 68[sp],r12
- ld.w 64[sp],r13
- ld.w 60[sp],r14
- ld.w 56[sp],r15
- ld.w 52[sp],r16
- ld.w 48[sp],r17
- ld.w 44[sp],r18
- ld.w 40[sp],r19
- ld.w 36[sp],r20
- ld.w 32[sp],r21
- ld.w 28[sp],r22
- ld.w 24[sp],r23
- ld.w 20[sp],r24
- ld.w 16[sp],r25
- ld.w 12[sp],r26
- ld.w 8[sp],r27
- ld.w 4[sp],r28
- ld.w 0[sp],r29
-#endif
- addi 104,sp,sp
- jmp [r10]
- .size __restore_all_interrupt,.-__restore_all_interrupt
-#endif /* L_save_all_interrupt */
-
-#if defined(__v850e__) || defined(__v850e1__) || defined(__v850e2__) || defined(__v850e2v3__)
-#ifdef L_callt_save_r2_r29
- /* Put these functions into the call table area. */
- .call_table_text
-
- /* Allocate space and save registers 2, 20 .. 29 on the stack. */
- /* Called via: callt ctoff(__callt_save_r2_r29). */
- .align 2
-.L_save_r2_r29:
- add -4, sp
- st.w r2, 0[sp]
- prepare {r20 - r29}, 0
- ctret
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: callt ctoff(__callt_return_r2_r29). */
- .align 2
-.L_return_r2_r29:
- dispose 0, {r20-r29}
- ld.w 0[sp], r2
- add 4, sp
- jmp [r31]
-
- /* Place the offsets of the start of these routines into the call table. */
- .call_table_data
-
- .global __callt_save_r2_r29
- .type __callt_save_r2_r29,@function
-__callt_save_r2_r29: .short ctoff(.L_save_r2_r29)
-
- .global __callt_return_r2_r29
- .type __callt_return_r2_r29,@function
-__callt_return_r2_r29: .short ctoff(.L_return_r2_r29)
-
-#endif /* L_callt_save_r2_r29. */
-
-#ifdef L_callt_save_r2_r31
- /* Put these functions into the call table area. */
- .call_table_text
-
- /* Allocate space and save registers 2 and 20 .. 29, 31 on the stack. */
- /* Also allocate space for the argument save area. */
- /* Called via: callt ctoff(__callt_save_r2_r31). */
- .align 2
-.L_save_r2_r31:
- add -4, sp
- st.w r2, 0[sp]
- prepare {r20 - r29, r31}, 0
- ctret
-
- /* Restore saved registers, deallocate stack and return to the user. */
- /* Called via: callt ctoff(__callt_return_r2_r31). */
- .align 2
-.L_return_r2_r31:
- dispose 0, {r20 - r29, r31}
- ld.w 0[sp], r2
- addi 4, sp, sp
- jmp [r31]
-
- /* Place the offsets of the start of these routines into the call table. */
- .call_table_data
-
- .global __callt_save_r2_r31
- .type __callt_save_r2_r31,@function
-__callt_save_r2_r31: .short ctoff(.L_save_r2_r31)
-
- .global __callt_return_r2_r31
- .type __callt_return_r2_r31,@function
-__callt_return_r2_r31: .short ctoff(.L_return_r2_r31)
-
-#endif /* L_callt_save_r2_r31 */
-
-#ifdef L_callt_save_interrupt
- /* Put these functions into the call table area. */
- .call_table_text
-
- /* Save registers r1, ep, gp, r10 on stack and load up with expected values. */
- /* Called via: callt ctoff(__callt_save_interrupt). */
- .align 2
-.L_save_interrupt:
- /* SP has already been moved before callt ctoff(_save_interrupt). */
- /* R1,R10,R11,ctpc,ctpsw has alread been saved bofore callt ctoff(_save_interrupt). */
- /* addi -28, sp, sp */
- /* st.w r1, 24[sp] */
- /* st.w r10, 12[sp] */
- /* st.w r11, 16[sp] */
- /* stsr ctpc, r10 */
- /* st.w r10, 20[sp] */
- /* stsr ctpsw, r10 */
- /* st.w r10, 24[sp] */
- st.w ep, 0[sp]
- st.w gp, 4[sp]
- st.w r1, 8[sp]
- mov hilo(__ep),ep
- mov hilo(__gp),gp
- ctret
-
- .call_table_text
- /* Restore saved registers, deallocate stack and return from the interrupt. */
- /* Called via: callt ctoff(__callt_restore_interrupt). */
- .align 2
- .globl __return_interrupt
- .type __return_interrupt,@function
-.L_return_interrupt:
- ld.w 24[sp], r1
- ldsr r1, ctpsw
- ld.w 20[sp], r1
- ldsr r1, ctpc
- ld.w 16[sp], r11
- ld.w 12[sp], r10
- ld.w 8[sp], r1
- ld.w 4[sp], gp
- ld.w 0[sp], ep
- addi 28, sp, sp
- reti
-
- /* Place the offsets of the start of these routines into the call table. */
- .call_table_data
-
- .global __callt_save_interrupt
- .type __callt_save_interrupt,@function
-__callt_save_interrupt: .short ctoff(.L_save_interrupt)
-
- .global __callt_return_interrupt
- .type __callt_return_interrupt,@function
-__callt_return_interrupt: .short ctoff(.L_return_interrupt)
-
-#endif /* L_callt_save_interrupt */
-
-#ifdef L_callt_save_all_interrupt
- /* Put these functions into the call table area. */
- .call_table_text
-
- /* Save all registers except for those saved in __save_interrupt. */
- /* Allocate enough stack for all of the registers & 16 bytes of space. */
- /* Called via: callt ctoff(__callt_save_all_interrupt). */
- .align 2
-.L_save_all_interrupt:
- addi -60, sp, sp
-#ifdef __EP__
- mov ep, r1
- mov sp, ep
- sst.w r2, 56[ep]
- sst.w r5, 52[ep]
- sst.w r6, 48[ep]
- sst.w r7, 44[ep]
- sst.w r8, 40[ep]
- sst.w r9, 36[ep]
- sst.w r11, 32[ep]
- sst.w r12, 28[ep]
- sst.w r13, 24[ep]
- sst.w r14, 20[ep]
- sst.w r15, 16[ep]
- sst.w r16, 12[ep]
- sst.w r17, 8[ep]
- sst.w r18, 4[ep]
- sst.w r19, 0[ep]
- mov r1, ep
-#else
- st.w r2, 56[sp]
- st.w r5, 52[sp]
- st.w r6, 48[sp]
- st.w r7, 44[sp]
- st.w r8, 40[sp]
- st.w r9, 36[sp]
- st.w r11, 32[sp]
- st.w r12, 28[sp]
- st.w r13, 24[sp]
- st.w r14, 20[sp]
- st.w r15, 16[sp]
- st.w r16, 12[sp]
- st.w r17, 8[sp]
- st.w r18, 4[sp]
- st.w r19, 0[sp]
-#endif
- prepare {r20 - r29, r31}, 0
- ctret
-
- /* Restore all registers saved in __save_all_interrupt
- deallocate the stack space. */
- /* Called via: callt ctoff(__callt_restore_all_interrupt). */
- .align 2
-.L_restore_all_interrupt:
- dispose 0, {r20 - r29, r31}
-#ifdef __EP__
- mov ep, r1
- mov sp, ep
- sld.w 0 [ep], r19
- sld.w 4 [ep], r18
- sld.w 8 [ep], r17
- sld.w 12[ep], r16
- sld.w 16[ep], r15
- sld.w 20[ep], r14
- sld.w 24[ep], r13
- sld.w 28[ep], r12
- sld.w 32[ep], r11
- sld.w 36[ep], r9
- sld.w 40[ep], r8
- sld.w 44[ep], r7
- sld.w 48[ep], r6
- sld.w 52[ep], r5
- sld.w 56[ep], r2
- mov r1, ep
-#else
- ld.w 0 [sp], r19
- ld.w 4 [sp], r18
- ld.w 8 [sp], r17
- ld.w 12[sp], r16
- ld.w 16[sp], r15
- ld.w 20[sp], r14
- ld.w 24[sp], r13
- ld.w 28[sp], r12
- ld.w 32[sp], r11
- ld.w 36[sp], r9
- ld.w 40[sp], r8
- ld.w 44[sp], r7
- ld.w 48[sp], r6
- ld.w 52[sp], r5
- ld.w 56[sp], r2
-#endif
- addi 60, sp, sp
- ctret
-
- /* Place the offsets of the start of these routines into the call table. */
- .call_table_data
-
- .global __callt_save_all_interrupt
- .type __callt_save_all_interrupt,@function
-__callt_save_all_interrupt: .short ctoff(.L_save_all_interrupt)
-
- .global __callt_restore_all_interrupt
- .type __callt_restore_all_interrupt,@function
-__callt_restore_all_interrupt: .short ctoff(.L_restore_all_interrupt)
-
-#endif /* L_callt_save_all_interrupt */
-
-
-#define MAKE_CALLT_FUNCS( START ) \
- .call_table_text ;\
- .align 2 ;\
- /* Allocate space and save registers START .. r29 on the stack. */ ;\
- /* Called via: callt ctoff(__callt_save_START_r29). */ ;\
-.L_save_##START##_r29: ;\
- prepare { START - r29 }, 0 ;\
- ctret ;\
- ;\
- /* Restore saved registers, deallocate stack and return. */ ;\
- /* Called via: callt ctoff(__return_START_r29). */ ;\
- .align 2 ;\
-.L_return_##START##_r29: ;\
- dispose 0, { START - r29 }, r31 ;\
- ;\
- /* Place the offsets of the start of these funcs into the call table. */;\
- .call_table_data ;\
- ;\
- .global __callt_save_##START##_r29 ;\
- .type __callt_save_##START##_r29,@function ;\
-__callt_save_##START##_r29: .short ctoff(.L_save_##START##_r29 ) ;\
- ;\
- .global __callt_return_##START##_r29 ;\
- .type __callt_return_##START##_r29,@function ;\
-__callt_return_##START##_r29: .short ctoff(.L_return_##START##_r29 )
-
-
-#define MAKE_CALLT_CFUNCS( START ) \
- .call_table_text ;\
- .align 2 ;\
- /* Allocate space and save registers START .. r31 on the stack. */ ;\
- /* Called via: callt ctoff(__callt_save_START_r31c). */ ;\
-.L_save_##START##_r31c: ;\
- prepare { START - r29, r31}, 0 ;\
- ctret ;\
- ;\
- /* Restore saved registers, deallocate stack and return. */ ;\
- /* Called via: callt ctoff(__return_START_r31c). */ ;\
- .align 2 ;\
-.L_return_##START##_r31c: ;\
- dispose 0, { START - r29, r31}, r31 ;\
- ;\
- /* Place the offsets of the start of these funcs into the call table. */;\
- .call_table_data ;\
- ;\
- .global __callt_save_##START##_r31c ;\
- .type __callt_save_##START##_r31c,@function ;\
-__callt_save_##START##_r31c: .short ctoff(.L_save_##START##_r31c ) ;\
- ;\
- .global __callt_return_##START##_r31c ;\
- .type __callt_return_##START##_r31c,@function ;\
-__callt_return_##START##_r31c: .short ctoff(.L_return_##START##_r31c )
-
-
-#ifdef L_callt_save_20
- MAKE_CALLT_FUNCS (r20)
-#endif
-#ifdef L_callt_save_21
- MAKE_CALLT_FUNCS (r21)
-#endif
-#ifdef L_callt_save_22
- MAKE_CALLT_FUNCS (r22)
-#endif
-#ifdef L_callt_save_23
- MAKE_CALLT_FUNCS (r23)
-#endif
-#ifdef L_callt_save_24
- MAKE_CALLT_FUNCS (r24)
-#endif
-#ifdef L_callt_save_25
- MAKE_CALLT_FUNCS (r25)
-#endif
-#ifdef L_callt_save_26
- MAKE_CALLT_FUNCS (r26)
-#endif
-#ifdef L_callt_save_27
- MAKE_CALLT_FUNCS (r27)
-#endif
-#ifdef L_callt_save_28
- MAKE_CALLT_FUNCS (r28)
-#endif
-#ifdef L_callt_save_29
- MAKE_CALLT_FUNCS (r29)
-#endif
-
-#ifdef L_callt_save_20c
- MAKE_CALLT_CFUNCS (r20)
-#endif
-#ifdef L_callt_save_21c
- MAKE_CALLT_CFUNCS (r21)
-#endif
-#ifdef L_callt_save_22c
- MAKE_CALLT_CFUNCS (r22)
-#endif
-#ifdef L_callt_save_23c
- MAKE_CALLT_CFUNCS (r23)
-#endif
-#ifdef L_callt_save_24c
- MAKE_CALLT_CFUNCS (r24)
-#endif
-#ifdef L_callt_save_25c
- MAKE_CALLT_CFUNCS (r25)
-#endif
-#ifdef L_callt_save_26c
- MAKE_CALLT_CFUNCS (r26)
-#endif
-#ifdef L_callt_save_27c
- MAKE_CALLT_CFUNCS (r27)
-#endif
-#ifdef L_callt_save_28c
- MAKE_CALLT_CFUNCS (r28)
-#endif
-#ifdef L_callt_save_29c
- MAKE_CALLT_CFUNCS (r29)
-#endif
-
-
-#ifdef L_callt_save_31c
- .call_table_text
- .align 2
- /* Allocate space and save register r31 on the stack. */
- /* Called via: callt ctoff(__callt_save_r31c). */
-.L_callt_save_r31c:
- prepare {r31}, 0
- ctret
-
- /* Restore saved registers, deallocate stack and return. */
- /* Called via: callt ctoff(__return_r31c). */
- .align 2
-.L_callt_return_r31c:
- dispose 0, {r31}, r31
-
- /* Place the offsets of the start of these funcs into the call table. */
- .call_table_data
-
- .global __callt_save_r31c
- .type __callt_save_r31c,@function
-__callt_save_r31c: .short ctoff(.L_callt_save_r31c)
-
- .global __callt_return_r31c
- .type __callt_return_r31c,@function
-__callt_return_r31c: .short ctoff(.L_callt_return_r31c)
-#endif
-
-#endif /* __v850e__ */
-
-/* libgcc2 routines for NEC V850. */
-/* Double Integer Arithmetical Operation. */
-
-#ifdef L_negdi2
- .text
- .global ___negdi2
- .type ___negdi2, @function
-___negdi2:
- not r6, r10
- add 1, r10
- setf l, r6
- not r7, r11
- add r6, r11
- jmp [lp]
-
- .size ___negdi2,.-___negdi2
-#endif
-
-#ifdef L_cmpdi2
- .text
- .global ___cmpdi2
- .type ___cmpdi2,@function
-___cmpdi2:
- # Signed comparison bitween each high word.
- cmp r9, r7
- be .L_cmpdi_cmp_low
- setf ge, r10
- setf gt, r6
- add r6, r10
- jmp [lp]
-.L_cmpdi_cmp_low:
- # Unsigned comparigon bitween each low word.
- cmp r8, r6
- setf nl, r10
- setf h, r6
- add r6, r10
- jmp [lp]
- .size ___cmpdi2, . - ___cmpdi2
-#endif
-
-#ifdef L_ucmpdi2
- .text
- .global ___ucmpdi2
- .type ___ucmpdi2,@function
-___ucmpdi2:
- cmp r9, r7 # Check if each high word are same.
- bne .L_ucmpdi_check_psw
- cmp r8, r6 # Compare the word.
-.L_ucmpdi_check_psw:
- setf nl, r10 #
- setf h, r6 #
- add r6, r10 # Add the result of comparison NL and comparison H.
- jmp [lp]
- .size ___ucmpdi2, . - ___ucmpdi2
-#endif
-
-#ifdef L_muldi3
- .text
- .global ___muldi3
- .type ___muldi3,@function
-___muldi3:
-#ifdef __v850__
- jarl __save_r26_r31, r10
- addi 16, sp, sp
- mov r6, r28
- shr 15, r28
- movea lo(32767), r0, r14
- and r14, r28
- mov r8, r10
- shr 15, r10
- and r14, r10
- mov r6, r19
- shr 30, r19
- mov r7, r12
- shl 2, r12
- or r12, r19
- and r14, r19
- mov r8, r13
- shr 30, r13
- mov r9, r12
- shl 2, r12
- or r12, r13
- and r14, r13
- mov r7, r11
- shr 13, r11
- and r14, r11
- mov r9, r31
- shr 13, r31
- and r14, r31
- mov r7, r29
- shr 28, r29
- and r14, r29
- mov r9, r12
- shr 28, r12
- and r14, r12
- and r14, r6
- and r14, r8
- mov r6, r14
- mulh r8, r14
- mov r6, r16
- mulh r10, r16
- mov r6, r18
- mulh r13, r18
- mov r6, r15
- mulh r31, r15
- mulh r12, r6
- mov r28, r17
- mulh r10, r17
- add -16, sp
- mov r28, r12
- mulh r8, r12
- add r17, r18
- mov r28, r17
- mulh r31, r17
- add r12, r16
- mov r28, r12
- mulh r13, r12
- add r17, r6
- mov r19, r17
- add r12, r15
- mov r19, r12
- mulh r8, r12
- mulh r10, r17
- add r12, r18
- mov r19, r12
- mulh r13, r12
- add r17, r15
- mov r11, r13
- mulh r8, r13
- add r12, r6
- mov r11, r12
- mulh r10, r12
- add r13, r15
- mulh r29, r8
- add r12, r6
- mov r16, r13
- shl 15, r13
- add r14, r13
- mov r18, r12
- shl 30, r12
- mov r13, r26
- add r12, r26
- shr 15, r14
- movhi hi(131071), r0, r12
- movea lo(131071), r12, r13
- and r13, r14
- mov r16, r12
- and r13, r12
- add r12, r14
- mov r18, r12
- shl 15, r12
- and r13, r12
- add r12, r14
- shr 17, r14
- shr 17, r16
- add r14, r16
- shl 13, r15
- shr 2, r18
- add r18, r15
- add r15, r16
- mov r16, r27
- add r8, r6
- shl 28, r6
- add r6, r27
- mov r26, r10
- mov r27, r11
- jr __return_r26_r31
-#else /* defined(__v850e__) */
- /* (Ahi << 32 + Alo) * (Bhi << 32 + Blo) */
- /* r7 r6 r9 r8 */
- mov r8, r10
- mulu r7, r8, r0 /* Ahi * Blo */
- mulu r6, r9, r0 /* Alo * Bhi */
- mulu r6, r10, r11 /* Alo * Blo */
- add r8, r11
- add r9, r11
- jmp [r31]
-#endif /* defined(__v850e__) */
- .size ___muldi3, . - ___muldi3
-#endif
-
diff --git a/gcc/config/v850/t-v850 b/gcc/config/v850/t-v850
index fcd3b84..7885229 100644
--- a/gcc/config/v850/t-v850
+++ b/gcc/config/v850/t-v850
@@ -17,67 +17,6 @@
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
-LIB1ASMSRC = v850/lib1funcs.asm
-LIB1ASMFUNCS = _mulsi3 \
- _divsi3 \
- _udivsi3 \
- _modsi3 \
- _umodsi3 \
- _save_2 \
- _save_20 \
- _save_21 \
- _save_22 \
- _save_23 \
- _save_24 \
- _save_25 \
- _save_26 \
- _save_27 \
- _save_28 \
- _save_29 \
- _save_2c \
- _save_20c \
- _save_21c \
- _save_22c \
- _save_23c \
- _save_24c \
- _save_25c \
- _save_26c \
- _save_27c \
- _save_28c \
- _save_29c \
- _save_31c \
- _save_interrupt \
- _save_all_interrupt \
- _callt_save_20 \
- _callt_save_21 \
- _callt_save_22 \
- _callt_save_23 \
- _callt_save_24 \
- _callt_save_25 \
- _callt_save_26 \
- _callt_save_27 \
- _callt_save_28 \
- _callt_save_29 \
- _callt_save_20c \
- _callt_save_21c \
- _callt_save_22c \
- _callt_save_23c \
- _callt_save_24c \
- _callt_save_25c \
- _callt_save_26c \
- _callt_save_27c \
- _callt_save_28c \
- _callt_save_29c \
- _callt_save_31c \
- _callt_save_interrupt \
- _callt_save_all_interrupt \
- _callt_save_r2_r29 \
- _callt_save_r2_r31 \
- _negdi2 \
- _cmpdi2 \
- _ucmpdi2 \
- _muldi3
-
# Create target-specific versions of the libraries
MULTILIB_OPTIONS = mv850/mv850e/mv850e2/mv850e2v3
MULTILIB_DIRNAMES = v850 v850e v850e2 v850e2v3