[PATCH resend] libstdc++-v3: Fix cmath math declarations and stub support for hppa64-*-hpux11*
Ping. The patch still applies cleanly and fixes the following fails: FAIL: 26_numerics/headers/cmath/equivalent_functions.cc -std=gnu++17 (test for excess errors) UNRESOLVED: 26_numerics/headers/cmath/equivalent_functions.cc -std=gnu++17 compilation failed to produce executable FAIL: 26_numerics/headers/cmath/functions_std_c++17.cc -std=gnu++17 (test for excess errors) See: https://gcc.gnu.org/pipermail/gcc-testresults/2024-September/825348.html Tested recently on hppa64-hp-hpux11.11 and hppa-unknow-linux-gnu. Okay? Dave --- libstdc++-v3: Fix cmath math declarations and stub support for hppa64-*-hpux11* This change fixes the following issues: 1) When the target host system doesn't support the full set of C99 functions, the stub replacements are not declared by cmath. As a result, stub replacements do not become members of namespace std. 2) Some using statements for float and long double C99 functions are surrounded by a _GLIBCXX_HAVE_* #ifdef. For example, #ifdef _GLIBCXX_HAVE_ACOSF using ::acosf; #endif As a result, missing float and long double functions never become a member of std even though there is stub support for all of them. 3) Undefs for acosf, acosl, etc, are missing. Adding these should allow PR86553 to be fixed. 4) Added AC_DEFINE statements for HAVE_CBRTF, HAVE_COPYSIGNF, HAVE_HYPOTF, HAVE_LOG2F and HAVE_NEXTAFTERF to crossconfig.m4 for hpux host. 5) Added additional checks to linkage.m4. 6) Added stubs for missing float, double and long double C99 functions. PR libstdc++/114101 libstdc++-v3/ChangeLog: * config/os/hpux/os_defines.h (_GLIBCXX_USE_C99_MATH_FUNCS): Define. (_GLIBCXX_USE_C99_MATH_TR1): Define. (_GLIBCXX_USE_BUILTIN_FMA): Define if _PA_RISC2_0 host. (_GLIBCXX_USE_BUILTIN_FMAF): Likewise. * crossconfig.m4: Add AC_DEFINE statements for HAVE_CBRTF, HAVE_COPYSIGNF, HAVE_HYPOTF, HAVE_LOG2F and HAVE_NEXTAFTERF. * include/c_global/cmath: Add #undef statements for acosf, acosl, etc. Add declarations for acosf, acosl, etc. Likewise, add declarations for acoshf, acoshl, etc, for C++11. * libstdc++-v3/include/tr1/cmath: Add declarations for acosf, acosl, etc. * linkage.m4: Add checks for fma, nexttoward, scalbln, tgamma, cbrtf, copysignf, expm1f, log2f, nanf, nextafterf, nexttowardf, expm1l, ilogbl, nanl, nextafterl, nexttowardl, scalblnl, scalbnl. * src/c++98/Makefile.am: Add math_stubs_double.cc to sources. * src/c++98/math_stubs_double.cc: New file. * src/c++98/math_stubs_float.cc (scalbnf): New stub. (lgammaf, tgammaf, erff, erfcf, remquof, fdimf, nearbyintf, exp2f, rintf, lrintf, llrintf, fmaxf, fminf, log1pf, truncf, asinhf, acoshf, atanhf, scalblnf, lroundf, llroundf, roundf, remainderf, logbf, ilogbf, expm1f, nextafterf, nexttowardf, nanf): Likewise. * src/c++98/math_stubs_long_double.cc (ilogbl): New stub. (lgammal, log1pl, nanl, nearbyintl, nextafterl, nexttowardl, scalblnl, scalbnl, tgammal): Likewise. * configure: Regenerate. * config.h.in: Regenerate. * src/c++98/Makefile.in: Regenerate. diff --git a/libstdc++-v3/config/os/hpux/os_defines.h b/libstdc++-v3/config/os/hpux/os_defines.h index 38c1c38af0c..9ab1af42bda 100644 --- a/libstdc++-v3/config/os/hpux/os_defines.h +++ b/libstdc++-v3/config/os/hpux/os_defines.h @@ -79,6 +79,18 @@ namespace std #define _GLIBCXX_USE_LONG_LONG 1 +// Import C99 functions in in in namespace std in C++11. +// Missing functions are handled by stubs. The fma, nexttoward, scalbln +// and tgamma are missing in HP-UX 11. Many float variants are supported. +#define _GLIBCXX_USE_C99_MATH_FUNCS 1 +#define _GLIBCXX_USE_C99_MATH_TR1 1 + +#ifdef _PA_RISC2_0 +// Float and double fma are supported directly in hardware. +#define _GLIBCXX_USE_BUILTIN_FMA 1 +#define _GLIBCXX_USE_BUILTIN_FMAF 1 +#endif + // HPUX on IA64 requires vtable to be 64 bit aligned even at 32 bit // mode. We need to pad the vtable structure to achieve this. #if !defined(_LP64) && defined (__ia64__) diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4 index b3269cb88e0..c6b08be5df5 100644 --- a/libstdc++-v3/crossconfig.m4 +++ b/libstdc++-v3/crossconfig.m4 @@ -152,14 +152,10 @@ case "${host}" in AC_DEFINE(HAVE_ACOSF) AC_DEFINE(HAVE_ASINF) AC_DEFINE(HAVE_ATANF) +AC_DEFINE(HAVE_ATAN2F) AC_DEFINE(HAVE_COSF) AC_DEFINE(HAVE_COSHF) -AC_DEFINE(HAVE_SINF) -AC_DEFINE(HAVE_SINHF) -AC_DEFINE(HAVE_TANF) -AC_DEFINE(HAVE_TANHF) AC_DEFINE(HAVE_EXPF) -AC_DEFINE(HAVE_ATAN2F) AC_DEFINE(HAVE_FABSF) AC_DEFINE(HAVE_FMODF) AC_DEFINE(HAVE_FREXPF) @@ -167,7 +163,16 @@ case "${host}" in AC_DEFINE(HAVE_LOG10F) AC_DEFINE(HAVE_MODF) AC_DEFINE(HAVE_POWF) +AC_DEFINE(HAVE_SINF) +AC_DEFINE(HAVE_SINHF) AC_DEFINE(HAVE_SQRTF) +AC_D
[committed] hppa: Add peephole2 optimizations for REG+D loads and stores
Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11. Committed to trunk. Dave --- hppa: Add peephole2 optimizations for REG+D loads and stores The PA 1.x architecture only supports long displacements in integer loads and stores. Floating-point loads and stores only support short displacements. As a result, we have to wait until reload is complete before generating insns with long displacements. The PA 2.0 architecture supports long displacements in both integer and floating-point loads and stores. The peephole2 optimizations added in this change are only enabled when 14-bit long displacements aren't supported for floating-point loads and stores. 2024-09-18 John David Anglin gcc/ChangeLog: * config/pa/pa.h (GENERAL_REGNO_P): Define. * config/pa/pa.md: Add SImode and SFmode peephole2 patterns to generate loads and stores with long displacements. diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 7e45c358895..6fcc2fa2ac7 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -480,6 +480,9 @@ extern rtx hppa_pic_save_rtx (void); #define INDEX_REG_CLASS GENERAL_REGS #define BASE_REG_CLASS GENERAL_REGS +/* True if register is a general register. */ +#define GENERAL_REGNO_P(N) ((N) >= 1 && (N) <= 31) + #define FP_REG_CLASS_P(CLASS) \ ((CLASS) == FP_REGS || (CLASS) == FPUPPER_REGS) diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 1e781efb66b..f0520bb2c35 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -2280,6 +2280,58 @@ (set_attr "pa_combine_type" "addmove") (set_attr "length" "4")]) +; Rewrite RTL using a REG+D store. This will allow the insn that +; computes the address to be deleted if the register it sets is dead. +(define_peephole2 + [(set (match_operand:SI 0 "register_operand" "") + (plus:SI (match_operand:SI 1 "register_operand" "") +(match_operand:SI 2 "const_int_operand" ""))) + (set (mem:SI (match_dup 0)) + (match_operand:SI 3 "register_operand" ""))] + "!TARGET_64BIT + && !INT14_OK_STRICT + && GENERAL_REGNO_P (REGNO (operands[0])) + && GENERAL_REGNO_P (REGNO (operands[3])) + && REGNO (operands[0]) != REGNO (operands[3]) + && base14_operand (operands[2], E_SImode)" + [(set (mem:SI (plus:SI (match_dup 1) (match_dup 2))) (match_dup 3)) + (set (match_dup 0) (plus:SI (match_dup 1) (match_dup 2)))] + "") + +; Rewrite RTL using a REG+D load. This will allow the insn that +; computes the address to be deleted if the register it sets is dead. +(define_peephole2 + [(set (match_operand:SI 0 "register_operand" "") + (plus:SI (match_operand:SI 1 "register_operand" "") +(match_operand:SI 2 "const_int_operand" ""))) + (set (match_operand:SI 3 "register_operand" "") + (mem:SI (match_dup 0)))] + "!TARGET_64BIT + && !INT14_OK_STRICT + && GENERAL_REGNO_P (REGNO (operands[0])) + && GENERAL_REGNO_P (REGNO (operands[3])) + && REGNO (operands[0]) != REGNO (operands[3]) + && REGNO (operands[1]) != REGNO (operands[3]) + && base14_operand (operands[2], E_SImode)" + [(set (match_dup 3) (mem:SI (plus:SI (match_dup 1) (match_dup 2 + (set (match_dup 0) (plus:SI (match_dup 1) (match_dup 2)))] + "") + +(define_peephole2 + [(set (match_operand:SI 0 "register_operand" "") + (plus:SI (match_operand:SI 1 "register_operand" "") +(match_operand:SI 2 "const_int_operand" ""))) + (set (match_operand:SI 3 "register_operand" "") + (mem:SI (match_dup 0)))] + "!TARGET_64BIT + && !INT14_OK_STRICT + && GENERAL_REGNO_P (REGNO (operands[0])) + && GENERAL_REGNO_P (REGNO (operands[3])) + && REGNO (operands[0]) == REGNO (operands[3]) + && base14_operand (operands[2], E_SImode)" + [(set (match_dup 3) (mem:SI (plus:SI (match_dup 1) (match_dup 2] + "") + ; Rewrite RTL using an indexed store. This will allow the insn that ; computes the address to be deleted if the register it sets is dead. (define_peephole2 @@ -4507,6 +4559,54 @@ (set_attr "pa_combine_type" "addmove") (set_attr "length" "4")]) +(define_peephole2 + [(set (match_operand:SI 0 "register_operand" "") + (plus:SI (match_operand:SI 1 "register_operand" "") +(match_operand:SI 2 "const_int_operand" ""))) + (set (mem:SF (match_dup 0)) + (match_operand:SF 3 "register_operand" ""))] + "!TARGET_64BIT +
[committed] hppa: Don't canonicalize operand order of scaled index addresses
Tested on hppa64-hp-hpux11.11 and hppa-unknown-linux-gnu. Committed to trunk. Dave --- hppa: Don't canonicalize operand order of scaled index addresses pa_print_operand handles both operand orders for scaled index addresses, so it isn't necessary to canonicalize the order of operands. 2024-09-09 John David Anglin gcc/ChangeLog: * config/pa/pa.cc (pa_legitimate_address_p): Don't canonicalize operand order of scaled index addresses. diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc index 631f18a0ef5..84aa4f1b1f2 100644 --- a/gcc/config/pa/pa.cc +++ b/gcc/config/pa/pa.cc @@ -11022,14 +11022,13 @@ pa_legitimate_address_p (machine_mode mode, rtx x, bool strict, code_helper) return true; if (!TARGET_DISABLE_INDEXING - && GET_CODE (index) == MULT /* Only accept base operands with the REG_POINTER flag prior to reload on targets with non-equivalent space registers. */ && (TARGET_NO_SPACE_REGS - || (base == XEXP (x, 1) - && (reload_completed - || (reload_in_progress && HARD_REGISTER_P (base)) - || REG_POINTER (base + || reload_completed + || (reload_in_progress && HARD_REGISTER_P (base)) + || REG_POINTER (base)) + && GET_CODE (index) == MULT && REG_P (XEXP (index, 0)) && GET_MODE (XEXP (index, 0)) == Pmode && MODE_OK_FOR_SCALED_INDEXING_P (mode) signature.asc Description: PGP signature
[committed] hppa: Enable PA 2.0 symbolic operands on ELF32 targets
Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. Committed to trunk. Dave --- hppa: Enable PA 2.0 symbolic operands on ELF32 targets The GNU ELF32 linker has been fixed and it can now handle PA 2.0 symbolic relocations. This only affects non-pic code generation. 2024-08-31 John David Anglin gcc/ChangeLog: * config/pa/pa.cc (pa_emit_move_sequence): Remove symbolic memory work arounds for TARGET_ELF32. (pa_legitimate_address_p): Likewise. Allow symbolic operands. Adjust comment. * config/pa/pa.md: Replace reg_or_0_or_nonsymb_mem_operand with reg_or_0_or_mem_operand predicate in various unnamed move insns. * config/pa/predicates.md (floating_point_store_memory_operand): Update comment. Remove symbolic memory work arounds for TARGET_ELF32. (nonsymb_mem_operand): Rename to mem_operand. Allow symbolic memory operands. (reg_or_0_or_nonsymb_mem_operand): Rename to reg_or_0_or_mem_operand. Allow symbolic memory operands. diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc index 297ec3a6f69..631f18a0ef5 100644 --- a/gcc/config/pa/pa.cc +++ b/gcc/config/pa/pa.cc @@ -2043,8 +2043,7 @@ pa_emit_move_sequence (rtx *operands, machine_mode mode, rtx scratch_reg) op1 = replace_equiv_address (op1, scratch_reg); } } - else if (((TARGET_ELF32 || !TARGET_PA_20) - && symbolic_memory_operand (op1, VOIDmode)) + else if ((!INT14_OK_STRICT && symbolic_memory_operand (op1, VOIDmode)) || IS_LO_SUM_DLT_ADDR_P (XEXP (op1, 0)) || IS_INDEX_ADDR_P (XEXP (op1, 0))) { @@ -2093,8 +2092,7 @@ pa_emit_move_sequence (rtx *operands, machine_mode mode, rtx scratch_reg) op0 = replace_equiv_address (op0, scratch_reg); } } - else if (((TARGET_ELF32 || !TARGET_PA_20) - && symbolic_memory_operand (op0, VOIDmode)) + else if ((!INT14_OK_STRICT && symbolic_memory_operand (op0, VOIDmode)) || IS_LO_SUM_DLT_ADDR_P (XEXP (op0, 0)) || IS_INDEX_ADDR_P (XEXP (op0, 0))) { @@ -11059,20 +11057,21 @@ pa_legitimate_address_p (machine_mode mode, rtx x, bool strict, code_helper) { y = XEXP (x, 1); - /* Needed for -fPIC */ + /* UNSPEC_DLTIND14R is always okay. Needed for -fPIC */ if (mode == Pmode && GET_CODE (y) == UNSPEC) return true; /* Before reload, we need support for 14-bit floating point loads and stores, and associated relocations. */ - if ((TARGET_ELF32 || !INT14_OK_STRICT) + if (!INT14_OK_STRICT && !reload_completed && mode != QImode && mode != HImode) return false; - if (CONSTANT_P (y)) + if (CONSTANT_P (y) + || (!flag_pic && symbolic_operand (y, mode))) return true; } return false; diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 9e410f43052..1e781efb66b 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -3866,7 +3866,7 @@ (define_insn "" [(set (match_operand:DF 0 "move_dest_operand" "=f,*r,T,?o,?Q,f,*r,*r,?*r,?f") - (match_operand:DF 1 "reg_or_0_or_nonsymb_mem_operand" + (match_operand:DF 1 "reg_or_0_or_mem_operand" "fG,*rG,f,*r,*r,RT,o,RQ,f,*r"))] "(register_operand (operands[0], DFmode) || reg_or_0_operand (operands[1], DFmode)) @@ -4040,7 +4040,7 @@ (define_insn "" [(set (match_operand:DF 0 "move_dest_operand" "=r,?o,?Q,r,r") - (match_operand:DF 1 "reg_or_0_or_nonsymb_mem_operand" + (match_operand:DF 1 "reg_or_0_or_mem_operand" "rG,r,r,o,RQ"))] "(register_operand (operands[0], DFmode) || reg_or_0_operand (operands[1], DFmode)) @@ -4440,7 +4440,7 @@ (define_insn "" [(set (match_operand:SF 0 "move_dest_operand" "=f,!*r,f,*r,T,Q,?*r,?f") - (match_operand:SF 1 "reg_or_0_or_nonsymb_mem_operand" + (match_operand:SF 1 "reg_or_0_or_mem_operand" "fG,!*rG,RT,RQ,f,*rG,f,*r"))] "(register_operand (operands[0], SFmode) || reg_or_0_operand (operands[1], SFmode)) @@ -4462,7 +4462,7 @@ (define_insn "" [(set (match_operand:SF 0 "move_dest_operand" "=f,!*r,f,*r,T,Q") - (match_operand:SF 1 "reg_or_0_or_nonsymb_mem_operand" + (match_operand:SF 1 "reg_or_0_or_mem_operand" "fG,!*rG,RT
[committed] hppa: Fix handling of unscaled index addresses on HP-UX
Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. Committed to trunk. Dave --- hppa: Fix handling of unscaled index addresses on HP-UX The PA-RISC architecture uses the top two bits of memory pointers to select space registers. The space register ID is ored with the pointer offset to compute the global virtual address for an access. The new late combine passes broke gcc on HP-UX. One of these passes runs after reload. The existing code assumed no unscaled index instructions would be created after reload as the REG_POINTER flag is not reliable after reload. The new pass sometimes interchanged the base and index registers, causing these instructions to fault when the wrong space register was selected. I investigated various alternatives to try to retain generation of unscaled index instructions on HP-UX. It's not possible to simply treat unscaled index addresses as not legitimate after reload as sometimes instructions need to be rerecognized after reload. So, we needed to allow unscaled index addresses after reload and to disable the late combine passes. I had noticed that reversing the current order of base and index register canonicalization resulted in more accesses using unscaled index addresses. However, this exposed issues with the REG_POINTER flag. The flag is not propagated when a constant is added to a pointer. Tree opimization sometimes adds two pointers. I found that I had to treat the result as a pointer but the addition generally corrupts the space register bits. These get fixed when a negative pointer is added. Finally, the REG_POINTER flag isn't set when a pointer is passed in a function call. I couldn't get this approach to work. Thus, I came to the conclusion that the best approach was to disable use of unscaled index addresses on HP-UX. I don't think this impacts performance significantly. Code size might get slightly larger but we get some or more back from having the late combine passes. 2024-08-29 John David Anglin gcc/ChangeLog: * config/pa/pa.cc (load_reg): Don't generate load with unscaled index address when !TARGET_NO_SPACE_REGS. (pa_legitimate_address_p): Only allow unscaled index addresses when TARGET_NO_SPACE_REGS. diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc index 911b7d96e9b..297ec3a6f69 100644 --- a/gcc/config/pa/pa.cc +++ b/gcc/config/pa/pa.cc @@ -4517,7 +4517,7 @@ load_reg (int reg, HOST_WIDE_INT disp, int base) rtx tmpreg = gen_rtx_REG (Pmode, 1); emit_move_insn (tmpreg, delta); - if (TARGET_DISABLE_INDEXING) + if (!TARGET_NO_SPACE_REGS || TARGET_DISABLE_INDEXING) { emit_move_insn (tmpreg, gen_rtx_PLUS (Pmode, tmpreg, basereg)); src = gen_rtx_MEM (word_mode, tmpreg); @@ -11009,17 +11009,13 @@ pa_legitimate_address_p (machine_mode mode, rtx x, bool strict, code_helper) } if (!TARGET_DISABLE_INDEXING - /* Only accept the "canonical" INDEX+BASE operand order -on targets with non-equivalent space registers. */ - && (TARGET_NO_SPACE_REGS - ? REG_P (index) - : (base == XEXP (x, 1) && REG_P (index) -&& (reload_completed -|| (reload_in_progress && HARD_REGISTER_P (base)) -|| REG_POINTER (base)) -&& (reload_completed -|| (reload_in_progress && HARD_REGISTER_P (index)) -|| !REG_POINTER (index + /* Currently, the REG_POINTER flag is not set in a variety +of situations (e.g., call arguments and pointer arithmetic). +As a result, we can't reliably determine when unscaled +addresses are legitimate on targets that need space register +selection. */ + && TARGET_NO_SPACE_REGS + && REG_P (index) && MODE_OK_FOR_UNSCALED_INDEXING_P (mode) && (strict ? STRICT_REG_OK_FOR_INDEX_P (index) : REG_OK_FOR_INDEX_P (index)) signature.asc Description: PGP signature
[committed] hppa: Fix (plus (plus (mult (a) (mem_shadd_constant)) (b)) (c)) optimization
Tested on hppa-unknown-linux-gnu. Committed to active branches. Dave --- hppa: Fix (plus (plus (mult (a) (mem_shadd_constant)) (b)) (c)) optimization The constant C must be an integral multiple of the shift value in the above optimization. Non integral values can occur evaluating IMAGPART_EXPR when the shadd constant is 8 and we have SFmode. 2024-08-06 John David Anglin gcc/ChangeLog: PR target/113384 * config/pa/pa.cc (hppa_legitimize_address): Add check to ensure constant is an integral multiple of shift the value. diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc index ab4bfc5d0c2..7b222875247 100644 --- a/gcc/config/pa/pa.cc +++ b/gcc/config/pa/pa.cc @@ -1410,6 +1410,7 @@ hppa_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, /* If the index adds a large constant, try to scale the constant so that it can be loaded with only one insn. */ if (GET_CODE (XEXP (idx, 1)) == CONST_INT + && INTVAL (XEXP (idx, 1)) % (1 << shift_val) == 0 && VAL_14_BITS_P (INTVAL (XEXP (idx, 1)) / INTVAL (XEXP (XEXP (idx, 0), 1))) && INTVAL (XEXP (idx, 1)) % INTVAL (XEXP (XEXP (idx, 0), 1)) == 0) signature.asc Description: PGP signature
[committed] testsuite: Fix unaligned accesses in ipa-sra-8.c and ipa-sra-9.c
Committed as obvious to trunk. Noticed originally on hppa2.0w-hp-hpux11.11. Tested on hppa-unknown-linux-gnu. Dave --- testsuite: Fix unaligned accesses in ipa-sra-8.c and ipa-sra-9.c 2024-07-28 John David Anglin gcc/testsuite/ChangeLog: PR testsuite/92550 * gcc.dg/ipa/ipa-sra-8.c: Change get_a argument type to SSS. * gcc.dg/ipa/ipa-sra-9.c: Likewise. diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-sra-8.c b/gcc/testsuite/gcc.dg/ipa/ipa-sra-8.c index 9e6e40ac54d..dd5c5d0c32b 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-sra-8.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-sra-8.c @@ -11,7 +11,7 @@ typedef SS __attribute__((aligned(1))) SSS; static unsigned int __attribute__ ((noinline)) -get_a (SS s) +get_a (SSS s) { return s.a; }; diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-sra-9.c b/gcc/testsuite/gcc.dg/ipa/ipa-sra-9.c index c5468cfbb76..41d7ddd9fec 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-sra-9.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-sra-9.c @@ -7,6 +7,8 @@ typedef struct S { unsigned a, b, c; } SS; +typedef SS __attribute__((aligned(1))) SSS; + typedef struct U { SS s[2]; } UU; @@ -14,7 +16,7 @@ typedef struct U { typedef UU __attribute__((aligned(1))) UUU; static unsigned int __attribute__ ((noinline)) -get_a (SS s) +get_a (SSS s) { return s.a; }; signature.asc Description: PGP signature
[committed] libstdc++-v3: Skip 30_threads/future/members/poll.cc on hppa*-*-linux*
Fixes test fail on hppa*-*-linux*. Committed to trunk. Dave --- Skip 30_threads/future/members/poll.cc on hppa*-*-linux* hppa*-*-linux* lacks high resolution timer support. Timer resolution ranges from 1 to 10ms. As a result, a large number of iterations are needed for the wait_for_0 and ready loops. This causes the wait_until_sys_epoch and wait_until_steady_epoch loops to timeout. There the loop wait time is determined by the timer resolution. 2024-07-04 John David Anglin libstdc++-v3/ChangeLog: PR libstdc++/98678 * testsuite/30_threads/future/members/poll.cc: Skip on hppa*-*-linux*. diff --git a/libstdc++-v3/testsuite/30_threads/future/members/poll.cc b/libstdc++-v3/testsuite/30_threads/future/members/poll.cc index 4fa282bd87f..2bdbe7a48ce 100644 --- a/libstdc++-v3/testsuite/30_threads/future/members/poll.cc +++ b/libstdc++-v3/testsuite/30_threads/future/members/poll.cc @@ -19,6 +19,7 @@ // { dg-do run { target c++11 } } // { dg-additional-options "-pthread" { target pthread } } // { dg-require-gthreads "" } +// { dg-skip-if "no high resolution timer support" { hppa*-*-linux* } } #include #include signature.asc Description: PGP signature
[committed] hppa: Fix ICE caused by mismatched predicate and constraint in xmpyu patterns
Fixes mismatched predicate and constraint in xmpyu patterns. The xmpyu instruction doesn't support multiplying a 32-bit const_int with a floating-point register. So, I just removed these patterns. Tested on hppa-unknown-linux-gnu. Committed to trunk. Dave --- hppa: Fix ICE caused by mismatched predicate and constraint in xmpyu patterns 2024-06-30 John David Anglin gcc/ChangeLog: PR target/115691 * config/pa/pa.md: Remove incorrect xmpyu patterns. diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index b0f29a44bae..9e410f43052 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -5503,24 +5503,6 @@ [(set_attr "type" "fpmuldbl") (set_attr "length" "4")]) -(define_insn "" - [(set (match_operand:DI 0 "register_operand" "=f") - (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "f")) -(match_operand:DI 2 "uint32_operand" "f")))] - "TARGET_PA_11 && ! TARGET_SOFT_FLOAT && ! TARGET_SOFT_MULT && !TARGET_64BIT" - "xmpyu %1,%R2,%0" - [(set_attr "type" "fpmuldbl") - (set_attr "length" "4")]) - -(define_insn "" - [(set (match_operand:DI 0 "register_operand" "=f") - (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "f")) -(match_operand:DI 2 "uint32_operand" "f")))] - "TARGET_PA_11 && ! TARGET_SOFT_FLOAT && ! TARGET_SOFT_MULT && TARGET_64BIT" - "xmpyu %1,%2R,%0" - [(set_attr "type" "fpmuldbl") - (set_attr "length" "4")]) - (define_insn "" [(set (reg:SI 29) (mult:SI (reg:SI 26) (reg:SI 25))) (clobber (match_operand:SI 0 "register_operand" "=a")) signature.asc Description: PGP signature
Re: [PATCH 50/52] pa: New hook implementation pa_c_mode_for_floating_type
@@ -1306,3 +1306,9 @@ do { \ /* An integer expression for the size in bits of the largest integer machine mode that should actually be used. We allow pairs of registers. */ #define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (TARGET_64BIT ? TImode : DImode) + +/* Define these macros as default for all subtargets, add PA_ prefix + as {FLOAT,{,LONG_}DOUBLE}_TYPE_SIZE get poisoned. */ +#define PA_FLOAT_TYPE_SIZE BITS_PER_WORD +#define PA_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2) +#define PA_LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2) -- John David Anglin dave.ang...@bell.net
[committed] Fix failure of c-c++-common/analyzer/stdarg-pr111289-int.c on hpux
Fixes conflicting declarations of mode_t. Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. Committed to trunk. Dave --- Fix failure of c-c++-common/analyzer/stdarg-pr111289-int.c on hpux 2024-03-28 John David Anglin gcc/testsuite/ChangeLog: PR analyzer/111289 * c-c++-common/analyzer/stdarg-pr111289-int.c: Don't include . diff --git a/gcc/testsuite/c-c++-common/analyzer/stdarg-pr111289-int.c b/gcc/testsuite/c-c++-common/analyzer/stdarg-pr111289-int.c index 33d83169c3e..8faa58c9480 100644 --- a/gcc/testsuite/c-c++-common/analyzer/stdarg-pr111289-int.c +++ b/gcc/testsuite/c-c++-common/analyzer/stdarg-pr111289-int.c @@ -1,6 +1,5 @@ #include #include -#include typedef unsigned int mode_t; signature.asc Description: PGP signature
[committed] hppa: Fix LO_SUM DLTIND14R address support in PRINT_OPERAND_ADDRESS
Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. Committed to trunk. Dave --- hppa: Fix LO_SUM DLTIND14R address support in PRINT_OPERAND_ADDRESS This bug was hidden since LO_SUM DLTIND14R addresses are normally handled by the A constraint in the move patterns. 2024-03-23 John David Anglin gcc/ChangeLog: * config/pa/pa.cc (pa_output_global_address): Handle UNSPEC_DLTIND14R addresses. * config/pa/pa.h (PRINT_OPERAND_ADDRESS): Output "RT'" for UNSPEC_DLTIND14R address. diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc index d7666103de8..f9b1906efb4 100644 --- a/gcc/config/pa/pa.cc +++ b/gcc/config/pa/pa.cc @@ -5784,7 +5784,12 @@ pa_output_global_address (FILE *file, rtx x, int round_constant) if (GET_CODE (x) == HIGH) x = XEXP (x, 0); - if (GET_CODE (x) == SYMBOL_REF && read_only_operand (x, VOIDmode)) + if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_DLTIND14R) +{ + x = XVECEXP (x, 0, 0); + output_addr_const (file, x); +} + else if (GET_CODE (x) == SYMBOL_REF && read_only_operand (x, VOIDmode)) output_addr_const (file, x); else if (GET_CODE (x) == SYMBOL_REF && !flag_pic) { diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 403f16c5cb5..127a0d1966d 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -1247,12 +1247,15 @@ do { \ reg_names [REGNO (XEXP (addr, 0))]); \ break; \ case LO_SUM: \ - if (!symbolic_operand (XEXP (addr, 1), VOIDmode)) \ + if (GET_CODE (XEXP (addr, 1)) == UNSPEC \ + && XINT (XEXP (addr, 1), 1) == UNSPEC_DLTIND14R) \ + fputs ("RT'", FILE);\ + else if (!symbolic_operand (XEXP (addr, 1), VOIDmode)) \ fputs ("R'", FILE); \ else if (flag_pic == 0) \ fputs ("RR'", FILE);\ else \ - fputs ("RT'", FILE);\ + gcc_unreachable (); \ pa_output_global_address (FILE, XEXP (addr, 1), 0); \ fputs ("(", FILE); \ output_operand (XEXP (addr, 0), 0); \ signature.asc Description: PGP signature
[committed] hppa: Improve handling of REG+D addresses when generating PA 2.0 code
Tested on hppa-unknown-linux-gnu. Committed to trunk. Dave --- hppa: Improve handling of REG+D addresses when generating PA 2.0 code In looking at PR 112415, it became clear that improvements could be made in the handling of loads and stores using REG+D addresses. A change in 2002 conflated two issues: 1) We can't generate insns with 14-bit displacements before reload completes when generating PA 1.x code since floating-point loads and stores only support 5-bit offsets in PA 1.x. 2) The GNU ELF 32-bit linker lacks relocation support for PA 2.0 floating point instructions with 14-bit displacements. These relocations affect instructions with symbolic references. The result of the change was to block creation of PA 2.0 instructions with 14-bit REG_D displacements for SImode, DImode, SFmode and DFmode on the GNU linux target before reload. This was unnecessary as these instructions don't need relocation. This change revise the INT14_OK_STRICT define to allow creation of instructions with 14-bit REG+D addresses before reload when generating PA 2.0 code. 2024-03-17 John David Anglin gcc/ChangeLog: PR rtl-optimization/112415 * config/pa/pa.cc (pa_emit_move_sequence): Revise condition for symbolic memory operands. (pa_legitimate_address_p): Revise LO_SUM condition. * config/pa/pa.h (INT14_OK_STRICT): Revise define. Move comment about GNU linker to predicates.md. * config/pa/predicates.md (floating_point_store_memory_operand): Revise condition for symbolic memory operands. Update comment. diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc index 129289f8e62..d7666103de8 100644 --- a/gcc/config/pa/pa.cc +++ b/gcc/config/pa/pa.cc @@ -2039,7 +2039,8 @@ pa_emit_move_sequence (rtx *operands, machine_mode mode, rtx scratch_reg) op1 = replace_equiv_address (op1, scratch_reg); } } - else if ((!INT14_OK_STRICT && symbolic_memory_operand (op1, VOIDmode)) + else if (((TARGET_ELF32 || !TARGET_PA_20) + && symbolic_memory_operand (op1, VOIDmode)) || IS_LO_SUM_DLT_ADDR_P (XEXP (op1, 0)) || IS_INDEX_ADDR_P (XEXP (op1, 0))) { @@ -2088,7 +2089,8 @@ pa_emit_move_sequence (rtx *operands, machine_mode mode, rtx scratch_reg) op0 = replace_equiv_address (op0, scratch_reg); } } - else if ((!INT14_OK_STRICT && symbolic_memory_operand (op0, VOIDmode)) + else if (((TARGET_ELF32 || !TARGET_PA_20) + && symbolic_memory_operand (op0, VOIDmode)) || IS_LO_SUM_DLT_ADDR_P (XEXP (op0, 0)) || IS_INDEX_ADDR_P (XEXP (op0, 0))) { @@ -11032,18 +11040,22 @@ pa_legitimate_address_p (machine_mode mode, rtx x, bool strict, code_helper) && (strict ? STRICT_REG_OK_FOR_BASE_P (y) : REG_OK_FOR_BASE_P (y))) { + y = XEXP (x, 1); + /* Needed for -fPIC */ if (mode == Pmode - && GET_CODE (XEXP (x, 1)) == UNSPEC) + && GET_CODE (y) == UNSPEC) return true; - if (!INT14_OK_STRICT - && (strict || !(reload_in_progress || reload_completed)) + /* Before reload, we need support for 14-bit floating +point loads and stores, and associated relocations. */ + if ((TARGET_ELF32 || !INT14_OK_STRICT) + && !reload_completed && mode != QImode && mode != HImode) return false; - if (CONSTANT_P (XEXP (x, 1))) + if (CONSTANT_P (y)) return true; } return false; diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 7abaeae269e..403f16c5cb5 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -828,19 +828,8 @@ extern int may_call_alloca; /* Nonzero if 14-bit offsets can be used for all loads and stores. This is not possible when generating PA 1.x code as floating point - accesses only support 5-bit offsets. Note that we do not forbid - the use of 14-bit offsets prior to reload. Instead, we use secondary - reloads to fix REG+D memory addresses for floating-point accesses. - - FIXME: the GNU ELF linker clobbers the LSB of the FP register number - in PA 2.0 floating-point insns with long displacements. This is - because R_PARISC_DPREL14WR and other relocations like it are not - yet supported by GNU ld. For now, we reject long displacements - on this target. */ - -#define INT14_OK_STRICT \ - (TARGET_SOFT_FLOAT \ - || (TARGET_PA_20 && !TARGET_ELF32 && !TARGET_ELF64)) + accesses only support 5-bit offsets. */ +#define INT14_OK_STRICT (TARGET_SOFT_FLOAT || TARGET_PA_20) /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx and check its vali
[committed] hppa: Fix complaint about non-delegitimized UNSPEC UNSPEC_TP
Tested on hppa-unknown-linux-gnu. Committed to trunk. Dave --- hppa: Fix complaint about non-delegitimized UNSPEC UNSPEC_TP 2024-03-17 John David Anglin gcc/ChangeLog: * config/pa/pa.cc (pa_delegitimize_address): Delegitimize UNSPEC_TP. diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc index 129289f8e62..d7666103de8 100644 --- a/gcc/config/pa/pa.cc +++ b/gcc/config/pa/pa.cc @@ -10707,7 +10709,13 @@ pa_trampoline_adjust_address (rtx addr) static rtx pa_delegitimize_address (rtx orig_x) { - rtx x = delegitimize_mem_from_attrs (orig_x); + rtx x; + + if (GET_CODE (orig_x) == UNSPEC + && XINT (orig_x, 1) == UNSPEC_TP) +orig_x = XVECEXP (orig_x, 0, 0); + + x = delegitimize_mem_from_attrs (orig_x); if (GET_CODE (x) == LO_SUM && GET_CODE (XEXP (x, 1)) == UNSPEC signature.asc Description: PGP signature
[committed] hppa: Fix REG+D address support before reload
Tested on hppa-unknown-linux-gnu. Committed to trunk. Dave --- hppa: Fix REG+D address support before reload When generating PA 1.x code or code for GNU ld, floating-point accesses only support 5-bit displacements but integer accesses support 14-bit displacements. I mistakenly assumed reload could fix an invalid 14-bit displacement in a floating-point access but this is not the case. 2024-03-14 John David Anglin gcc/ChangeLog: PR target/114288 * config/pa/pa.cc (pa_legitimate_address_p): Don't allow 14-bit displacements before reload for modes that may use a floating-point load or store. diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc index 694123e37c9..129289f8e62 100644 --- a/gcc/config/pa/pa.cc +++ b/gcc/config/pa/pa.cc @@ -10968,20 +10968,15 @@ pa_legitimate_address_p (machine_mode mode, rtx x, bool strict, code_helper) /* Long 14-bit displacements always okay for these cases. */ if (INT14_OK_STRICT + || reload_completed || mode == QImode || mode == HImode) return true; - /* A secondary reload may be needed to adjust the displacement -of floating-point accesses when STRICT is nonzero. */ - if (strict) - return false; - - /* We get significantly better code if we allow long displacements -before reload for all accesses. Instructions must satisfy their -constraints after reload, so we must have an integer access. -Return true for both cases. */ - return true; + /* We have to limit displacements to those supported by +both floating-point and integer accesses as reload can't +fix invalid displacements. See PR114288. */ + return false; } if (!TARGET_DISABLE_INDEXING signature.asc Description: PGP signature
Re: [committed] Set num_threads to 50 on 32-bit hppa in two libgomp loop tests
On 2024-03-01 3:44 a.m., Jakub Jelinek wrote: Isn't this just that you have 50 in there? No. It's okay. The problem is we run out of memory caused by a "ulimit -s 81920" statement that I had in .bashrc. The test pass with default stack allocation. clone(child_stack=0x3191040, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tid=[1108], tls=0x81918c0, child_tidptr=0x8191468) = 1108 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 mmap2(NULL, 83890176, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = -1 ENOMEM (Cannot allocate memory) Will revert change to tests. Dave -- John David Anglin dave.ang...@bell.net
Re: [committed] Set num_threads to 50 on 32-bit hppa in two libgomp loop tests
On 2024-02-29 6:02 p.m., Thomas Schwinge wrote: Hi! On 2024-02-01T19:20:57+, John David Anglin wrote: Tested on hppa-unknown-linux-gnu. Committed to trunk. Set num_threads to 50 on 32-bit hppa in two libgomp loop tests We support a maximum of 50 threads on 32-bit hppa. What happens if you go higher? Curious, what/why is that architectural limit of 50 threads? One gets an EAGAIN error at 51. I don't know why 50 is the architectural limit on hppa-linux. I had asked Helge previously but didn't get an answer. As far as I can tell, limit isn't set by glibc. It seems 64 is supported on all other targets. I wonder: shouldn't that cap at 50 threads happen inside libgomp, generally, instead of per test case and user code (!)? Per my understanding, OpenMP 'num_threads' specifies a *desired* number of threads; the implementation may limit that value. Sounds like a good suggestion. Dave -- John David Anglin dave.ang...@bell.net
[PATCH] libstdc++-v3: Fix cmath math declarations and stub support for hppa64-*-hpux11*
This change fixes the C99 math function support in on hppa64-*-hpux11*. Tested on hppa64-hp-hpux11.11 and x86_64-linux-gnu. See: https://gcc.gnu.org/pipermail/gcc-testresults/2024-February/809158.html https://gcc.gnu.org/pipermail/gcc-testresults/2024-February/809101.html Okay for trunk? Dave --- Fix cmath math declarations and stub support for hppa64-*-hpux11* This change fixes the following issues: 1) When the target host system doesn't support the full set of C99 functions, the stub replacements are not declared by cmath. As a result, stub replacements do not become members of namespace std. 2) Some using statements for float and long double C99 functions are surrounded by a _GLIBCXX_HAVE_* #ifdef. For example, #ifdef _GLIBCXX_HAVE_ACOSF using ::acosf; #endif As a result, missing float and long double functions never become a member of std even though there is stub support for all of them. 3) Undefs for acosf, acosl, etc, are missing. Adding these should allow PR86553 to be fixed. 4) Added AC_DEFINE statements for HAVE_CBRTF, HAVE_COPYSIGNF, HAVE_HYPOTF, HAVE_LOG2F and HAVE_NEXTAFTERF to crossconfig.m4 for hpux host. 5) Added additional checks to linkage.m4. 6) Added stubs for missing float, double and long double C99 functions. PR libstdc++/114101 libstdc++-v3/ChangeLog: * config/os/hpux/os_defines.h (_GLIBCXX_USE_C99_MATH_FUNCS): Define. (_GLIBCXX_USE_C99_MATH_TR1): Define. (_GLIBCXX_USE_BUILTIN_FMA): Define if _PA_RISC2_0 host. (_GLIBCXX_USE_BUILTIN_FMAF): Likewise. * crossconfig.m4: Add AC_DEFINE statements for HAVE_CBRTF, HAVE_COPYSIGNF, HAVE_HYPOTF, HAVE_LOG2F and HAVE_NEXTAFTERF. * include/c_global/cmath: Add #undef statements for acosf, acosl, etc. Add declarations for acosf, acosl, etc. Likewise, add declarations for acoshf, acoshl, etc, for C++11. * libstdc++-v3/include/tr1/cmath: Add declarations for acosf, acosl, etc. * linkage.m4: Add checks for fma, nexttoward, scalbln, tgamma, cbrtf, copysignf, expm1f, log2f, nanf, nextafterf, nexttowardf, expm1l, ilogbl, nanl, nextafterl, nexttowardl, scalblnl, scalbnl. * src/c++98/Makefile.am: Add math_stubs_double.cc to sources. * src/c++98/math_stubs_double.cc: New file. * src/c++98/math_stubs_float.cc (scalbnf): New stub. (lgammaf, tgammaf, erff, erfcf, remquof, fdimf, nearbyintf, exp2f, rintf, lrintf, llrintf, fmaxf, fminf, log1pf, truncf, asinhf, acoshf, atanhf, scalblnf, lroundf, llroundf, roundf, remainderf, logbf, ilogbf, expm1f, nextafterf, nexttowardf, nanf): Likewise. * src/c++98/math_stubs_long_double.cc (ilogbl): New stub. (lgammal, log1pl, nanl, nearbyintl, nextafterl, nexttowardl, scalblnl, scalbnl, tgammal): Likewise. * configure: Regenerate. * config.h.in: Regenerate. * src/c++98/Makefile.in: Regenerate. diff --git a/libstdc++-v3/config/os/hpux/os_defines.h b/libstdc++-v3/config/os/hpux/os_defines.h index 38c1c38af0c..9ab1af42bda 100644 --- a/libstdc++-v3/config/os/hpux/os_defines.h +++ b/libstdc++-v3/config/os/hpux/os_defines.h @@ -79,6 +79,18 @@ namespace std #define _GLIBCXX_USE_LONG_LONG 1 +// Import C99 functions in in in namespace std in C++11. +// Missing functions are handled by stubs. The fma, nexttoward, scalbln +// and tgamma are missing in HP-UX 11. Many float variants are supported. +#define _GLIBCXX_USE_C99_MATH_FUNCS 1 +#define _GLIBCXX_USE_C99_MATH_TR1 1 + +#ifdef _PA_RISC2_0 +// Float and double fma are supported directly in hardware. +#define _GLIBCXX_USE_BUILTIN_FMA 1 +#define _GLIBCXX_USE_BUILTIN_FMAF 1 +#endif + // HPUX on IA64 requires vtable to be 64 bit aligned even at 32 bit // mode. We need to pad the vtable structure to achieve this. #if !defined(_LP64) && defined (__ia64__) diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4 index b3269cb88e0..c6b08be5df5 100644 --- a/libstdc++-v3/crossconfig.m4 +++ b/libstdc++-v3/crossconfig.m4 @@ -152,14 +152,10 @@ case "${host}" in AC_DEFINE(HAVE_ACOSF) AC_DEFINE(HAVE_ASINF) AC_DEFINE(HAVE_ATANF) +AC_DEFINE(HAVE_ATAN2F) AC_DEFINE(HAVE_COSF) AC_DEFINE(HAVE_COSHF) -AC_DEFINE(HAVE_SINF) -AC_DEFINE(HAVE_SINHF) -AC_DEFINE(HAVE_TANF) -AC_DEFINE(HAVE_TANHF) AC_DEFINE(HAVE_EXPF) -AC_DEFINE(HAVE_ATAN2F) AC_DEFINE(HAVE_FABSF) AC_DEFINE(HAVE_FMODF) AC_DEFINE(HAVE_FREXPF) @@ -167,7 +163,16 @@ case "${host}" in AC_DEFINE(HAVE_LOG10F) AC_DEFINE(HAVE_MODF) AC_DEFINE(HAVE_POWF) +AC_DEFINE(HAVE_SINF) +AC_DEFINE(HAVE_SINHF) AC_DEFINE(HAVE_SQRTF) +AC_DEFINE(HAVE_TANF) +AC_DEFINE(HAVE_TANHF) +AC_DEFINE(HAVE_CBRTF) +AC_DEFINE(HAVE_COPYSIGNF) +AC_DEFINE(HAVE_HYPOTF) +AC_DEFINE(HAVE_LOG2F) +AC_DEFINE(HAVE_NEXTAFTERF) # GLIBCXX_CHECK_STDLIB_SUPPORT AC_DEFINE(HAVE_STRTOLD
[committed] Fix gcc.c-torture/execute/ieee/cdivchkf.c on hpux
Tested on hppa64-hp-hpux11.11 and hppa-unknown-linux-gnu. Committed to trunk. Dave --- Fix gcc.c-torture/execute/ieee/cdivchkf.c on hpux 2024-02-11 John David Anglin gcc/testsuite/ChangeLog: * gcc.c-torture/execute/ieee/cdivchkf.c: Use ilogb and __builtin_fmax instead of ilogbf and __builtin_fmaxf. diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/cdivchkf.c b/gcc/testsuite/gcc.c-torture/execute/ieee/cdivchkf.c index adf1ed91dc7..86ef69f8771 100644 --- a/gcc/testsuite/gcc.c-torture/execute/ieee/cdivchkf.c +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/cdivchkf.c @@ -8,7 +8,7 @@ extern void abort (void); extern void exit (int); -extern int ilogbf (float); +extern int ilogb (double); int match (float _Complex, float _Complex); #define SMALL FLT_MIN @@ -22,7 +22,8 @@ int match (float _Complex, float _Complex); int match (float _Complex c, float _Complex z) { float rz, iz, rc, ic; - float rerr, ierr, rmax; + float rerr, ierr; + double rmax; int biterr; rz = __real__ z; iz = __imag__ z; @@ -54,11 +55,11 @@ int match (float _Complex c, float _Complex z) { ierr = __builtin_fabsf (iz - ic) / SMALL; } - rmax = __builtin_fmaxf(rerr, ierr); + rmax = __builtin_fmax (rerr, ierr); biterr = 0; if ( rmax != 0.0) { - biterr = ilogbf (rmax) + MAXBIT + 1; + biterr = ilogb (rmax) + MAXBIT + 1; } if (biterr >= ERRLIM) signature.asc Description: PGP signature
[committed] libgomp: Define config_path for hppa*-*-linux*
Tested on hppa-unknown-linux-gnu. Committed to trunk. Dave --- libgomp: Define config_path for hppa*-*-linux* 2024-02-11 John David Anglin libgomp/ChangeLog: PR libgomp/113843 * configure.tgt (hppa*-*-linux*): Define config_path. diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt index 2cd7272fcd8..46af75f978f 100644 --- a/libgomp/configure.tgt +++ b/libgomp/configure.tgt @@ -52,6 +52,10 @@ if test x$enable_linux_futex = xyes; then config_path="linux posix" ;; +hppa*-*-linux*) + config_path="linux posix" + ;; + ia64*-*-linux*) config_path="linux/ia64 linux posix" ;; signature.asc Description: PGP signature
[committed] Fix xfail for 32-bit hppa*-*-* in gcc.dg/pr84877.c
Tested on hppa-unknown-linux-gnu. Committed to trunk. Dave --- Fix xfail for 32-bit hppa*-*-* in gcc.dg/pr84877.c 2024-02-03 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/pr84877.c: Adjust xfail parentheses. diff --git a/gcc/testsuite/gcc.dg/pr84877.c b/gcc/testsuite/gcc.dg/pr84877.c index 68681206e73..e82991f42dd 100644 --- a/gcc/testsuite/gcc.dg/pr84877.c +++ b/gcc/testsuite/gcc.dg/pr84877.c @@ -1,4 +1,4 @@ -/* { dg-do run { xfail { cris-*-* sparc*-*-* } || { { ! lp64 } && hppa*-*-* } } } */ +/* { dg-do run { xfail { { cris-*-* sparc*-*-* } || { { ! lp64 } && hppa*-*-* } } } } */ /* { dg-options "-O2" } */ #include signature.asc Description: PGP signature
[committed] libatomic: Provide FPU exception defines for hppa
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- libatomic: Provide FPU exception defines for hppa The exception defines in do not match the exception bits in the FPU status register on hppa-linux and hppa64-hpux11.11. On linux, they match the trap enable bits. On 64-bit hpux, they match the exception bits for IA64. The IA64 bits are in a different order and location than HPPA. HP uses table look ups to reorder the bits in code to test and raise exceptions. All the architectures that I looked at just pass the FPU status register to __atomic_feraiseexcept(). The simplest approach for hppa is to define FE_INEXACT, etc, to match the status register and not include . 2024-02-03 John David Anglin libatomic/ChangeLog: PR target/59778 * configure.tgt (hppa*): Set ARCH. * config/pa/fenv.c: New file. diff --git a/libatomic/config/pa/fenv.c b/libatomic/config/pa/fenv.c new file mode 100644 index 000..232e8416ffd --- /dev/null +++ b/libatomic/config/pa/fenv.c @@ -0,0 +1,74 @@ +/* Copyright (C) 2012-2024 Free Software Foundation, Inc. + + This file is part of the GNU Atomic Library (libatomic). + + Libatomic 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 3 of the License, or + (at your option) any later version. + + Libatomic 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. + + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + + You should have received a copy of the GNU General Public License and + a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + <http://www.gnu.org/licenses/>. */ + +#include "libatomic_i.h" + +#define FE_INEXACT (1<<27) +#define FE_UNDERFLOW (1<<28) +#define FE_OVERFLOW(1<<29) +#define FE_DIVBYZERO (1<<30) +#define FE_INVALID (1<<31) + +/* Raise the supported floating-point exceptions from EXCEPTS. Other + bits in EXCEPTS are ignored. */ + +void +__atomic_feraiseexcept (int excepts __attribute__ ((unused))) +{ + volatile float r __attribute__ ((unused)); +#ifdef FE_INVALID + if (excepts & FE_INVALID) + { +volatile float zero = 0.0f; +r = zero / zero; + } +#endif +#ifdef FE_DIVBYZERO + if (excepts & FE_DIVBYZERO) +{ + volatile float zero = 0.0f; + r = 1.0f / zero; +} +#endif +#ifdef FE_OVERFLOW + if (excepts & FE_OVERFLOW) +{ + volatile float max = __FLT_MAX__; + r = max * max; +} +#endif +#ifdef FE_UNDERFLOW + if (excepts & FE_UNDERFLOW) +{ + volatile float min = __FLT_MIN__; + r = min * min; +} +#endif +#ifdef FE_INEXACT + if (excepts & FE_INEXACT) +{ + volatile float three = 3.0f; + r = 1.0f / three; +} +#endif +} diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt index 67a5f2dff80..4237f283fe4 100644 --- a/libatomic/configure.tgt +++ b/libatomic/configure.tgt @@ -36,6 +36,7 @@ case "${target_cpu}" in XCFLAGS="${XCFLAGS} -mfp-trap-mode=sui" ARCH=alpha ;; + hppa*) ARCH=pa ;; rs6000 | powerpc*) ARCH=powerpc ;; riscv*) ARCH=riscv ;; sh*) ARCH=sh ;; signature.asc Description: PGP signature
[committed] hppa: Implement TARGET_ATOMIC_ASSIGN_EXPAND_FENV
Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. This is the first step in fixing PR target/59778. libatomic/fenv.c needs fixing for hppa so exceptions are correctly raised. Committed to trunk. Dave --- hppa: Implement TARGET_ATOMIC_ASSIGN_EXPAND_FENV This change implements __builtin_get_fpsr() and __builtin_set_fpsr(x) to get and set the floating-point status register. They are used to implement pa_atomic_assign_expand_fenv(). 2024-02-02 John David Anglin gcc/ChangeLog: PR target/59778 * config/pa/pa.cc (enum pa_builtins): Add PA_BUILTIN_GET_FPSR and PA_BUILTIN_SET_FPSR builtins. * (pa_builtins_icode): Declare. * (def_builtin, pa_fpu_init_builtins): New. * (pa_init_builtins): Initialize FPU builtins. * (pa_builtin_decl, pa_expand_builtin_1): New. * (pa_expand_builtin): Handle PA_BUILTIN_GET_FPSR and PA_BUILTIN_SET_FPSR builtins. * (pa_atomic_assign_expand_fenv): New. * config/pa/pa.md (UNSPECV_GET_FPSR, UNSPECV_SET_FPSR): New UNSPECV constants. (get_fpsr, put_fpsr): New expanders. (get_fpsr_32, get_fpsr_64, set_fpsr_32, set_fpsr_64): New insn patterns. diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc index c58b0a0d75e..694123e37c9 100644 --- a/gcc/config/pa/pa.cc +++ b/gcc/config/pa/pa.cc @@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see #include "target.h" #include "rtl.h" #include "tree.h" +#include "gimple.h" #include "df.h" #include "tm_p.h" #include "stringpool.h" @@ -142,6 +143,7 @@ static void pa_asm_out_destructor (rtx, int); #endif static void pa_init_builtins (void); static rtx pa_expand_builtin (tree, rtx, rtx, machine_mode mode, int); +static tree pa_builtin_decl (unsigned, bool); static rtx hppa_builtin_saveregs (void); static void hppa_va_start (tree, rtx); static tree hppa_gimplify_va_arg_expr (tree, tree, gimple_seq *, gimple_seq *); @@ -205,6 +207,7 @@ static bool pa_modes_tieable_p (machine_mode, machine_mode); static bool pa_can_change_mode_class (machine_mode, machine_mode, reg_class_t); static HOST_WIDE_INT pa_starting_frame_offset (void); static section* pa_elf_select_rtx_section(machine_mode, rtx, unsigned HOST_WIDE_INT) ATTRIBUTE_UNUSED; +static void pa_atomic_assign_expand_fenv (tree *, tree *, tree *); /* The following extra sections are only used for SOM. */ static GTY(()) section *som_readonly_data_section; @@ -314,9 +317,10 @@ static size_t n_deferred_plabels = 0; #undef TARGET_INIT_BUILTINS #define TARGET_INIT_BUILTINS pa_init_builtins - #undef TARGET_EXPAND_BUILTIN #define TARGET_EXPAND_BUILTIN pa_expand_builtin +#undef TARGET_BUILTIN_DECL +#define TARGET_BUILTIN_DECL pa_builtin_decl #undef TARGET_REGISTER_MOVE_COST #define TARGET_REGISTER_MOVE_COST hppa_register_move_cost @@ -426,6 +430,9 @@ static size_t n_deferred_plabels = 0; #undef TARGET_HAVE_SPECULATION_SAFE_VALUE #define TARGET_HAVE_SPECULATION_SAFE_VALUE speculation_safe_value_not_needed +#undef TARGET_ATOMIC_ASSIGN_EXPAND_FENV +#define TARGET_ATOMIC_ASSIGN_EXPAND_FENV pa_atomic_assign_expand_fenv + struct gcc_target targetm = TARGET_INITIALIZER; /* Parse the -mfixed-range= option string. */ @@ -592,6 +599,10 @@ pa_option_override (void) enum pa_builtins { + /* FPU builtins. */ + PA_BUILTIN_GET_FPSR, + PA_BUILTIN_SET_FPSR, + PA_BUILTIN_COPYSIGNQ, PA_BUILTIN_FABSQ, PA_BUILTIN_INFQ, @@ -600,10 +611,48 @@ enum pa_builtins }; static GTY(()) tree pa_builtins[(int) PA_BUILTIN_max]; +static GTY(()) enum insn_code pa_builtins_icode[(int) PA_BUILTIN_max]; + +/* Add a PA builtin function with NAME, ICODE, CODE and TYPE. Return the + function decl or NULL_TREE if the builtin was not added. */ + +static tree +def_builtin (const char *name, enum insn_code icode, enum pa_builtins code, +tree type) +{ + tree t += add_builtin_function (name, type, code, BUILT_IN_MD, NULL, NULL_TREE); + + if (t) +{ + pa_builtins[code] = t; + pa_builtins_icode[code] = icode; +} + + return t; +} + +/* Create builtin functions for FPU instructions. */ + +static void +pa_fpu_init_builtins (void) +{ + tree ftype; + + ftype = build_function_type_list (unsigned_type_node, 0); + def_builtin ("__builtin_get_fpsr", CODE_FOR_get_fpsr, + PA_BUILTIN_GET_FPSR, ftype); + ftype = build_function_type_list (void_type_node, unsigned_type_node, 0); + def_builtin ("__builtin_set_fpsr", CODE_FOR_set_fpsr, + PA_BUILTIN_SET_FPSR, ftype); +} static void pa_init_builtins (void) { + if (!TARGET_SOFT_FLOAT) +pa_fpu_init_builtins (); + #ifdef DONT_HAVE_FPUTC_UNLOCKED { tree decl = builtin_decl_explicit (BUILT_IN_PUTC_UNLOCKED); @@ -663,6 +712,92 @@ pa_init_builtins (void) } } +/* Implement TARGET_BUILTIN_DECL. */ + +static tree +pa_builtin_decl (unsigned i
[committed] Set num_threads to 50 on 32-bit hppa in two libgomp loop tests
Tested on hppa-unknown-linux-gnu. Committed to trunk. Dave --- Set num_threads to 50 on 32-bit hppa in two libgomp loop tests We support a maximum of 50 threads on 32-bit hppa. 2024-02-01 John David Anglin libgomp/ChangeLog: * testsuite/libgomp.c++/loop-3.C: Set num_threads to 50 on 32-bit hppa. * testsuite/libgomp.c/omp-loop03.c: Likewise. diff --git a/libgomp/testsuite/libgomp.c++/loop-3.C b/libgomp/testsuite/libgomp.c++/loop-3.C index fa50f099f3f..3f460f114bf 100644 --- a/libgomp/testsuite/libgomp.c++/loop-3.C +++ b/libgomp/testsuite/libgomp.c++/loop-3.C @@ -1,3 +1,9 @@ +#if defined(__hppa__) && !defined(__LP64__) +#define NUM_THREADS 50 +#else +#define NUM_THREADS 64 +#endif + extern "C" void abort (void); int a; @@ -19,7 +25,7 @@ foo () int main (void) { -#pragma omp parallel num_threads (64) +#pragma omp parallel num_threads (NUM_THREADS) foo (); return 0; diff --git a/libgomp/testsuite/libgomp.c/omp-loop03.c b/libgomp/testsuite/libgomp.c/omp-loop03.c index 7bb9a194331..9879981cf4a 100644 --- a/libgomp/testsuite/libgomp.c/omp-loop03.c +++ b/libgomp/testsuite/libgomp.c/omp-loop03.c @@ -1,3 +1,9 @@ +#if defined(__hppa__) && !defined(__LP64__) +#define NUM_THREADS 50 +#else +#define NUM_THREADS 64 +#endif + extern void abort (void); int a; @@ -19,7 +25,7 @@ foo () int main (void) { -#pragma omp parallel num_threads (64) +#pragma omp parallel num_threads (NUM_THREADS) foo (); return 0; signature.asc Description: PGP signature
[committed] xfail gnat.dg/trampoline3.adb scan-assembler-not check on hppa*-*-*
Tested on hppa-unknown-linux-gnu. Committed to trunk. Dave --- xfail gnat.dg/trampoline3.adb scan-assembler-not check on hppa*-*-* We still require an executable stack for trampolines on hppa*-*-*. 2024-02-01 John David Anglin gcc/testsuite/ChangeLog: * gnat.dg/trampoline3.adb: xfail scan-assembler-not check on hppa*-*-*. diff --git a/gcc/testsuite/gnat.dg/trampoline3.adb b/gcc/testsuite/gnat.dg/trampoline3.adb index 28057662452..10b6e5d4a41 100644 --- a/gcc/testsuite/gnat.dg/trampoline3.adb +++ b/gcc/testsuite/gnat.dg/trampoline3.adb @@ -19,4 +19,4 @@ begin I := P(0); end; --- { dg-final { scan-assembler-not "GNU-stack.*x" } } +-- { dg-final { scan-assembler-not "GNU-stack.*x" { xfail hppa*-*-* } } } signature.asc Description: PGP signature
[committed] hppa: Fix bug in atomic_storedi_1 pattern
Tested on hppa-unknown-linux-gnu. Committed to trunk. Dave --- hppa: Fix bug in atomic_storedi_1 pattern The first alternative stores the floating-point status register in the destination. It should store zero. We need to copy %fr0 to another floating-point register to initialize it to zero. 2024-02-01 John David Anglin gcc/ChangeLog: * config/pa/pa.md (atomic_storedi_1): Fix bug in alternative 1. diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 52ad0c3776d..aecdcc98b6a 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -10723,13 +10723,13 @@ add,l %2,%3,%3\;bv,n %%r0(%3)" (define_insn "atomic_storedi_1" [(set (mem:DI (match_operand:SI 0 "register_operand" "r,r")) (match_operand:DI 1 "reg_or_0_operand" "M,r")) - (clobber (match_scratch:DI 2 "=X,f"))] + (clobber (match_scratch:DI 2 "=f,f"))] "!TARGET_64BIT && !TARGET_SOFT_FLOAT" "@ - {fstds|fstd} %%fr0,0(%0) + fcpy,dbl %%fr0,%2\n\t{fstds|fstd} %2,0(%0) {stws|stw} %1,-16(%%sp)\n\t{stws|stw} %R1,-12(%%sp)\n\t{fldds|fldd} -16(%%sp),%2\n\t{fstds|fstd} %2,0(%0)" [(set_attr "type" "move,move") - (set_attr "length" "4,16")]) + (set_attr "length" "8,16")]) ;; PA 2.0 hardware supports out-of-order execution of loads and stores, so ;; we need memory barriers to enforce program order for memory references signature.asc Description: PGP signature
[committed] Add -gno-strict-dwarf to dg-options in various btf enum tests
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Add -gno-strict-dwarf to dg-options in various btf enum tests The -gno-strict-dwarf option is needed to ensure enum signedness is added to type_die. 2024-01-22 John David Anglin gcc/testsuite/ChangeLog: PR debug/113382 * gcc.dg/debug/btf/btf-bitfields-3.c: Add -gno-strict-dwarf option to dg-options. * gcc.dg/debug/btf/btf-enum-1.c: Likewise. * gcc.dg/debug/btf/btf-enum-small.c: Likewise. * gcc.dg/debug/btf/btf-enum64-1.c: Likewise. diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-3.c b/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-3.c index 78b8b7d49ad..08622b771e6 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-3.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-3.c @@ -14,7 +14,7 @@ */ /* { dg-do compile } */ -/* { dg-options "-O0 -gbtf -dA" } */ +/* { dg-options "-O0 -gbtf -gno-strict-dwarf -dA" } */ /* Enum with 4 members. */ /* { dg-final { scan-assembler-times "\[\t \]0x604\[\t \]+\[^\n\]*btt_info" 1 } } */ diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-enum-1.c b/gcc/testsuite/gcc.dg/debug/btf/btf-enum-1.c index 021ce0345e4..7873c8837a0 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-enum-1.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-enum-1.c @@ -1,7 +1,7 @@ /* Test BTF generation for enums. */ /* { dg-do compile } */ -/* { dg-options "-O0 -gbtf -fno-short-enums -dA" } */ +/* { dg-options "-O0 -gbtf -gno-strict-dwarf -fno-short-enums -dA" } */ /* { dg-final { scan-assembler-times "\[\t \]0x604\[\t \]+\[^\n\]*btt_info" 1 } } */ /* { dg-final { scan-assembler-times "\[\t \]0x8603\[\t \]+\[^\n\]*btt_info" 1 } } */ diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-enum-small.c b/gcc/testsuite/gcc.dg/debug/btf/btf-enum-small.c index eb8a1bd2c43..ccc92c92ba9 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-enum-small.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-enum-small.c @@ -1,7 +1,7 @@ /* Test BTF generation for small enums. */ /* { dg-do compile } */ -/* { dg-options "-O2 -gbtf -dA" } */ +/* { dg-options "-O2 -gbtf -gno-strict-dwarf -dA" } */ /* { dg-final { scan-assembler-not "bte_value_lo32" } } */ /* { dg-final { scan-assembler-not "bte_value_hi32" } } */ diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-enum64-1.c b/gcc/testsuite/gcc.dg/debug/btf/btf-enum64-1.c index 5d1487c1183..3ba885af17f 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-enum64-1.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-enum64-1.c @@ -1,7 +1,7 @@ /* Test BTF generation for 64 bits enums. */ /* { dg-do compile } */ -/* { dg-options "-O0 -gbtf -dA" } */ +/* { dg-options "-O0 -gbtf -gno-strict-dwarf -dA" } */ /* { dg-final { scan-assembler-times "\[\t \].size\[\t \]_?myenum1,\[\t \]8" 1 } } */ /* { dg-final { scan-assembler-times "\[\t \].size\[\t \]_?myenum2,\[\t \]8" 1 } } */ signature.asc Description: PGP signature
[committed] Remove several xfails for 32-bit hppa*-*-*
Tested on hppa-unknown-linux-gnu. Committed to trunk. Dave --- Remove several xfails for 32-bit hppa*-*-* These arise because 32-bit ELF targets were changed from callee copies to caller copies. 2024-01-20 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/ipa/iinline-4.c: Remove dg-final xfail for 32-bit hppa*-*-*. * gcc.dg/ipa/inline-5.c: Likewise. * gcc.dg/ipa/ipcp-cstagg-7.c: Likewise. * gcc.dg/tree-ssa/vector-4.c: Likewise. diff --git a/gcc/testsuite/gcc.dg/ipa/iinline-4.c b/gcc/testsuite/gcc.dg/ipa/iinline-4.c index f50ffa58221..c78163dbeff 100644 --- a/gcc/testsuite/gcc.dg/ipa/iinline-4.c +++ b/gcc/testsuite/gcc.dg/ipa/iinline-4.c @@ -214,7 +214,7 @@ int test7 (void) /* { dg-final { scan-ipa-dump "hooray1\[^\\n\]*inline copy in test1" "inline" } } */ /* { dg-final { scan-ipa-dump "hooray2\[^\\n\]*inline copy in test2" "inline" } } */ /* { dg-final { scan-ipa-dump "hooray3\[^\\n\]*inline copy in test3" "inline" } } */ -/* { dg-final { scan-ipa-dump "hooray4\[^\\n\]*inline copy in test4" "inline" { xfail { { hppa*-*-* } && { ! lp64 } } } } } */ +/* { dg-final { scan-ipa-dump "hooray4\[^\\n\]*inline copy in test4" "inline" } } */ /* { dg-final { scan-ipa-dump "hooray5\[^\\n\]*inline copy in test5" "inline" } } */ /* { dg-final { scan-ipa-dump "hooray6\[^\\n\]*inline copy in test6" "inline" } } */ /* { dg-final { scan-ipa-dump "hooray7\[^\\n\]*inline copy in test7" "inline" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/inline-5.c b/gcc/testsuite/gcc.dg/ipa/inline-5.c index 559e258955e..390ba499d67 100644 --- a/gcc/testsuite/gcc.dg/ipa/inline-5.c +++ b/gcc/testsuite/gcc.dg/ipa/inline-5.c @@ -34,5 +34,5 @@ accessreference (struct a *a) /* Will be eliminated by inlining */ } -/* { dg-final { scan-ipa-dump-times "Will be eliminated" 4 "fnsummary" { xfail { { hppa*-*-* } && { ! lp64 } } } } } */ +/* { dg-final { scan-ipa-dump-times "Will be eliminated" 4 "fnsummary" } } */ /* { dg-final { scan-ipa-dump-times "50. will be eliminated" 1 "fnsummary" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipcp-cstagg-7.c b/gcc/testsuite/gcc.dg/ipa/ipcp-cstagg-7.c index b08c420cd86..6af8bda6d8e 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipcp-cstagg-7.c +++ b/gcc/testsuite/gcc.dg/ipa/ipcp-cstagg-7.c @@ -62,4 +62,4 @@ h (int x) return bar (s, x); } -/* { dg-final { scan-ipa-dump-times "Discovered an indirect call to a known target" 3 "cp" { xfail { hppa*-*-* && { ! lp64 } } } } } */ +/* { dg-final { scan-ipa-dump-times "Discovered an indirect call to a known target" 3 "cp" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vector-4.c b/gcc/testsuite/gcc.dg/tree-ssa/vector-4.c index 00ddd2995be..982a2a47d6a 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/vector-4.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/vector-4.c @@ -10,7 +10,6 @@ v4si vs (v4si a, v4si b) } /* The compound literal should be placed directly in the vec_perm. */ -/* Test is xfailed on 32-bit hppa*-*-* because target-callee-copies. */ -/* { dg-final { scan-tree-dump-times "VEC_PERM_EXPR ;" 1 "gimple" { target { ! mmix-knuth-mmixware } xfail { hppa*-*-* && { ! lp64 } } } } } */ +/* { dg-final { scan-tree-dump-times "VEC_PERM_EXPR ;" 1 "gimple" { target { ! mmix-knuth-mmixware } } } } */ /* { dg-final { scan-tree-dump-times "VEC_PERM_EXPR ;" 1 "gimple" { target mmix-knuth-mmixware } } } */ signature.asc Description: PGP signature
[committed] Increase timeout by 2 in libgomp.fortran/alloc-comp-3.f90 on hppa*-*-*
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Increase timeout by 2 in libgomp.fortran/alloc-comp-3.f90 on hppa*-*-* 2024-01-20 John David Anglin libgomp/ChangeLog: * testsuite/libgomp.fortran/alloc-comp-3.f90: Increase timeout by 2 on hppa*-*-*. diff --git a/libgomp/testsuite/libgomp.fortran/alloc-comp-3.f90 b/libgomp/testsuite/libgomp.fortran/alloc-comp-3.f90 index 0185859cb26..eb418e83d9e 100644 --- a/libgomp/testsuite/libgomp.fortran/alloc-comp-3.f90 +++ b/libgomp/testsuite/libgomp.fortran/alloc-comp-3.f90 @@ -2,6 +2,7 @@ ! Don't cycle by default through all options, just test -O0 and -O2, ! as this is quite large test. ! { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } +! { dg-timeout-factor 2.0 { target hppa*-*-* } } module m type dl signature.asc Description: PGP signature
[committed] Don't run libgomp.c/simd-math-1.c on hppa*-*-hpux*
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Don't run libgomp.c/simd-math-1.c on hppa*-*-hpux* hppa*-*-hpux* lacks necessary math functions. 2024-01-20 John David Anglin libgomp/ChangeLog: * testsuite/libgomp.c/simd-math-1.c: Don't run on hppa*-*-hpux*. diff --git a/libgomp/testsuite/libgomp.c/simd-math-1.c b/libgomp/testsuite/libgomp.c/simd-math-1.c index 42a008c80fc..b30df09caf6 100644 --- a/libgomp/testsuite/libgomp.c/simd-math-1.c +++ b/libgomp/testsuite/libgomp.c/simd-math-1.c @@ -1,7 +1,7 @@ /* Check that the SIMD versions of math routines give the same (or sufficiently close) results as their scalar equivalents. */ -/* { dg-do run } */ +/* { dg-do run { target { ! hppa*-*-hpux* } } } */ /* { dg-options "-O2 -ftree-vectorize -fno-math-errno" } */ /* { dg-additional-options -foffload-options=amdgcn-amdhsa=-mstack-size=300 { target offload_target_amdgcn } } */ /* { dg-additional-options "-DNONSTDFUNC=1" { target nonstandard_math_functions } } */ signature.asc Description: PGP signature
[committed] xfail scan-tree-dump-times checks on hppa*64*-*-* in gcc.dg/tree-ssa/slsr-13.c
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- xfail scan-tree-dump-times checks on hppa*64*-*-* in gcc.dg/tree-ssa/slsr-13.c 2024-01-20 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/slsr-13.c: xfail scan-tree-dump-times checks on hppa*64*-*-*. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-13.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-13.c index 4133694174c..93749d6e856 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/slsr-13.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-13.c @@ -20,5 +20,5 @@ f (int s, int c) return x; } -/* { dg-final { scan-tree-dump-times " \\* 4" 2 "optimized" } } */ -/* { dg-final { scan-tree-dump-times " \\* 5" 0 "optimized" } } */ +/* { dg-final { scan-tree-dump-times " \\* 4" 2 "optimized" {xfail hppa*64*-*-* } } } */ +/* { dg-final { scan-tree-dump-times " \\* 5" 0 "optimized" {xfail hppa*64*-*-* } } } */ signature.asc Description: PGP signature
[committed] Require target lra in gcc.dg/torture/pr110422.c
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Require target lra in gcc.dg/torture/pr110422.c LRA is required for asm goto. 2024-01-20 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/torture/pr110422.c: Require target lra. diff --git a/gcc/testsuite/gcc.dg/torture/pr110422.c b/gcc/testsuite/gcc.dg/torture/pr110422.c index 2e171a7a19e..2a653bdfce3 100644 --- a/gcc/testsuite/gcc.dg/torture/pr110422.c +++ b/gcc/testsuite/gcc.dg/torture/pr110422.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target lra } } */ struct T { int x; }; int foo(void) { signature.asc Description: PGP signature
[committed] Limit dg-xfail-run-if for *-*-hpux11.[012]* to -O0
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Limit dg-xfail-run-if for *-*-hpux11.[012]* to -O0 2024-01-19 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/torture/pr47917.c: Limit dg-xfail-run-if for hpux11.[012]* to -O0. diff --git a/gcc/testsuite/gcc.dg/torture/pr47917.c b/gcc/testsuite/gcc.dg/torture/pr47917.c index 5724907ba1c..32c99c6a2d2 100644 --- a/gcc/testsuite/gcc.dg/torture/pr47917.c +++ b/gcc/testsuite/gcc.dg/torture/pr47917.c @@ -2,7 +2,7 @@ /* { dg-options "-std=c99" } */ /* { dg-options "-std=gnu99" { target *-*-hpux* } } */ /* { dg-additional-options "-D__USE_MINGW_ANSI_STDIO=1" { target *-*-mingw* } } */ -/* { dg-xfail-run-if "non-conforming C99 snprintf" { *-*-hpux11.[012]* } } */ +/* { dg-xfail-run-if "non-conforming C99 snprintf" { *-*-hpux11.[012]* } { "-O0" } } */ /* PR middle-end/47917 */ signature.asc Description: PGP signature
[committed] Change dg-options for hpux to define _HPUX_SOURCE in gcc.dg/pthread-init-2.c
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Change dg-options for hpux to define _HPUX_SOURCE in gcc.dg/pthread-init-2.c Pthreads on hpux needs _HPUX_SOURCE define for id_t and spu_t types. 2024-01-19 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/pthread-init-2.c: Change dg-options for hpux to define _HPUX_SOURCE. diff --git a/gcc/testsuite/gcc.dg/pthread-init-2.c b/gcc/testsuite/gcc.dg/pthread-init-2.c index d7cd66b5c02..c934fb525f9 100644 --- a/gcc/testsuite/gcc.dg/pthread-init-2.c +++ b/gcc/testsuite/gcc.dg/pthread-init-2.c @@ -7,7 +7,8 @@ /* { dg-do compile } */ /* { dg-require-effective-target pthread_h } */ /* { dg-options "-Wextra -Wall -ansi" } */ -/* { dg-options "-Wextra -Wall -ansi -D_POSIX_C_SOURCE=199506L" { target { *-*-hpux* } } } */ +/* We need to define _HPUX_SOURCE on hpux11.11 for id_t and spu_t types. */ +/* { dg-options "-Wextra -Wall -ansi -D_HPUX_SOURCE" { target { *-*-hpux* } } } */ /* { dg-options "-Wextra -Wall -ansi -D_XOPEN_SOURCE=500" { target { powerpc-ibm-aix* } } } */ /* The definition of PTHREAD_MUTEX_INITIALIZER is missing an initializer for mutexAttr.mutexAttrType in kernel mode for various VxWorks versions. */ signature.asc Description: PGP signature
[committed] Only xfail gcc.dg/pr84877.c on 32-bit hppa*-*-*
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Only xfail gcc.dg/pr84877.c on 32-bit hppa*-*-* 2024-01-19 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/pr84877.c: Only xfail on 32-bit hppa*-*-*. diff --git a/gcc/testsuite/gcc.dg/pr84877.c b/gcc/testsuite/gcc.dg/pr84877.c index d1fb84763c8..68681206e73 100644 --- a/gcc/testsuite/gcc.dg/pr84877.c +++ b/gcc/testsuite/gcc.dg/pr84877.c @@ -1,4 +1,4 @@ -/* { dg-do run { xfail { cris-*-* hppa*-*-* sparc*-*-* } } } */ +/* { dg-do run { xfail { cris-*-* sparc*-*-* } || { { ! lp64 } && hppa*-*-* } } } */ /* { dg-options "-O2" } */ #include signature.asc Description: PGP signature
[committed] Skip gcc.dg/analyzer/pr94688.c on hppa*64*-*-*
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Skip gcc.dg/analyzer/pr94688.c on hppa*64*-*-* 2024-01-19 John David Anglin gcc/testsuite/ChangeLog: PR analyzer/112705 * gcc.dg/analyzer/pr94688.c: Skip on hppa*64*-*-*. diff --git a/gcc/testsuite/gcc.dg/analyzer/pr94688.c b/gcc/testsuite/gcc.dg/analyzer/pr94688.c index f553b8cfdad..8ea8bc3b288 100644 --- a/gcc/testsuite/gcc.dg/analyzer/pr94688.c +++ b/gcc/testsuite/gcc.dg/analyzer/pr94688.c @@ -1,3 +1,4 @@ +/* { dg-skip-if "PR112705" { hppa*64*-*-* } } */ int a, b; void d(); void c() signature.asc Description: PGP signature
[committed] Add .data.rel.ro.local to read only sections in gcc.dg/array-quals-1.c
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Add .data.rel.ro.local to read only sections in gcc.dg/array-quals-1.c 2024-01-16 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/array-quals-1.c: Add .data.rel.ro.local to read only sections. diff --git a/gcc/testsuite/gcc.dg/array-quals-1.c b/gcc/testsuite/gcc.dg/array-quals-1.c index b9b55f774bc..e379f6121b7 100644 --- a/gcc/testsuite/gcc.dg/array-quals-1.c +++ b/gcc/testsuite/gcc.dg/array-quals-1.c @@ -30,23 +30,23 @@ cia d1 = { 7, 8 }; static cia e[2] = { { 1, 2 }, { 3, 4 } }; /* { dg-final { scan-assembler-symbol-section {^_?e1$} {^\.(const|rodata|srodata|sdata)|\[RO\]} } } */ cia e1[2] = { { 1, 2 }, { 3, 4 } }; -/* { dg-final { scan-assembler-symbol-section {^_?p$} {^\.(const|rodata|srodata|sdata)|\[RW\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?p$} {^\.(const|rodata|srodata|sdata|data.rel.ro.local)|\[RW\]} } } */ void *const p = &a; -/* { dg-final { scan-assembler-symbol-section {^_?q$} {^\.(const|rodata|srodata|sdata)|\[RW\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?q$} {^\.(const|rodata|srodata|sdata|data.rel.ro.local)|\[RW\]} } } */ void *const q = &b; -/* { dg-final { scan-assembler-symbol-section {^_?r$} {^\.(const|rodata|srodata|sdata)|\[RW\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?r$} {^\.(const|rodata|srodata|sdata|data.rel.ro.local)|\[RW\]} } } */ void *const r = &c; -/* { dg-final { scan-assembler-symbol-section {^_?s$} {^\.(const|rodata|srodata|sdata)|\[RW\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?s$} {^\.(const|rodata|srodata|sdata|data.rel.ro.local)|\[RW\]} } } */ void *const s = &d; -/* { dg-final { scan-assembler-symbol-section {^_?t$} {^\.(const|rodata|srodata|sdata)|\[RW\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?t$} {^\.(const|rodata|srodata|sdata|data.rel.ro.local)|\[RW\]} } } */ void *const t = &e; -/* { dg-final { scan-assembler-symbol-section {^_?p1$} {^\.(const|rodata|srodata|sdata)|\[RW\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?p1$} {^\.(const|rodata|srodata|sdata|data.rel.ro.local)|\[RW\]} } } */ void *const p1 = &a1; -/* { dg-final { scan-assembler-symbol-section {^_?q1$} {^\.(const|rodata|srodata|sdata)|\[RW\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?q1$} {^\.(const|rodata|srodata|sdata|data.rel.ro.local)|\[RW\]} } } */ void *const q1 = &b1; -/* { dg-final { scan-assembler-symbol-section {^_?r1$} {^\.(const|rodata|srodata|sdata)|\[RW\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?r1$} {^\.(const|rodata|srodata|sdata|data.rel.ro.local)|\[RW\]} } } */ void *const r1 = &c1; -/* { dg-final { scan-assembler-symbol-section {^_?s1$} {^\.(const|rodata|srodata|sdata)|\[RW\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?s1$} {^\.(const|rodata|srodata|sdata|data.rel.ro.local)|\[RW\]} } } */ void *const s1 = &d1; -/* { dg-final { scan-assembler-symbol-section {^_?t1$} {^\.(const|rodata|srodata|sdata)|\[RW\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?t1$} {^\.(const|rodata|srodata|sdata|data.rel.ro.local)|\[RW\]} } } */ void *const t1 = &e1; signature.asc Description: PGP signature
[committed] Remove xfail for hppa*-*-hpux* from stdatomic-flag.c and stdatomic-flag-2.c
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Remove xfail for hppa*-*-hpux* from stdatomic-flag.c and stdatomic-flag-2.c Tests now pass on hppa64-hp-hpux11.11. 2024-01-16 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/atomic/stdatomic-flag.c: Remove xfail. * gcc.dg/atomic/stdatomic-flag-2.c: Likewise. diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-flag-2.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-flag-2.c index aeae6b7b5ad..e4e3a6ef33d 100644 --- a/gcc/testsuite/gcc.dg/atomic/stdatomic-flag-2.c +++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-flag-2.c @@ -1,7 +1,7 @@ /* Test atomic_flag routines for existence and execution. Out-of-line function calls. */ /* The test needs a lockless atomic implementation. */ -/* { dg-do run { xfail hppa*-*-hpux* } } */ +/* { dg-do run } */ /* { dg-options "-std=c11 -pedantic-errors" } */ #include diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c index 515d5d8dd5a..bd28ba56c24 100644 --- a/gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c +++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c @@ -1,6 +1,6 @@ /* Test atomic_flag routines for existence and execution. */ /* The test needs a lockless atomic implementation. */ -/* { dg-do run { xfail hppa*-*-hpux* } } */ +/* { dg-do run } */ /* { dg-options "-std=c11 -pedantic-errors" } */ #include signature.asc Description: PGP signature
[committed] xfail scan-tree-dump-not throw in g++.dg/pr99966.C on hppa*64*-*-*
Tested on hppa64-hpux11.11. Committed to trunk. Dave --- xfail scan-tree-dump-not throw in g++.dg/pr99966.C on hppa*64*-*-* 2024-01-16 John David Anglin gcc/testsuite/ChangeLog: PR tree-optimization/110794 * g++.dg/pr99966.C: xfail scan-tree-dump-not throw on hppa*64*-*-*. diff --git a/gcc/testsuite/g++.dg/pr99966.C b/gcc/testsuite/g++.dg/pr99966.C index 4d689822b87..d111c0acf11 100644 --- a/gcc/testsuite/g++.dg/pr99966.C +++ b/gcc/testsuite/g++.dg/pr99966.C @@ -20,4 +20,4 @@ uint64_t f(std::vector& data, size_t start, size_t end){ return total; } -/* { dg-final { scan-tree-dump-not "throw" "vrp1"} } */ +/* { dg-final { scan-tree-dump-not "throw" "vrp1" { xfail hppa*64*-*-* } } } */ signature.asc Description: PGP signature
[committed] Require target lto in several tests
Tested on hppa64-hp-hpux11.11 with lto disabled. Committed to trunk. Dave --- Require target lto in several tests 2024-01-16 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/c23-tag-alias-2.c: Require target lto. * gcc.dg/c23-tag-alias-3.c: Likewise. * gcc.dg/gnu23-tag-alias-3.c: Likewise. * gcc.dg/scantest-lto.c: Likewise. diff --git a/gcc/testsuite/gcc.dg/c23-tag-alias-2.c b/gcc/testsuite/gcc.dg/c23-tag-alias-2.c index 64ff67d8552..1a4097b629d 100644 --- a/gcc/testsuite/gcc.dg/c23-tag-alias-2.c +++ b/gcc/testsuite/gcc.dg/c23-tag-alias-2.c @@ -1,4 +1,4 @@ -/* { dg-do run } +/* { dg-do run { target lto } } * { dg-options "-std=c23 -flto -O2" } */ diff --git a/gcc/testsuite/gcc.dg/c23-tag-alias-3.c b/gcc/testsuite/gcc.dg/c23-tag-alias-3.c index b9fe6f3b407..76bc4dfcd23 100644 --- a/gcc/testsuite/gcc.dg/c23-tag-alias-3.c +++ b/gcc/testsuite/gcc.dg/c23-tag-alias-3.c @@ -1,4 +1,4 @@ -/* { dg-do run } +/* { dg-do run { target lto } } * { dg-options "-std=c23 -O2" } */ diff --git a/gcc/testsuite/gcc.dg/gnu23-tag-alias-3.c b/gcc/testsuite/gcc.dg/gnu23-tag-alias-3.c index c2fd4e930ef..9d7e7e11c7f 100644 --- a/gcc/testsuite/gcc.dg/gnu23-tag-alias-3.c +++ b/gcc/testsuite/gcc.dg/gnu23-tag-alias-3.c @@ -1,4 +1,4 @@ -/* { dg-do run } +/* { dg-do run { target lto } } * { dg-options "-std=gnu23 -flto -O2" } */ diff --git a/gcc/testsuite/gcc.dg/scantest-lto.c b/gcc/testsuite/gcc.dg/scantest-lto.c index 5f8abaf77f3..46c21f20bfc 100644 --- a/gcc/testsuite/gcc.dg/scantest-lto.c +++ b/gcc/testsuite/gcc.dg/scantest-lto.c @@ -1,3 +1,4 @@ +/* { dg-do compile { target lto } } /* { dg-options "-O2 -flto" } */ void foo () signature.asc Description: PGP signature
[committed] Skip various cmp-mem-const tests on lp64 hppa*-*-*
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Skip various cmp-mem-const tests on lp64 hppa*-*-* Prior optimization already reduced the constant. 2024-01-16 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/cmp-mem-const-3.c: Skip on lp64 hppa*-*-*. * gcc.dg/cmp-mem-const-4.c: Likewise. * gcc.dg/cmp-mem-const-5.c: Likewise. * gcc.dg/cmp-mem-const-6.c: Likewise. diff --git a/gcc/testsuite/gcc.dg/cmp-mem-const-3.c b/gcc/testsuite/gcc.dg/cmp-mem-const-3.c index c60ecdb4026..5469f10712e 100644 --- a/gcc/testsuite/gcc.dg/cmp-mem-const-3.c +++ b/gcc/testsuite/gcc.dg/cmp-mem-const-3.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { lp64 && { ! sparc*-*-* } } } } */ +/* { dg-do compile { target { lp64 && { ! { sparc*-*-* hppa*-*-* } } } } } */ /* Excluding sparc since there we do not end up with a comparison of memory and a constant which means that the optimization is not applicable. */ /* { dg-options "-O2 -fdump-rtl-combine-details" } */ diff --git a/gcc/testsuite/gcc.dg/cmp-mem-const-4.c b/gcc/testsuite/gcc.dg/cmp-mem-const-4.c index 7aa403d76d9..9ea094e20eb 100644 --- a/gcc/testsuite/gcc.dg/cmp-mem-const-4.c +++ b/gcc/testsuite/gcc.dg/cmp-mem-const-4.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { lp64 && { ! sparc*-*-* } } } } */ +/* { dg-do compile { target { lp64 && { ! { sparc*-*-* hppa*-*-* } } } } } */ /* Excluding sparc since there we do not end up with a comparison of memory and a constant which means that the optimization is not applicable. */ /* { dg-options "-O2 -fdump-rtl-combine-details" } */ diff --git a/gcc/testsuite/gcc.dg/cmp-mem-const-5.c b/gcc/testsuite/gcc.dg/cmp-mem-const-5.c index 4316dcb5605..5a9096ef84d 100644 --- a/gcc/testsuite/gcc.dg/cmp-mem-const-5.c +++ b/gcc/testsuite/gcc.dg/cmp-mem-const-5.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { lp64 && { ! sparc*-*-* } } } } */ +/* { dg-do compile { target { lp64 && { ! { sparc*-*-* hppa*-*-* } } } } } */ /* Excluding sparc since there a prior optimization already reduced the constant, i.e., nothing left for us. */ /* { dg-options "-O2 -fdump-rtl-combine-details" } */ diff --git a/gcc/testsuite/gcc.dg/cmp-mem-const-6.c b/gcc/testsuite/gcc.dg/cmp-mem-const-6.c index d9046af79eb..381195361e0 100644 --- a/gcc/testsuite/gcc.dg/cmp-mem-const-6.c +++ b/gcc/testsuite/gcc.dg/cmp-mem-const-6.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { lp64 && { ! sparc*-*-* } } } } */ +/* { dg-do compile { target { lp64 && { ! { sparc*-*-* hppa*-*-* } } } } } */ /* Excluding sparc since there a prior optimization already reduced the constant, i.e., nothing left for us. */ /* { dg-options "-O2 -fdump-rtl-combine-details" } */ signature.asc Description: PGP signature
[committed] xfail all scan-tree-dump-times checks on hppa*64*-*-* in sra-17.c and sra-18.c
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- xfail all scan-tree-dump-times checks on hppa*64*-*-* in sra-17.c and sra-18.c 2024-01-16 John David Anglin gcc/testsuite/ChangeLog: PR tree-optimization/91624 * gcc.dg/tree-ssa/sra-17.c: xfail all scan-tree-dump-times checks on hppa*64*-*-*. * gcc.dg/tree-ssa/sra-18.c: Likewise. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/sra-17.c b/gcc/testsuite/gcc.dg/tree-ssa/sra-17.c index b0d4811e77b..f1c74274b30 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/sra-17.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/sra-17.c @@ -17,5 +17,5 @@ main (int argc, char **argv) abort (); } -/* { dg-final { scan-tree-dump-times "Removing load: a = \\\*.?L.?C.?.?.?0;" 1 "esra" } } */ -/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\\[" 4 "esra" } } */ +/* { dg-final { scan-tree-dump-times "Removing load: a = \\\*.?L.?C.?.?.?0;" 1 "esra" { xfail hppa*64*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\\[" 4 "esra" { xfail hppa*64*-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/sra-18.c b/gcc/testsuite/gcc.dg/tree-ssa/sra-18.c index 2cdeae6e9e7..3077485a8db 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/sra-18.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/sra-18.c @@ -23,8 +23,8 @@ main (int argc, char **argv) abort (); } -/* { dg-final { scan-tree-dump-times "Removing load: a = \\\*.?L.?C.?.?.?0;" 1 "esra" } } */ -/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[0\\\]\\.f\\\[0\\\]\\.x" 1 "esra" } } */ -/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[0\\\]\\.f\\\[1\\\]\\.x" 1 "esra" } } */ -/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[1\\\]\\.f\\\[0\\\]\\.x" 1 "esra" } } */ -/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[1\\\]\\.f\\\[1\\\]\\.x" 1 "esra" } } */ +/* { dg-final { scan-tree-dump-times "Removing load: a = \\\*.?L.?C.?.?.?0;" 1 "esra" { xfail hppa*64*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[0\\\]\\.f\\\[0\\\]\\.x" 1 "esra" { xfail hppa*64*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[0\\\]\\.f\\\[1\\\]\\.x" 1 "esra" { xfail hppa*64*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[1\\\]\\.f\\\[0\\\]\\.x" 1 "esra" { xfail hppa*64*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[1\\\]\\.f\\\[1\\\]\\.x" 1 "esra" { xfail hppa*64*-*-* } } } */ signature.asc Description: PGP signature
[committed] Disable tests for strdup/strndup on __hpux__ in various builtin-object-size tests
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Disable tests for strdup/strndup on __hpux__ hppa*-*-hpux* doesn't have strdup or strndup. 2024-01-14 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/builtin-object-size-1.c: Disable tests for strdup/strndup on __hpux__. * gcc.dg/builtin-object-size-2.c: Likewise. * gcc.dg/builtin-object-size-3.c: Likewise. * gcc.dg/builtin-object-size-4.c: Likewise. diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-1.c b/gcc/testsuite/gcc.dg/builtin-object-size-1.c index 64c4bc4da39..4f7d4c0b370 100644 --- a/gcc/testsuite/gcc.dg/builtin-object-size-1.c +++ b/gcc/testsuite/gcc.dg/builtin-object-size-1.c @@ -621,7 +621,7 @@ test10 (void) } } -#ifndef __AVR__ /* avr has no strndup */ +#if !defined(__AVR__) && !defined(__hpux__) /* avr and hpux have no strndup */ /* Tests for strdup/strndup. */ size_t __attribute__ ((noinline)) @@ -726,7 +726,7 @@ main (void) test8 (); test9 (1); test10 (); -#ifndef __AVR__ /* avr has no strndup */ +#if !defined(__AVR__) && !defined(__hpux__) /* avr and hpux have no strndup */ test11 (); #endif DONE (); diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-2.c b/gcc/testsuite/gcc.dg/builtin-object-size-2.c index da10b6b0632..37d3dcc6f56 100644 --- a/gcc/testsuite/gcc.dg/builtin-object-size-2.c +++ b/gcc/testsuite/gcc.dg/builtin-object-size-2.c @@ -536,7 +536,7 @@ test8 (unsigned cond) #endif } -#ifndef __AVR__ /* avr has no strndup */ +#if !defined(__AVR__) && !defined(__hpux__) /* avr and hpux have no strndup */ /* Tests for strdup/strndup. */ size_t __attribute__ ((noinline)) @@ -639,7 +639,7 @@ main (void) test6 (); test7 (); test8 (1); -#ifndef __AVR__ /* avr has no strndup */ +#if !defined(__AVR__) && !defined(__hpux__) /* avr and hpux have no strndup */ test9 (); #endif DONE (); diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-3.c b/gcc/testsuite/gcc.dg/builtin-object-size-3.c index f23873bec38..f4d1ebf7027 100644 --- a/gcc/testsuite/gcc.dg/builtin-object-size-3.c +++ b/gcc/testsuite/gcc.dg/builtin-object-size-3.c @@ -628,7 +628,7 @@ test10 (void) } } -#ifndef __AVR__ /* avr has no strndup */ +#if !defined(__AVR__) && !defined(__hpux__) /* avr and hpux have no strndup */ /* Tests for strdup/strndup. */ size_t __attribute__ ((noinline)) @@ -734,7 +734,7 @@ main (void) test8 (); test9 (1); test10 (); -#ifndef __AVR__ /* avr has no strndup */ +#if !defined(__AVR__) && !defined(__hpux__) /* avr and hpux have no strndup */ test11 (); #endif DONE (); diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-4.c b/gcc/testsuite/gcc.dg/builtin-object-size-4.c index dcb042f34b6..2887dd15042 100644 --- a/gcc/testsuite/gcc.dg/builtin-object-size-4.c +++ b/gcc/testsuite/gcc.dg/builtin-object-size-4.c @@ -509,7 +509,7 @@ test8 (unsigned cond) #endif } -#ifndef __AVR__ /* avr has no strndup */ +#if !defined(__AVR__) && !defined(__hpux__) /* avr and hpux have no strndup */ /* Tests for strdup/strndup. */ size_t __attribute__ ((noinline)) @@ -612,7 +612,7 @@ main (void) test6 (); test7 (); test8 (1); -#ifndef __AVR__ /* avr has no strndup */ +#if !defined(__AVR__) && !defined(__hpux__) /* avr and hpux have no strndup */ test9 (); #endif DONE (); signature.asc Description: PGP signature
[committed] Skip several gcc.dg/builtin-dynamic-object-size tests on hppa*-*-hpux*
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Skip several gcc.dg/builtin-dynamic-object-size tests on hppa*-*-hpux* hppa*-*-hpux* doesn't have strdup or strndup. 2024-01-14 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/builtin-dynamic-object-size-0.c: Skip on hppa*-*-hpux*. * gcc.dg/builtin-dynamic-object-size-1.c: Likewise. * gcc.dg/builtin-dynamic-object-size-2.c: Likewise. * gcc.dg/builtin-dynamic-object-size-3.c: Likewise. * gcc.dg/builtin-dynamic-object-size-4.c: Likewise. diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-0.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-0.c index c3ac6230d4d..173e7c755f4 100644 --- a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-0.c +++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-0.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ /* { dg-require-effective-target size20plus } */ +/* { dg-skip-if "no strndup" { hppa*-*-hpux* } } */ #include "builtin-object-size-common.h" diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-1.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-1.c index 8f17c8edcaf..ffa59985024 100644 --- a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-1.c +++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-1.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -Wno-stringop-overread" } */ /* { dg-require-effective-target alloca } */ +/* { dg-skip-if "no strndup" { hppa*-*-hpux* } } */ #define __builtin_object_size __builtin_dynamic_object_size #include "builtin-object-size-1.c" diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-2.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-2.c index 3677782ff1c..fff32da7aea 100644 --- a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-2.c +++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-2.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -Wno-stringop-overread" } */ /* { dg-require-effective-target alloca } */ +/* { dg-skip-if "no strndup" { hppa*-*-hpux* } } */ #define __builtin_object_size __builtin_dynamic_object_size #include "builtin-object-size-2.c" diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-3.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-3.c index 5b6987b7773..ac223d67b10 100644 --- a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-3.c +++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-3.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -Wno-stringop-overread" } */ /* { dg-require-effective-target alloca } */ +/* { dg-skip-if "no strndup" { hppa*-*-hpux* } } */ #define __builtin_object_size __builtin_dynamic_object_size #include "builtin-object-size-3.c" diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-4.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-4.c index 9d796224e96..fdf4284ae11 100644 --- a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-4.c +++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-4.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -Wno-stringop-overread" } */ /* { dg-require-effective-target alloca } */ +/* { dg-skip-if "no strndup" { hppa*-*-hpux* } } */ #define __builtin_object_size __builtin_dynamic_object_size #include "builtin-object-size-4.c" signature.asc Description: PGP signature
[committed] Fix dg-warning on hppa*64*-*-*
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Fix dg-warning on hppa*64*-*-* 2024-01-14 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/Wattributes-6.c: Fix dg-warning on hppa*64*-*-*. diff --git a/gcc/testsuite/gcc.dg/Wattributes-6.c b/gcc/testsuite/gcc.dg/Wattributes-6.c index 978f3f938e9..49a085def9e 100644 --- a/gcc/testsuite/gcc.dg/Wattributes-6.c +++ b/gcc/testsuite/gcc.dg/Wattributes-6.c @@ -408,7 +408,7 @@ finline_hot_noret_align (int); /* { dg-warning "ignoring attribute .warn_unused /* { dg-note"previous declaration here" "" { target *-*-* } .-1 } */ inline int ATTR ((aligned (4))) - finline_hot_noret_align (int); /* { dg-warning "ignoring attribute .aligned \\(4\\). because it conflicts with attribute .aligned \\(8\\)." "" { target { ! { hppa*64*-*-* } } } } */ + finline_hot_noret_align (int); /* { dg-warning "ignoring attribute .aligned \\(4\\). because it conflicts with attribute .aligned \\(8\\)." "" } */ inline int ATTR ((aligned (8))) finline_hot_noret_align (int); /* { dg-note "previous declaration here" } */ signature.asc Description: PGP signature
[committed] Skip several analyzer socket tests on hppa*-*-hpux*
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Skip several analyzer socket tests on hppa*-*-hpux* 2024-01-14 John David Anglin gcc/testsuite/ChangeLog: PR analyzer/113150 * c-c++-common/analyzer/fd-glibc-byte-stream-socket.c: Skip on hppa*-*-hpux*. * c-c++-common/analyzer/fd-manpage-getaddrinfo-client.c: Likewise. * c-c++-common/analyzer/fd-mappage-getaddrinfo-server.c: Likewise. * c-c++-common/analyzer/fd-symbolic-socket.c: Likewise. * gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c: Likewise. diff --git a/gcc/testsuite/c-c++-common/analyzer/fd-glibc-byte-stream-socket.c b/gcc/testsuite/c-c++-common/analyzer/fd-glibc-byte-stream-socket.c index d9666f99edd..fab8426acb9 100644 --- a/gcc/testsuite/c-c++-common/analyzer/fd-glibc-byte-stream-socket.c +++ b/gcc/testsuite/c-c++-common/analyzer/fd-glibc-byte-stream-socket.c @@ -1,6 +1,6 @@ /* Example from glibc manual (16.9.6). */ /* { dg-require-effective-target sockets } */ -/* { dg-skip-if "" { powerpc*-*-aix* } } */ +/* { dg-skip-if "" { hppa*-*-hpux* powerpc*-*-aix* } } */ #include #include diff --git a/gcc/testsuite/c-c++-common/analyzer/fd-manpage-getaddrinfo-client.c b/gcc/testsuite/c-c++-common/analyzer/fd-manpage-getaddrinfo-client.c index 16da9333074..21dfe977db8 100644 --- a/gcc/testsuite/c-c++-common/analyzer/fd-manpage-getaddrinfo-client.c +++ b/gcc/testsuite/c-c++-common/analyzer/fd-manpage-getaddrinfo-client.c @@ -28,7 +28,7 @@ the source, must acknowledge the copyright and authors of this work. /* { dg-require-effective-target sockets } */ /* { dg-additional-options "-Wno-analyzer-too-complex" } */ -/* { dg-skip-if "" { powerpc*-*-aix* } } */ +/* { dg-skip-if "" { hppa*-*-hpux* powerpc*-*-aix* } } */ #include #include diff --git a/gcc/testsuite/c-c++-common/analyzer/fd-mappage-getaddrinfo-server.c b/gcc/testsuite/c-c++-common/analyzer/fd-mappage-getaddrinfo-server.c index c02ee6ff643..2e9cec4abf0 100644 --- a/gcc/testsuite/c-c++-common/analyzer/fd-mappage-getaddrinfo-server.c +++ b/gcc/testsuite/c-c++-common/analyzer/fd-mappage-getaddrinfo-server.c @@ -27,7 +27,7 @@ the source, must acknowledge the copyright and authors of this work. */ /* { dg-require-effective-target sockets } */ -/* { dg-skip-if "" { powerpc*-*-aix* } } */ +/* { dg-skip-if "" { hppa*-*-hpux* powerpc*-*-aix* } } */ #include #include diff --git a/gcc/testsuite/c-c++-common/analyzer/fd-symbolic-socket.c b/gcc/testsuite/c-c++-common/analyzer/fd-symbolic-socket.c index d7dc46a2d47..32264fd9701 100644 --- a/gcc/testsuite/c-c++-common/analyzer/fd-symbolic-socket.c +++ b/gcc/testsuite/c-c++-common/analyzer/fd-symbolic-socket.c @@ -1,5 +1,5 @@ /* { dg-require-effective-target sockets } */ -/* { dg-skip-if "" { powerpc*-*-aix* } } */ +/* { dg-skip-if "" { hppa*-*-hpux* powerpc*-*-aix* } } */ #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c b/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c index d8b697d323e..fcbcc740170 100644 --- a/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c +++ b/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c @@ -1,7 +1,7 @@ /* Example from glibc manual (16.9.7). */ /* { dg-require-effective-target sockets } */ /* { dg-additional-options "-Wno-analyzer-too-complex" } */ -/* { dg-skip-if "" { powerpc*-*-aix* } } */ +/* { dg-skip-if "" { hppa*-*-hpux* powerpc*-*-aix* } } */ #include #include signature.asc Description: PGP signature
[committed] hppa64: Fix fmt_f_default_field_width_3.f90 and fmt_g_default_field_width_3.f90
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- hppa64: Fix fmt_f_default_field_width_3.f90 and fmt_g_default_field_width_3.f90 The hppa*64*-*-hpux* target is not included in the set of fortran_real_16 targets because it doesn't have cosl. However, these tests don't need cosl, etc. 2024-01-13 John David Anglin gcc/testsuite/ChangeLog: * gfortran.dg/fmt_f_default_field_width_3.f90: Add hppa*64*-*-hpux* to real_16 dg-error targets. * gfortran.dg/fmt_g_default_field_width_3.f90: Likewise. diff --git a/gcc/testsuite/gfortran.dg/fmt_f_default_field_width_3.f90 b/gcc/testsuite/gfortran.dg/fmt_f_default_field_width_3.f90 index 3e7d8f64d43..46f271e0c60 100644 --- a/gcc/testsuite/gfortran.dg/fmt_f_default_field_width_3.f90 +++ b/gcc/testsuite/gfortran.dg/fmt_f_default_field_width_3.f90 @@ -30,6 +30,6 @@ program test #ifdef __GFC_REAL_16__ real_16 = 4.18 -write(buffer, fmt) ':',real_16,':' ! { dg-error "Nonnegative width required" "" { target fortran_real_16 } } +write(buffer, fmt) ':',real_16,':' ! { dg-error "Nonnegative width required" "" { target { fortran_real_16 || { hppa*64*-*-hpux* } } } } #endif end diff --git a/gcc/testsuite/gfortran.dg/fmt_g_default_field_width_3.f90 b/gcc/testsuite/gfortran.dg/fmt_g_default_field_width_3.f90 index 95a05981941..22fe1a35d65 100644 --- a/gcc/testsuite/gfortran.dg/fmt_g_default_field_width_3.f90 +++ b/gcc/testsuite/gfortran.dg/fmt_g_default_field_width_3.f90 @@ -33,6 +33,6 @@ program test #ifdef __GFC_REAL_16__ real_16 = 4.18 -write(buffer, fmt) ':',real_16,':' ! { dg-error "Positive width required" "" { target fortran_real_16 } } +write(buffer, fmt) ':',real_16,':' ! { dg-error "Positive width required" "" { target { fortran_real_16 || { hppa*64*-*-hpux* } } } } #endif end signature.asc Description: PGP signature
[committed] xfail dg-final "Sunk statements: 5" on hppa*64*-*-*
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- xfail dg-final "Sunk statements: 5" on hppa*64*-*-* 2024-01-08 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/ssa-sink-18.c: xfail dg-final "Sunk statements: 5" on hppa*64*-*-*. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-18.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-18.c index 1372100882e..b199df26a0f 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-18.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-18.c @@ -215,4 +215,4 @@ compute_on_bytes (uint8_t *in_data, int in_len, uint8_t *out_data, int out_len) base+index addressing modes, so the ip[len] address computation can't be made from the IV computation above. powerpc64le similarly is affected. */ - /* { dg-final { scan-tree-dump-times "Sunk statements: 5" 1 "sink2" { target lp64 xfail { riscv64-*-* powerpc64le-*-* } } } } */ + /* { dg-final { scan-tree-dump-times "Sunk statements: 5" 1 "sink2" { target lp64 xfail { riscv64-*-* powerpc64le-*-* hppa*64*-*-* } } } } */ signature.asc Description: PGP signature
[committed] Skip gfortran.dg/dec_math.f90 on hppa*-*-hpux*
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Skip gfortran.dg/dec_math.f90 on hppa hppa*-*-hpux* doesn't have any long double trig functions. 2024-01-08 John David Anglin gcc/testsuite/ChangeLog: * gfortran.dg/dec_math.f90: Skip on hppa*-*-hpux*. diff --git a/gcc/testsuite/gfortran.dg/dec_math.f90 b/gcc/testsuite/gfortran.dg/dec_math.f90 index d95233a5169..393e7def88e 100644 --- a/gcc/testsuite/gfortran.dg/dec_math.f90 +++ b/gcc/testsuite/gfortran.dg/dec_math.f90 @@ -1,5 +1,6 @@ ! { dg-options "-cpp -std=gnu" } ! { dg-do run { xfail i?86-*-freebsd* } } +! { dg-skip-if "No long double libc functions" { hppa*-*-hpux* } } ! ! Test extra math intrinsics formerly offered by -fdec-math, ! now included with -std=gnu or -std=legacy. signature.asc Description: PGP signature
[committed] hppa: Fix bind_c_coms.f90 and bind_c_vars.f90 tests on hppa
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- hppa: Fix bind_c_coms.f90 and bind_c_vars.f90 tests on hppa Commit 6271dd98 changed the default from -fcommon to -fno-common. This silently changed the alignment of uninitialized BSS data on hppa where the alignment of common data must be greater or equal to the alignment of the largest type that will fit in the block. For example, the alignment of `double d[2];' changed from 16 to 8 on hppa64. The hppa architecture requires strict alignment and the linker warns about inconsistent alignment of variables. This change broke the gfortran.dg/bind_c_coms.f90 and gfortran.dg/bind_c_vars.f90 tests. These tests check whether bind_c works between fortran and C. Adding the -fcommon option fixes the tests. Probably, gcc and HP C are now by default inconsistent but that's water under the bridge. 2024-01-08 John David Anglin gcc/testsuite/ChangeLog: PR testsuite/94253 * gfortran.dg/bind_c_coms.f90: Add -fcommon option on hppa*-*-*. * gfortran.dg/bind_c_vars.f90: Likewise. diff --git a/gcc/testsuite/gfortran.dg/bind_c_coms.f90 b/gcc/testsuite/gfortran.dg/bind_c_coms.f90 index 85ead9fb636..2f9714947c7 100644 --- a/gcc/testsuite/gfortran.dg/bind_c_coms.f90 +++ b/gcc/testsuite/gfortran.dg/bind_c_coms.f90 @@ -3,6 +3,7 @@ ! { dg-options "-w" } ! the -w option is to prevent the warning about long long ints module bind_c_coms +! { dg-additional-options "-fcommon" { target hppa*-*-hpux* } } use, intrinsic :: iso_c_binding implicit none diff --git a/gcc/testsuite/gfortran.dg/bind_c_vars.f90 b/gcc/testsuite/gfortran.dg/bind_c_vars.f90 index 4f4a0cfd795..ede3ffd8c21 100644 --- a/gcc/testsuite/gfortran.dg/bind_c_vars.f90 +++ b/gcc/testsuite/gfortran.dg/bind_c_vars.f90 @@ -1,6 +1,7 @@ ! { dg-do run } ! { dg-additional-sources bind_c_vars_driver.c } module bind_c_vars +! { dg-additional-options "-fcommon" { target hppa*-*-hpux* } } use, intrinsic :: iso_c_binding implicit none signature.asc Description: PGP signature
[committed] hppa: Fix pr110279-1.c on hppa
This test needs fma support. It is only available on hppa in PA 2.0. Tested on hppa-unknown-linux-gnu. Committed to trunk. Dave --- hppa: Fix pr110279-1.c on hppa 2023-12-24 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/pr110279-1.c: Add -march=2.0 option on hppa*-*-*. diff --git a/gcc/testsuite/gcc.dg/pr110279-1.c b/gcc/testsuite/gcc.dg/pr110279-1.c index f25b6aec967..291824c0a48 100644 --- a/gcc/testsuite/gcc.dg/pr110279-1.c +++ b/gcc/testsuite/gcc.dg/pr110279-1.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-Ofast --param avoid-fma-max-bits=512 --param tree-reassoc-width=4 -fdump-tree-widening_mul-details" } */ /* { dg-additional-options "-march=armv8.2-a" { target aarch64-*-* } } */ +/* { dg-additional-options "-march=2.0" { target hppa*-*-* } } */ #define LOOP_COUNT 8 typedef double data_e; signature.asc Description: PGP signature
Re: [PATCH,doc] install: Drop hppa*-hp-hpux10, remove old notes on hppa*-hp-hpux11
On 2023-12-17 2:28 a.m., Gerald Pfeifer wrote: Hi Dave, based on our earlier e-mail, I understand we don't support hppa*-hp-hpux10 any longer, so let's remove them from the installation docs. On the way remove references to GCC 2.95 and 3.0 from hppa*-hp-hpux11. Okay? The sentence about 64-bit libffi for hpux also can be removed. I ported it a few years ago. Otherwise, the change is okay. (I believe it would be great if you could have a look at that part of the installation docs. I'm pretty confident there is quite a bit more we can garbage collect or simplify.) Maybe I can do it tomorrow. Dave Gerald gcc: PR target/69374 * doc/install.texi (Specific) : Remove section. (Specific) : Remove references to GCC 2.95 and 3.0. --- gcc/doc/install.texi | 18 -- 1 file changed, 18 deletions(-) diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 84d8834a9b5..17cef5a2bae 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -3742,8 +3742,6 @@ information have to. @item @uref{#hppa-hp-hpux,,hppa*-hp-hpux*} @item -@uref{#hppa-hp-hpux10,,hppa*-hp-hpux10} -@item @uref{#hppa-hp-hpux11,,hppa*-hp-hpux11} @item @uref{#x-x-linux-gnu,,*-*-linux-gnu} @@ -4152,27 +4150,11 @@ a list of the predefines used with each standard. More specific information to @samp{hppa*-hp-hpux*} targets follows. -@html - -@end html -@anchor{hppa-hp-hpux10} -@heading hppa*-hp-hpux10 -For hpux10.20, we @emph{highly} recommend you pick up the latest sed patch -@code{PHCO_19798} from HP@. - -The C++ ABI has changed incompatibly in GCC 4.0. COMDAT subspaces are -used for one-only code and data. This resolves many of the previous -problems in using C++ on this target. However, the ABI is not compatible -with the one implemented under HP-UX 11 using secondary definitions. - @html @end html @anchor{hppa-hp-hpux11} @heading hppa*-hp-hpux11 -GCC 3.0 and up support HP-UX 11. GCC 2.95.x is not supported and cannot -be used to compile GCC 3.0 and up. - The libffi library haven't been ported to 64-bit HP-UX@ and doesn't build. Refer to @uref{binaries.html,,binaries} for information about obtaining -- John David Anglin dave.ang...@bell.net
Re: [PATCH] install: Streamline the hppa*-hp-hpux* section
Hi Gerald, I have one comment. The only target currently supported is hppa64-hp-hpux11*. While gas is required, only the HP ld works. Otherwise, the change looks fine. Dave On 2023-12-16 8:35 p.m., Gerald Pfeifer wrote: John, Jeff, I suggest to streamline the hppa*-hp-hpux* installation instructions as follows. Okay? In fact in the following sections there is even more, and more specific material, which would be great could you have a look at and help trim. Gerald >From 52149282c3a77ccda6385f06f36323c71b26491a Mon Sep 17 00:00:00 2001 From: Gerald Pfeifer Date: Sun, 17 Dec 2023 09:33:40 +0800 Subject: [PATCH] install: Streamline the hppa*-hp-hpux* section gcc: PR target/69374 * doc/install.texi (Specific) : Remove a note on GCC 4.3. Remove details on how the HP assembler, which we document as not working, breaks. --- gcc/doc/install.texi | 17 - 1 file changed, 17 deletions(-) diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 5ec81098d47..70d46feabf6 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -4121,8 +4121,6 @@ longer a multiple of 2 bytes. @end html @anchor{hppa-hp-hpux} @heading hppa*-hp-hpux* -Support for HP-UX version 9 and older was discontinued in GCC 3.4. - We require using gas/binutils on all hppa platforms. Version 2.19 or later is recommended. @@ -4130,21 +4128,6 @@ It may be helpful to configure GCC with the @uref{./configure.html#with-gnu-as,,@option{--with-gnu-as}} and @option{--with-as=@dots{}} options to ensure that GCC can find GAS@. -The HP assembler should not be used with GCC. It is rarely tested and may -not work. It shouldn't be used with any languages other than C due to its -many limitations. - -Specifically, @option{-g} does not work (HP-UX uses a peculiar debugging -format which GCC does not know about). It also inserts timestamps -into each object file it creates, causing the 3-stage comparison test to -fail during a bootstrap. You should be able to continue by saying -@samp{make all-host all-target} after getting the failure from @samp{make}. - -Various GCC features are not supported. For example, it does not support weak -symbols or alias definitions. As a result, explicit template instantiations -are required when using C++. This makes it difficult if not impossible to -build many C++ applications. - There are two default scheduling models for instructions. These are PROCESSOR_7100LC and PROCESSOR_8000. They are selected from the pa-risc architecture specified for the target machine when configuring. -- John David Anglin dave.ang...@bell.net
[committed] Fix c-c++-common/fhardened-[12].c test fails on hppa
Tested on hppa-unknown-linux-gnu. Committed to trunk. Dave --- Fix c-c++-common/fhardened-[12].c test fails on hppa The -fstack-protector and -fstack-protector-strong options are not supported on hppa since the stack grows up. 2023-12-06 John David Anglin gcc/testsuite/ChangeLog: * c-c++-common/fhardened-1.c: Ignore __SSP_STRONG__ define if __hppa__ is defined. * c-c++-common/fhardened-2.c: Ignore __SSP__ define if __hppa__ is defined. diff --git a/gcc/testsuite/c-c++-common/fhardened-1.c b/gcc/testsuite/c-c++-common/fhardened-1.c index 7e6740655fe..23478be76b2 100644 --- a/gcc/testsuite/c-c++-common/fhardened-1.c +++ b/gcc/testsuite/c-c++-common/fhardened-1.c @@ -1,7 +1,7 @@ /* { dg-do compile { target *-*-linux* *-*-gnu* } } */ /* { dg-options "-fhardened -O" } */ -#ifndef __SSP_STRONG__ +#if !defined(__SSP_STRONG__) && !defined(__hppa__) # error "-fstack-protector-strong not enabled" #endif diff --git a/gcc/testsuite/c-c++-common/fhardened-2.c b/gcc/testsuite/c-c++-common/fhardened-2.c index 280ff96eb15..6ac66f9f6b7 100644 --- a/gcc/testsuite/c-c++-common/fhardened-2.c +++ b/gcc/testsuite/c-c++-common/fhardened-2.c @@ -4,7 +4,7 @@ #ifdef __SSP_STRONG__ # error "-fstack-protector-strong enabled when it should not be" #endif -#ifndef __SSP__ +#if !defined(__SSP__) && !defined(__hppa__) # error "-fstack-protector not enabled" #endif signature.asc Description: PGP signature
[committed] Skip analyzer strndup test on hppa*-*-hpux*
Test on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Skip analyzer strndup test on hppa*-*-hpux* 2023-11-26 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/analyzer/strndup-1.c: Skip on hppa*-*-hpux*. diff --git a/gcc/testsuite/gcc.dg/analyzer/strndup-1.c b/gcc/testsuite/gcc.dg/analyzer/strndup-1.c index 8cf7a42bf53..85ccae85d83 100644 --- a/gcc/testsuite/gcc.dg/analyzer/strndup-1.c +++ b/gcc/testsuite/gcc.dg/analyzer/strndup-1.c @@ -1,4 +1,4 @@ -/* { dg-skip-if "no strndup in libc" { *-*-darwin[789]* *-*-darwin10* *-*-mingw* *-*-vxworks* } } */ +/* { dg-skip-if "no strndup in libc" { *-*-darwin[789]* *-*-darwin10* hppa*-*-hpux* *-*-mingw* *-*-vxworks* } } */ #include #include signature.asc Description: PGP signature
[committed] Skip analyzer socket tests on hppa*-*-hpux*
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Skip analyzer socket tests on hppa*-*-hpux* 2023-11-26 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/analyzer/fd-glibc-datagram-client.c: Skip on hppa*-*-hpux*. * gcc.dg/analyzer/fd-glibc-datagram-socket.c: Likewise. diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-glibc-datagram-client.c b/gcc/testsuite/gcc.dg/analyzer/fd-glibc-datagram-client.c index fa98e3c045e..6d4dc607c3d 100644 --- a/gcc/testsuite/gcc.dg/analyzer/fd-glibc-datagram-client.c +++ b/gcc/testsuite/gcc.dg/analyzer/fd-glibc-datagram-client.c @@ -1,6 +1,6 @@ /* Example from the glibc manual (16.10.4). */ /* { dg-require-effective-target sockets } */ -/* { dg-skip-if "" { powerpc*-*-aix* } } */ +/* { dg-skip-if "" { hppa*-*-hpux* powerpc*-*-aix* } } */ #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-glibc-datagram-socket.c b/gcc/testsuite/gcc.dg/analyzer/fd-glibc-datagram-socket.c index 0d4894d98e1..7e179cfe3a6 100644 --- a/gcc/testsuite/gcc.dg/analyzer/fd-glibc-datagram-socket.c +++ b/gcc/testsuite/gcc.dg/analyzer/fd-glibc-datagram-socket.c @@ -1,6 +1,6 @@ /* Example from glibc manual (16.10.3). */ /* { dg-require-effective-target sockets } */ -/* { dg-skip-if "" { powerpc*-*-aix* } } */ +/* { dg-skip-if "" { hppa*-*-hpux* powerpc*-*-aix* } } */ #include #include signature.asc Description: PGP signature
[committed] hppa: Fix pr104869.C on hpux
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- hppa: Fix pr104869.C on hpux 2023-11-26 John David Anglin gcc/testsuite/ChangeLog: * g++.dg/pr104869.C: Add attribute visibility default to main prototype. diff --git a/gcc/testsuite/g++.dg/pr104869.C b/gcc/testsuite/g++.dg/pr104869.C index 13a39fccdb9..851d65355de 100644 --- a/gcc/testsuite/g++.dg/pr104869.C +++ b/gcc/testsuite/g++.dg/pr104869.C @@ -69,7 +69,7 @@ struct ControlFlow { return false; } #ifdef __hpux__ -extern int main(void); +extern int main(void) __attribute__ ((visibility ("default"))); #endif int main() { signature.asc Description: PGP signature
[committed] hppa: Really fix g++.dg/modules/bad-mapper-1.C on hpux
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- hppa: Really fix g++.dg/modules/bad-mapper-1.C on hpux 2023-11-26 John David Anglin gcc/testsuite/ChangeLog: * g++.dg/modules/bad-mapper-1.C: Add hppa*-*-hpux* to dg-error "this-will-not-work" targets. diff --git a/gcc/testsuite/g++.dg/modules/bad-mapper-1.C b/gcc/testsuite/g++.dg/modules/bad-mapper-1.C index b787023dd42..b0b0b86c9cd 100644 --- a/gcc/testsuite/g++.dg/modules/bad-mapper-1.C +++ b/gcc/testsuite/g++.dg/modules/bad-mapper-1.C @@ -1,6 +1,6 @@ // { dg-additional-options "-fmodules-ts -fmodule-mapper=|this-will-not-work" } import unique1.bob; -// { dg-error "-:failed (exec|CreateProcess|posix_spawn).*mapper.* .*this-will-not-work" "" { target { ! { *-*-darwin[89]* *-*-darwin10* } } } 0 } +// { dg-error "-:failed (exec|CreateProcess|posix_spawn).*mapper.* .*this-will-not-work" "" { target { ! { *-*-darwin[89]* *-*-darwin10* hppa*-*-hpux* } } } 0 } // { dg-prune-output "fatal error:" } // { dg-prune-output "failed to read" } // { dg-prune-output "compilation terminated" } signature.asc Description: PGP signature
[committed] hppa: Use INT14_OK_STRICT in a couple of places in pa_emit_move_sequence
This fixes a couple of places in pa_emit_move_sequence that should be using the INT14_OK_STRICT macro. Tested on hppa-unknown-linux-gnu. Committed to trunk. Dave --- hppa: Use INT14_OK_STRICT in a couple of places in pa_emit_move_sequence 64-bit Linux target has relocation issue and can't use 14-bit offsets. 2023-11-22 John David Anglin gcc/ChangeLog: * config/pa/pa.cc (pa_emit_move_sequence): Use INT14_OK_STRICT in a couple of places. diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc index 565c948a9e6..2ee987796f6 100644 --- a/gcc/config/pa/pa.cc +++ b/gcc/config/pa/pa.cc @@ -1872,9 +1872,7 @@ pa_emit_move_sequence (rtx *operands, machine_mode mode, rtx scratch_reg) if (reg_plus_base_memory_operand (op1, GET_MODE (op1))) { - if (!(TARGET_PA_20 - && !TARGET_ELF32 - && INT_14_BITS (XEXP (XEXP (op1, 0), 1))) + if (!(INT14_OK_STRICT && INT_14_BITS (XEXP (XEXP (op1, 0), 1))) && !INT_5_BITS (XEXP (XEXP (op1, 0), 1))) { /* SCRATCH_REG will hold an address and maybe the actual data. @@ -1923,9 +1921,7 @@ pa_emit_move_sequence (rtx *operands, machine_mode mode, rtx scratch_reg) if (reg_plus_base_memory_operand (op0, GET_MODE (op0))) { - if (!(TARGET_PA_20 - && !TARGET_ELF32 - && INT_14_BITS (XEXP (XEXP (op0, 0), 1))) + if (!(INT14_OK_STRICT && INT_14_BITS (XEXP (XEXP (op0, 0), 1))) && !INT_5_BITS (XEXP (XEXP (op0, 0), 1))) { /* SCRATCH_REG will hold an address and maybe the actual data. signature.asc Description: PGP signature
[committed] hppa: Fix g++.dg/modules/bad-mapper-1.C on hpux
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- hppa: Fix g++.dg/modules/bad-mapper-1.C on hpux 2023-11-23 John David Anglin gcc/testsuite/ChangeLog: * g++.dg/modules/bad-mapper-1.C: Add hppa*-*-hpux* to dg-error "-:failed mapper handshake communication" targets. diff --git a/gcc/testsuite/g++.dg/modules/bad-mapper-1.C b/gcc/testsuite/g++.dg/modules/bad-mapper-1.C index 53e3e1d0c88..f2ea5fbf580 100644 --- a/gcc/testsuite/g++.dg/modules/bad-mapper-1.C +++ b/gcc/testsuite/g++.dg/modules/bad-mapper-1.C @@ -4,6 +4,6 @@ import unique1.bob; // { dg-prune-output "fatal error:" } // { dg-prune-output "failed to read" } // { dg-prune-output "compilation terminated" } -// { dg-error "-:failed mapper handshake communication" "" { target { *-*-darwin[89]* *-*-darwin10* } } 0 } +// { dg-error "-:failed mapper handshake communication" "" { target { *-*-darwin[89]* *-*-darwin10* hppa*-*-hpux* } } 0 } // { dg-prune-output "trying to exec .this-will-not-work." } // { dg-prune-output "unknown Compiled Module Interface" } signature.asc Description: PGP signature
[committed] hppa: Fix gcc.dg/analyzer/fd-4.c on hpux
This fixes gcc.dg/analyzer/fd-4.c on hppa64-hp-hpux11.11. Committed to trunk. Dave --- hppa: Fix gcc.dg/analyzer/fd-4.c on hpux 2023-11-23 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/analyzer/fd-4.c: Define _MODE_T on hpux. diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-4.c b/gcc/testsuite/gcc.dg/analyzer/fd-4.c index 994bad84342..3a961e4f813 100644 --- a/gcc/testsuite/gcc.dg/analyzer/fd-4.c +++ b/gcc/testsuite/gcc.dg/analyzer/fd-4.c @@ -1,4 +1,4 @@ -#ifdef _AIX +#if defined(_AIX) || defined(__hpux) #define _MODE_T #endif #include signature.asc Description: PGP signature
[committed] hppa: Export main in pr104869.C on hpux
This fixes a hpux linker warning about main not being exported. Committed to trunk. Dave --- hppa: Export main in pr104869.C on hpux This is needed to avoid a linker warning. 2023-11-23 John David Anglin gcc/testsuite/ChangeLog: * g++.dg/pr104869.C: Export main on hpux. diff --git a/gcc/testsuite/g++.dg/pr104869.C b/gcc/testsuite/g++.dg/pr104869.C index 9a6ef88adbd..13a39fccdb9 100644 --- a/gcc/testsuite/g++.dg/pr104869.C +++ b/gcc/testsuite/g++.dg/pr104869.C @@ -68,6 +68,9 @@ struct ControlFlow { foo(2); return false; } +#ifdef __hpux__ +extern int main(void); +#endif int main() { ControlFlow cf = { nullptr, ControlFlow::UnwindType::EE }; signature.asc Description: PGP signature
[committed] hppa: xfail scan-assembler-not check in g++.dg/cpp0x/initlist-const1.C
The scan-assembler-not check needs to be xfailed on hppa*-*-hpux*. Dave --- hppa: xfail scan-assembler-not check in g++.dg/cpp0x/initlist-const1.C 2023-11-23 John David Anglin gcc/testsuite/ChangeLog: * g++.dg/cpp0x/initlist-const1.C: xfail scan-assembler-not check on hppa*-*-hpux*. diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-const1.C b/gcc/testsuite/g++.dg/cpp0x/initlist-const1.C index 0da07592f75..260448aa630 100644 --- a/gcc/testsuite/g++.dg/cpp0x/initlist-const1.C +++ b/gcc/testsuite/g++.dg/cpp0x/initlist-const1.C @@ -6,4 +6,4 @@ const auto x = { 1, 2 }; -// { dg-final { scan-assembler-not {\.data} { xfail powerpc-ibm-aix* } } } +// { dg-final { scan-assembler-not {\.data} { xfail hppa*-*-hpux* powerpc-ibm-aix* } } } signature.asc Description: PGP signature
[committed] hppa: Don't skip check for warning at line 411 in Wattributes.c on hppa*64*-*-*
The warning is now properly generated. Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Don't skip check for warning at line 411 in Wattributes.c on hppa*64*-*-* 2023-11-23 John David Anglin gcc/testsuite/ChangeLog: * c-c++-common/Wattributes.c: Don't skip check for warning at line 411 in Wattributes.c on hppa*64*-*-*. diff --git a/gcc/testsuite/c-c++-common/Wattributes.c b/gcc/testsuite/c-c++-common/Wattributes.c index 978f3f938e9..49a085def9e 100644 --- a/gcc/testsuite/c-c++-common/Wattributes.c +++ b/gcc/testsuite/c-c++-common/Wattributes.c @@ -408,7 +408,7 @@ finline_hot_noret_align (int); /* { dg-warning "ignoring attribute .warn_unused /* { dg-note"previous declaration here" "" { target *-*-* } .-1 } */ inline int ATTR ((aligned (4))) - finline_hot_noret_align (int); /* { dg-warning "ignoring attribute .aligned \\(4\\). because it conflicts with attribute .aligned \\(8\\)." "" { target { ! { hppa*64*-*-* } } } } */ + finline_hot_noret_align (int); /* { dg-warning "ignoring attribute .aligned \\(4\\). because it conflicts with attribute .aligned \\(8\\)." "" } */ inline int ATTR ((aligned (8))) finline_hot_noret_align (int); /* { dg-note "previous declaration here" } */ signature.asc Description: PGP signature
[committed] hppa: Define MAX_FIXED_MODE_SIZE
Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. Committed to trunk. Fixes FAIL: c-c++-common/pr111309-1.c ICE. Dave --- hppa: Define MAX_FIXED_MODE_SIZE Replace default define. We support TImode when TARGET_64BIT is true. 2023-11-22 John David Anglin gcc/ChangeLog: PR target/112592 * config/pa/pa.h (MAX_FIXED_MODE_SIZE): Define. diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index aba2cec7357..d73428682e7 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -1310,3 +1310,7 @@ do { \ /* Output default function prologue for hpux. */ #define TARGET_ASM_FUNCTION_PROLOGUE pa_output_function_prologue + +/* An integer expression for the size in bits of the largest integer machine + mode that should actually be used. We allow pairs of registers. */ +#define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (TARGET_64BIT ? TImode : DImode) signature.asc Description: PGP signature
[committed] hppa: Fix integer REG+D address reloads
Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. Fixes testcase in PR. Committed to trunk. Dave --- hppa: Fix integer REG+D address reloads I made a mistake in the previous change to integer_store_memory_operand. There is no support pa_emit_move sequence to handle secondary reloads of integer REG+D instructions. Further, the Q constraint is used for some non-simple instructions (movb and addib). Thus, we need to return true when reload is in progress. 2023-11-22 John David Anglin gcc/ChangeLog: PR target/112617 * config/pa/predicates.md (integer_store_memory_operand): Return true for REG+D addresses when reload_in_progress is true. diff --git a/gcc/config/pa/predicates.md b/gcc/config/pa/predicates.md index 1b50020e1de..4c07c0a3828 100644 --- a/gcc/config/pa/predicates.md +++ b/gcc/config/pa/predicates.md @@ -308,6 +308,13 @@ if (reg_plus_base_memory_operand (op, mode)) { + /* There is no support for handling secondary reloads of integer +REG+D instructions in pa_emit_move_sequence. Further, the Q +constraint is used in more than simple move instructions. So, +we must return true and let reload handle the reload. */ + if (reload_in_progress) + return true; + /* Extract CONST_INT operand. */ if (GET_CODE (op) == SUBREG) op = SUBREG_REG (op); signature.asc Description: PGP signature
Re: [committed] hppa: Revise REG+D address support to allow long displacements before reload
On 2023-11-16 10:00 p.m., Jeff Law wrote: I'm not seeing any obvious problems in the gcc testsuite. It needs testing on packages that do extensive floating point calculations. OK, I'll focus on those. THe more likely scenario is xmpy which is used for integer multiply, but the operands have to be moved into FP registers because the operation happens in the FPU. There are lots of xmpyu instructions in cc1 and cc1plus. For example, 9fee8c: 08 03 02 5c copy r3,ret0 9fee90: 37 9c 00 20 ldo 10(ret0),ret0 9fee94: 27 80 10 17 fldw 0(ret0),fr23 9fee98: 08 03 02 5c copy r3,ret0 9fee9c: 37 9c 00 28 ldo 14(ret0),ret0 9feea0: 27 80 10 16 fldw 0(ret0),fr22 9feea4: 3a f6 47 18 xmpyu fr23,fr22,fr24 9feea8: 2f c1 12 18 fstd fr24,-10(sp) 9feeac: 0f c1 10 9c ldw -10(sp),ret0 9feeb0: 0f c9 10 9d ldw -c(sp),ret1 There are 2169 xmpyu instructions in cc1plus in my current gcc bootstrap on linux. Dave -- John David Anglin dave.ang...@bell.net
Re: [committed] hppa: Revise REG+D address support to allow long displacements before reload
On 2023-11-16 4:52 p.m., Jeff Law wrote: On 11/16/23 10:54, John David Anglin wrote: Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. Committed to trunk. This patch works around problem compiling python3.11 by improving REG+D address handling. The change results in smaller code and reduced register pressure. Dave --- hppa: Revise REG+D address support to allow long displacements before reload In analyzing PR rtl-optimization/112415, I realized that restricting REG+D offsets to 5-bits before reload results in very poor code and complexities in optimizing these instructions after reload. The general problem is long displacements are not allowed for floating point accesses when generating PA 1.1 code. Even with PA 2.0, there is a ELF linker bug that prevents using long displacements for floating point loads and stores. In the past, enabling long displacements before reload caused issues in reload. However, there have been fixes in the handling of reloads for floating-point accesses. This change allows long displacements before reload and corrects a couple of issues in the constraint handling for integer and floating-point accesses. 2023-11-16 John David Anglin gcc/ChangeLog: PR rtl-optimization/112415 * config/pa/pa.cc (pa_legitimate_address_p): Allow 14-bit displacements before reload. Simplify logic flow. Revise comments. * config/pa/pa.h (TARGET_ELF64): New define. (INT14_OK_STRICT): Update define and comment. * config/pa/pa64-linux.h (TARGET_ELF64): Define. * config/pa/predicates.md (base14_operand): Don't check alignment of short displacements. (integer_store_memory_operand): Don't return true when reload_in_progress is true. Remove INT_5_BITS check. (floating_point_store_memory_operand): Don't return true when reload_in_progress is true. Use INT14_OK_STRICT to check whether long displacements are always okay. I strongly suspect this is going to cause problems in the end. I've already done what you're trying to do. It'll likely look fine for an extended period of time, but it will almost certainly break one day. I could happen. If it happens and can't be fixed, it's easy enough to return false in pa_legitimate_address_p before reload. Maybe we could add an optimization option for this. As it stands, the code improvement for python is significant. I don't think f-m-o can fix things after reload. Hopefully, Sam will test the change with various package builds on gentoo. Debian is still on gcc-13. I'm not seeing any obvious problems in the gcc testsuite. It needs testing on packages that do extensive floating point calculations. Dave -- John David Anglin dave.ang...@bell.net
[committed] hppa: Revise REG+D address support to allow long displacements before reload
Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. Committed to trunk. This patch works around problem compiling python3.11 by improving REG+D address handling. The change results in smaller code and reduced register pressure. Dave --- hppa: Revise REG+D address support to allow long displacements before reload In analyzing PR rtl-optimization/112415, I realized that restricting REG+D offsets to 5-bits before reload results in very poor code and complexities in optimizing these instructions after reload. The general problem is long displacements are not allowed for floating point accesses when generating PA 1.1 code. Even with PA 2.0, there is a ELF linker bug that prevents using long displacements for floating point loads and stores. In the past, enabling long displacements before reload caused issues in reload. However, there have been fixes in the handling of reloads for floating-point accesses. This change allows long displacements before reload and corrects a couple of issues in the constraint handling for integer and floating-point accesses. 2023-11-16 John David Anglin gcc/ChangeLog: PR rtl-optimization/112415 * config/pa/pa.cc (pa_legitimate_address_p): Allow 14-bit displacements before reload. Simplify logic flow. Revise comments. * config/pa/pa.h (TARGET_ELF64): New define. (INT14_OK_STRICT): Update define and comment. * config/pa/pa64-linux.h (TARGET_ELF64): Define. * config/pa/predicates.md (base14_operand): Don't check alignment of short displacements. (integer_store_memory_operand): Don't return true when reload_in_progress is true. Remove INT_5_BITS check. (floating_point_store_memory_operand): Don't return true when reload_in_progress is true. Use INT14_OK_STRICT to check whether long displacements are always okay. diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc index 218c48b4ae0..565c948a9e6 100644 --- a/gcc/config/pa/pa.cc +++ b/gcc/config/pa/pa.cc @@ -10819,23 +10819,29 @@ pa_legitimate_address_p (machine_mode mode, rtx x, bool strict, code_helper) if (GET_CODE (index) == CONST_INT) { + /* Short 5-bit displacements always okay. */ if (INT_5_BITS (index)) return true; - /* When INT14_OK_STRICT is false, a secondary reload is needed -to adjust the displacement of SImode and DImode floating point -instructions but this may fail when the register also needs -reloading. So, we return false when STRICT is true. We -also reject long displacements for float mode addresses since -the majority of accesses will use floating point instructions -that don't support 14-bit offsets. */ - if (!INT14_OK_STRICT - && (strict || !(reload_in_progress || reload_completed)) - && mode != QImode - && mode != HImode) + if (!base14_operand (index, mode)) return false; - return base14_operand (index, mode); + /* Long 14-bit displacements always okay for these cases. */ + if (INT14_OK_STRICT + || mode == QImode + || mode == HImode) + return true; + + /* A secondary reload may be needed to adjust the displacement +of floating-point accesses when STRICT is nonzero. */ + if (strict) + return false; + + /* We get significantly better code if we allow long displacements +before reload for all accesses. Instructions must satisfy their +constraints after reload, so we must have an integer access. +Return true for both cases. */ + return true; } if (!TARGET_DISABLE_INDEXING diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index e65af522966..aba2cec7357 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -37,6 +37,11 @@ extern unsigned long total_code_bytes; #define TARGET_ELF32 0 #endif +/* Generate code for ELF64 ABI. */ +#ifndef TARGET_ELF64 +#define TARGET_ELF64 0 +#endif + /* Generate code for SOM 32bit ABI. */ #ifndef TARGET_SOM #define TARGET_SOM 0 @@ -823,12 +828,11 @@ extern int may_call_alloca; /* Nonzero if 14-bit offsets can be used for all loads and stores. This is not possible when generating PA 1.x code as floating point - loads and stores only support 5-bit offsets. Note that we do not - forbid the use of 14-bit offsets for integer modes. Instead, we - use secondary reloads to fix REG+D memory addresses for integer - mode floating-point loads and stores. + accesses only support 5-bit offsets. Note that we do not forbid + the use of 14-bit offsets prior to reload. Instead, we use secondary + reloads to fix REG+D memory addresses for floating-point accesses. - FIXME: the ELF32 linker clobbers the LSB of the FP r
[committed] hppa: Fix typo in PA 2.0 trampoline template
Noticed in glibc testsuite. Committed to active branches. Dave --- hppa: Fix typo in PA 2.0 trampoline template 2023-11-06 John David Anglin * config/pa/pa.cc (pa_asm_trampoline_template): Fix typo. diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc index 2e906cff7ff..218c48b4ae0 100644 --- a/gcc/config/pa/pa.cc +++ b/gcc/config/pa/pa.cc @@ -10401,7 +10401,7 @@ pa_asm_trampoline_template (FILE *f) fputs ("\tldw 0(%r22),%r21\n", f); fputs ("\tldw 4(%r22),%r19\n", f); fputs ("\tbve (%r21)\n", f); - fputs ("\tldw 52(%r1),%r29\n", f); + fputs ("\tldw 52(%r20),%r29\n", f); fputs ("\t.word 0\n", f); fputs ("\t.word 0\n", f); fputs ("\t.word 0\n", f); signature.asc Description: PGP signature
[committed] hppa: Enable generation of GNU stack notes on Linux
I think we have waited long enough for everone to switch to a kernel build with VDSO support. Committed to trunk. Dave --- Enable generation of GNU stack notes on Linux 2023-11-06 John David Anglin * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 1. diff --git a/gcc/config/pa/pa-linux.h b/gcc/config/pa/pa-linux.h index d38f68b1fa5..96c54765ddb 100644 --- a/gcc/config/pa/pa-linux.h +++ b/gcc/config/pa/pa-linux.h @@ -144,8 +144,7 @@ along with GCC; see the file COPYING3. If not see #define HAVE_sync_compare_and_swapsi 1 #define HAVE_sync_compare_and_swapdi 1 -/* It's not possible to enable GNU_stack notes since the kernel needs - an executable stack for signal returns and syscall restarts. */ +/* Enable GNU stack notes. */ #undef NEED_INDICATE_EXEC_STACK -#define NEED_INDICATE_EXEC_STACK 0 +#define NEED_INDICATE_EXEC_STACK 1 signature.asc Description: PGP signature
[committed] hppa: Delete MALLOC_ABI_ALIGNMENT define from pa32-linux.h
In spite of what the comment says, the MALLOC_ALIGNMENT in glibc for 32-bit hppa-linux has always been 8, not 16. There is no reason to increase it as the old linux threads implementation has been removed. So, we can use default in pa.h. Dave --- Delete MALLOC_ABI_ALIGNMENT define from pa32-linux.h 2023-10-05 John David Anglin * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Delete. diff --git a/gcc/config/pa/pa32-linux.h b/gcc/config/pa/pa32-linux.h index bdd13ce492e..f48e45374f4 100644 --- a/gcc/config/pa/pa32-linux.h +++ b/gcc/config/pa/pa32-linux.h @@ -68,11 +68,6 @@ call_ ## FUNC (void) \ #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD -/* POSIX types such as pthread_mutex_t require 16-byte alignment to retain - layout compatibility with the original linux thread implementation. */ -#undef MALLOC_ABI_ALIGNMENT -#define MALLOC_ABI_ALIGNMENT 128 - /* Place jump tables in the text section except when generating non-PIC code. When generating non-PIC code, the relocations needed to load the address of the jump table result in a text label in the final executable signature.asc Description: PGP signature
[committed] Add hppa*-*-* to dg-error targets at line 5 in gfortran.dg/pr95690.f90
Committed to trunk. Dave --- Add hppa*-*-* to dg-error targets at line 5 2023-10-02 John David Anglin gcc/testsuite/ChangeLog: * gfortran.dg/pr95690.f90: Add hppa*-*-* to dg-error targets at line 5. diff --git a/gcc/testsuite/gfortran.dg/pr95690.f90 b/gcc/testsuite/gfortran.dg/pr95690.f90 index 47a5df9e894..1432937438a 100644 --- a/gcc/testsuite/gfortran.dg/pr95690.f90 +++ b/gcc/testsuite/gfortran.dg/pr95690.f90 @@ -2,8 +2,8 @@ module m contains subroutine s - print *, (erfc) ! { dg-error "not a floating constant" "" { target i?86-*-* x86_64-*-* sparc*-*-* cris-*-* } } - end ! { dg-error "not a floating constant" "" { target { ! "i?86-*-* x86_64-*-* sparc*-*-* cris-*-*" } } } + print *, (erfc) ! { dg-error "not a floating constant" "" { target i?86-*-* x86_64-*-* sparc*-*-* cris-*-* hppa*-*-* } } + end ! { dg-error "not a floating constant" "" { target { ! "i?86-*-* x86_64-*-* sparc*-*-* cris-*-* hppa*-*-*" } } } function erfc() end end signature.asc Description: PGP signature
[committed] Require target lra in gcc.dg/pr108095.c
Committed to trunk. Dave --- Require target lra in gcc.dg/pr108095.c 2023-10-02 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/pr108095.c: Require target lra. diff --git a/gcc/testsuite/gcc.dg/pr108095.c b/gcc/testsuite/gcc.dg/pr108095.c index fb76caae72e..0a487cf614a 100644 --- a/gcc/testsuite/gcc.dg/pr108095.c +++ b/gcc/testsuite/gcc.dg/pr108095.c @@ -1,5 +1,5 @@ /* PR tree-optimization/108095 */ -/* { dg-do compile } */ +/* { dg-do compile { target lra } } */ /* { dg-options "-Os -g" } */ int v; signature.asc Description: PGP signature
[committed] Increase timeout factor for hppa*-*-* in gcc.dg/long_branch.c
Committed to trunk. Dave --- Increase timeout factor for hppa*-*-* in gcc.dg/long_branch.c 2023-10-02 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/long_branch.c: Increase timeout factor for hppa*-*-*. diff --git a/gcc/testsuite/gcc.dg/long_branch.c b/gcc/testsuite/gcc.dg/long_branch.c index c1ac24f5116..ba80ab3d15b 100644 --- a/gcc/testsuite/gcc.dg/long_branch.c +++ b/gcc/testsuite/gcc.dg/long_branch.c @@ -1,7 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -fno-reorder-blocks" } */ /* { dg-skip-if "limited code space" { pdp11-*-* } } */ -/* { dg-timeout-factor 2.0 { target hppa*-*-* } } */ +/* { dg-timeout-factor 4.0 { target hppa*-*-* } } */ void abort (); signature.asc Description: PGP signature
[committed] hppa: Fix memory barrier patterns for pre PA8800 processors
Since 2005, it was assumed in the Linux kernel that all PA 2.0 processors supported the ldcw cacheable hint and that natural alignment could be used for ldcw,co. However, I recently fired up an old A500 machine with PA8600 processors and found that 16-byte alignment was needed for ldcw,co on it. As far as I can tell, only PA8800 and PA8900 processors support the cacheable hint. This change revises the memory barrier patterns. We alway use ldcw,co when comp[iling for PA 2.0 but we disable the -mcoherent-ldcw option by default. As a result, the 16-byte aligned patterns are now the default. This is safer but slightly less efficient. Dave --- Fix memory barrier patterns for pre PA8800 processors 2023-09-29 John David Anglin * config/pa/pa.md (memory_barrier): Revise comment. (memory_barrier_64, memory_barrier_32): Use ldcw,co on PA 2.0. * config/pa/pa.opt (coherent-ldcw): Change default to disabled. diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index f603591447d..4f85991e6bd 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -10739,10 +10739,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)" ;; generating PA 1.x code even though all PA 1.x systems are strongly ordered. ;; When barriers are needed, we use a strongly ordered ldcw instruction as -;; the barrier. Most PA 2.0 targets are cache coherent. In that case, we -;; can use the coherent cache control hint and avoid aligning the ldcw -;; address. In spite of its description, it is not clear that the sync -;; instruction works as a barrier. +;; the barrier. All PA 2.0 targets accept the "co" cache control hint but +;; only PA8800 and PA8900 processors implement the cacheable hint. In +;; that case, we can avoid aligning the ldcw address. In spite of its +;; description, it is not clear that the sync instruction works as a barrier. (define_expand "memory_barrier" [(parallel @@ -10772,7 +10772,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)" (unspec:BLK [(match_dup 0)] UNSPEC_MEMORY_BARRIER)) (clobber (match_operand 1 "pmode_register_operand" "=&r"))] "TARGET_64BIT" - "ldo 15(%%sp),%1\n\tdepd %%r0,63,3,%1\n\tldcw 0(%1),%1" + "ldo 15(%%sp),%1\n\tdepd %%r0,63,3,%1\n\tldcw,co 0(%1),%1" [(set_attr "type" "binary") (set_attr "length" "12")]) @@ -10781,6 +10781,6 @@ add,l %2,%3,%3\;bv,n %%r0(%3)" (unspec:BLK [(match_dup 0)] UNSPEC_MEMORY_BARRIER)) (clobber (match_operand 1 "pmode_register_operand" "=&r"))] "" - "ldo 15(%%sp),%1\n\t{dep|depw} %%r0,31,3,%1\n\tldcw 0(%1),%1" + "ldo 15(%%sp),%1\n\t{dep|depw} %%r0,31,3,%1\n\t{ldcw|ldcw,co} 0(%1),%1" [(set_attr "type" "binary") (set_attr "length" "12")]) diff --git a/gcc/config/pa/pa.opt b/gcc/config/pa/pa.opt index dd358f2f26a..573edcea338 100644 --- a/gcc/config/pa/pa.opt +++ b/gcc/config/pa/pa.opt @@ -50,7 +50,7 @@ Target Mask(CALLER_COPIES) Caller copies function arguments passed by hidden reference. mcoherent-ldcw -Target Var(TARGET_COHERENT_LDCW) Init(1) +Target Var(TARGET_COHERENT_LDCW) Init(0) Use ldcw/ldcd coherent cache-control hint. mdisable-fpregs signature.asc Description: PGP signature
[committed] hppa: Update baseline symbols for hppa-linux
Committed to trunk. Dave --- Update baseline symbols for hppa-linux. 2023-09-25 John David Anglin libstdc++-v3/ChangeLog: * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update. diff --git a/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt b/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt index ff40f201eb8..b41e57125ef 100644 --- a/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt +++ b/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt @@ -983,8 +983,18 @@ FUNC:_ZNKSt11__timepunctIwE9_M_monthsEPPKw FUNC:_ZNKSt11__timepunctIwE9_M_monthsEPPKw@@GLIBCXX_3.4 FUNC:_ZNKSt11logic_error4whatEv FUNC:_ZNKSt11logic_error4whatEv@@GLIBCXX_3.4 +FUNC:_ZNKSt12__basic_fileIcE13native_handleEv +FUNC:_ZNKSt12__basic_fileIcE13native_handleEv@@GLIBCXX_3.4.32 FUNC:_ZNKSt12__basic_fileIcE7is_openEv FUNC:_ZNKSt12__basic_fileIcE7is_openEv@@GLIBCXX_3.4 +FUNC:_ZNKSt12__shared_ptrINSt10filesystem28recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE2EEcvbEv +FUNC:_ZNKSt12__shared_ptrINSt10filesystem28recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE2EEcvbEv@@GLIBCXX_3.4.31 +FUNC:_ZNKSt12__shared_ptrINSt10filesystem4_DirELN9__gnu_cxx12_Lock_policyE2EEcvbEv +FUNC:_ZNKSt12__shared_ptrINSt10filesystem4_DirELN9__gnu_cxx12_Lock_policyE2EEcvbEv@@GLIBCXX_3.4.31 +FUNC:_ZNKSt12__shared_ptrINSt10filesystem7__cxx1128recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE2EEcvbEv +FUNC:_ZNKSt12__shared_ptrINSt10filesystem7__cxx1128recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE2EEcvbEv@@GLIBCXX_3.4.31 +FUNC:_ZNKSt12__shared_ptrINSt10filesystem7__cxx114_DirELN9__gnu_cxx12_Lock_policyE2EEcvbEv +FUNC:_ZNKSt12__shared_ptrINSt10filesystem7__cxx114_DirELN9__gnu_cxx12_Lock_policyE2EEcvbEv@@GLIBCXX_3.4.31 FUNC:_ZNKSt12bad_weak_ptr4whatEv FUNC:_ZNKSt12bad_weak_ptr4whatEv@@GLIBCXX_3.4.15 FUNC:_ZNKSt12future_error4whatEv @@ -1313,6 +1323,20 @@ FUNC:_ZNKSt5ctypeIwE9do_narrowEPKwS2_cPc FUNC:_ZNKSt5ctypeIwE9do_narrowEPKwS2_cPc@@GLIBCXX_3.4 FUNC:_ZNKSt5ctypeIwE9do_narrowEwc FUNC:_ZNKSt5ctypeIwE9do_narrowEwc@@GLIBCXX_3.4 +FUNC:_ZNKSt6chrono4tzdb11locate_zoneESt17basic_string_viewIcSt11char_traitsIcEE +FUNC:_ZNKSt6chrono4tzdb11locate_zoneESt17basic_string_viewIcSt11char_traitsIcEE@@GLIBCXX_3.4.31 +FUNC:_ZNKSt6chrono4tzdb12current_zoneEv +FUNC:_ZNKSt6chrono4tzdb12current_zoneEv@@GLIBCXX_3.4.31 +FUNC:_ZNKSt6chrono9time_zone15_M_get_sys_infoENS_10time_pointINS_3_V212system_clockENS_8durationIxSt5ratioILx1ELx1EE +FUNC:_ZNKSt6chrono9time_zone15_M_get_sys_infoENS_10time_pointINS_3_V212system_clockENS_8durationIxSt5ratioILx1ELx1EE@@GLIBCXX_3.4.31 +FUNC:_ZNKSt6chrono9time_zone17_M_get_local_infoENS_10time_pointINS_7local_tENS_8durationIxSt5ratioILx1ELx1EE +FUNC:_ZNKSt6chrono9time_zone17_M_get_local_infoENS_10time_pointINS_7local_tENS_8durationIxSt5ratioILx1ELx1EE@@GLIBCXX_3.4.31 +FUNC:_ZNKSt6chrono9tzdb_list14const_iteratordeEv +FUNC:_ZNKSt6chrono9tzdb_list14const_iteratordeEv@@GLIBCXX_3.4.31 +FUNC:_ZNKSt6chrono9tzdb_list5beginEv +FUNC:_ZNKSt6chrono9tzdb_list5beginEv@@GLIBCXX_3.4.31 +FUNC:_ZNKSt6chrono9tzdb_list5frontEv +FUNC:_ZNKSt6chrono9tzdb_list5frontEv@@GLIBCXX_3.4.31 FUNC:_ZNKSt6locale2id5_M_idEv FUNC:_ZNKSt6locale2id5_M_idEv@@GLIBCXX_3.4 FUNC:_ZNKSt6locale4nameB5cxx11Ev @@ -6134,12 +6158,30 @@ FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_ FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 +FUNC:_ZNSt6chrono11locate_zoneESt17basic_string_viewIcSt11char_traitsIcEE +FUNC:_ZNSt6chrono11locate_zoneESt17basic_string_viewIcSt11char_traitsIcEE@@GLIBCXX_3.4.31 +FUNC:_ZNSt6chrono11reload_tzdbEv +FUNC:_ZNSt6chrono11reload_tzdbEv@@GLIBCXX_3.4.31 +FUNC:_ZNSt6chrono12current_zoneEv +FUNC:_ZNSt6chrono12current_zoneEv@@GLIBCXX_3.4.31 FUNC:_ZNSt6chrono12system_clock3nowEv FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 +FUNC:_ZNSt6chrono13get_tzdb_listEv +FUNC:_ZNSt6chrono13get_tzdb_listEv@@GLIBCXX_3.4.31 +FUNC:_ZNSt6chrono14remote_versionB5cxx11Ev +FUNC:_ZNSt6chrono14remote_versionB5cxx11Ev@@GLIBCXX_3.4.31 FUNC:_ZNSt6chrono3_V212steady_clock3nowEv FUNC:_ZNSt6chrono3_V212steady_clock3nowEv@@GLIBCXX_3.4.19 FUNC:_ZNSt6chrono3_V212system_clock3nowEv FUNC:_ZNSt6chrono3_V212system_clock3nowEv@@GLIBCXX_3.4.19 +FUNC:_ZNSt6chrono8get_tzdbEv +FUNC:_ZNSt6chrono8get_tzdbEv@@GLIBCXX_3.4.31 +FUNC:_ZNSt6chrono9tzdb_list11erase_afterENS0_14const_iteratorE +FUNC:_ZNSt6chrono9tzdb_list11erase_afterENS0_14const_iteratorE@@GLIBCXX_3.4.31 +FUNC:_ZNSt6chrono9tzdb_list14const_iteratorppEi +FUNC:_ZNSt6chrono9tzdb_list14const_iteratorppEi@@GLIBCXX_3.4.31 +FUNC:_ZNSt6chrono9tzdb_list14const_iteratorppEv +FUNC:_ZNSt6chrono9tzdb_list14const_iteratorppEv@@GLIBCXX_3.4.31 FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_ FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_
Re: [PATCH] Use strtol instead of std::stoi in gensupport.cc
Ping. On 2023-07-19 2:59 p.m., John David Anglin wrote: Tested on trunk with hppa64-hp-hpux11.11. Okay? Dave --- Use strtol instead of std::stoi [PR110646] Implementation of std::stoi was overlooked on hppa-hpux, so use strtol instead. 2023-07-19 John David Anglin gcc/ChangeLog: PR bootstrap/110646 * gensupport.cc(class conlist): Use strtol instead of std::stoi. diff --git a/gcc/gensupport.cc b/gcc/gensupport.cc index 959d1d9c83c..87bcf5ee441 100644 --- a/gcc/gensupport.cc +++ b/gcc/gensupport.cc @@ -640,7 +640,7 @@ public: name.assign (ns, len); if (numeric) - idx = std::stoi (name); + idx = strtol (name.c_str (), (char **)NULL, 10); } /* Adds a character to the end of the string. */ -- John David Anglin dave.ang...@bell.net
[committed] Require target lra in gcc.c-torture/compile/asmgoto-6.c
The asmgoto feature requires LRA support. Committed to trunk. Tested on hppa64-hp-hpux11.11. Dave --- Require target lra in gcc.c-torture/compile/asmgoto-6.c 2023-07-21 John David Anglin gcc/testsuite/ChangeLog: * gcc.c-torture/compile/asmgoto-6.c: Require target lra. diff --git a/gcc/testsuite/gcc.c-torture/compile/asmgoto-6.c b/gcc/testsuite/gcc.c-torture/compile/asmgoto-6.c index 0652bd4e4e1..6799b83c20a 100644 --- a/gcc/testsuite/gcc.c-torture/compile/asmgoto-6.c +++ b/gcc/testsuite/gcc.c-torture/compile/asmgoto-6.c @@ -1,5 +1,5 @@ -/* { dg-do compile } */ +/* { dg-do compile { target lra } } */ /* PR middle-end/110420 */ /* PR middle-end/103979 */ /* PR middle-end/98619 */ signature.asc Description: PGP signature
[PATCH] Use strtol instead of std::stoi in gensupport.cc
Tested on trunk with hppa64-hp-hpux11.11. Okay? Dave --- Use strtol instead of std::stoi [PR110646] Implementation of std::stoi was overlooked on hppa-hpux, so use strtol instead. 2023-07-19 John David Anglin gcc/ChangeLog: PR bootstrap/110646 * gensupport.cc(class conlist): Use strtol instead of std::stoi. diff --git a/gcc/gensupport.cc b/gcc/gensupport.cc index 959d1d9c83c..87bcf5ee441 100644 --- a/gcc/gensupport.cc +++ b/gcc/gensupport.cc @@ -640,7 +640,7 @@ public: name.assign (ns, len); if (numeric) - idx = std::stoi (name); + idx = strtol (name.c_str (), (char **)NULL, 10); } /* Adds a character to the end of the string. */ signature.asc Description: PGP signature
[committed] hppa: Modify TLS patterns to provide both 32 and 64-bit support
Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. Committed to trunk. Dave --- hppa: Modify TLS patterns to provide both 32 and 64-bit support. 2023-07-15 John David Anglin gcc/ChangeLog: * config/pa/pa.md: Define constants R1_REGNUM, R19_REGNUM and R27_REGNUM. (tgd_load): Restrict to !TARGET_64BIT. Use register constants. (tld_load): Likewise. (tgd_load_pic): Change to expander. (tld_load_pic, tld_offset_load, tp_load): Likewise. (tie_load_pic, tle_load): Likewise. (tgd_load_picsi, tgd_load_picdi): New. (tld_load_picsi, tld_load_picdi): New. (tld_offset_load): New. (tp_load): New. (tie_load_picsi, tie_load_picdi): New. (tle_load): New. diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 726e12768f8..f603591447d 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -108,6 +108,14 @@ (MAX_17BIT_OFFSET 262100) ; 17-bit branch ]) +;; Register numbers + +(define_constants + [(R1_REGNUM 1) + (R19_REGNUM 19) + (R27_REGNUM 27) + ]) + ;; Mode and code iterators ;; This mode iterator allows :P to be used for patterns that operate on @@ -10262,9 +10270,9 @@ add,l %2,%3,%3\;bv,n %%r0(%3)" (define_insn "tgd_load" [(set (match_operand:SI 0 "register_operand" "=r") (unspec:SI [(match_operand 1 "tgd_symbolic_operand" "")] UNSPEC_TLSGD)) - (clobber (reg:SI 1)) - (use (reg:SI 27))] - "" + (clobber (reg:SI R1_REGNUM)) + (use (reg:SI R27_REGNUM))] + "!TARGET_64BIT" "* { return \"addil LR'%1-$tls_gdidx$,%%r27\;ldo RR'%1-$tls_gdidx$(%%r1),%0\"; @@ -10272,12 +10280,25 @@ add,l %2,%3,%3\;bv,n %%r0(%3)" [(set_attr "type" "multi") (set_attr "length" "8")]) -(define_insn "tgd_load_pic" +(define_expand "tgd_load_pic" + [(set (match_operand 0 "register_operand") + (unspec [(match_operand 1 "tgd_symbolic_operand")] UNSPEC_TLSGD_PIC)) + (clobber (reg R1_REGNUM))] + "" +{ + if (TARGET_64BIT) +emit_insn (gen_tgd_load_picdi (operands[0], operands[1])); + else +emit_insn (gen_tgd_load_picsi (operands[0], operands[1])); + DONE; +}) + +(define_insn "tgd_load_picsi" [(set (match_operand:SI 0 "register_operand" "=r") (unspec:SI [(match_operand 1 "tgd_symbolic_operand" "")] UNSPEC_TLSGD_PIC)) - (clobber (reg:SI 1)) - (use (reg:SI 19))] - "" + (clobber (reg:SI R1_REGNUM)) + (use (reg:SI R19_REGNUM))] + "!TARGET_64BIT" "* { return \"addil LT'%1-$tls_gdidx$,%%r19\;ldo RT'%1-$tls_gdidx$(%%r1),%0\"; @@ -10285,12 +10306,25 @@ add,l %2,%3,%3\;bv,n %%r0(%3)" [(set_attr "type" "multi") (set_attr "length" "8")]) +(define_insn "tgd_load_picdi" + [(set (match_operand:DI 0 "register_operand" "=r") + (unspec:DI [(match_operand 1 "tgd_symbolic_operand" "")] UNSPEC_TLSGD_PIC)) + (clobber (reg:DI R1_REGNUM)) + (use (reg:DI R27_REGNUM))] + "TARGET_64BIT" + "* +{ + return \"addil LT'%1-$tls_gdidx$,%%r27\;ldo RT'%1-$tls_gdidx$(%%r1),%0\"; +}" + [(set_attr "type" "multi") + (set_attr "length" "8")]) + (define_insn "tld_load" [(set (match_operand:SI 0 "register_operand" "=r") (unspec:SI [(match_operand 1 "tld_symbolic_operand" "")] UNSPEC_TLSLDM)) - (clobber (reg:SI 1)) - (use (reg:SI 27))] - "" + (clobber (reg:SI R1_REGNUM)) + (use (reg:SI R27_REGNUM))] + "!TARGET_64BIT" "* { return \"addil LR'%1-$tls_ldidx$,%%r27\;ldo RR'%1-$tls_ldidx$(%%r1),%0\"; @@ -10298,12 +10332,25 @@ add,l %2,%3,%3\;bv,n %%r0(%3)" [(set_attr "type" "multi") (set_attr "length" "8")]) -(define_insn "tld_load_pic" +(define_expand "tld_load_pic" + [(set (match_operand 0 "register_operand") + (unspec [(match_operand 1 "tld_symbolic_operand")] UNSPEC_TLSLDM_PIC)) + (clobber (reg R1_REGNUM))] + "" +{ + if (TARGET_64BIT) +emit_insn (gen_tld_load_picdi (operands[0], operands[1])); + else +emit_insn (gen_tld_load_picsi (operands[0], operands[1])); + DONE; +}) + +(define_insn "tld_load_picsi" [(set (match_operand:SI 0 "register_operand" "=r") (unspec:SI [(match_operand 1 "tld_symbolic_operand" "")] UNSPEC_TLSLDM_PIC)) - (clobber (reg:SI 1)) - (use (reg:SI 19))] - "" + (clobber (reg:SI R1_REGNUM)) + (use (reg:SI R19_REGNUM))] + "!TARGET_64BIT&q
[committed] hppa: Add clear_cache expander
Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. Committed to trunk. Dave --- Add clear_cache expander. 2023-05-17 John David Anglin gcc/ChangeLog: * config/pa/pa.md (clear_cache): New. diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 7b7d7f776c7..726e12768f8 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -9940,6 +9940,23 @@ add,l %2,%3,%3\;bv,n %%r0(%3)" [(set_attr "type" "multi") (set_attr "length" "52")]) +(define_expand "clear_cache" + [(match_operand 0 "pmode_register_operand") + (match_operand 1 "pmode_register_operand")] + "" +{ + rtx line_length = gen_reg_rtx (Pmode); + + emit_move_insn (line_length, GEN_INT (MIN_CACHELINE_SIZE)); + if (TARGET_64BIT) +emit_insn (gen_icacheflushdi (operands[0], operands[1], line_length, + gen_reg_rtx (Pmode), gen_reg_rtx (Pmode))); + else +emit_insn (gen_icacheflushsi (operands[0], operands[1], line_length, + gen_reg_rtx (Pmode), gen_reg_rtx (Pmode))); + DONE; +}) + ;; An out-of-line prologue. (define_insn "outline_prologue_call" [(unspec_volatile [(const_int 0)] UNSPECV_OPC) signature.asc Description: PGP signature
[committed] hppa: Fix handling of large arguments passed by value
This change revises pa_function_arg_size to return values that fit in an int. For a number of reasons, updating pa_function_arg, pa_arg_partial_bytes, etc, to handle handle HOST_WIDE_INT values didn't seem useful. Currently, gcc limits the size of arguments passed by value to 1 GB. The PA prologue/epilogue code only handles 32-bit frame offsets and 1 GB is the maximum frame size that can be recorded in the HPUX unwind descriptor. Thus, limiting argument sizes to 1 GB is enough. Tested on hppa64-hp-hpux11.11 and hppa-unknown-linux-gnu. Committed to trunk. Dave --- Fix handling of large arguments passed by value. 2023-04-15 John David Anglin gcc/ChangeLog: PR target/109478 * config/pa/pa-protos.h (pa_function_arg_size): Update prototype. * config/pa/pa.cc (pa_function_arg): Return NULL_RTX if argument size is zero. (pa_arg_partial_bytes): Don't call pa_function_arg_size twice. (pa_function_arg_size): Change return type to int. Return zero for arguments larger than 1 GB. Update comments. diff --git a/gcc/config/pa/pa-protos.h b/gcc/config/pa/pa-protos.h index c0a61ea89c3..b4b1310a52d 100644 --- a/gcc/config/pa/pa-protos.h +++ b/gcc/config/pa/pa-protos.h @@ -106,7 +106,7 @@ extern void pa_asm_output_aligned_local (FILE *, const char *, unsigned int); extern void pa_hpux_asm_output_external (FILE *, tree, const char *); extern HOST_WIDE_INT pa_initial_elimination_offset (int, int); -extern HOST_WIDE_INT pa_function_arg_size (machine_mode, const_tree); +extern int pa_function_arg_size (machine_mode, const_tree); extern void pa_output_function_label (FILE *); extern void hppa_profile_hook (int); diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc index 3f91ebce603..db633b275e5 100644 --- a/gcc/config/pa/pa.cc +++ b/gcc/config/pa/pa.cc @@ -9784,6 +9784,8 @@ pa_function_arg (cumulative_args_t cum_v, const function_arg_info &arg) return NULL_RTX; arg_size = pa_function_arg_size (mode, type); + if (!arg_size) +return NULL_RTX; /* If this arg would be passed partially or totally on the stack, then this routine should return zero. pa_arg_partial_bytes will @@ -9985,15 +9987,16 @@ pa_arg_partial_bytes (cumulative_args_t cum_v, const function_arg_info &arg) CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v); unsigned int max_arg_words = 8; unsigned int offset = 0; + int arg_size; if (!TARGET_64BIT) return 0; - if (pa_function_arg_size (arg.mode, arg.type) > 1 && (cum->words & 1)) + arg_size = pa_function_arg_size (arg.mode, arg.type); + if (arg_size > 1 && (cum->words & 1)) offset = 1; - if (cum->words + offset + pa_function_arg_size (arg.mode, arg.type) - <= max_arg_words) + if (cum->words + offset + arg_size <= max_arg_words) /* Arg fits fully into registers. */ return 0; else if (cum->words + offset >= max_arg_words) @@ -11067,17 +11070,25 @@ pa_starting_frame_offset (void) return 8; } -/* Figure out the size in words of the function argument. The size - returned by this function should always be greater than zero because - we pass variable and zero sized objects by reference. */ +/* Figure out the size in words of the function argument. */ -HOST_WIDE_INT +int pa_function_arg_size (machine_mode mode, const_tree type) { HOST_WIDE_INT size; size = mode != BLKmode ? GET_MODE_SIZE (mode) : int_size_in_bytes (type); - return CEIL (size, UNITS_PER_WORD); + + /* The 64-bit runtime does not restrict the size of stack frames, + but the gcc calling conventions limit argument sizes to 1G. Our + prologue/epilogue code limits frame sizes to just under 32 bits. + 1G is also the maximum frame size that can be handled by the HPUX + unwind descriptor. Since very large TYPE_SIZE_UNIT values can + occur for (parallel:BLK []), we need to ignore large arguments + passed by value. */ + if (size >= (1 << (HOST_BITS_PER_INT - 2))) +size = 0; + return (int) CEIL (size, UNITS_PER_WORD); } #include "gt-pa.h" signature.asc Description: PGP signature
[committed] hppa: Fix gcc.dg/long_branch.c on hppa
Committed to trunk. Dave --- Fix gcc.dg/long_branch.c on hppa. 2023-04-08 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/long_branch.c: Use timeout factor 2.0 on hppa*-*-*. diff --git a/gcc/testsuite/gcc.dg/long_branch.c b/gcc/testsuite/gcc.dg/long_branch.c index 97fb169b043..c1ac24f5116 100644 --- a/gcc/testsuite/gcc.dg/long_branch.c +++ b/gcc/testsuite/gcc.dg/long_branch.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -fno-reorder-blocks" } */ /* { dg-skip-if "limited code space" { pdp11-*-* } } */ +/* { dg-timeout-factor 2.0 { target hppa*-*-* } } */ void abort (); signature.asc Description: PGP signature
[committed] hppa: Fix 22_locale/locale/cons/12658_thread-2.cc on hppa
Committed to trunk. Dave --- Fix 22_locale/locale/cons/12658_thread-2.cc on hppa. 2023-04-05 John David Anglin libstdc++-v3/ChangeLog: * testsuite/22_locale/locale/cons/12658_thread-2.cc: Double timeout factor on hppa*-*-*. diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc index 1ce85b7475d..d198a0ac304 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc @@ -3,6 +3,7 @@ // { dg-require-effective-target pthread } // { dg-require-namedlocale "en_US.ISO8859-1" } // { dg-require-namedlocale "fr_FR.ISO8859-15" } +// { dg-timeout-factor 2.0 { target hppa*-*-* } } // Copyright (C) 2004-2023 Free Software Foundation, Inc. // signature.asc Description: PGP signature
[committed] hppa: Add assember CFI directives to millicode division and remainder routines
Committed to trunk after testing on hppa-unknown-linux-gnu. Dave --- Add assember CFI directives to millicode division and remainder routines. The millicode division and remainder routines trap division by zero. The unwinder needs these directives to unwind divide by zero traps. 2023-04-05 John David Anglin libgcc/ChangeLog: PR target/109374 * config/pa/milli64.S (RETURN_COLUMN): Define. ($$divI): Add CFI directives. ($$divU): Likewise. ($$remI): Likewise. ($$remU): Likewise. diff --git a/libgcc/config/pa/milli64.S b/libgcc/config/pa/milli64.S index 2316f797354..e1c84f48d25 100644 --- a/libgcc/config/pa/milli64.S +++ b/libgcc/config/pa/milli64.S @@ -105,8 +105,10 @@ sar: .reg%cr11 /* Shift Amount Register */ rp:.regr2 /* return pointer */ #ifdef pa64 mrp: .regr2 /* millicode return pointer */ +#define RETURN_COLUMN 2 #else mrp: .regr31 /* millicode return pointer */ +#define RETURN_COLUMN 31 #endif ret0: .regr28 /* return value */ ret1: .regr29 /* return value (high part of double) */ @@ -313,6 +315,8 @@ RDEFINE(temp1,arg0) .import $$divI_15,millicode .export $$divI,millicode .export $$divoI,millicode + .cfi_startproc + .cfi_return_column RETURN_COLUMN .proc .callinfo millicode .entry @@ -484,6 +488,7 @@ LSYM(negative1) addoarg0,arg1,r0/* trap iff dividend==0x8000 && divisor==-1 */ .exit .procend + .cfi_endproc .end #endif @@ -543,6 +548,8 @@ RDEFINE(temp1,arg0) .import $$divU_12,millicode .import $$divU_14,millicode .import $$divU_15,millicode + .cfi_startproc + .cfi_return_column RETURN_COLUMN .proc .callinfo millicode .entry @@ -706,6 +713,7 @@ LSYM(big_divisor) addcr0,r0,retreg .exit .procend + .cfi_endproc .end #endif @@ -750,6 +758,8 @@ RDEFINE(retreg,ret1) SUBSPA_MILLI ATTR_MILLI + .cfi_startproc + .cfi_return_column RETURN_COLUMN .proc .callinfo millicode .entry @@ -875,6 +885,7 @@ LSYM(finish) nop .exit .procend + .cfi_endproc #ifdef milliext .origin 0x0200 #endif @@ -922,6 +933,8 @@ RDEFINE(rmndr,ret1) /* r29 */ SUBSPA_MILLI ATTR_MILLI .export $$remU,millicode + .cfi_startproc + .cfi_return_column RETURN_COLUMN .proc .callinfo millicode .entry @@ -1013,6 +1026,7 @@ LSYM(special_case) nop .exit .procend + .cfi_endproc .end #endif signature.asc Description: PGP signature
[committed] hppa: Fix support for atomic loads and stores on hppa
The following change fixes a number of problems with atomic loads and stores on hppa. Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. The TARGET_SOFT_FLOAT case is not tested. It's possible we need additional atomic load support for this case but I think that's unnecessary since hppa requires strict alignment. We could use an array of locks in sync-libfuncs.c to improve performance but I kept things simple for now. Committed to trunk. Dave --- Fix support for atomic loads and stores on hppa. This change updates the atomic libcall support to fix the following issues: 1) A internal compiler error with -fno-sync-libcalls. 2) When sync libcalls are disabled, we don't generate libcalls for libatomic. 3) There is no sync libcall support for targets other than linux. As a result, non-atomic stores are silently emitted for types smaller or equal to the word size. There are now a few atomic libcalls in the libgcc code, so we need sync support on all targets. 2023-01-13 John David Anglin gcc/ChangeLog: * config/pa/pa-linux.h (TARGET_SYNC_LIBCALL): Delete define. * config/pa/pa.cc (pa_init_libfuncs): Use MAX_SYNC_LIBFUNC_SIZE define. * config/pa/pa.h (TARGET_SYNC_LIBCALLS): Use flag_sync_libcalls. (MAX_SYNC_LIBFUNC_SIZE): Define. (TARGET_CPU_CPP_BUILTINS): Define __SOFTFP__ when soft float is enabled. * config/pa/pa.md (atomic_storeqi): Emit __atomic_exchange_1 libcall when sync libcalls are disabled. (atomic_storehi, atomic_storesi, atomic_storedi): Likewise. (atomic_loaddi): Emit __atomic_load_8 libcall when sync libcalls are disabled on 32-bit target. * config/pa/pa.opt (matomic-libcalls): New option. * doc/invoke.texi (HPPA Options): Update. libgcc/ChangeLog: * config.host (hppa*64*-*-linux*): Adjust tmake_file to use pa/t-pa64-linux. (hppa*64*-*-hpux11*): Adjust tmake_file to use pa/t-pa64-hpux instead of pa/t-hpux and pa/t-pa64. * config/pa/linux-atomic.c: Define u32 type. (ATOMIC_LOAD): Define new macro to implement atomic_load_1, atomic_load_2, atomic_load_4 and atomic_load_8. Update sync defines to use atomic_load calls for type. (SYNC_LOCK_LOAD_2): New macro to implement __sync_lock_load_8. * config/pa/sync-libfuncs.c: New file. * config/pa/t-netbsd (LIB2ADD_ST): Define. * config/pa/t-openbsd (LIB2ADD_ST): Define. * config/pa/t-pa64-hpux: New file. * config/pa/t-pa64-linux: New file. diff --git a/gcc/config/pa/pa-linux.h b/gcc/config/pa/pa-linux.h index 5af11a1df80..1073f42bd6b 100644 --- a/gcc/config/pa/pa-linux.h +++ b/gcc/config/pa/pa-linux.h @@ -133,9 +133,6 @@ along with GCC; see the file COPYING3. If not see #undef TARGET_GAS #define TARGET_GAS 1 -#undef TARGET_SYNC_LIBCALL -#define TARGET_SYNC_LIBCALL 1 - /* The SYNC operations are implemented as library functions, not INSN patterns. As a result, the HAVE defines for the patterns are not defined. We need to define them to generate the corresponding diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc index 9f43802075f..b43a91f2edb 100644 --- a/gcc/config/pa/pa.cc +++ b/gcc/config/pa/pa.cc @@ -5940,8 +5940,8 @@ pa_init_libfuncs (void) "_U_Qfcnvxf_udbl_to_quad"); } - if (TARGET_SYNC_LIBCALL) -init_sync_libfuncs (8); + if (TARGET_SYNC_LIBCALLS) +init_sync_libfuncs (MAX_SYNC_LIBFUNC_SIZE); } /* HP's millicode routines mean something special to the assembler. diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index bafdf602138..93d6f53f97f 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -72,10 +72,12 @@ extern unsigned long total_code_bytes; #define HPUX_LONG_DOUBLE_LIBRARY 0 #endif -/* Linux kernel atomic operation support. */ -#ifndef TARGET_SYNC_LIBCALL -#define TARGET_SYNC_LIBCALL 0 -#endif +/* Sync libcall support. */ +#define TARGET_SYNC_LIBCALLS (flag_sync_libcalls) + +/* The maximum size of the sync library functions supported. DImode + is supported on 32-bit targets using floating point loads and stores. */ +#define MAX_SYNC_LIBFUNC_SIZE 8 /* The following three defines are potential target switches. The current defines are optimal given the current capabilities of GAS and GNU ld. */ @@ -173,6 +175,8 @@ do { \ builtin_define("_PA_RISC1_0"); \ if (HPUX_LONG_DOUBLE_LIBRARY) \ builtin_define("__SIZEOF_FLOAT128__=16"); \ + if (TARGET_SOFT_FLOAT)\ + builtin_define("__SOFTFP__"); \ } while (0) /* An old set of OS defines for various BSD-like systems. */ diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.
[PATCH] c++tools: Fix compilation of server.cc on hpux
Tested on trunk and gcc-12 with hppa64-hp-hpux11.11. Okay? Dave --- Fix compilation of server.cc on hpux. Select and FD_ISSET are declared in sys/time.h on most versions of hpux. As a result, HAVE_PSELECT and HAVE_SELECT can be 0. 2023-01-07 John David Anglin c++tools/ChangeLog: PR c++tools/107616 * server.cc (server): Don't call FD_ISSET when HAVE_PSELECT and HAVE_SELECT are zero. diff --git a/c++tools/server.cc b/c++tools/server.cc index 00154a05925..693aec6820a 100644 --- a/c++tools/server.cc +++ b/c++tools/server.cc @@ -753,8 +753,10 @@ server (bool ipv6, int sock_fd, module_resolver *resolver) } } +#if defined (HAVE_PSELECT) || defined (HAVE_SELECT) if (active < 0 && sock_fd >= 0 && FD_ISSET (sock_fd, &readers)) active = -1; +#endif } if (active >= 0) signature.asc Description: PGP signature
[committed] Fix compilation of gcc.dg/atomic/c11-atomic-exec-[45].c on hpux
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Fix compilation of gcc.dg/atomic/c11-atomic-exec-[45].c on hpux. _HPUX_SOURCE needs to be defined to provide various types needed for pthreads. 2023-01-07 John David Anglin gcc/testsuite/ChangeLog: * gcc.dg/atomic/c11-atomic-exec-4.c: Add "-D_HPUX_SOURCE" option on *-*-hpux*. * gcc.dg/atomic/c11-atomic-exec-5.c: Likewise. diff --git a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-4.c b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-4.c index 669e7c058c3..a7e158f14e8 100644 --- a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-4.c +++ b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-4.c @@ -4,6 +4,7 @@ /* { dg-do run } */ /* { dg-options "-std=c11 -pedantic-errors -pthread -U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=200809L" } */ /* { dg-additional-options "-D_XOPEN_SOURCE=600" { target *-*-solaris2* } } */ +/* { dg-additional-options "-D_HPUX_SOURCE" { target *-*-hpux* } } */ /* { dg-require-effective-target pthread } */ #include diff --git a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c index f8bfa63b4cc..299d6ab904b 100644 --- a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c +++ b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c @@ -7,6 +7,7 @@ /* { dg-add-options ieee } */ /* { dg-additional-options "-mfp-trap-mode=sui" { target alpha*-*-* } } */ /* { dg-additional-options "-D_XOPEN_SOURCE=600" { target *-*-solaris2* } } */ +/* { dg-additional-options "-D_HPUX_SOURCE" { target *-*-hpux* } } */ /* { dg-require-effective-target fenv_exceptions } */ /* { dg-require-effective-target pthread } */ /* { dg-timeout-factor 2 } */ signature.asc Description: PGP signature
[committed] hppa: Fix atomic operations on PA-RISC 2.0 processors
This changes fixes the atomic operations defined for hppa processors in libstdc++-v3. It appears they were originally written with only PA 1.x processors in mind. Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- Fix atomic operations on PA-RISC 2.0 processors. PA-RISC 2.0 supports out-of-order execution for loads and stores. Thus, we need to synchonize memory accesses. This change revises the lock releases in __exchange_and_add and __atomic_add to use an ordered store with release semantics. We also use an ordered load in the inner spin loop. We use the "ldcw,co" instruction instead of "ldcw" when compiled for PA 2.0. Most PA 2.0 processors are coherent and can execute the ldcw instruction in cache for improved performance. Finally, the inner spin loop is revised to immediately branch to the ldcw instruction when it detects the lock is free. 2023-01-05 John David Anglin libstdc++-v3/ChangeLog: * config/cpu/hppa/atomicity.h (_PA_LDCW_INSN): Define. (__exchange_and_add): Use _PA_LDCW_INSN. Use ordered store for lock release. Revise loop. (__atomic_add): Likewise. diff --git a/libstdc++-v3/config/cpu/hppa/atomicity.h b/libstdc++-v3/config/cpu/hppa/atomicity.h index bb997e70c1d..658073537a4 100644 --- a/libstdc++-v3/config/cpu/hppa/atomicity.h +++ b/libstdc++-v3/config/cpu/hppa/atomicity.h @@ -25,6 +25,15 @@ #include #include +/* Perform ldcw operation in cache when possible. */ +#ifndef _PA_LDCW_INSN +# ifdef _PA_RISC2_0 +# define _PA_LDCW_INSN "ldcw,co" +# else +# define _PA_LDCW_INSN "ldcw" +# endif +#endif + namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION @@ -51,19 +60,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION int tmp; volatile int& lock = _Atomicity_lock<0>::_S_atomicity_lock; -__asm__ __volatile__ ("ldcw 0(%1),%0\n\t" +__asm__ __volatile__ (_PA_LDCW_INSN " 0(%1),%0\n\t" "cmpib,<>,n 0,%0,.+20\n\t" - "ldw 0(%1),%0\n\t" - "cmpib,= 0,%0,.-4\n\t" + "ldw,ma 0(%1),%0\n\t" + "cmpib,<> 0,%0,.-12\n\t" "nop\n\t" - "b,n .-20" + "b,n .-12" : "=&r" (tmp) : "r" (&lock) : "memory"); result = *__mem; *__mem = result + __val; -__asm__ __volatile__ ("stw %1,0(%0)" +__asm__ __volatile__ ("stw,ma %1,0(%0)" : : "r" (&lock), "r" (tmp) : "memory"); return result; } @@ -75,18 +84,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION int tmp; volatile int& lock = _Atomicity_lock<0>::_S_atomicity_lock; -__asm__ __volatile__ ("ldcw 0(%1),%0\n\t" +__asm__ __volatile__ (_PA_LDCW_INSN " 0(%1),%0\n\t" "cmpib,<>,n 0,%0,.+20\n\t" - "ldw 0(%1),%0\n\t" - "cmpib,= 0,%0,.-4\n\t" + "ldw,ma 0(%1),%0\n\t" + "cmpib,<> 0,%0,.-12\n\t" "nop\n\t" - "b,n .-20" + "b,n .-12" : "=&r" (tmp) : "r" (&lock) : "memory"); *__mem += __val; -__asm__ __volatile__ ("stw %1,0(%0)" +__asm__ __volatile__ ("stw,ma %1,0(%0)" : : "r" (&lock), "r" (tmp) : "memory"); } signature.asc Description: PGP signature
[committed] Suppress warning from -fstack-protector on hppa
Committed to trunk. Dave --- Suppress -fstack-protector warning on hppa. Some package builds enable -fstack-protector and -Werror. Since -fstack-protector is not supported on hppa because the stack grows up, these packages must check for the warning generated by -fstack-protector and suppress it on hppa. This is problematic since hppa is the only significant architecture where the stack grows up. 2022-12-16 John David Anglin gcc/ChangeLog: * config/pa/pa.cc (pa_option_override): Disable -fstack-protector. gcc/testsuite/ChangeLog: * lib/target-supports.exp (check_effective_target_static): Return 0 on hppa*-*-*. diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc index 54ab486a02d..9f43802075f 100644 --- a/gcc/config/pa/pa.cc +++ b/gcc/config/pa/pa.cc @@ -567,6 +567,9 @@ pa_option_override (void) flag_reorder_blocks = 1; } + /* Disable -fstack-protector to suppress warning. */ + flag_stack_protect = 0; + /* We can't guarantee that .dword is available for 32-bit targets. */ if (UNITS_PER_WORD == 4) targetm.asm_out.aligned_op.di = NULL; diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 2a058c67c53..0ed20bf9e45 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -1214,6 +1214,9 @@ proc check_effective_target_static {} { # Return 1 if the target supports -fstack-protector proc check_effective_target_fstack_protector {} { +if { [istarget hppa*-*-*] } { + return 0; +} return [check_runtime fstack_protector { #include int main (int argc, char *argv[]) { signature.asc Description: PGP signature
[committed] hppa: Fix addvdi3 and subvdi3 patterns
This was found building 64-bit openssh package. Committed to active branches. Dave --- Fix addvdi3 and subvdi3 patterns While most PA 2.0 instructions support both 32 and 64-bit traps and conditions, the addi and subi instructions only support 32-bit traps and conditions. Thus, we need to force immediate operands to register operands on the 64-bit target and use the add/sub instructions which can trap on 64-bit signed overflow. 2022-11-30 John David Anglin gcc/ChangeLog: * config/pa/pa.md (addvdi3): Force operand 2 to a register. Remove "addi,tsv,*" instruction from unamed pattern. (subvdi3): Force operand 1 to a register. Remove "subi,tsv" instruction from from unamed pattern. diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 76ae35d4cfa..41382271e54 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -5071,23 +5071,25 @@ (match_dup 2 (const_int 0))])] "" - "") + " +{ + if (TARGET_64BIT) +operands[2] = force_reg (DImode, operands[2]); +}") (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (plus:DI (match_operand:DI 1 "reg_or_0_operand" "%rM,rM") -(match_operand:DI 2 "arith11_operand" "r,I"))) + [(set (match_operand:DI 0 "register_operand" "=r") + (plus:DI (match_operand:DI 1 "reg_or_0_operand" "%rM") +(match_operand:DI 2 "register_operand" "r"))) (trap_if (ne (plus:TI (sign_extend:TI (match_dup 1)) (sign_extend:TI (match_dup 2))) (sign_extend:TI (plus:DI (match_dup 1) (match_dup 2 (const_int 0))] "TARGET_64BIT" - "@ - add,tsv,* %2,%1,%0 - addi,tsv,* %2,%1,%0" - [(set_attr "type" "binary,binary") - (set_attr "length" "4,4")]) + "add,tsv,* %2,%1,%0" + [(set_attr "type" "binary") + (set_attr "length" "4")]) (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") @@ -5262,23 +5264,25 @@ (match_dup 2 (const_int 0))])] "" - "") + " +{ + if (TARGET_64BIT) +operands[1] = force_reg (DImode, operands[1]); +}") (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (minus:DI (match_operand:DI 1 "arith11_operand" "r,I") - (match_operand:DI 2 "reg_or_0_operand" "rM,rM"))) + [(set (match_operand:DI 0 "register_operand" "=r") + (minus:DI (match_operand:DI 1 "register_operand" "r") + (match_operand:DI 2 "reg_or_0_operand" "rM"))) (trap_if (ne (minus:TI (sign_extend:TI (match_dup 1)) (sign_extend:TI (match_dup 2))) (sign_extend:TI (minus:DI (match_dup 1) (match_dup 2 (const_int 0))] "TARGET_64BIT" - "@ - {subo|sub,tsv} %1,%2,%0 - {subio|subi,tsv} %1,%2,%0" - [(set_attr "type" "binary,binary") - (set_attr "length" "4,4")]) + "sub,tsv,* %1,%2,%0" + [(set_attr "type" "binary") + (set_attr "length" "4")]) (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r,&r") signature.asc Description: PGP signature
[committed] hppa: Skip guality tests on hppa*-*-hpux*
Committed to trunk. Dave --- Skip guality tests on hppa-hpux. The guality check command hangs. This causes TCL errors in other tests and slows testsuite execution. 2022-11-13 John David Anglin gcc/testsuite/ChangeLog: * g++.dg/guality/guality.exp: Skip on hppa*-*-hpux*. * gcc.dg/guality/guality.exp: Likewise. * gfortran.dg/guality/guality.exp: Likewise. diff --git a/gcc/testsuite/g++.dg/guality/guality.exp b/gcc/testsuite/g++.dg/guality/guality.exp index 1d5b65fef57..2d736d292e9 100644 --- a/gcc/testsuite/g++.dg/guality/guality.exp +++ b/gcc/testsuite/g++.dg/guality/guality.exp @@ -8,6 +8,10 @@ if { [istarget *-*-darwin*] } { return } +if { [istarget hppa*-*-hpux*] } { +return +} + if { [istarget "powerpc-ibm-aix*"] } { set torture_execute_xfail "powerpc-ibm-aix*" return diff --git a/gcc/testsuite/gcc.dg/guality/guality.exp b/gcc/testsuite/gcc.dg/guality/guality.exp index ba87132aef2..075bebe34e8 100644 --- a/gcc/testsuite/gcc.dg/guality/guality.exp +++ b/gcc/testsuite/gcc.dg/guality/guality.exp @@ -8,6 +8,10 @@ if { [istarget *-*-darwin*] } { return } +if { [istarget hppa*-*-hpux*] } { +return +} + if { [istarget "powerpc-ibm-aix*"] } { set torture_execute_xfail "powerpc-ibm-aix*" return diff --git a/gcc/testsuite/gfortran.dg/guality/guality.exp b/gcc/testsuite/gfortran.dg/guality/guality.exp index 0375edfffe4..86a966a9133 100644 --- a/gcc/testsuite/gfortran.dg/guality/guality.exp +++ b/gcc/testsuite/gfortran.dg/guality/guality.exp @@ -8,6 +8,10 @@ if { [istarget *-*-darwin*] } { return } +if { [istarget hppa*-*-hpux*] } { +return +} + if { [istarget "powerpc-ibm-aix*"] } { set torture_execute_xfail "powerpc-ibm-aix*" return signature.asc Description: PGP signature
Re: [PATCH][V3] 32-bit PA-RISC with HP-UX: remove deprecated ports
On 2022-08-31 3:21 a.m., Martin Liška wrote: Sending v3 of the patch that includes John's comments. Ready to be installed? Okay. Dave -- John David Anglin dave.ang...@bell.net
Re: [PATCH][V3] 32-bit PA-RISC with HP-UX: remove deprecated ports
On 2022-08-31 11:35 a.m., Jeff Law wrote: It looks like you removed the pa-bsd and pa-osf targets too. Those were so niche that I doubt anyone else would notice. That should be okay. I have never heard of anyone building these. There is no config for these in config.gcc. hppa*-*-openbsd* and hppa*-*-netbsd* are still somewhat used. Dave -- John David Anglin dave.ang...@bell.net
Re: [PATCH] 32-bit PA-RISC with HP-UX: remove deprecated ports
On 2022-08-30 8:13 p.m., Jeff Law wrote: On 8/28/2022 10:34 AM, John David Anglin wrote: On 2022-08-26 3:15 a.m., Martin Liška wrote: Removes the deprecated ports. If I'm correct all hpux9,hpux10 should be removed as they only provide 32-bit targets. On the contrary, hpux11 supports hppa64 that we still do support. It is my understanding that the 32-bit hppa hpux targets were deprecated because they don't support ELF and the DWARF debug format (.stabs is to be removed). Some of the changes to libtool.m4 affect the 32-bit ia64 hpux target. As far as I know, it supports ELF and the DWARF debug format. If someone really cared, they could support dwarf on the 32bit PA SOM targets -- but I'm not going to lose any sleep over 32bit PA SOM:-) Yes. I thought about working on it. However, although 32bit hppa-hpux lives on in qemu, my main focus is linux. I also had to shutdown my dedicated hpux machine. Dave -- John David Anglin dave.ang...@bell.net
Re: [PATCH] 32-bit PA-RISC with HP-UX: remove deprecated ports
On 2022-08-29 10:06 a.m., Martin Liška wrote: Thanks for the feedback, can you please check the updated version of the patch? @@ -353,9 +347,6 @@ proc check_weak_available { } { # return 1 if weak undefined symbols are supported. proc check_effective_target_weak_undefined { } { - if { [istarget hppa*-*-hpux*] } { - return 0 - } This code needs to be retained for hppa64. @@ -562,7 +553,6 @@ proc check_effective_target_trampolines { } { if { [istarget avr-*-*] || [istarget msp430-*-*] || [istarget nvptx-*-*] - || [istarget hppa2.0w-hp-hpux11.23] || [istarget hppa64-hp-hpux11.23] || [istarget pru-*-*] || [istarget bpf-*-*] } { The above looks odd. As far as I know, support for trampolines doesn't depend in any way on hpux11.23. I suspect the hppa64 line can be removed as well. @@ -1,4 +0,0 @@ -# The ada virtual array implementation requires that indexing be disabled on -# hosts such as hpux that use a segmented memory architecture. Both the c -# and ada files need to be compiled with this option for correct operation. -ADA_CFLAGS = -mdisable-indexing -D_X_HPUX10 diff --git a/config/mmap.m4 b/config/mmap.m4 index fba0d9d3657..53e5215d833 100644 --- a/config/mmap.m4 +++ b/config/mmap.m4 @@ -42,7 +42,7 @@ else # Systems known to be in this category are Windows (all variants), # VMS, and Darwin. case "$host_os" in - *vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) + *vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux11.00) gcc_cv_func_mmap_dev_zero=no ;; *) gcc_cv_func_mmap_dev_zero=yes;; Strictly, all hpux versions up to and including hpux11.00 don't have /dev/zero. Dave -- John David Anglin dave.ang...@bell.net
Re: [PATCH] 32-bit PA-RISC with HP-UX: remove deprecated ports
On 2022-08-29 10:06 a.m., Martin Liška wrote: Thanks for the feedback, can you please check the updated version of the patch? The changes to the libffi directory are not necessary and incorrect. libffi is a separate project. Dave -- John David Anglin dave.ang...@bell.net
Re: [PATCH] 32-bit PA-RISC with HP-UX: remove deprecated ports
On 2022-08-29 10:06 a.m., Martin Liška wrote: Thanks for the feedback, can you please check the updated version of the patch? hppa64-hp-hpux11.11 built successfully with the updated patch: https://gcc.gnu.org/pipermail/gcc-testresults/2022-August/767508.html Dave -- John David Anglin dave.ang...@bell.net
Re: [PATCH] 32-bit PA-RISC with HP-UX: remove deprecated ports
On 2022-08-26 3:15 a.m., Martin Liška wrote: Removes the deprecated ports. If I'm correct all hpux9,hpux10 should be removed as they only provide 32-bit targets. On the contrary, hpux11 supports hppa64 that we still do support. It is my understanding that the 32-bit hppa hpux targets were deprecated because they don't support ELF and the DWARF debug format (.stabs is to be removed). Some of the changes to libtool.m4 affect the 32-bit ia64 hpux target. As far as I know, it supports ELF and the DWARF debug format. Possibly, the removal of ia64-hpux should be considered but I think it's a separate issue. Ready to be installed? Thanks, Martin ChangeLog: * config.rpath: Delete hpux9 and hpux10. * configure: Regenerate. * configure.ac: Delete hpux9 and hpux10. * libgo/config/libtool.m4: Ignore 32-bit hpux targets. * libgo/configure: Regenerate. * libtool.m4: Delete hpux9 and hpux10. The libtool.m4 files are from GNU libtool. I don't think these files should be changed. Dave -- John David Anglin dave.ang...@bell.net