+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
-/* 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
#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
#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