]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
milli64.S ($$dyncall): New function.
authorJohn David Anglin <dave@hiauly1.hia.nrc.ca>
Tue, 2 Apr 2002 19:44:45 +0000 (19:44 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Tue, 2 Apr 2002 19:44:45 +0000 (19:44 +0000)
* milli64.S ($$dyncall): New function.
* t-linux (LIB1ASMFUNCS): Revise module list.
(LIB1ASMSRC): Use pa/milli64.S.

From-SVN: r51760

gcc/ChangeLog
gcc/config/pa/milli64.S
gcc/config/pa/t-linux

index b40448e0345ad0f7ca1a2410618c8ac7479cdd89..4b9eaf25ff42fac45aa93c0157832931a6f52c85 100644 (file)
@@ -1,3 +1,9 @@
+2002-04-02  John David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+       * milli64.S ($$dyncall): New function.
+       * t-linux (LIB1ASMFUNCS): Revise module list.
+       (LIB1ASMSRC): Use pa/milli64.S.
+
 2002-04-02  Richard Henderson  <rth@redhat.com>
 
        * fixinc/inclhack.def (AAB_solaris_sys_varargs_h): Move and
index e456d87511000c9ce8eeee0f71789104daeac7a4..2190a36e2c9a8a986398b297c2a01186b1b8dd30 100644 (file)
@@ -1,8 +1,8 @@
-/* 64-bit millicode, original author Hewlett-Packard
+/* 32 and 64-bit millicode, original author Hewlett-Packard
    adapted for gcc by Paul Bame <bame@debian.org>
-   and Alan Modra <alan@linuxcare.com.au>
+   and Alan Modra <alan@linuxcare.com.au>.
 
-   Copyright 2001 Free Software Foundation, Inc.
+   Copyright 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GNU CC and is released under the terms of
    of the GNU General Public License as published by the Free Software
@@ -194,6 +194,30 @@ mrp_slot:  .equ    -20     /* "current RP" slot (replacing "r31_slot") */
 #define LREF(sym)       CAT(L$,sym)
 #endif
 
+#ifdef L_dyncall
+       SUBSPA_MILLI
+       ATTR_DATA
+GSYM($$dyncall)
+       .export $$dyncall,millicode
+       .proc
+       .callinfo       millicode
+       .entry
+       bb,>=,n %r22,30,LREF(1)         ; branch if not plabel address
+       depi    0,31,2,%r22             ; clear the two least significant bits
+       ldw     4(%r22),%r19            ; load new LTP value
+       ldw     0(%r22),%r22            ; load address of target
+LSYM(1)
+#ifdef LINUX
+       bv      %r0(%r22)               ; branch to the real target
+#else
+       ldsid   (%sr0,%r22),%r1         ; get the "space ident" selected by r22
+       mtsp    %r1,%sr0                ; move that space identifier into sr0
+       be      0(%sr0,%r22)            ; branch to the real target
+#endif
+       stw     %r2,-24(%r30)           ; save return address into frame marker
+       .exit
+       .procend
+#endif
 
 #ifdef L_divI
 /* ROUTINES:   $$divI, $$divoI
index e6394a75166e1e26d513d2911d7bacca2d548d9e..51422987e7628a26a9730117192387bd9d2404c0 100644 (file)
@@ -1,13 +1,9 @@
 #Plug millicode routines into libgcc.a  We want these on both native and
-#cross compiles.
+#cross compiles.  We use the "64-bit" routines because the "32-bit" code
+#is broken for certain corner cases.
 
-LIB1ASMFUNCS =  _divI _divU _remI _remU _multiply \
-       _divI_15 _divI_14 _divI_12 _divI_10 _divI_9 \
-       _divI_7 _divI_6 _divI_5 _divI_3 \
-       _divU_15 _divU_14 _divU_12 _divU_10 _divU_9 \
-       _divU_7 _divU_6 _divU_5 _divU_3 _dyncall
-
-LIB1ASMSRC = pa/milli32.S
+LIB1ASMFUNCS = _divI _divU _remI _remU _div_const _mulI _dyncall
+LIB1ASMSRC = pa/milli64.S
 
 # Compile crtbeginS.o and crtendS.o as PIC.
 CRTSTUFF_T_CFLAGS_S = -fPIC