Nicolas Pitre <nico@cam.org>
authorRichard Earnshaw <rearnsha@gcc.gnu.org>
Tue, 30 Sep 2003 10:21:41 +0000 (10:21 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Tue, 30 Sep 2003 10:21:41 +0000 (10:21 +0000)
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.

From-SVN: r71939

gcc/ChangeLog
gcc/config/arm/ieee754-df.S
gcc/config/arm/t-arm-elf

index b4d0f4d..cb96868 100644 (file)
@@ -1,4 +1,10 @@
-2003-09-80  Nathanael Nerode  <neroden@gcc.gnu.org>
+2003-09-30  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.
+
+2003-09-30  Nathanael Nerode  <neroden@gcc.gnu.org>
 
        * config.gcc: Default use_fixproto to 'no'.
 
index 2d5f487..b04d3df 100644 (file)
@@ -1086,6 +1086,10 @@ ARM_FUNC_START fixdfsi
 
        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 @@ ARM_FUNC_START fixunsdfsi
        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 @@ ARM_FUNC_START fixunsdfsi
        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 1b8f719..3f48f8b 100644 (file)
@@ -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