summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2002-04-02 19:44:45 +0000
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2002-04-02 19:44:45 +0000
commitf288a74f03779a771f536720b95351ddcb6c8a08 (patch)
tree7d1101292e8c919f6a605c7b919b6a61dd173638
parentbffe0cfeba9be575c593f22e5cca45489872194f (diff)
downloadppe42-gcc-f288a74f03779a771f536720b95351ddcb6c8a08.tar.gz
ppe42-gcc-f288a74f03779a771f536720b95351ddcb6c8a08.zip
* milli64.S ($$dyncall): New function.
* t-linux (LIB1ASMFUNCS): Revise module list. (LIB1ASMSRC): Use pa/milli64.S. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51760 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/pa/milli64.S30
-rw-r--r--gcc/config/pa/t-linux12
3 files changed, 37 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b40448e0345..4b9eaf25ff4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/pa/milli64.S b/gcc/config/pa/milli64.S
index e456d875110..2190a36e2c9 100644
--- a/gcc/config/pa/milli64.S
+++ b/gcc/config/pa/milli64.S
@@ -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
diff --git a/gcc/config/pa/t-linux b/gcc/config/pa/t-linux
index e6394a75166..51422987e76 100644
--- a/gcc/config/pa/t-linux
+++ b/gcc/config/pa/t-linux
@@ -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
OpenPOWER on IntegriCloud