From 20e415dfabc982852a012d91c3896101d6bb7c4f Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Thu, 17 Feb 2005 00:34:42 +0000 Subject: [PATCH] re PR target/19019 (GCC ldouble format incompatibility with XLC long double) PR target/19019 Backport from mainline: 2005-02-16 David Edelsohn * config/rs6000/t-aix43 (SHLIB_MAPFILES): Add libgcc-ppc64.ver. * config/rs6000/t-aix52 (SHLIB_MAPFILES): Same. 2005-02-15 David Edelsohn Alan Modra * config/rs6000/darwin-ldouble.c (_xlqadd): Rename to __gcc_qadd. (_xlqsub): Rename to __gcc_qsub. (_xlqmul): Rename to __gcc_qmul. (_xlqdiv): Rename to __gcc_qdiv. Provide versioned symbol aliases with old names. * config/rs6000/libgcc-ppc64.ver: Rename symbols. * config/rs6000/rs6000.c (rs6000_init_libfuncs): Rename symbols. * config/rs6000/t-aix43 (LIB2FUNCS_EXTRA): New. * config/rs6000/t-aix52 (LIB2FUNCS_EXTRA): New. * config/rs6000/t-newas (LIB2FUNCS_EXTRA): New. 2005-02-14 David Edelsohn * config/rs6000/rs6000.md (trunctfdf2): Change to define_expand. (trunctfdf2_internal1): New. (trunctfdf2_internal2): Renamed from trunctfdf2. 2005-02-13 David Edelsohn * config/rs6000/aix.h ({TARGET,MASK}_XL_CALL): Rename to {TARGET,MASK}_XL_COMPAT. (SUBTARGET_SWITCHES): Rename xl-call to xl-compat. Use MASK_XL_COMPAT. * config/rs6000/beos.h ({TARGET,MASK}_XL_CALL): Remove. * config/rs6000/rs6000.c (function_arg): Change TARGET_XL_CALL to TARGET_XL_COMPAT. (rs6000_arg_partial_bytes): Same. (rs6000_generate_compare): Generate PARALLEL for compare if TFmode and XL compatibility enabled. * config/rs6000/rs6000.h (TARGET_XL_CALL): Rename to TARGET_XL_COMPAT. * config/rs6000/rs6000.md (cmptf_internal1): Add !TARGET_XL_COMPAT test to final condition. (cmptf_internal2): New. * doc/invoke.texi (RS/6000 Subtarget Options): Change xl-call to xl-compat. Add TFmode information to description. From-SVN: r95133 --- gcc/ChangeLog | 41 +++++++++++++ gcc/config/rs6000/aix.h | 16 ++--- gcc/config/rs6000/beos.h | 12 ---- gcc/config/rs6000/darwin-ldouble.c | 39 +++++++++---- gcc/config/rs6000/libgcc-ppc64.ver | 10 ++-- gcc/config/rs6000/rs6000.c | 46 +++++++++++---- gcc/config/rs6000/rs6000.md | 93 ++++++++++++++++++++++++++++-- gcc/config/rs6000/t-aix43 | 5 +- gcc/config/rs6000/t-aix52 | 5 +- gcc/doc/invoke.texi | 24 ++++---- 10 files changed, 227 insertions(+), 64 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 71f52ab73c28..1b0c25b09a88 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,44 @@ +2005-02-16 David Edelsohn + + PR target/19019 + Backport from mainline: + 2005-02-16 David Edelsohn + * config/rs6000/t-aix43 (SHLIB_MAPFILES): Add libgcc-ppc64.ver. + * config/rs6000/t-aix52 (SHLIB_MAPFILES): Same. + 2005-02-15 David Edelsohn + Alan Modra + * config/rs6000/darwin-ldouble.c (_xlqadd): Rename to __gcc_qadd. + (_xlqsub): Rename to __gcc_qsub. + (_xlqmul): Rename to __gcc_qmul. + (_xlqdiv): Rename to __gcc_qdiv. + Provide versioned symbol aliases with old names. + * config/rs6000/libgcc-ppc64.ver: Rename symbols. + * config/rs6000/rs6000.c (rs6000_init_libfuncs): Rename symbols. + * config/rs6000/t-aix43 (LIB2FUNCS_EXTRA): New. + * config/rs6000/t-aix52 (LIB2FUNCS_EXTRA): New. + * config/rs6000/t-newas (LIB2FUNCS_EXTRA): New. + 2005-02-14 David Edelsohn + * config/rs6000/rs6000.md (trunctfdf2): Change to define_expand. + (trunctfdf2_internal1): New. + (trunctfdf2_internal2): Renamed from trunctfdf2. + 2005-02-13 David Edelsohn + * config/rs6000/aix.h ({TARGET,MASK}_XL_CALL): Rename to + {TARGET,MASK}_XL_COMPAT. + (SUBTARGET_SWITCHES): Rename xl-call to xl-compat. Use + MASK_XL_COMPAT. + * config/rs6000/beos.h ({TARGET,MASK}_XL_CALL): Remove. + * config/rs6000/rs6000.c (function_arg): Change TARGET_XL_CALL to + TARGET_XL_COMPAT. + (rs6000_arg_partial_bytes): Same. + (rs6000_generate_compare): Generate PARALLEL for compare if TFmode + and XL compatibility enabled. + * config/rs6000/rs6000.h (TARGET_XL_CALL): Rename to TARGET_XL_COMPAT. + * config/rs6000/rs6000.md (cmptf_internal1): Add !TARGET_XL_COMPAT + test to final condition. + (cmptf_internal2): New. + * doc/invoke.texi (RS/6000 Subtarget Options): Change xl-call to + xl-compat. Add TFmode information to description. + 2005-02-16 Eric Christopher PR preprocessor/19077 diff --git a/gcc/config/rs6000/aix.h b/gcc/config/rs6000/aix.h index 888234dc8b99..b14107f523a6 100644 --- a/gcc/config/rs6000/aix.h +++ b/gcc/config/rs6000/aix.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler, for IBM RS/6000 POWER running AIX. - Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GCC. @@ -175,15 +175,15 @@ #define JUMP_TABLES_IN_TEXT_SECTION 1 /* Enable AIX XL compiler calling convention breakage compatibility. */ -#undef TARGET_XL_CALL -#define MASK_XL_CALL 0x40000000 -#define TARGET_XL_CALL (target_flags & MASK_XL_CALL) +#undef TARGET_XL_COMPAT +#define MASK_XL_COMPAT 0x40000000 +#define TARGET_XL_COMPAT (target_flags & MASK_XL_COMPAT) #undef SUBTARGET_SWITCHES #define SUBTARGET_SWITCHES \ - {"xl-call", MASK_XL_CALL, \ - N_("Always pass floating-point arguments in memory") }, \ - {"no-xl-call", - MASK_XL_CALL, \ - N_("Don't always pass floating-point arguments in memory") }, \ + {"xl-compat", MASK_XL_COMPAT, \ + N_("Conform more closely to IBM XLC semantics") }, \ + {"no-xl-compat", - MASK_XL_COMPAT, \ + N_("Default GCC semantics that differ from IBM XLC") }, \ SUBSUBTARGET_SWITCHES #define SUBSUBTARGET_SWITCHES diff --git a/gcc/config/rs6000/beos.h b/gcc/config/rs6000/beos.h index 1ce36bf70aab..a9e88ac2f322 100644 --- a/gcc/config/rs6000/beos.h +++ b/gcc/config/rs6000/beos.h @@ -23,18 +23,6 @@ #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (BeOS/PowerPC)"); -/* Enable AIX XL compiler calling convention breakage compatibility. */ -#define MASK_XL_CALL 0x40000000 -#define TARGET_XL_CALL (target_flags & MASK_XL_CALL) -#undef SUBTARGET_SWITCHES -#define SUBTARGET_SWITCHES \ - {"xl-call", MASK_XL_CALL, \ - N_("Always pass floating-point arguments in memory") }, \ - {"no-xl-call", - MASK_XL_CALL, \ - N_("Don't always pass floating-point arguments in memory") }, \ - {"threads", 0}, \ - {"pe", 0}, - #undef ASM_SPEC #define ASM_SPEC "-u %(asm_cpu)" diff --git a/gcc/config/rs6000/darwin-ldouble.c b/gcc/config/rs6000/darwin-ldouble.c index 3174ebbcc5bc..60c17681b11f 100644 --- a/gcc/config/rs6000/darwin-ldouble.c +++ b/gcc/config/rs6000/darwin-ldouble.c @@ -1,5 +1,5 @@ /* 128-bit long double support routines for Darwin. - Copyright (C) 1993, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1993, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GCC. @@ -48,7 +48,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA This code currently assumes big-endian. */ -#if !_SOFT_FLOAT && (defined (__MACH__) || defined (__powerpc64__)) +#if !_SOFT_FLOAT && (defined (__MACH__) || defined (__powerpc64__) || defined (_AIX)) #define fabs(x) __builtin_fabs(x) @@ -58,10 +58,27 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA but GCC currently generates poor code when a union is used to turn a long double into a pair of doubles. */ -extern long double _xlqadd (double, double, double, double); -extern long double _xlqsub (double, double, double, double); -extern long double _xlqmul (double, double, double, double); -extern long double _xlqdiv (double, double, double, double); +extern long double __gcc_qadd (double, double, double, double); +extern long double __gcc_qsub (double, double, double, double); +extern long double __gcc_qmul (double, double, double, double); +extern long double __gcc_qdiv (double, double, double, double); + +#ifdef __ELF__ +/* Provide definitions of the old symbol names to statisfy apps and + shared libs built against an older libgcc. To access the _xlq + symbols an explicit version reference is needed, so these won't + satisfy an unadorned reference like _xlqadd. If dot symbols are + not needed, the assembler will remove the aliases from the symbol + table. */ +__asm__ (".symver __gcc_qadd,_xlqadd@GCC_3.4\n\t" + ".symver __gcc_qsub,_xlqsub@GCC_3.4\n\t" + ".symver __gcc_qmul,_xlqmul@GCC_3.4\n\t" + ".symver __gcc_qdiv,_xlqdiv@GCC_3.4\n\t" + ".symver .__gcc_qadd,._xlqadd@GCC_3.4\n\t" + ".symver .__gcc_qsub,._xlqsub@GCC_3.4\n\t" + ".symver .__gcc_qmul,._xlqmul@GCC_3.4\n\t" + ".symver .__gcc_qdiv,._xlqdiv@GCC_3.4"); +#endif typedef union { @@ -73,7 +90,7 @@ static const double FPKINF = 1.0/0.0; /* Add two 'long double' values and return the result. */ long double -_xlqadd (double a, double b, double c, double d) +__gcc_qadd (double a, double b, double c, double d) { longDblUnion z; double t, tau, u, FPR_zero, FPR_PosInf; @@ -132,13 +149,13 @@ _xlqadd (double a, double b, double c, double d) } long double -_xlqsub (double a, double b, double c, double d) +__gcc_qsub (double a, double b, double c, double d) { - return _xlqadd (a, b, -c, -d); + return __gcc_qadd (a, b, -c, -d); } long double -_xlqmul (double a, double b, double c, double d) +__gcc_qmul (double a, double b, double c, double d) { longDblUnion z; double t, tau, u, v, w, FPR_zero, FPR_PosInf; @@ -169,7 +186,7 @@ _xlqmul (double a, double b, double c, double d) } long double -_xlqdiv (double a, double b, double c, double d) +__gcc_qdiv (double a, double b, double c, double d) { longDblUnion z; double s, sigma, t, tau, u, v, w, FPR_zero, FPR_PosInf; diff --git a/gcc/config/rs6000/libgcc-ppc64.ver b/gcc/config/rs6000/libgcc-ppc64.ver index 116d5e73fa07..b27b4b492494 100644 --- a/gcc/config/rs6000/libgcc-ppc64.ver +++ b/gcc/config/rs6000/libgcc-ppc64.ver @@ -1,7 +1,7 @@ -GCC_3.4 { +GCC_3.4.4 { # long double support - _xlqadd - _xlqsub - _xlqmul - _xlqdiv + __gcc_qadd + __gcc_qsub + __gcc_qmul + __gcc_qdiv } diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 4b17d62bcebe..4a4092890d76 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -1,6 +1,6 @@ /* Subroutines used for code generation on IBM RS/6000. Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) This file is part of GCC. @@ -4522,7 +4522,7 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, needs_psave = (type && (cum->nargs_prototype <= 0 || (DEFAULT_ABI == ABI_AIX - && TARGET_XL_CALL + && TARGET_XL_COMPAT && align_words >= GP_ARG_NUM_REG))); if (!needs_psave && mode == fmode) @@ -4616,7 +4616,7 @@ function_arg_partial_nregs (CUMULATIVE_ARGS *cum, enum machine_mode mode, && !(type && (cum->nargs_prototype <= 0 || (DEFAULT_ABI == ABI_AIX - && TARGET_XL_CALL + && TARGET_XL_COMPAT && align_words >= GP_ARG_NUM_REG)))) { if (cum->fregno + ((GET_MODE_SIZE (mode) + 7) >> 3) > FP_ARG_MAX_REG + 1) @@ -7708,10 +7708,10 @@ rs6000_init_libfuncs (void) } /* Standard AIX/Darwin/64-bit SVR4 quad floating point routines. */ - set_optab_libfunc (add_optab, TFmode, "_xlqadd"); - set_optab_libfunc (sub_optab, TFmode, "_xlqsub"); - set_optab_libfunc (smul_optab, TFmode, "_xlqmul"); - set_optab_libfunc (sdiv_optab, TFmode, "_xlqdiv"); + set_optab_libfunc (add_optab, TFmode, "__gcc_qadd"); + set_optab_libfunc (sub_optab, TFmode, "__gcc_qsub"); + set_optab_libfunc (smul_optab, TFmode, "__gcc_qmul"); + set_optab_libfunc (sdiv_optab, TFmode, "__gcc_qdiv"); } else { @@ -9951,10 +9951,34 @@ rs6000_generate_compare (enum rtx_code code) emit_insn (cmp); } else - emit_insn (gen_rtx_SET (VOIDmode, compare_result, - gen_rtx_COMPARE (comp_mode, - rs6000_compare_op0, - rs6000_compare_op1))); + { + /* Generate XLC-compatible TFmode compare as PARALLEL with extra + CLOBBERs to match cmptf_internal2 pattern. */ + if (comp_mode == CCFPmode && TARGET_XL_COMPAT + && GET_MODE (rs6000_compare_op0) == TFmode + && (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) + && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128) + emit_insn (gen_rtx_PARALLEL (VOIDmode, + gen_rtvec (9, + gen_rtx_SET (VOIDmode, + compare_result, + gen_rtx_COMPARE (comp_mode, + rs6000_compare_op0, + rs6000_compare_op1)), + gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (DFmode)), + gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (DFmode)), + gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (DFmode)), + gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (DFmode)), + gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (DFmode)), + gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (DFmode)), + gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (DFmode)), + gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (DFmode))))); + else + emit_insn (gen_rtx_SET (VOIDmode, compare_result, + gen_rtx_COMPARE (comp_mode, + rs6000_compare_op0, + rs6000_compare_op1))); + } /* Some kinds of FP comparisons need an OR operation; under flag_finite_math_only we don't bother. */ diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 4328bb66a5be..b67c210e2a9d 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -1,6 +1,6 @@ ;; Machine description for IBM RISC System 6000 (POWER) for GNU C compiler ;; Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -;; 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +;; 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ;; This file is part of GCC. @@ -8259,14 +8259,36 @@ DONE; }) -(define_insn "trunctfdf2" +(define_expand "trunctfdf2" [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (float_truncate:DF (match_operand:TF 1 "gpc_reg_operand" "f")))] "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128" +"") + +(define_insn_and_split "trunctfdf2_internal1" + [(set (match_operand:DF 0 "gpc_reg_operand" "=f,?f") + (float_truncate:DF (match_operand:TF 1 "gpc_reg_operand" "0,f")))] + "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) && !TARGET_XL_COMPAT + && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128" + "@ + # + fmr %0,%1" + "&& reload_completed && REGNO (operands[0]) == REGNO (operands[1])" + [(const_int 0)] +{ + emit_note (NOTE_INSN_DELETED); + DONE; +} + [(set_attr "type" "fp")]) + +(define_insn "trunctfdf2_internal2" + [(set (match_operand:DF 0 "gpc_reg_operand" "=f") + (float_truncate:DF (match_operand:TF 1 "gpc_reg_operand" "f")))] + "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) && TARGET_XL_COMPAT + && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128" "fadd %0,%1,%L1" - [(set_attr "type" "fp") - (set_attr "length" "4")]) + [(set_attr "type" "fp")]) (define_insn_and_split "trunctfsf2" [(set (match_operand:SF 0 "gpc_reg_operand" "=f") @@ -11297,11 +11319,72 @@ [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") (compare:CCFP (match_operand:TF 1 "gpc_reg_operand" "f") (match_operand:TF 2 "gpc_reg_operand" "f")))] - "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) + "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) && !TARGET_XL_COMPAT && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128" "fcmpu %0,%1,%2\;bne %0,$+8\;fcmpu %0,%L1,%L2" [(set_attr "type" "fpcompare") (set_attr "length" "12")]) + +(define_insn_and_split "*cmptf_internal2" + [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") + (compare:CCFP (match_operand:TF 1 "gpc_reg_operand" "f") + (match_operand:TF 2 "gpc_reg_operand" "f"))) + (clobber (match_scratch:DF 3 "=f")) + (clobber (match_scratch:DF 4 "=f")) + (clobber (match_scratch:DF 5 "=f")) + (clobber (match_scratch:DF 6 "=f")) + (clobber (match_scratch:DF 7 "=f")) + (clobber (match_scratch:DF 8 "=f")) + (clobber (match_scratch:DF 9 "=f")) + (clobber (match_scratch:DF 10 "=f"))] + "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) && TARGET_XL_COMPAT + && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128" + "#" + "&& reload_completed" + [(set (match_dup 3) (match_dup 13)) + (set (match_dup 4) (match_dup 14)) + (set (match_dup 9) (abs:DF (match_dup 5))) + (set (match_dup 0) (compare:CCFP (match_dup 9) (match_dup 3))) + (set (pc) (if_then_else (ne (match_dup 0) (const_int 0)) + (label_ref (match_dup 11)) + (pc))) + (set (match_dup 0) (compare:CCFP (match_dup 5) (match_dup 7))) + (set (pc) (label_ref (match_dup 12))) + (match_dup 11) + (set (match_dup 10) (minus:DF (match_dup 5) (match_dup 7))) + (set (match_dup 9) (minus:DF (match_dup 6) (match_dup 8))) + (set (match_dup 9) (plus:DF (match_dup 10) (match_dup 9))) + (set (match_dup 0) (compare:CCFP (match_dup 7) (match_dup 4))) + (match_dup 12)] +{ + REAL_VALUE_TYPE rv; + const int lo_word = FLOAT_WORDS_BIG_ENDIAN ? GET_MODE_SIZE (DFmode) : 0; + const int hi_word = FLOAT_WORDS_BIG_ENDIAN ? 0 : GET_MODE_SIZE (DFmode); + + operands[5] = simplify_gen_subreg (DFmode, operands[1], TFmode, hi_word); + operands[6] = simplify_gen_subreg (DFmode, operands[1], TFmode, lo_word); + operands[7] = simplify_gen_subreg (DFmode, operands[2], TFmode, hi_word); + operands[8] = simplify_gen_subreg (DFmode, operands[2], TFmode, lo_word); + operands[11] = gen_label_rtx (); + operands[12] = gen_label_rtx (); + real_inf (&rv); + operands[13] = force_const_mem (DFmode, + CONST_DOUBLE_FROM_REAL_VALUE (rv, DFmode)); + operands[14] = force_const_mem (DFmode, + CONST_DOUBLE_FROM_REAL_VALUE (dconst0, + DFmode)); + if (TARGET_TOC) + { + operands[13] = gen_rtx_MEM (DFmode, + create_TOC_reference (XEXP (operands[13], 0))); + operands[14] = gen_rtx_MEM (DFmode, + create_TOC_reference (XEXP (operands[14], 0))); + set_mem_alias_set (operands[13], get_TOC_alias_set ()); + set_mem_alias_set (operands[14], get_TOC_alias_set ()); + RTX_UNCHANGING_P (operands[13]) = 1; + RTX_UNCHANGING_P (operands[14]) = 1; + } +}) ;; Now we have the scc insns. We can do some combinations because of the ;; way the machine works. diff --git a/gcc/config/rs6000/t-aix43 b/gcc/config/rs6000/t-aix43 index a716209e9bc9..8c2592fe4305 100644 --- a/gcc/config/rs6000/t-aix43 +++ b/gcc/config/rs6000/t-aix43 @@ -58,9 +58,12 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ SHLIB_INSTALL = $(INSTALL_DATA) @shlib_base_name@.a $$(DESTDIR)$$(slibdir)/ SHLIB_LIBS = -lc `case @shlib_base_name@ in *pthread*) echo -lpthread ;; esac` SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk -SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver +SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver $(srcdir)/config/rs6000/libgcc-ppc64.ver SHLIB_NM_FLAGS = -Bpg -X32_64 +# GCC 128-bit long double support routines. +LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/darwin-ldouble.c + # Either 32-bit and 64-bit objects in archives. AR_FLAGS_FOR_TARGET = -X32_64 diff --git a/gcc/config/rs6000/t-aix52 b/gcc/config/rs6000/t-aix52 index bddcdb11490d..839bd0a1ce27 100644 --- a/gcc/config/rs6000/t-aix52 +++ b/gcc/config/rs6000/t-aix52 @@ -39,9 +39,12 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ SHLIB_INSTALL = $(INSTALL_DATA) @shlib_base_name@.a $$(DESTDIR)$$(slibdir)/ SHLIB_LIBS = -lc `case @shlib_base_name@ in *pthread*) echo -lpthread ;; esac` SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk -SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver +SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver $(srcdir)/config/rs6000/libgcc-ppc64.ver SHLIB_NM_FLAGS = -Bpg -X32_64 +# GCC 128-bit long double support routines. +LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/darwin-ldouble.c + # Either 32-bit and 64-bit objects in archives. AR_FLAGS_FOR_TARGET = -X32_64 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index ed8665d61f4a..e721c03d0458 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1,12 +1,12 @@ @c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -@c 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +@c 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. @ignore @c man begin COPYRIGHT Copyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, -1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or @@ -421,7 +421,7 @@ in the following sections. -mpowerpc-gfxopt -mno-powerpc-gfxopt @gol -mnew-mnemonics -mold-mnemonics @gol -mfull-toc -mminimal-toc -mno-fp-in-toc -mno-sum-in-toc @gol --m64 -m32 -mxl-call -mno-xl-call -mpe @gol +-m64 -m32 -mxl-compat -mno-xl-compat -mpe @gol -malign-power -malign-natural @gol -msoft-float -mhard-float -mmultiple -mno-multiple @gol -mstring -mno-string -mupdate -mno-update @gol @@ -7187,13 +7187,17 @@ Specifying @option{-maix64} implies @option{-mpowerpc64} and @option{-mpowerpc}, while @option{-maix32} disables the 64-bit ABI and implies @option{-mno-powerpc64}. GCC defaults to @option{-maix32}. -@item -mxl-call -@itemx -mno-xl-call -@opindex mxl-call -@opindex mno-xl-call -On AIX, pass floating-point arguments to prototyped functions beyond the -register save area (RSA) on the stack in addition to argument FPRs. The -AIX calling convention was extended but not initially documented to +@item -mxl-compat +@itemx -mno-xl-compat +@opindex mxl-compat +@opindex mno-xl-compat +Produce code that conforms more closely to IBM XLC semantics when using +AIX-compatible ABI. Pass floating-point arguments to prototyped +functions beyond the register save area (RSA) on the stack in addition +to argument FPRs. Do not assume that most significant double in 128 +bit long double value is properly rounded when comparing values. + +The AIX calling convention was extended but not initially documented to handle an obscure K&R C case of calling a function that takes the address of its arguments with fewer arguments than declared. AIX XL compilers access floating point arguments which do not fit in the -- 2.47.2