pa.h (FUNCTION_ARG_PASS_BY_REFERENCE): Handle pass-by-reference for arguments with a mode, but no type.

* pa.h (FUNCTION_ARG_PASS_BY_REFERENCE): Handle pass-by-reference
        for arguments with a mode, but no type.
        (FUNCTION_ARG_CALLEE_COPIES): Similarly.
        * t-pa (LIB2FUNCS_EXTRA): Add quadlib.asm.
        * pa/long_double.h: New file.
        * configure.in (hpux10, hpux11 configurations): hpux10 and hpux11
        both have 128bit wide long doubles.
        * configure: Rebuilt.

From-SVN: r32101
This commit is contained in:
Jeffrey A Law 2000-02-22 08:40:16 +00:00 committed by Jeff Law
parent cab1f18012
commit 24e971f667
6 changed files with 352 additions and 240 deletions

View File

@ -1,3 +1,14 @@
Tue Feb 22 01:38:57 2000 Jeffrey A Law (law@cygnus.com)
* pa.h (FUNCTION_ARG_PASS_BY_REFERENCE): Handle pass-by-reference
for arguments with a mode, but no type.
(FUNCTION_ARG_CALLEE_COPIES): Similarly.
* t-pa (LIB2FUNCS_EXTRA): Add quadlib.asm.
* pa/long_double.h: New file.
* configure.in (hpux10, hpux11 configurations): hpux10 and hpux11
both have 128bit wide long doubles.
* configure: Rebuilt.
2000-02-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* defaults.h (ASM_OUTPUT_ASCII): Constify a char*.

106
gcc/config/pa/long_double.h Normal file
View File

@ -0,0 +1,106 @@
/* Definitions of long double support for GNU compiler.
Copyright (C) 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define LONG_DOUBLE_TYPE_SIZE 128
#undef ASM_OUTPUT_LONG_DOUBLE
#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
do { long value[4]; \
REAL_VALUE_TO_TARGET_LONG_DOUBLE ((VALUE), value); \
fprintf((FILE), "%s\t0x%x\n", "\t.word", value[0]); \
fprintf((FILE), "%s\t0x%x\n", "\t.word", value[1]); \
fprintf((FILE), "%s\t0x%x\n", "\t.word", value[2]); \
fprintf((FILE), "%s\t0x%x\n", "\t.word", value[3]); \
} while (0)
/* Define library calls for quad FP operations. These are all part of the
PA32 and PA64 ABIs. */
#define ADDTF3_LIBCALL "_U_Qfadd"
#define SUBTF3_LIBCALL "_U_Qfsub"
#define MULTF3_LIBCALL "_U_Qfmpy"
#define DIVTF3_LIBCALL "_U_Qfdiv"
#define NEGTF2_LIBCALL "_U_Qfneg"
#define SQRTTF2_LIBCALL "_U_Qfsqrt"
#define ABSTF2_LIBCALL "_U_Qfabs"
#define SMINTF3_LIBCALL "_U_Qfmin"
#define SMAXTF3_LIBCALL "_U_Qfmax"
#define EXTENDSFTF2_LIBCALL "_U_Qfcnvff_sgl_to_quad"
#define EXTENDDFTF2_LIBCALL "_U_Qfcnvff_dbl_to_quad"
#define TRUNCTFSF2_LIBCALL "_U_Qfcnvff_quad_to_sgl"
#define TRUNCTFDF2_LIBCALL "_U_Qfcnvff_quad_to_dbl"
#define FLOATSITF2_LIBCALL "_U_Qfcnvxf_sgl_to_quad"
#define FLOATDITF2_LIBCALL "_U_Qfcnvxf_dbl_to_quad"
#define FIX_TRUNCTFSI2_LIBCALL "_U_Qfcnvfxt_quad_to_sgl"
#define FIX_TRUNCTFDI2_LIBCALL "_U_Qfcnvfxt_quad_to_dbl"
#define EQTF2_LIBCALL "_U_Qfeq"
#define NETF2_LIBCALL "_U_Qfne"
#define GTTF2_LIBCALL "_U_Qfgt"
#define GETF2_LIBCALL "_U_Qfge"
#define LTTF2_LIBCALL "_U_Qflt"
#define LETF2_LIBCALL "_U_Qfle"
#define INIT_TARGET_OPTABS \
do { \
add_optab->handlers[(int) TFmode].libfunc \
= gen_rtx_SYMBOL_REF (Pmode, ADDTF3_LIBCALL); \
sub_optab->handlers[(int) TFmode].libfunc \
= gen_rtx_SYMBOL_REF (Pmode, SUBTF3_LIBCALL); \
smul_optab->handlers[(int) TFmode].libfunc \
= gen_rtx_SYMBOL_REF (Pmode, MULTF3_LIBCALL); \
flodiv_optab->handlers[(int) TFmode].libfunc \
= gen_rtx_SYMBOL_REF (Pmode, DIVTF3_LIBCALL); \
smin_optab->handlers[(int) TFmode].libfunc \
= gen_rtx_SYMBOL_REF (Pmode, SMINTF3_LIBCALL); \
smax_optab->handlers[(int) TFmode].libfunc \
= gen_rtx_SYMBOL_REF (Pmode, SMAXTF3_LIBCALL); \
sqrt_optab->handlers[(int) TFmode].libfunc \
= gen_rtx_SYMBOL_REF (Pmode, SQRTTF2_LIBCALL); \
abs_optab->handlers[(int) TFmode].libfunc \
= gen_rtx_SYMBOL_REF (Pmode, ABSTF2_LIBCALL); \
neg_optab->handlers[(int) TFmode].libfunc \
= gen_rtx_SYMBOL_REF (Pmode, NEGTF2_LIBCALL); \
extendsftf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EXTENDSFTF2_LIBCALL); \
extenddftf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EXTENDDFTF2_LIBCALL); \
trunctfsf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, TRUNCTFSF2_LIBCALL); \
trunctfdf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, TRUNCTFDF2_LIBCALL); \
floatsitf_libfunc = gen_rtx_SYMBOL_REF (Pmode, FLOATSITF2_LIBCALL); \
floatditf_libfunc = gen_rtx_SYMBOL_REF (Pmode, FLOATDITF2_LIBCALL); \
fixtfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFSI2_LIBCALL);\
fixtfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL);\
fixunstfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFSI2_LIBCALL); \
fixunstfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL); \
eqtf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EQTF2_LIBCALL); \
netf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, NETF2_LIBCALL); \
gttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GTTF2_LIBCALL); \
getf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GETF2_LIBCALL); \
lttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, LTTF2_LIBCALL); \
letf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, LETF2_LIBCALL); \
INIT_SUBTARGET_OPTABS; \
} while (0)
/* This is meant to be redefined in the host dependent files */
#define INIT_SUBTARGET_OPTABS
/* Nonzero if a floating point comparison library call for
mode MODE that will return a boolean value. Zero if one
of the libgcc2 functions is used. */
#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) ((MODE) == TFmode)

View File

@ -1054,10 +1054,12 @@ struct hppa_args {int words, nargs_prototype, indirect; };
/* Arguments larger than eight bytes are passed by invisible reference */
#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \
((TYPE) && int_size_in_bytes (TYPE) > 8)
(((TYPE) && int_size_in_bytes (TYPE) > 8) \
|| (MODE) && GET_MODE_SIZE (MODE) > 8)
#define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) \
((TYPE) && int_size_in_bytes (TYPE) > 8)
(((TYPE) && int_size_in_bytes (TYPE) > 8) \
|| (MODE) && GET_MODE_SIZE (MODE) > 8)
extern struct rtx_def *hppa_compare_op0, *hppa_compare_op1;

View File

@ -1,10 +1,14 @@
LIBGCC1=libgcc1.null
CROSS_LIBGCC1=libgcc1.null
ADA_CFLAGS=-mdisable-indexing
LIB2FUNCS_EXTRA=lib2funcs.asm
LIB2FUNCS_EXTRA=lib2funcs.asm quadlib.asm
lib2funcs.asm: $(srcdir)/config/pa/lib2funcs.asm
rm -f lib2funcs.asm
cp $(srcdir)/config/pa/lib2funcs.asm .
quadlib.asm: $(srcdir)/config/pa/quadlib.asm
rm -f quadlib.asm
cp $(srcdir)/config/pa/quadlib.asm .
TARGET_LIBGCC2_CFLAGS = -fPIC

455
gcc/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -999,7 +999,7 @@ changequote([,])dnl
;;
hppa1.1-*-hpux10* | hppa2*-*-hpux10*)
target_cpu_default="MASK_PA_11"
tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
tm_file="${tm_file} pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
xm_file=pa/xm-pahpux.h
xmake_file=pa/x-pa-hpux
tmake_file=pa/t-pa
@ -1018,7 +1018,7 @@ changequote([,])dnl
use_collect2=yes
;;
hppa1.0-*-hpux10*)
tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
tm_file="${tm_file} pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
xm_file=pa/xm-pahpux.h
xmake_file=pa/x-pa-hpux
tmake_file=pa/t-pa
@ -1038,7 +1038,7 @@ changequote([,])dnl
;;
hppa1.1-*-hpux11* | hppa2*-*-hpux11*)
target_cpu_default="MASK_PA_11"
tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
tm_file="${tm_file} pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
xm_file=pa/xm-pahpux.h
xmake_file=pa/x-pa-hpux
tmake_file=pa/t-pa
@ -1057,7 +1057,7 @@ changequote([,])dnl
use_collect2=yes
;;
hppa1.0-*-hpux11*)
tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
tm_file="${tm_file} pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
xm_file=pa/xm-pahpux.h
xmake_file=pa/x-pa-hpux
if test x$gas = xyes