This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: __fpscr_values in SH lib1funcs.asm
- To: gcc-patches at gcc dot gnu dot org
- Subject: Patch: __fpscr_values in SH lib1funcs.asm
- From: kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Date: Tue, 02 Oct 2001 14:23:37 +0900
- Cc: rodrigc at gcc dot gnu dot org, aoliva at redhat dot com, amylaar at redhat dot com, gniibe at m17n dot org
Hello,
lib1funcs of SH includes a table for switching FPU mode for SH-4.
This object should be an unique entity and it seems very good if
it's added to libgcc_s.so. The appended patch makes it possible.
There is no regression for sh-linux.
Regards,
kaz
--
2001-10-02 kaz Kojima <kkojima@rr.iij4u.or.jp>
* config/sh/lib1funcs.asm (__fpscr_values): Make it weak data
symbol instead of common symbol if L_fpscr_values defined.
Index: lib1funcs.asm
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/sh/lib1funcs.asm,v
retrieving revision 1.19
diff -u -r1.19 lib1funcs.asm
--- lib1funcs.asm 2001/06/03 22:08:26 1.19
+++ lib1funcs.asm 2001/10/02 04:05:30
@@ -1203,13 +1203,31 @@
.align 2
LOCAL(set_fpscr_L1):
.long GLOBAL(fpscr_values)
+#ifndef L_fpscr_values
#ifdef __ELF__
.comm GLOBAL(fpscr_values),8,4
#else
.comm GLOBAL(fpscr_values),8
#endif /* ELF */
+#endif /* L_fpscr_values */
#endif /* SH3E / SH4 */
#endif /* L_set_fpscr */
+#ifdef L_fpscr_values
+ .data
+ .align 2
+ .globl GLOBAL(fpscr_values)
+ .weak GLOBAL(fpscr_values)
+ .type GLOBAL(fpscr_values),@object
+GLOBAL(fpscr_values):
+#ifdef FMOVD_WORKS
+ .long 0x100000
+ .long 0x180000
+#else
+ .long 0
+ .long 0x80000
+#endif
+ .size GLOBAL(fpscr_values),8
+#endif /* fpscr_values */
#ifdef L_ic_invalidate
#if defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
.global GLOBAL(ic_invalidate)