Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: more on proff crash building native



der Mouse wrote:
>> [T]he real problem has to do with the code in libm.so
>> (__libm_dsqrt_r5) doing a rsb with the stack wrong.  Basically the 2
>> double args (4 words) are still on the stack.

I should have checked this earlier.  This diff is interesting.

--- /mwave/files1/netbsd/NetBSD-3/src/lib/libm/arch/vax/n_sqrt.S        2004-05\
-13 16:35:40.000000000 -0400
+++ /mwave/files1/netbsd/NetBSD-5_beta/src/lib/libm/arch/vax/n_sqrt.S   2007-04\
-18 00:46:13.000000000 -0400
@@ -1,4 +1,4 @@
-/*     $NetBSD: n_sqrt.S,v 1.7 2004/05/13 20:35:40 mhitch Exp $        */
+/*     $NetBSD: n_sqrt.S,v 1.8 2007/04/18 04:46:13 matt Exp $  */
 /*
  * Copyright (c) 1985, 1993
  *     The Regents of the University of California.  All rights reserved.
@@ -54,15 +54,16 @@

 dsqrt2:        bicw3   $0x807f,%r0,%r2 # check exponent of input
        jeql    noexp           # biased exponent is zero -> 0.0 or reserved
-       bsbb    __libm_dsqrt_r5_lcl+2
+       bsbb    __libm_dsqrt_r5_lcl
 noexp: ret

 /* **************************** internal procedure */

-__libm_dsqrt_r5_lcl:
+       .hidden __libm_dsqrt_r5
 ALTENTRY(__libm_dsqrt_r5)
-       nop
-       nop
+       halt
+       halt
+__libm_dsqrt_r5_lcl:
                                /* ENTRY POINT FOR cdabs and cdsqrt     */
                                /* returns double square root scaled by */
                                /* 2^%r6        */


Home | Main Index | Thread Index | Old Index