From fe660a1a193183ef0f00965babc5f37293e4d076 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Tue, 2 Apr 2002 19:44:45 +0000 Subject: [PATCH] milli64.S ($$dyncall): New function. * milli64.S ($$dyncall): New function. * t-linux (LIB1ASMFUNCS): Revise module list. (LIB1ASMSRC): Use pa/milli64.S. From-SVN: r51760 --- gcc/ChangeLog | 6 ++++++ gcc/config/pa/milli64.S | 30 +++++++++++++++++++++++++++--- gcc/config/pa/t-linux | 12 ++++-------- 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 + + * milli64.S ($$dyncall): New function. + * t-linux (LIB1ASMFUNCS): Revise module list. + (LIB1ASMSRC): Use pa/milli64.S. + 2002-04-02 Richard Henderson * 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 - and Alan Modra + and Alan Modra . - 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