parent
193a11660b
commit
36ee8b08f7
@ -1,8 +1,8 @@
|
||||
7f4348418dc3efefd357b32a2b5c8010211ab284 SOURCES/doxygen-1.8.0.src.tar.gz
|
||||
b745356ea1afec83ef254a5b1ce8bdf9e4eb69c8 SOURCES/gcc-12.1.1-20220628.tar.xz
|
||||
ecaedb16188931aa35d627f2edb28dbab5f8f3c1 SOURCES/gcc-12.2.1-20221121.tar.xz
|
||||
db38c7b67f8eea9f2e5b8a48d219165b2fdab11f SOURCES/gmp-6.1.0.tar.bz2
|
||||
bbffc5a2b05e4f0c97e882f96c448504491dc4ed SOURCES/isl-0.18.tar.bz2
|
||||
ae5fbb33bcb442121fbbf482a93f6b3c84d489ee SOURCES/isl-0.24.tar.bz2
|
||||
b8be66396c726fdc36ebb0f692ed8a8cca3bcc66 SOURCES/mpc-1.0.3.tar.gz
|
||||
e3b0af77f18505184410d621fe0aae179e229dba SOURCES/mpfr-3.1.4.tar.bz2
|
||||
6ec33952e824e837fef0e829c93d39d6a507082f SOURCES/newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz
|
||||
0e0c6f8d68ab0878f02287ac082c1077c831cd81 SOURCES/nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz
|
||||
1923f9401ce16ce5b818c104e3b09b0bdbb15606 SOURCES/newlib-cygwin-a8526cb52bedabd4d6ba4b227a5185627f871aa1.tar.xz
|
||||
ea865cf7e6834b88a8f8aee22b7a7065813ccc99 SOURCES/nvptx-tools-472b6e78b3ba918d727698f79911360b7c808247.tar.xz
|
||||
|
@ -1,8 +1,8 @@
|
||||
SOURCES/doxygen-1.8.0.src.tar.gz
|
||||
SOURCES/gcc-12.1.1-20220628.tar.xz
|
||||
SOURCES/gcc-12.2.1-20221121.tar.xz
|
||||
SOURCES/gmp-6.1.0.tar.bz2
|
||||
SOURCES/isl-0.18.tar.bz2
|
||||
SOURCES/isl-0.24.tar.bz2
|
||||
SOURCES/mpc-1.0.3.tar.gz
|
||||
SOURCES/mpfr-3.1.4.tar.bz2
|
||||
SOURCES/newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz
|
||||
SOURCES/nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz
|
||||
SOURCES/newlib-cygwin-a8526cb52bedabd4d6ba4b227a5185627f871aa1.tar.xz
|
||||
SOURCES/nvptx-tools-472b6e78b3ba918d727698f79911360b7c808247.tar.xz
|
||||
|
@ -0,0 +1,29 @@
|
||||
commit 8ac76d504ee1216ebffab08463a544d691d85112
|
||||
Author: Hongyu Wang <hongyu.wang@intel.com>
|
||||
Date: Tue Dec 6 09:53:35 2022 +0800
|
||||
|
||||
i386: Avoid fma_chain for -march=alderlake and sapphirerapids.
|
||||
|
||||
For Alderlake there is similar issue like PR81616, enable
|
||||
avoid_fma256_chain will also benefit on Intel latest platforms
|
||||
Alderlake and Sapphire Rapids.
|
||||
|
||||
gcc/ChangeLog:
|
||||
|
||||
* config/i386/x86-tune.def (X86_TUNE_AVOID_256FMA_CHAINS): Add
|
||||
m_SAPPHIRERAPIDS, m_ALDERLAKE.
|
||||
|
||||
diff --git a/gcc/config/i386/x86-tune.def b/gcc/config/i386/x86-tune.def
|
||||
index d983e2f6213..1e1b206a71c 100644
|
||||
--- a/gcc/config/i386/x86-tune.def
|
||||
+++ b/gcc/config/i386/x86-tune.def
|
||||
@@ -485,7 +485,8 @@ DEF_TUNE (X86_TUNE_AVOID_128FMA_CHAINS, "avoid_fma_chains", m_ZNVER)
|
||||
|
||||
/* X86_TUNE_AVOID_256FMA_CHAINS: Avoid creating loops with tight 256bit or
|
||||
smaller FMA chain. */
|
||||
-DEF_TUNE (X86_TUNE_AVOID_256FMA_CHAINS, "avoid_fma256_chains", m_ZNVER2 | m_ZNVER3)
|
||||
+DEF_TUNE (X86_TUNE_AVOID_256FMA_CHAINS, "avoid_fma256_chains", m_ZNVER2 | m_ZNVER3
|
||||
+ | m_ALDERLAKE | m_SAPPHIRERAPIDS)
|
||||
|
||||
/* X86_TUNE_V2DF_REDUCTION_PREFER_PHADDPD: Prefer haddpd
|
||||
for v2df vector reduction. */
|
@ -1,78 +0,0 @@
|
||||
commit d644dfe36d9733c767af62d37250253ced6efd8c
|
||||
Author: Cui,Lili <lili.cui@intel.com>
|
||||
Date: Mon Nov 7 11:25:41 2022 +0800
|
||||
|
||||
Remove AVX512_VP2INTERSECT from PTA_SAPPHIRERAPIDS
|
||||
|
||||
gcc/ChangeLog:
|
||||
|
||||
* config/i386/driver-i386.cc (host_detect_local_cpu):
|
||||
Move sapphirerapids out of AVX512_VP2INTERSECT.
|
||||
* config/i386/i386.h: Remove AVX512_VP2INTERSECT from PTA_SAPPHIRERAPIDS
|
||||
* doc/invoke.texi: Remove AVX512_VP2INTERSECT from SAPPHIRERAPIDS
|
||||
|
||||
(cherry picked from commit d644dfe36d9733c767af62d37250253ced6efd8c)
|
||||
|
||||
diff --git a/gcc/config/i386/driver-i386.cc b/gcc/config/i386/driver-i386.cc
|
||||
index 9e0ae0b2baa..fcf23fd921d 100644
|
||||
--- a/gcc/config/i386/driver-i386.cc
|
||||
+++ b/gcc/config/i386/driver-i386.cc
|
||||
@@ -574,15 +574,12 @@ const char *host_detect_local_cpu (int argc, const char **argv)
|
||||
/* This is unknown family 0x6 CPU. */
|
||||
if (has_feature (FEATURE_AVX))
|
||||
{
|
||||
+ /* Assume Tiger Lake */
|
||||
if (has_feature (FEATURE_AVX512VP2INTERSECT))
|
||||
- {
|
||||
- if (has_feature (FEATURE_TSXLDTRK))
|
||||
- /* Assume Sapphire Rapids. */
|
||||
- cpu = "sapphirerapids";
|
||||
- else
|
||||
- /* Assume Tiger Lake */
|
||||
- cpu = "tigerlake";
|
||||
- }
|
||||
+ cpu = "tigerlake";
|
||||
+ /* Assume Sapphire Rapids. */
|
||||
+ else if (has_feature (FEATURE_TSXLDTRK))
|
||||
+ cpu = "sapphirerapids";
|
||||
/* Assume Cooper Lake */
|
||||
else if (has_feature (FEATURE_AVX512BF16))
|
||||
cpu = "cooperlake";
|
||||
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
|
||||
index 363082ba47b..a61c32b8957 100644
|
||||
--- a/gcc/config/i386/i386.h
|
||||
+++ b/gcc/config/i386/i386.h
|
||||
@@ -2328,10 +2328,9 @@ constexpr wide_int_bitmask PTA_ICELAKE_SERVER = PTA_ICELAKE_CLIENT
|
||||
constexpr wide_int_bitmask PTA_TIGERLAKE = PTA_ICELAKE_CLIENT | PTA_MOVDIRI
|
||||
| PTA_MOVDIR64B | PTA_CLWB | PTA_AVX512VP2INTERSECT | PTA_KL | PTA_WIDEKL;
|
||||
constexpr wide_int_bitmask PTA_SAPPHIRERAPIDS = PTA_ICELAKE_SERVER | PTA_MOVDIRI
|
||||
- | PTA_MOVDIR64B | PTA_AVX512VP2INTERSECT | PTA_ENQCMD | PTA_CLDEMOTE
|
||||
- | PTA_PTWRITE | PTA_WAITPKG | PTA_SERIALIZE | PTA_TSXLDTRK | PTA_AMX_TILE
|
||||
- | PTA_AMX_INT8 | PTA_AMX_BF16 | PTA_UINTR | PTA_AVXVNNI | PTA_AVX512FP16
|
||||
- | PTA_AVX512BF16;
|
||||
+ | PTA_MOVDIR64B | PTA_ENQCMD | PTA_CLDEMOTE | PTA_PTWRITE | PTA_WAITPKG
|
||||
+ | PTA_SERIALIZE | PTA_TSXLDTRK | PTA_AMX_TILE | PTA_AMX_INT8 | PTA_AMX_BF16
|
||||
+ | PTA_UINTR | PTA_AVXVNNI | PTA_AVX512FP16 | PTA_AVX512BF16;
|
||||
constexpr wide_int_bitmask PTA_KNL = PTA_BROADWELL | PTA_AVX512PF
|
||||
| PTA_AVX512ER | PTA_AVX512F | PTA_AVX512CD | PTA_PREFETCHWT1;
|
||||
constexpr wide_int_bitmask PTA_BONNELL = PTA_CORE2 | PTA_MOVBE;
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index 3749e06f13e..cee057a70bf 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -31541,11 +31541,11 @@ Intel sapphirerapids CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, SSE3,
|
||||
SSSE3, SSE4.1, SSE4.2, POPCNT, CX16, SAHF, FXSR, AVX, XSAVE, PCLMUL, FSGSBASE,
|
||||
RDRND, F16C, AVX2, BMI, BMI2, LZCNT, FMA, MOVBE, HLE, RDSEED, ADCX, PREFETCHW,
|
||||
AES, CLFLUSHOPT, XSAVEC, XSAVES, SGX, AVX512F, AVX512VL, AVX512BW, AVX512DQ,
|
||||
-AVX512CD, PKU, AVX512VBMI, AVX512IFMA, SHA, AVX512VNNI, GFNI, VAES, AVX512VBMI2
|
||||
+AVX512CD, PKU, AVX512VBMI, AVX512IFMA, SHA, AVX512VNNI, GFNI, VAES, AVX512VBMI2,
|
||||
VPCLMULQDQ, AVX512BITALG, RDPID, AVX512VPOPCNTDQ, PCONFIG, WBNOINVD, CLWB,
|
||||
-MOVDIRI, MOVDIR64B, AVX512VP2INTERSECT, ENQCMD, CLDEMOTE, PTWRITE, WAITPKG,
|
||||
-SERIALIZE, TSXLDTRK, UINTR, AMX-BF16, AMX-TILE, AMX-INT8, AVX-VNNI, AVX512FP16
|
||||
-and AVX512BF16 instruction set support.
|
||||
+MOVDIRI, MOVDIR64B, ENQCMD, CLDEMOTE, PTWRITE, WAITPKG, SERIALIZE, TSXLDTRK,
|
||||
+UINTR, AMX-BF16, AMX-TILE, AMX-INT8, AVX-VNNI, AVX512FP16 and AVX512BF16
|
||||
+instruction set support.
|
||||
|
||||
@item alderlake
|
||||
Intel Alderlake CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, SSE3, SSSE3,
|
@ -1,17 +0,0 @@
|
||||
commit r12-8527-g7811663964aa7e31c3939b859bbfa2e16919639f
|
||||
Author: Martin Liska <mliska@suse.cz>
|
||||
Date: Wed Jun 29 15:28:07 2022 +0200
|
||||
|
||||
libsanitizer: cherry-pick 791e0d1bc85d
|
||||
|
||||
791e0d1bc85d: [compiler-rt] Add NO_EXEC_STACK_DIRECTIVE on s390x
|
||||
(cherry picked from commit aa87b7541b4c11f59c521154513f844ea6b5c977)
|
||||
|
||||
--- libsanitizer/tsan/tsan_rtl_s390x.S
|
||||
+++ libsanitizer/tsan/tsan_rtl_s390x.S
|
||||
@@ -45,3 +45,5 @@ intercept setjmp, _ZN14__interception11real_setjmpE
|
||||
intercept _setjmp, _ZN14__interception12real__setjmpE
|
||||
intercept sigsetjmp, _ZN14__interception14real_sigsetjmpE
|
||||
intercept __sigsetjmp, _ZN14__interception16real___sigsetjmpE
|
||||
+
|
||||
+NO_EXEC_STACK_DIRECTIVE
|
@ -1,28 +0,0 @@
|
||||
2022-05-11 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR bootstrap/105551
|
||||
* opts.cc (finish_options): Also disable var-tracking if
|
||||
!DWARF2_DEBUGGING_INFO.
|
||||
|
||||
--- gcc/opts.cc
|
||||
+++ gcc/opts.cc
|
||||
@@ -1334,11 +1334,15 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
|
||||
|| opts->x_flag_selective_scheduling2));
|
||||
|
||||
/* We know which debug output will be used so we can set flag_var_tracking
|
||||
- and flag_var_tracking_uninit if the user has not specified them. Note
|
||||
- we have not yet initialized debug_hooks so we might uselessly run
|
||||
- var-tracking on targets without var_location debug hook support. */
|
||||
+ and flag_var_tracking_uninit if the user has not specified them. */
|
||||
if (opts->x_debug_info_level < DINFO_LEVEL_NORMAL
|
||||
- || !dwarf_debuginfo_p (opts))
|
||||
+ || !dwarf_debuginfo_p (opts)
|
||||
+ /* We have not yet initialized debug hooks so match that to check
|
||||
+ whether we're only doing DWARF2_LINENO_DEBUGGING_INFO. */
|
||||
+#ifndef DWARF2_DEBUGGING_INFO
|
||||
+ || true
|
||||
+#endif
|
||||
+ )
|
||||
{
|
||||
if ((opts_set->x_flag_var_tracking && opts->x_flag_var_tracking == 1)
|
||||
|| (opts_set->x_flag_var_tracking_uninit
|
@ -1,89 +0,0 @@
|
||||
commit 6c175b3d170de2bb02b7bd45b3348eec05d28451
|
||||
Author: Roger Sayle <roger@nextmovesoftware.com>
|
||||
Date: Mon Jul 4 13:58:37 2022 +0100
|
||||
|
||||
PR target/105991: Recognize PLUS and XOR forms of rldimi in rs6000.md.
|
||||
|
||||
This patch addresses PR target/105991 where a change to prefer representing
|
||||
shifts and adds at the tree-level as multiplications, causes problems for
|
||||
the rldimi patterns in the powerpc backend. The issue is that rs6000.md
|
||||
models this pattern using IOR, and some variants that have the equivalent
|
||||
PLUS or XOR in the RTL fail to match some *rotl<mode>4_insert patterns.
|
||||
This is fixed in this patch by adding a define_insn_and_split to locally
|
||||
canonicalize the PLUS and XOR forms to the backend's preferred IOR form.
|
||||
|
||||
Backported from master.
|
||||
|
||||
2022-07-04 Roger Sayle <roger@nextmovesoftware.com>
|
||||
Marek Polacek <polacek@redhat.com>
|
||||
Segher Boessenkool <segher@kernel.crashing.org>
|
||||
Kewen Lin <linkw@linux.ibm.com>
|
||||
|
||||
gcc/ChangeLog
|
||||
PR target/105991
|
||||
* config/rs6000/rs6000.md (rotl<mode>3_insert_3): Check that
|
||||
exact_log2 doesn't return -1 (or zero).
|
||||
(plus_xor): New code iterator.
|
||||
(*rotl<mode>3_insert_3_<code>): New define_insn_and_split.
|
||||
|
||||
gcc/testsuite/ChangeLog
|
||||
PR target/105991
|
||||
* gcc.target/powerpc/pr105991.c: New test case.
|
||||
|
||||
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
|
||||
index 64049a6e521..6082ded8c31 100644
|
||||
--- a/gcc/config/rs6000/rs6000.md
|
||||
+++ b/gcc/config/rs6000/rs6000.md
|
||||
@@ -4178,7 +4178,8 @@ (define_insn "rotl<mode>3_insert_3"
|
||||
(match_operand:GPR 4 "const_int_operand" "n"))
|
||||
(ashift:GPR (match_operand:GPR 1 "gpc_reg_operand" "r")
|
||||
(match_operand:SI 2 "const_int_operand" "n"))))]
|
||||
- "INTVAL (operands[2]) == exact_log2 (UINTVAL (operands[4]) + 1)"
|
||||
+ "INTVAL (operands[2]) > 0
|
||||
+ && INTVAL (operands[2]) == exact_log2 (UINTVAL (operands[4]) + 1)"
|
||||
{
|
||||
if (<MODE>mode == SImode)
|
||||
return "rlwimi %0,%1,%h2,0,31-%h2";
|
||||
@@ -4187,6 +4188,24 @@ (define_insn "rotl<mode>3_insert_3"
|
||||
}
|
||||
[(set_attr "type" "insert")])
|
||||
|
||||
+; Canonicalize the PLUS and XOR forms to IOR for rotl<mode>3_insert_3
|
||||
+(define_code_iterator plus_xor [plus xor])
|
||||
+
|
||||
+(define_insn_and_split "*rotl<mode>3_insert_3_<code>"
|
||||
+ [(set (match_operand:GPR 0 "gpc_reg_operand" "=r")
|
||||
+ (plus_xor:GPR
|
||||
+ (and:GPR (match_operand:GPR 3 "gpc_reg_operand" "0")
|
||||
+ (match_operand:GPR 4 "const_int_operand" "n"))
|
||||
+ (ashift:GPR (match_operand:GPR 1 "gpc_reg_operand" "r")
|
||||
+ (match_operand:SI 2 "const_int_operand" "n"))))]
|
||||
+ "INTVAL (operands[2]) > 0
|
||||
+ && INTVAL (operands[2]) == exact_log2 (UINTVAL (operands[4]) + 1)"
|
||||
+ "#"
|
||||
+ "&& 1"
|
||||
+ [(set (match_dup 0)
|
||||
+ (ior:GPR (and:GPR (match_dup 3) (match_dup 4))
|
||||
+ (ashift:GPR (match_dup 1) (match_dup 2))))])
|
||||
+
|
||||
(define_code_iterator plus_ior_xor [plus ior xor])
|
||||
|
||||
(define_split
|
||||
diff --git a/gcc/testsuite/gcc.target/powerpc/pr105991.c b/gcc/testsuite/gcc.target/powerpc/pr105991.c
|
||||
new file mode 100644
|
||||
index 00000000000..0d9d130cb63
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/powerpc/pr105991.c
|
||||
@@ -0,0 +1,12 @@
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2" } */
|
||||
+/* { dg-require-effective-target lp64 } */
|
||||
+unsigned long long
|
||||
+foo (unsigned long long value)
|
||||
+{
|
||||
+ value &= 0xffffffff;
|
||||
+ value |= value << 32;
|
||||
+ return value;
|
||||
+}
|
||||
+/* { dg-final { scan-assembler {\mrldimi\M} } } */
|
||||
+
|
@ -0,0 +1,124 @@
|
||||
libstdc++: Update from latest fast_float [PR107468]
|
||||
|
||||
The following patch is a cherry-pick from
|
||||
https://github.com/fastfloat/fast_float/pull/153
|
||||
to restrict fast_float Clinger's fast path to when rounding mode
|
||||
is FE_TONEAREST.
|
||||
Using std::fegetround showed in benchmarks too slow, so instead
|
||||
it uses a check with 2 float additions and comparison to verify
|
||||
if rounding is FE_TONEAREST.
|
||||
|
||||
2022-11-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR libstdc++/107468
|
||||
* src/c++17/fast_float/fast_float.h (detail::rounds_to_nearest): New
|
||||
function, taken from https://github.com/fastfloat/fast_float/pull/153.
|
||||
(from_chars_advanced): Only use Clinger's fast path if
|
||||
detail::rounds_to_nearest().
|
||||
* testsuite/20_util/from_chars/pr107468.cc: New test.
|
||||
|
||||
--- libstdc++-v3/src/c++17/fast_float/fast_float.h.jj 2022-04-28 15:56:18.315632888 +0200
|
||||
+++ libstdc++-v3/src/c++17/fast_float/fast_float.h 2022-11-20 18:53:49.570830249 +0100
|
||||
@@ -2842,6 +2842,48 @@ from_chars_result parse_infnan(const cha
|
||||
return answer;
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * Returns true if the floating-pointing rounding mode is to 'nearest'.
|
||||
+ * It is the default on most system. This function is meant to be inexpensive.
|
||||
+ * Credit : @mwalcott3
|
||||
+ */
|
||||
+fastfloat_really_inline bool rounds_to_nearest() noexcept {
|
||||
+ // See
|
||||
+ // A fast function to check your floating-point rounding mode
|
||||
+ // https://lemire.me/blog/2022/11/16/a-fast-function-to-check-your-floating-point-rounding-mode/
|
||||
+ //
|
||||
+ // This function is meant to be equivalent to :
|
||||
+ // prior: #include <cfenv>
|
||||
+ // return fegetround() == FE_TONEAREST;
|
||||
+ // However, it is expected to be much faster than the fegetround()
|
||||
+ // function call.
|
||||
+ //
|
||||
+ // The volatile keywoard prevents the compiler from computing the function
|
||||
+ // at compile-time.
|
||||
+ // There might be other ways to prevent compile-time optimizations (e.g., asm).
|
||||
+ // The value does not need to be std::numeric_limits<float>::min(), any small
|
||||
+ // value so that 1 + x should round to 1 would do (after accounting for excess
|
||||
+ // precision, as in 387 instructions).
|
||||
+ static volatile float fmin = std::numeric_limits<float>::min();
|
||||
+ float fmini = fmin; // we copy it so that it gets loaded at most once.
|
||||
+ //
|
||||
+ // Explanation:
|
||||
+ // Only when fegetround() == FE_TONEAREST do we have that
|
||||
+ // fmin + 1.0f == 1.0f - fmin.
|
||||
+ //
|
||||
+ // FE_UPWARD:
|
||||
+ // fmin + 1.0f > 1
|
||||
+ // 1.0f - fmin == 1
|
||||
+ //
|
||||
+ // FE_DOWNWARD or FE_TOWARDZERO:
|
||||
+ // fmin + 1.0f == 1
|
||||
+ // 1.0f - fmin < 1
|
||||
+ //
|
||||
+ // Note: This may fail to be accurate if fast-math has been
|
||||
+ // enabled, as rounding conventions may not apply.
|
||||
+ return (fmini + 1.0f == 1.0f - fmini);
|
||||
+}
|
||||
+
|
||||
} // namespace detail
|
||||
|
||||
template<typename T>
|
||||
@@ -2870,7 +2912,7 @@ from_chars_result from_chars_advanced(co
|
||||
answer.ec = std::errc(); // be optimistic
|
||||
answer.ptr = pns.lastmatch;
|
||||
// Next is Clinger's fast path.
|
||||
- if (binary_format<T>::min_exponent_fast_path() <= pns.exponent && pns.exponent <= binary_format<T>::max_exponent_fast_path() && pns.mantissa <=binary_format<T>::max_mantissa_fast_path() && !pns.too_many_digits) {
|
||||
+ if (binary_format<T>::min_exponent_fast_path() <= pns.exponent && pns.exponent <= binary_format<T>::max_exponent_fast_path() && pns.mantissa <=binary_format<T>::max_mantissa_fast_path() && !pns.too_many_digits && detail::rounds_to_nearest()) {
|
||||
value = T(pns.mantissa);
|
||||
if (pns.exponent < 0) { value = value / binary_format<T>::exact_power_of_ten(-pns.exponent); }
|
||||
else { value = value * binary_format<T>::exact_power_of_ten(pns.exponent); }
|
||||
--- libstdc++-v3/testsuite/20_util/from_chars/pr107468.cc.jj
|
||||
+++ libstdc++-v3/testsuite/20_util/from_chars/pr107468.cc
|
||||
@@ -0,0 +1,42 @@
|
||||
+// Copyright (C) 2022 Free Software Foundation, Inc.
|
||||
+//
|
||||
+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
|
||||
+// any later version.
|
||||
+
|
||||
+// This library is distributed in the hope that it will be useful,
|
||||
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+// GNU General Public License for more details.
|
||||
+
|
||||
+// You should have received a copy of the GNU General Public License along
|
||||
+// with this library; see the file COPYING3. If not see
|
||||
+// <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+// { dg-do run { target c++17 } }
|
||||
+// { dg-add-options ieee }
|
||||
+
|
||||
+#include <charconv>
|
||||
+#include <string>
|
||||
+#include <cfenv>
|
||||
+#include <testsuite_hooks.h>
|
||||
+
|
||||
+int
|
||||
+main()
|
||||
+{
|
||||
+ // FP from_char not available otherwise.
|
||||
+#if __cpp_lib_to_chars >= 201611L \
|
||||
+ && _GLIBCXX_USE_C99_FENV_TR1 \
|
||||
+ && defined(FE_DOWNWARD) \
|
||||
+ && defined(_GLIBCXX_FLOAT_IS_IEEE_BINARY32)
|
||||
+ // PR libstdc++/107468
|
||||
+ float f;
|
||||
+ char buf[] = "3.355447e+07";
|
||||
+ std::fesetround(FE_DOWNWARD);
|
||||
+ auto [ptr, ec] = std::from_chars(buf, buf + sizeof(buf) - 1, f, std::chars_format::scientific);
|
||||
+ VERIFY( ec == std::errc() && ptr == buf + sizeof(buf) - 1 );
|
||||
+ VERIFY( f == 33554472.0f );
|
||||
+#endif
|
||||
+}
|
@ -0,0 +1,178 @@
|
||||
2022-08-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
||||
Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR fortran/46539
|
||||
gcc/
|
||||
* common.opt (static-libquadmath): New option.
|
||||
* gcc.cc (driver_handle_option): Always accept -static-libquadmath.
|
||||
* config/darwin.h (LINK_SPEC): Handle -static-libquadmath.
|
||||
gcc/fortran/
|
||||
* lang.opt (static-libquadmath): New option.
|
||||
* invoke.texi (-static-libquadmath): Document it.
|
||||
libgfortran/
|
||||
* acinclude.m4 (LIBQUADSPEC): From $FC -static-libgfortran -###
|
||||
output determine -Bstatic/-Bdynamic, -bstatic/-bdynamic,
|
||||
-aarchive_shared/-adefault linker support or Darwin remapping
|
||||
of -lgfortran to libgfortran.a%s and use that around or instead
|
||||
of -lquadmath in LIBQUADSPEC.
|
||||
* configure: Regenerated.
|
||||
|
||||
--- gcc/common.opt.jj 2022-04-28 15:56:02.822846833 +0200
|
||||
+++ gcc/common.opt 2022-09-29 19:41:37.250880668 +0200
|
||||
@@ -3563,6 +3563,10 @@ static-libphobos
|
||||
Driver
|
||||
; Documented for D, but always accepted by driver.
|
||||
|
||||
+static-libquadmath
|
||||
+Driver
|
||||
+; Documented for Fortran, but always accepted by driver.
|
||||
+
|
||||
static-libstdc++
|
||||
Driver
|
||||
|
||||
--- gcc/gcc.cc.jj 2022-04-28 15:56:04.771819920 +0200
|
||||
+++ gcc/gcc.cc 2022-09-29 19:41:37.296880041 +0200
|
||||
@@ -4583,12 +4583,14 @@ driver_handle_option (struct gcc_options
|
||||
case OPT_static_libgcc:
|
||||
case OPT_shared_libgcc:
|
||||
case OPT_static_libgfortran:
|
||||
+ case OPT_static_libquadmath:
|
||||
case OPT_static_libphobos:
|
||||
case OPT_static_libstdc__:
|
||||
/* These are always valid, since gcc.cc itself understands the
|
||||
first two, gfortranspec.cc understands -static-libgfortran,
|
||||
- d-spec.cc understands -static-libphobos, and g++spec.cc
|
||||
- understands -static-libstdc++ */
|
||||
+ d-spec.cc understands -static-libphobos, g++spec.cc
|
||||
+ understands -static-libstdc++ and libgfortran.spec handles
|
||||
+ -static-libquadmath. */
|
||||
validated = true;
|
||||
break;
|
||||
|
||||
--- gcc/config/darwin.h.jj 2022-06-18 21:56:40.666675606 +0200
|
||||
+++ gcc/config/darwin.h 2022-09-29 19:41:37.261880518 +0200
|
||||
@@ -443,6 +443,7 @@ extern GTY(()) int darwin_ms_struct;
|
||||
%:replace-outfile(-lobjc libobjc-gnu.a%s); \
|
||||
:%:replace-outfile(-lobjc -lobjc-gnu )}}\
|
||||
%{static|static-libgcc|static-libgfortran:%:replace-outfile(-lgfortran libgfortran.a%s)}\
|
||||
+ %{static|static-libgcc|static-libquadmath:%:replace-outfile(-lquadmath libquadmath.a%s)}\
|
||||
%{static|static-libgcc|static-libphobos:%:replace-outfile(-lgphobos libgphobos.a%s)}\
|
||||
%{static|static-libgcc|static-libstdc++|static-libgfortran:%:replace-outfile(-lgomp libgomp.a%s)}\
|
||||
%{static|static-libgcc|static-libstdc++:%:replace-outfile(-lstdc++ libstdc++.a%s)}\
|
||||
--- gcc/fortran/lang.opt.jj 2022-04-28 15:56:04.579822571 +0200
|
||||
+++ gcc/fortran/lang.opt 2022-09-29 19:41:37.279880273 +0200
|
||||
@@ -863,6 +863,10 @@ static-libgfortran
|
||||
Fortran
|
||||
Statically link the GNU Fortran helper library (libgfortran).
|
||||
|
||||
+static-libquadmath
|
||||
+Driver
|
||||
+Statically link the GCC Quad-Precision Math Library (libquadmath).
|
||||
+
|
||||
std=f2003
|
||||
Fortran
|
||||
Conform to the ISO Fortran 2003 standard.
|
||||
--- gcc/fortran/invoke.texi.jj 2022-04-29 15:51:59.080720092 +0200
|
||||
+++ gcc/fortran/invoke.texi 2022-09-29 19:41:37.273880354 +0200
|
||||
@@ -170,7 +170,7 @@ and warnings}.
|
||||
|
||||
@item Link Options
|
||||
@xref{Link Options,,Options for influencing the linking step}.
|
||||
-@gccoptlist{-static-libgfortran}
|
||||
+@gccoptlist{-static-libgfortran -static-libquadmath}
|
||||
|
||||
@item Runtime Options
|
||||
@xref{Runtime Options,,Options for influencing runtime behavior}.
|
||||
@@ -1425,6 +1425,20 @@ configured, this option has no effect.
|
||||
@end table
|
||||
|
||||
|
||||
+@table @gcctabopt
|
||||
+@item -static-libquadmath
|
||||
+@opindex @code{static-libquadmath}
|
||||
+On systems that provide @file{libquadmath} as a shared and a static
|
||||
+library, this option forces the use of the static version. If no
|
||||
+shared version of @file{libquadmath} was built when the compiler was
|
||||
+configured, this option has no effect.
|
||||
+
|
||||
+Please note that the @file{libquadmath} runtime library is licensed under the
|
||||
+GNU Lesser General Public License (LGPL), and linking it statically introduces
|
||||
+requirements when redistributing the resulting binaries.
|
||||
+@end table
|
||||
+
|
||||
+
|
||||
@node Runtime Options
|
||||
@section Influencing runtime behavior
|
||||
@cindex options, runtime
|
||||
--- libgfortran/acinclude.m4.jj 2022-09-29 19:41:37.306879904 +0200
|
||||
+++ libgfortran/acinclude.m4 2022-09-29 19:42:42.641988408 +0200
|
||||
@@ -338,11 +338,32 @@ AC_DEFUN([LIBGFOR_CHECK_FLOAT128], [
|
||||
ac_[]_AC_LANG_ABBREV[]_werror_flag=$ac_xsave_[]_AC_LANG_ABBREV[]_werror_flag
|
||||
])
|
||||
|
||||
+ dnl Determine -Bstatic ... -Bdynamic etc. support from gfortran -### stderr.
|
||||
+ touch conftest1.$ac_objext conftest2.$ac_objext
|
||||
+ LQUADMATH=-lquadmath
|
||||
+ $FC -static-libgfortran -### -o conftest \
|
||||
+ conftest1.$ac_objext -lgfortran conftest2.$ac_objext 2>&1 >/dev/null \
|
||||
+ | grep "conftest1.$ac_objext.*conftest2.$ac_objext" > conftest.cmd
|
||||
+ if grep "conftest1.$ac_objext.* -Bstatic -lgfortran -Bdynamic .*conftest2.$ac_objext" \
|
||||
+ conftest.cmd >/dev/null 2>&1; then
|
||||
+ LQUADMATH="%{static-libquadmath:-Bstatic} -lquadmath %{static-libquadmath:-Bdynamic}"
|
||||
+ elif grep "conftest1.$ac_objext.* -bstatic -lgfortran -bdynamic .*conftest2.$ac_objext" \
|
||||
+ conftest.cmd >/dev/null 2>&1; then
|
||||
+ LQUADMATH="%{static-libquadmath:-bstatic} -lquadmath %{static-libquadmath:-bdynamic}"
|
||||
+ elif grep "conftest1.$ac_objext.* -aarchive_shared -lgfortran -adefault .*conftest2.$ac_objext" \
|
||||
+ conftest.cmd >/dev/null 2>&1; then
|
||||
+ LQUADMATH="%{static-libquadmath:-aarchive_shared} -lquadmath %{static-libquadmath:-adefault}"
|
||||
+ elif grep "conftest1.$ac_objext.*libgfortran.a .*conftest2.$ac_objext" \
|
||||
+ conftest.cmd >/dev/null 2>&1; then
|
||||
+ LQUADMATH="%{static-libquadmath:libquadmath.a%s;:-lquadmath}"
|
||||
+ fi
|
||||
+ rm -f conftest1.$ac_objext conftest2.$ac_objext conftest conftest.cmd
|
||||
+
|
||||
dnl For static libgfortran linkage, depend on libquadmath only if needed.
|
||||
if test "x$libgfor_cv_have_as_needed" = xyes; then
|
||||
- LIBQUADSPEC="%{static-libgfortran:$libgfor_cv_as_needed_option} -lquadmath %{static-libgfortran:$libgfor_cv_no_as_needed_option}"
|
||||
+ LIBQUADSPEC="%{static-libgfortran:$libgfor_cv_as_needed_option} $LQUADMATH %{static-libgfortran:$libgfor_cv_no_as_needed_option}"
|
||||
else
|
||||
- LIBQUADSPEC="-lquadmath"
|
||||
+ LIBQUADSPEC="$LQUADMATH"
|
||||
fi
|
||||
if test -f ../libquadmath/libquadmath.la; then
|
||||
LIBQUADLIB=../libquadmath/libquadmath.la
|
||||
--- libgfortran/configure.jj 2022-09-29 19:41:37.345879372 +0200
|
||||
+++ libgfortran/configure 2022-09-29 19:42:59.878753212 +0200
|
||||
@@ -27301,10 +27301,30 @@ fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgfor_cv_have_as_needed" >&5
|
||||
$as_echo "$libgfor_cv_have_as_needed" >&6; }
|
||||
|
||||
+ touch conftest1.$ac_objext conftest2.$ac_objext
|
||||
+ LQUADMATH=-lquadmath
|
||||
+ $FC -static-libgfortran -### -o conftest \
|
||||
+ conftest1.$ac_objext -lgfortran conftest2.$ac_objext 2>&1 >/dev/null \
|
||||
+ | grep "conftest1.$ac_objext.*conftest2.$ac_objext" > conftest.cmd
|
||||
+ if grep "conftest1.$ac_objext.* -Bstatic -lgfortran -Bdynamic .*conftest2.$ac_objext" \
|
||||
+ conftest.cmd >/dev/null 2>&1; then
|
||||
+ LQUADMATH="%{static-libquadmath:-Bstatic} -lquadmath %{static-libquadmath:-Bdynamic}"
|
||||
+ elif grep "conftest1.$ac_objext.* -bstatic -lgfortran -bdynamic .*conftest2.$ac_objext" \
|
||||
+ conftest.cmd >/dev/null 2>&1; then
|
||||
+ LQUADMATH="%{static-libquadmath:-bstatic} -lquadmath %{static-libquadmath:-bdynamic}"
|
||||
+ elif grep "conftest1.$ac_objext.* -aarchive_shared -lgfortran -adefault .*conftest2.$ac_objext" \
|
||||
+ conftest.cmd >/dev/null 2>&1; then
|
||||
+ LQUADMATH="%{static-libquadmath:-aarchive_shared} -lquadmath %{static-libquadmath:-adefault}"
|
||||
+ elif grep "conftest1.$ac_objext.*libgfortran.a .*conftest2.$ac_objext" \
|
||||
+ conftest.cmd >/dev/null 2>&1; then
|
||||
+ LQUADMATH="%{static-libquadmath:libquadmath.a%s;:-lquadmath}"
|
||||
+ fi
|
||||
+ rm -f conftest1.$ac_objext conftest2.$ac_objext conftest conftest.cmd
|
||||
+
|
||||
if test "x$libgfor_cv_have_as_needed" = xyes; then
|
||||
- LIBQUADSPEC="%{static-libgfortran:$libgfor_cv_as_needed_option} -lquadmath %{static-libgfortran:$libgfor_cv_no_as_needed_option}"
|
||||
+ LIBQUADSPEC="%{static-libgfortran:$libgfor_cv_as_needed_option} $LQUADMATH %{static-libgfortran:$libgfor_cv_no_as_needed_option}"
|
||||
else
|
||||
- LIBQUADSPEC="-lquadmath"
|
||||
+ LIBQUADSPEC="$LQUADMATH"
|
||||
fi
|
||||
if test -f ../libquadmath/libquadmath.la; then
|
||||
LIBQUADLIB=../libquadmath/libquadmath.la
|
@ -0,0 +1,41 @@
|
||||
From 023c5b36e476976cb3b45ff32c7c64990c5a6d45 Mon Sep 17 00:00:00 2001
|
||||
From: Kewen Lin <linkw@linux.ibm.com>
|
||||
Date: Thu, 1 Sep 2022 00:27:11 -0500
|
||||
Subject: [PATCH] rs6000/test: Fix typo in pr86731-fwrapv-longlong.c [PR106682]
|
||||
|
||||
Commit r12-2266 updated the scanned assembly content from
|
||||
|
||||
"{\mlvx\M|\mlxv\M|\mlxvd2x\M}"
|
||||
|
||||
to
|
||||
|
||||
"{\mp?lxv\M|\mlxv\M|\mlxvd2x\M}"
|
||||
|
||||
for the test case pr86731-fwrapv-longlong.c unexpectedly.
|
||||
|
||||
It's meant to update "lxv" to "p?lxv", should leave the
|
||||
"lvx" unchanged. So fix the typo accordingly.
|
||||
|
||||
PR testsuite/106682
|
||||
|
||||
gcc/testsuite/ChangeLog:
|
||||
|
||||
* gcc.target/powerpc/pr86731-fwrapv-longlong.c: Fix typo.
|
||||
---
|
||||
gcc/testsuite/gcc.target/powerpc/pr86731-fwrapv-longlong.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/testsuite/gcc.target/powerpc/pr86731-fwrapv-longlong.c b/gcc/testsuite/gcc.target/powerpc/pr86731-fwrapv-longlong.c
|
||||
index dcb30e1d886..018e1cf9749 100644
|
||||
--- a/gcc/testsuite/gcc.target/powerpc/pr86731-fwrapv-longlong.c
|
||||
+++ b/gcc/testsuite/gcc.target/powerpc/pr86731-fwrapv-longlong.c
|
||||
@@ -31,5 +31,5 @@ vector signed long long splats4(void)
|
||||
|
||||
/* { dg-final { scan-assembler-times {\mvspltis[bhw]\M} 0 } } */
|
||||
/* { dg-final { scan-assembler-times {\mvsl[bhwd]\M} 0 } } */
|
||||
-/* { dg-final { scan-assembler-times {\mp?lxv\M|\mlxv\M|\mlxvd2x\M|\mxxspltidp\M} 2 } } */
|
||||
+/* { dg-final { scan-assembler-times {\mp?lxv\M|\mlvx\M|\mlxvd2x\M|\mxxspltidp\M} 2 } } */
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,85 @@
|
||||
From: Sven Verdoolaege <sven.verdoolaege@gmail.com>
|
||||
Date: Mon, 6 Jun 2022 12:56:02 +0000 (+0200)
|
||||
Subject: update m4/ax_prog_cc_for_build.m4
|
||||
X-Git-Tag: isl-0.25~11
|
||||
X-Git-Url: https://repo.or.cz/isl.git/commitdiff_plain/b4dcdfadc29a6c9f410a72f345f3f32725b1d38b
|
||||
|
||||
update m4/ax_prog_cc_for_build.m4
|
||||
|
||||
In particular, update to the latest version from the autoconf archive,
|
||||
but preserve the changes from isl-0.22.1-358-gcd42abdf2
|
||||
(m4/ax_prog_cc_for_build.m4: do not override host compiler dependency style,
|
||||
Tue Jun 9 10:54:10 2020 +0200).
|
||||
|
||||
Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>
|
||||
|
||||
--- isl-0.24/m4/ax_prog_cc_for_build.m4.jj 2021-03-02 12:07:09.000000000 +0100
|
||||
+++ isl-0.24/m4/ax_prog_cc_for_build.m4 2022-12-20 18:11:18.855777817 +0100
|
||||
@@ -32,7 +32,7 @@
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
-#serial 18
|
||||
+#serial 21
|
||||
|
||||
AU_ALIAS([AC_PROG_CC_FOR_BUILD], [AX_PROG_CC_FOR_BUILD])
|
||||
AC_DEFUN([AX_PROG_CC_FOR_BUILD], [dnl
|
||||
@@ -44,6 +44,8 @@ dnl Use the standard macros, but make th
|
||||
dnl
|
||||
pushdef([ac_cv_prog_CPP], ac_cv_build_prog_CPP)dnl
|
||||
pushdef([ac_cv_prog_cc_c89], ac_cv_build_prog_cc_c89)dnl
|
||||
+pushdef([ac_cv_prog_cc_c99], ac_cv_build_prog_cc_c99)dnl
|
||||
+pushdef([ac_cv_prog_cc_c11], ac_cv_build_prog_cc_c11)dnl
|
||||
pushdef([ac_cv_prog_gcc], ac_cv_build_prog_gcc)dnl
|
||||
pushdef([ac_cv_prog_cc_works], ac_cv_build_prog_cc_works)dnl
|
||||
pushdef([ac_cv_prog_cc_cross], ac_cv_build_prog_cc_cross)dnl
|
||||
@@ -86,7 +88,21 @@ AS_IF([test -n "$build"], [ac_build
|
||||
[test -n "$build_alias"],[ac_build_tool_prefix="$build_alias-"])
|
||||
|
||||
AC_LANG_PUSH([C])
|
||||
+
|
||||
+dnl The pushdef([ac_cv_c_compiler_gnu], ...) currently does not cover
|
||||
+dnl the use of this variable in _AC_LANG_COMPILER_GNU called by
|
||||
+dnl AC_PROG_CC. Unset this cache variable temporarily as a workaround.
|
||||
+was_set_c_compiler_gnu=${[ac_cv_c_compiler_gnu]+y}
|
||||
+AS_IF([test ${was_set_c_compiler_gnu}],
|
||||
+ [saved_c_compiler_gnu=$[ac_cv_c_compiler_gnu]
|
||||
+ AS_UNSET([[ac_cv_c_compiler_gnu]])])
|
||||
+
|
||||
AC_PROG_CC
|
||||
+
|
||||
+dnl Restore ac_cv_c_compiler_gnu
|
||||
+AS_IF([test ${was_set_c_compiler_gnu}],
|
||||
+ [[ac_cv_c_compiler_gnu]=$[saved_c_compiler_gnu]])
|
||||
+
|
||||
_AC_COMPILER_EXEEXT
|
||||
_AC_COMPILER_OBJEXT
|
||||
AC_PROG_CPP
|
||||
--- isl-0.24/configure.jj 2021-04-26 11:13:19.000000000 +0200
|
||||
+++ isl-0.24/configure 2022-12-20 18:11:36.882518568 +0100
|
||||
@@ -5002,6 +4990,13 @@ ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR
|
||||
ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_build_c_compiler_gnu
|
||||
|
||||
+
|
||||
+was_set_c_compiler_gnu=${ac_cv_c_compiler_gnu+y}
|
||||
+if test ${was_set_c_compiler_gnu}; then :
|
||||
+ saved_c_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
+ { ac_cv_c_compiler_gnu=; unset ac_cv_c_compiler_gnu;}
|
||||
+fi
|
||||
+
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD'
|
||||
ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5'
|
||||
@@ -5728,6 +5723,11 @@ else
|
||||
fi
|
||||
|
||||
|
||||
+
|
||||
+if test ${was_set_c_compiler_gnu}; then :
|
||||
+ ac_cv_c_compiler_gnu=$saved_c_compiler_gnu
|
||||
+fi
|
||||
+
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
Loading…
Reference in new issue