This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
SH: _set_fpscr added
- To: egcs-patches at cygnus dot com
- Subject: SH: _set_fpscr added
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Fri, 2 Oct 1998 16:23:19 +0100 (BST)
Fri Oct 2 16:13:12 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* t-sh (LIB1ASMFUNCS): Add _set_fpscr .
* config/sh/lib1funcs.asm (___set_fpscr): Add.
Index: config/sh/t-sh
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/sh/t-sh,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 t-sh
*** t-sh 1997/08/11 15:57:46 1.1.1.1
--- t-sh 1998/10/02 15:21:19
***************
*** 1,7 ****
CROSS_LIBGCC1 = libgcc1-asm.a
LIB1ASMSRC = sh/lib1funcs.asm
LIB1ASMFUNCS = _ashiftrt _ashiftrt_n _ashiftlt _lshiftrt _movstr \
! _mulsi3 _sdivsi3 _udivsi3
# These are really part of libgcc1, but this will cause them to be
# built correctly, so...
--- 1,7 ----
CROSS_LIBGCC1 = libgcc1-asm.a
LIB1ASMSRC = sh/lib1funcs.asm
LIB1ASMFUNCS = _ashiftrt _ashiftrt_n _ashiftlt _lshiftrt _movstr \
! _mulsi3 _sdivsi3 _udivsi3 _set_fpscr
# These are really part of libgcc1, but this will cause them to be
# built correctly, so...
Index: config/sh/lib1funcs.asm
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/sh/lib1funcs.asm,v
retrieving revision 1.1.1.2
diff -p -r1.1.1.2 lib1funcs.asm
*** lib1funcs.asm 1997/11/02 08:45:34 1.1.1.2
--- lib1funcs.asm 1998/10/02 15:21:19
*************** ret: rts
*** 967,969 ****
--- 967,994 ----
mov r4,r0
#endif
+ #ifdef L_set_fpscr
+ #if defined (__SH3E__)
+ .global ___set_fpscr
+ ___set_fpscr:
+ lds r4,fpscr
+ mov.l ___set_fpscr_L1,r1
+ swap.w r4,r0
+ or #24,r0
+ xor #16,r0
+ swap.w r0,r2
+ mov.l r2,@r1
+ xor #8,r0
+ swap.w r0,r3
+ rts
+ mov.l r3,@(4,r1)
+ .align 2
+ ___set_fpscr_L1:
+ .long ___fpscr_values
+ #ifdef __ELF__
+ .comm ___fpscr_values,8,4
+ #else
+ .comm ___fpscr_values,8
+ #endif /* ELF */
+ #endif /* SH3E */
+ #endif /* L_set_fpscr */