This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: minor fix to ARM float lib


Without this change libgcc.a ends up with __fixunsdfsi defined twice
presumably due to the C version being included and the other one pulled 
with _fixdfsi.o.  Properly spliting those two in their respective targets
fix the problem, and isn't a bad thing to do anyway.

[ This is also to test the patch submission procedure. 
  Please tell me if I need to change something. ]


2003-09-14  Nicolas Pitre <nico@cam.org>

	* arm/ieee754-df.S: split compilation of fixunsdfsi from
	  L_fixdfsi target.
	* arm/t-arm-elf: add _fixunsdfsi target due to the above.

Index: config/arm/t-arm-elf
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/arm/t-arm-elf,v
retrieving revision 1.19
diff -u -r1.19 t-arm-elf
--- config/arm/t-arm-elf	30 Aug 2003 15:55:17 -0000	1.19
+++ config/arm/t-arm-elf	8 Sep 2003 18:03:05 -0000
@@ -1,7 +1,7 @@
 LIB1ASMSRC = arm/lib1funcs.asm
 LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func \
 	_call_via_rX _interwork_call_via_rX \
-	_negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi \
+	_negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
 	_truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
 	_fixsfsi _fixunssfsi
 
Index: config/arm/ieee754-df.S
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/arm/ieee754-df.S,v
retrieving revision 1.2
diff -u -r1.2 ieee754-df.S
--- config/arm/ieee754-df.S	30 Aug 2003 15:55:18 -0000	1.2
+++ config/arm/ieee754-df.S	8 Sep 2003 18:03:06 -0000
@@ -1086,6 +1086,10 @@
 
 	FUNC_END fixdfsi
 
+#endif /* L_fixdfsi */
+
+#ifdef L_fixunsdfsi
+
 ARM_FUNC_START fixunsdfsi
 	orrs	ip, xl, xh, lsl #1
 	movcss	r0, #0			@ value is negative
@@ -1096,13 +1100,13 @@
 	orr	ip, ip, #0x00f00000
 	and	r2, xh, ip
 	teq	r2, ip
-	beq	1f			@ value is INF or NAN
+	beq	2f			@ value is INF or NAN
 	bic	ip, ip, #0x40000000
 	cmp	r2, ip
-	bcc	1b			@ value is too small
+	bcc	1f			@ value is too small
 	add	ip, ip, #(31 << 20)
 	cmp	r2, ip
-	bhi	2f			@ value is too large
+	bhi	3f			@ value is too large
 
 	rsb	r2, r2, ip
 	mov	ip, xh, lsl #11
@@ -1112,14 +1116,20 @@
 	mov	r0, ip, lsr r2
 	RET
 
-1:	orrs	xl, xl, xh, lsl #12
-	bne	4b			@ value is NAN.
-2:	mov	r0, #0xffffffff		@ maximum unsigned si
+1:	mov	r0, #0
+	RET
+
+2:	orrs	xl, xl, xh, lsl #12
+	bne	4f			@ value is NAN.
+3:	mov	r0, #0xffffffff		@ maximum unsigned si
+	RET
+
+4:	mov	r0, #0			@ How should we convert NAN?
 	RET
 
 	FUNC_END fixunsdfsi
 
-#endif /* L_fixunsdfdi */
+#endif /* L_fixunsdfsi */
 
 #ifdef L_truncdfsf2
 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]