[PATCH] [testsuite] [ppc] disable -mpowerpc64 for various ilp32 asm-out checks

2025-04-11 Thread Alexandre Oliva
target { powerpc*-*-* } } } */ -/* { dg-options "-mdejagnu-cpu=power9 -mvsx" } */ +/* { dg-options "-mdejagnu-cpu=power9 -mvsx -mno-powerpc64" } */ /* { dg-require-effective-target ilp32 } */ /* { dg-require-effective-target powerpc_vsx } */ diff --git a/gcc/testsuite/gcc.target

[PATCH] [testsuite] [ppc] block-cmp-8 should require powerpc64

2025-04-11 Thread Alexandre Oliva
{ target ilp32 } } */ /* { dg-options "-O2 -mpowerpc64" } */ -/* { dg-require-effective-target has_arch_ppc64 } */ +/* { dg-require-effective-target powerpc64 } */ /* { dg-timeout-factor 2 } */ /* Verify memcmp on m32 mpowerpc64 */ -- Alexandre Oliva, happy hacker

[PATCH] [testsuite] [ppc] add -mfloat128 to pr67808.c

2025-04-11 Thread Alexandre Oliva
DOUBLE __ibm128 #elif defined(__LONG_DOUBLE_IBM128__) -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and diversity. Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

[PATCH] [testsuite] [ppc] add -mdejagnu-cpu=power7 to pr17381.c

2025-04-11 Thread Alexandre Oliva
*/ double d; float test1(float fParm) -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and diversity. Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

[PATCH] [testsuite] [ppc] add -maltivec to pr111380-2.c

2025-04-11 Thread Alexandre Oliva
dg-require-effective-target powerpc_altivec_ok } */ +/* { dg-options "-O2 -mno-vsx -maltivec" } */ /* Verify it emits error message on inlining even without LTO. */ -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GN

[PATCH] [testsuite] [ppc] require ifunc for target_clones test

2025-04-11 Thread Alexandre Oliva
+++ b/gcc/testsuite/gcc.target/powerpc/power11-3.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-mdejagnu-cpu=power8 -O2" } */ +/* { dg-require-ifunc "" } */ /* Check if we can set the power11 target via a target_clones attribute. */ -- Alexandre

[PATCH] [testsuite] [ppc] add -mno-strict-align to pr111449-1.c

2025-04-11 Thread Alexandre Oliva
-require-effective-target powerpc_vsx } */ /* Ensure vector mode is used for 16-byte by pieces equality compare. */ -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice

[PATCH] [testsuite] [ppc] allow implicit fuction declarations in pr92661.c

2025-04-11 Thread Alexandre Oliva
supports DFP or not. */ -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and diversity. Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

[PATCH] [testsuite] [ppc] skip -msoft-float tests when testing with -mhard-float

2025-04-11 Thread Alexandre Oliva
compatible and warns it. */ /* { dg-skip-if "aix long-double-128 soft-float" { powerpc*-*-aix* } } */ /* { dg-options "-mlong-double-128 -msoft-float" } */ +/* { dg-skip-if "" { *-*-* } { "-mhard-float" } } */ /* Verify there is no ICE. */ -- Ale

[PATCH] [testsuite] [ppc] tolerate -mfloat128 warning in pr99708.c

2025-04-11 Thread Alexandre Oliva
t128" } */ +/* { dg-prune-output ".-mfloat128. option may not be fully supported" } */ /* * PR target/99708 -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and

[PATCH] [testsuite] [ppc] adjust vsx-builtin-7.c xxpermdi count for ilp32

2025-04-11 Thread Alexandre Oliva
35 { target { le && lp64 } } } } */ /* { dg-final { scan-assembler-times "vspltisb" 2 } } */ /* { dg-final { scan-assembler-times "vspltish" 2 } } */ /* { dg-final { scan-assembler-times "vspltisw" 2 { target be } } } */ -- Alexandre Oliva, happy hacker

[PATCH] [testsuite] [ppc] require vsx for vec-cmpne tests

2025-04-11 Thread Alexandre Oliva
arget powerpc_vsx_ok } */ /* Test that the vec_cmpne builtin generates the expected Altivec instructions. */ -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice a

[PATCH] [testsuite] [ppc] use dg-do-if in vec-mul.c

2025-04-11 Thread Alexandre Oliva
or, return if it does not match. -switch [dg-process-target-1 [lindex $args 1]] { +switch [dg-process-target-1 [lindex $args 2]] { "N" { return } "P" { return } } -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and diversity. Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

[PATCH] [testsuite] [ppc] pr87600, pr89313: test for __PPC__ as well

2025-04-11 Thread Alexandre Oliva
) # define REG "r3" #elif defined (__s390__) # define REG "0" -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and diversity. Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

[PATCH] [testsuite] [riscv] xfail ssa-dom-cse-2 on riscv64

2025-03-31 Thread Alexandre Oliva
owerpc*-*-* sparc*-*-* riscv*-*-* } } || aarch64_sve } || { arm*-*-* && { ! arm_neon } } } } } } } */ -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice are key for i

[PATCH] [testsuite] [riscv] xfail update-threading on riscv [PR110628]

2025-03-31 Thread Alexandre Oliva
g-final { scan-tree-dump-times "Invalid sum" 0 "optimized" { xfail cris-*-* } } } Xfail: PR110628 */ +/* { dg-final { scan-tree-dump-times "Invalid sum" 0 "optimized" { xfail cris-*-* riscv*-*-* } } } Xfail: PR110628 */ -- Alexandre Oliva, happy hacker

[PATCH] [testsuite] [riscv] limit mcpu-xiangshan-nanhu.c to rv64

2025-03-31 Thread Alexandre Oliva
4imafdc_zba_zbb_zbc_zbs_zbkb_zbkc_zbkx_zknd _zkne_zknh_zksed_zksh_svinval_zicbom_zicboz */ -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and diversity. Excluding

[PATCH] [testsuite] [riscv] xfail some [PR113281] tests

2025-04-04 Thread Alexandre Oliva
/rvv/pr113281-5.c +++ b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/pr113281-5.c @@ -15,4 +15,4 @@ int main() { return 1; } -/* { dg-final { scan-assembler-not {vset} } } */ +/* { dg-final { scan-assembler-not {vset} { xfail *-*-* } } } */ -- Alexandre Oliva, happy hackerhttps

Re: [PATCH] testsuite: Fix up strub-internal-pr112938.C test for C++2{0,3,6}

2025-03-27 Thread Alexandre Oliva
On Mar 27, 2025, Jakub Jelinek wrote: > Here is a fix, tested on x86_64-linux, ok for trunk? > 2025-03-27 Jakub Jelinek > * g++.dg/strub-internal-pr112938.C: Add dg-warning for c++20. LGTM, thanks -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom

Re: [PATCH] [testsuite] [ppc] block-cmp-8 should require powerpc64

2025-04-15 Thread Alexandre Oliva
On Apr 15, 2025, Peter Bergner wrote: > On 4/14/25 11:35 PM, Alexandre Oliva wrote: >>> That said, that should be done in a separate patch. >> >> *nod*. Do you mean you're going to make that change, that I should, or >> that you hope someone else will? I&#

RISC-V: adjust testcase for gcc-14 [PR118182]

2025-04-14 Thread Alexandre Oliva
.. -** vmv.s.x .* +** vfmv.s.f .* ** ... ** vfredusum.vs .* ** ... -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and dive

RISC-V: revert pr114194 tests on gcc-14 [PR118601]

2025-04-14 Thread Alexandre Oliva
+,0\([a-x0-9]+\) +** sb\t[a-x0-9]+,1\([a-x0-9]+\) +** sb\t[a-x0-9]+,2\([a-x0-9]+\) +** sb\t[a-x0-9]+,3\([a-x0-9]+\) +** sb\t[a-x0-9]+,4\([a-x0-9]+\) +** ret +*/ +void foo1_5 (void *p) +{ + __builtin_memset (p, 1, 5); +} -- Alexandre Oliva, happy hackerhttps://blog.l

Re: [PATCH] [testsuite] [ppc] compile [PR112822] with -mvsx

2025-04-14 Thread Alexandre Oliva
m just sharing the reasons why I didn't take this path. -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and diversity. Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

Re: [PATCH] [testsuite] [ppc] block-cmp-8 should require powerpc64

2025-04-14 Thread Alexandre Oliva
nod*. Do you mean you're going to make that change, that I should, or that you hope someone else will? I'd rather avoid duplication, and this is likely a somewhat involved change, since the string powerpc64 appears all over gcc/testsuite/, with various meanings other than a dejagnu e

Re: [PATCH] [riscv] vec_dup immediate constants in pred_broadcast expand [PR118182]

2025-04-13 Thread Alexandre Oliva
h stuff, it's just that FAILs often catch my attention, especially if they seem like regressions. -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and diversity. Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

[PATCH] [riscv] vec_dup immediate constants in pred_broadcast expand [PR118182]

2025-04-11 Thread Alexandre Oliva
) +operands[3] = gen_rtx_VEC_DUPLICATE (mode, operands[3]); }) (define_insn_and_split "*pred_broadcast" -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and diversity. Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

Re: [PATCH] [testsuite] [ppc] compile [PR112822] with -mvsx

2025-04-15 Thread Alexandre Oliva
On Apr 15, 2025, Peter Bergner wrote: > On 4/14/25 11:30 PM, Alexandre Oliva wrote: >> On Apr 14, 2025, Peter Bergner wrote: >> >>> This is an architecture independent test case, so I'm surprised this >>> doesn't FAIL on non-powerpc targets since

Re: [PATCH] [testsuite] [ppc] disable -mpowerpc64 for various ilp32 asm-out checks

2025-04-15 Thread Alexandre Oliva
n knowledge about the target environment makes it safe. > https://gcc.gnu.org/PR106680 -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and diversity. Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

Re: [PATCH] [testsuite] [ppc] pr87600, pr89313: test for __PPC__ as well

2025-04-15 Thread Alexandre Oliva
On Apr 14, 2025, Peter Bergner wrote: > On 4/11/25 1:03 PM, Alexandre Oliva wrote: >> gcc.dg/pr87600.h and gcc.dg/pr89313.c test for __powerpc__ and >> __POWERPC__ to choose ppc register names, but ppc-elf defines neither; >> it defines __PPC__, so test for that as well. &g

Re: [PATCH] [testsuite] [ppc] compile [PR112822] with -mvsx

2025-04-15 Thread Alexandre Oliva
erpc-elf and I confirm that it solves the failures that motivated the initial patch in this thread. -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion

Re: [PATCH] [testsuite] [ppc] disable -mpowerpc64 for various ilp32 asm-out checks

2025-04-14 Thread Alexandre Oliva
st me, well, I could live with that ;-) I can see that it would make sense to only enable it if explicitly requested. Please let me know what you maintainers decide, and I'll adjust as needed. Thanks, -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software A

[PATCH] vxworks: undefine TARGET_FORTIFY_SOURCE_DEFAULT_LEVEL

2025-05-08 Thread Alexandre Oliva
(instead of passing -flinker-output=nolto-rel). */ #undef LTO_PLUGIN_SPEC #define LTO_PLUGIN_SPEC "%{!mrtp:-plugin-opt=-linker-output-auto-nolto-rel}" + +/* Undo the linux.h definition. */ +#undef TARGET_FORTIFY_SOURCE_DEFAULT_LEVEL -- Alexandre Oliva, happy hacker

[PATCH] [testsuite] [vxworks] add -gno-strict-dwarf to pr111409.c

2025-05-08 Thread Alexandre Oliva
dg-options "-gsplit-dwarf -g3 -dA -gno-strict-dwarf" } */ /* { dg-final { scan-assembler-times {\.section\t"?\.debug_macro} 1 } } */ /* { dg-final { scan-assembler-not {\.byte\s+0x7\s*#\s*Import} } } */ -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/

[PATCH] [vxworks] wrap base/b_NULL.h to override NULL

2025-05-08 Thread Alexandre Oliva
They're installed at the +top of the @file{include} tree, unless the optional @samp{/././} +sequence appears in the name, marking the beginning of the name under +which the header should be installed. GCC installs its own version of @code{}, from @file{ginclude/float.h}. This is done to cope w

[PATCH] [testsuite] [vxworks] skip macros from implicitly-included vxConfig.h

2025-05-08 Thread Alexandre Oliva
]*} module } } +// { dg-final { scan-lang-dump-not {Writing macro #define [a-z][_a-zA-Z0-9]* at [0-9]*} module } } -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice a

[PATCH] libstdc++-v3: testsuite: lengthen stop_request wait_until timeout

2025-05-08 Thread Alexandre Oliva
e src; - auto abst = std::chrono::steady_clock::now() + 1.0s; + auto abst = std::chrono::steady_clock::now() + (ck ? 5.0s : 1.0s); auto tok = src.get_token(); std::thread t([ck, &ready, &mtx, &cv, abst, tok] { -- Alexandre Oliva, happy hackerhttps://blo

[PATCH] [testsuite] [ppc] add -mpowerpc-gfxopt or -mcmpb to copysign tests

2025-05-08 Thread Alexandre Oliva
{ { i?86-*-* x86_64-*-* } && ilp32 } } } */ +/* { dg-additional-options "-mpowerpc-gfxopt" { target { powerpc*-*-* } } } */ /* { dg-do compile } */ float f(float x) { diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 287e51bbfc661..2421ca225e8dd 100644 --

[PATCH] add explicit ABI and align options to pr88233.c

2025-05-08 Thread Alexandre Oliva
{ scan-assembler-times {\mlfd\M} 2 { target { le } } } } */ +/* { dg-final { scan-assembler-times {\mlxvd2x\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mstxvd2x\M} 1 } } */ -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-foun

[PATCH] [testsuite] [ppc] adjust vsx-builtin-7.c xxpermdi/rldic counts

2025-05-08 Thread Alexandre Oliva
/* { dg-final { scan-assembler-times "vspltisb" 2 } } */ /* { dg-final { scan-assembler-times "vspltish" 2 } } */ /* { dg-final { scan-assembler-times "vspltisw" 2 { target be } } } */ -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.

[PATCH] [testsuite] [ppc] disable strict align for block-cmp-[14].c

2025-05-08 Thread Alexandre Oliva
target be } } */ -/* { dg-options "-O2 -mdejagnu-cpu=power7" } */ +/* { dg-options "-O2 -mdejagnu-cpu=power7 -mno-strict-align" } */ /* { dg-skip-if "" { has_arch_ppc64 && ilp32 } } */ /* { dg-final { scan-assembler-not {\mb[l]? memcmp\M} } } */ -- Alexandr

[PATCH] [testsuite] [ppc] expect vectorization in gen-vect-11c.c

2025-05-08 Thread Alexandre Oliva
-/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { xfail amdgcn*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { xfail amdgcn*-*-* powerpc*-*-* } } } */ -- Alexandre Oliva, happy hackerhttps:/

Re: [PATCH] [testsuite] [ppc] require float128 available for copysign

2025-05-08 Thread Alexandre Oliva
On Apr 11, 2025, Alexandre Oliva wrote: > for gcc/testsuite/ChangeLog > * lib/target-supports.exp (check_effective_target_ifn_copysign): > Require float128 on ppc. I hereby withdraw this patch, it was based on a misunderstanding. -- Alexandre Oliva, happy hacker

[PATCH] add explicit ABI and align options to pr88233.c

2025-05-08 Thread Alexandre Oliva
g-final { scan-assembler-times {\mstxvd2x\M} 1 } } */ -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and diversity. Excluding neuro-others for n

[PATCH] [testsuite] [ppc] pr110071 requires power6 for shrink-wrapping

2025-05-08 Thread Alexandre Oliva
pping. */ +/* { dg-final { scan-rtl-dump-times "Performing shrink-wrapping" 1 "pro_and_epilogue" { target has_arch_pwr6 } } } */ -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer

[PATCH] vxworks: libgcc: include string.h for memset

2025-05-08 Thread Alexandre Oliva
__TIMESPEC_TO_NSEC(timespec) \ ((long long)timespec.tv_sec * 10 + (long long)timespec.tv_nsec) -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and

[PATCH] vxworks: libstdc++: include ioLib.h for dup()

2025-05-08 Thread Alexandre Oliva
fault) { _GLIBCXX_BEGIN_NAMESPACE_VERSION -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and diversity. Excluding neuro-others for not behaving ""n

[PATCH] [testsuite] [vxworks] netinet includes atomic, reqs c++11

2025-05-08 Thread Alexandre Oliva
-exceptions" } */ /* { dg-skip-if "" { hppa*-*-hpux* powerpc*-*-aix* } } */ +/* On vxworks, netinet/in.h indirectly includes atomic, that requires C++11. */ +/* { dg-skip-if "" { *-*-vxworks* && { c++ && { ! c++11 } } } } */ #include #include

[PATCH] [testsuite] [analyzer] [vxworks] define __STDC_WANT_LIB_EXT1__ to 1

2025-05-08 Thread Alexandre Oliva
#include #include -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and diversity. Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

[PATCH] libstdc++-v3: no -latomic on vxworks

2025-05-08 Thread Alexandre Oliva
-append link_flags " -latomic " +if { [istarget *-*-vxworks*] } { + # vxworks provides libatomic as part of libc. +} else { + append link_flags " -latomic " +} if [info exists TEST_ALWAYS_FLAGS] { set atomic_saved_TEST_ALWAYS_FLAGS

[PATCH] libstdc++-v3: testsuite: increase future/members/poll timing tolerance

2025-05-08 Thread Alexandre Oliva
bstdc++/2020-November/051422.html -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and diversity. Excluding neuro-others for not behaving "

Re: [PATCH] [testsuite] [ppc] block-cmp-8 should require powerpc64

2025-05-09 Thread Alexandre Oliva
On Apr 11, 2025, Alexandre Oliva wrote: > * gcc.target/powerpc/block-cmp-8.c: Require powerpc64 > instruction execution support. > --- a/gcc/testsuite/gcc.target/powerpc/block-cmp-8.c > +++ b/gcc/testsuite/gcc.target/powerpc/block-cmp-8.c > -/* { dg-require-e

Re: [PATCH] [testsuite] [ppc] pr87600, pr89313: test for __PPC__ as well

2025-05-09 Thread Alexandre Oliva
On Apr 16, 2025, Alexandre Oliva wrote: > On Apr 14, 2025, Peter Bergner wrote: >> On 4/11/25 1:03 PM, Alexandre Oliva wrote: >>> gcc.dg/pr87600.h and gcc.dg/pr89313.c test for __powerpc__ and >>> __POWERPC__ to choose ppc register names, but ppc-elf defines neither;

[PATCH] [libstdc++] [testsuite] xfail double-prec from_chars for x86_64 ldbl

2023-05-29 Thread Alexandre Oliva via Gcc-patches
{ dg-xfail-run-if "from_chars limited to double-precision" { aarch64-*-vxworks* i*86-*-vxworks* x86_64-*-vxworks* } } // { dg-require-effective-target ieee_floats } // { dg-require-effective-target size32plus } -- Alexandre Oliva, happy hackerhttps://FSFLA.

Re: [PATCH] libstdc++: Correct NTTP and simd_mask ctor call

2023-06-02 Thread Alexandre Oliva via Gcc-patches
;m not sure about the requirements. [libstdc++] [simd] [ppc] use nonvector intrinsic fallback types From: Alexandre Oliva Compiling such tests as pr109822_cast_functions.cc on powerpc targets that don't support VSX fails because some intrinsic types that are expected to be vectorizable a

Re: [PATCH] libstdc++: Correct NTTP and simd_mask ctor call

2023-06-02 Thread Alexandre Oliva via Gcc-patches
nvalid ISTM that rtems is missing some of the math.h functions expected by libstdc++, but also that even those that are present are not visible in namespace ::std::, where the macros reasonably expect to find them. Is this known? Should I file a PR about it? -- Alexandre Oliva, happy hacke

Re: [RFC] Introduce -finline-memset-loops

2023-06-02 Thread Alexandre Oliva via Gcc-patches
On Jan 19, 2023, Alexandre Oliva wrote: > Would it make more sense to extend it, even constrained by the > limitations mentioned above, or handle memset only? In the latter case, > would it still make sense to adopt a command-line option that suggests a > broader effect than it

[testsuite] bump some tsvc timeouts

2023-06-07 Thread Alexandre Oliva via Gcc-patches
-effective-target vect_float } */ +/* { dg-timeout-factor 2 } */ #include "tsvc.h" @@ -38,4 +39,4 @@ int main (int argc, char **argv) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file

[PATCH] fix frange_nextafter odr violation

2023-06-08 Thread Alexandre Oliva via Gcc-patches
nge_float (const char *lb, const char *ub, tree type = float_type_node) { REAL_VALUE_TYPE min, max; -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deepl

Re: [PATCH] fix frange_nextafter odr violation

2023-06-09 Thread Alexandre Oliva via Gcc-patches
On Jun 9, 2023, Richard Biener wrote: > On Thu, Jun 8, 2023 at 4:38 PM Alexandre Oliva via Gcc-patches > wrote: >> C++ requires inline functions to be declared inline and defined in >> every translation unit that uses them. frange_nextafter is used in >> gimple-r

libstdc++-v3: do not duplicate some math functions when using newlib

2023-06-14 Thread Alexandre Oliva via Gcc-patches
or the long version of some math libraries depends on +dnl # architecture and newlib version. So test for their availability +dnl # rather than hardcoding that information. +GLIBCXX_CHECK_MATH_DECLS([ + acosl asinl atan2l atanl ceill coshl cosl expl fabsl floorl fmodl + frexpl hy

[libstdc++] [testsuite] xfail dbl from_chars for aarch64 rtems ldbl

2023-06-14 Thread Alexandre Oliva via Gcc-patches
"-DSKIP_LONG_DOUBLE" { target aarch64-*-vxworks* x86_64-*-vxworks* } } +// { dg-additional-options "-DSKIP_LONG_DOUBLE" { target aarch64-*-rtems* aarch64-*-vxworks* x86_64-*-vxworks* } } #include #include -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Fr

[libstdc++] [testsuite] expect zero entropy matching implementation

2023-06-14 Thread Alexandre Oliva via Gcc-patches
t;arc4random" }) + for (auto token : { "getentropy", "arc4random" }) if (__gnu_test::random_device_available(token)) { const double entropy = std::random_device(token).entropy(); -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free So

Re: [PATCH] Introduce hardbool attribute for C

2023-06-15 Thread Alexandre Oliva via Gcc-patches
On Aug 9, 2022, Alexandre Oliva wrote: > Ping? Ping? Refreshed, added setting of ENUM_UNDERLYING_TYPE, retested on x86_64-linux-gnu (also on gcc-13). Introduce hardbool attribute for C This patch introduces hardened booleans in C. The hardbool attribute, when attached to an integral t

Re: [PATCH zero-call-used-regs] Add leafy mode for zero-call-used-regs

2023-06-16 Thread Alexandre Oliva via Gcc-patches
Hello, Qing, On Oct 27, 2022, Qing Zhao wrote: <https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604480.html> > On Oct 26, 2022, at 5:29 PM, Alexandre Oliva wrote: >> I'm sure there are other scenarios in which keeping at least the >> possibility of '

[PATCH v3] Introduce attribute reverse_alias

2023-07-14 Thread Alexandre Oliva via Gcc-patches
This patch introduces an attribute to add extra aliases to a symbol when its definition is output. The main goal is to ease interfacing C++ with Ada, as C++ mangled names have to be named, and in some cases (e.g. when using stdint.h typedefs in function arguments) the symbol names may vary acros

Re: [PATCH v3] Introduce attribute reverse_alias

2023-07-17 Thread Alexandre Oliva via Gcc-patches
not necessarily ok, baz's symbol may be mangled > Is is emitting a an additiona symbol -- ie, something like 'altname'. Yup. Is there precedent for this attribute name elsewhere? I think it could work. > Is that symbol known in the current TU, or other TUs? Only in the ass

[PATCH v4] Introduce attribute sym

2023-07-19 Thread Alexandre Oliva via Gcc-patches
On Jul 18, 2023, Richard Biener wrote: > I think the __symver__ attribute does something similar already so > maybe use __attribute__((__sym__("foo")))? Cool, thanks, that will do. Regstrapped on x86_64-linux-gnu. Ok to install? This patch introduces an attribute to add extra asm names (alia

Re: [PATCH v4] Introduce attribute sym

2023-07-21 Thread Alexandre Oliva via Gcc-patches
the named sym alias needs to be introduced in the symtab early enough that other (non-sym) alias declarations can refer to it, which symver doesn't need to worry about. -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist

Re: [PATCH] aarch64: testsuite: symbol-range compile only

2022-07-05 Thread Alexandre Oliva via Gcc-patches
On Jun 30, 2022, Hans-Peter Nilsson wrote: > On Thu, 23 Jun 2022, Alexandre Oliva via Gcc-patches wrote: >> +proc check_effective_target_two_plus_gigs { } { >> +return [check_no_compiler_messages two_plus_gigs executable { >> +int dummy[0x8000]; > Don'

Re: [PATCH] libstdc++: testsuite: avoid predictable mkstemp

2022-07-05 Thread Alexandre Oliva via Gcc-patches
On Jun 27, 2022, Alexandre Oliva wrote: > On Jun 23, 2022, Jonathan Wakely wrote: >> The attached makes this a bit more efficient, and makes more of the >> code common to the mkstemp and non-mkstmp branches. I'll wait to hear >> back from you before pushing it (since

Re: [PATCH] libstdc++: retry removal of dir entries if dir removal fails

2022-07-05 Thread Alexandre Oliva via Gcc-patches
rg/ticket/4674 -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about <https://stallmansupport.org>

Re: [PATCH] libstdc++: testsuite: avoid predictable mkstemp

2022-07-05 Thread Alexandre Oliva via Gcc-patches
in kernel mode. file += std::to_string((unsigned long) ::getpid()); p = std::move(file); if (test_fs::exists(p)) -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flou

[PATCH] Introduce hardbool attribute for C

2022-07-07 Thread Alexandre Oliva via Gcc-patches
} + +void check_vtrue (hbool v) +{ + check_ptrue (&v); +} + +int main () { + check_pfalse (&var); + var = !(int)(hbool)(_Bool)var; + check_ptrue (&var); + var = (zbool)var; + check_ptrue (&var); + + check_ptrue (&x.a[0]); + check_pfalse (&x.a[1]); + check_vtrue

[PATCH] Control flow redundancy hardening

2022-07-07 Thread Alexandre Oliva via Gcc-patches
/dev/null +++ b/gcc/gimple-harden-control-flow.cc @@ -0,0 +1,713 @@ +/* Control flow redundancy hardening. + Copyright (C) 2022 Free Software Foundation, Inc. + Contributed by Alexandre Oliva . + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under

Re: [PATCH] Introduce hardbool attribute for C

2022-07-08 Thread Alexandre Oliva via Gcc-patches
grounds that using +uninitialized values invokes undefined behavior. @item may_alias -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deep

Re: [PATCH] Introduce hardbool attribute for C

2022-07-08 Thread Alexandre Oliva via Gcc-patches
ny other value; the challenge would be to get such a value stored in a variable, given that actual booleans can only hold true (nonzero) or false (zero), and neither would convert to NaB. -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist

Re: [PATCH] Control flow redundancy hardening

2022-07-08 Thread Alexandre Oliva via Gcc-patches
methods/subprograms in a program, rather than basic blocks within a function. Thanks a lot for these questions. They're going to help me be better prepared for a presentation about various hardening features (*) that I've submitted and am preparing for the upcoming Cauldron. (*)

[PATCH] i386 testsuite: cope with --enable-default-pie

2022-07-11 Thread Alexandre Oliva via Gcc-patches
* Verify that foo clones are not numbered. */ -/* { dg-final { scan-assembler "foo.resolver," } } */ -/* { dg-final { scan-assembler "foo.default," } } */ -/* { dg-final { scan-assembler "foo.avx," } } */ - -/* { dg-final { scan-assembler "slm" } } */ -/* { dg-final { scan-a

Re: [PATCH] i386 testsuite: cope with --enable-default-pie

2022-07-12 Thread Alexandre Oliva via Gcc-patches
x 912cbe0919100..b1d9619275e72 100644 --- a/gcc/testsuite/gcc.target/i386/pr98482-1.c +++ b/gcc/testsuite/gcc.target/i386/pr98482-1.c @@ -1,7 +1,8 @@ /* { dg-do compile { target { *-*-linux* && lp64 } } } */ /* { dg-require-effective-target mfentry } */ /* { dg-options "-fprofile -m

[PATCH] i386 PIE: accept @GOTOFF in load/store multi base address

2022-07-26 Thread Alexandre Oliva via Gcc-patches
dr (mem_2, &base_2, &offset_2)) + if (!extract_base_offset_in_addr (mem_2, &base_2, &symbase_2, &offset_2)) return false; /* Check if the bases are the same. */ - if (!rtx_equal_p (base_1, base_2)) + if (!rtx_equal_p (base_1, base_2) || !rtx_equal_p (symbase_1

[PATCH] [PR83782] i386 PIE: avoid @GOTOFF for ifuncs and their aliases

2022-07-26 Thread Alexandre Oliva via Gcc-patches
bler "foo@GOT\\\(" { target ia32 } } } */ /* { dg-final { scan-assembler-not "foo@GOTPCREL\\\(" { target { ! ia32 } } } } */ -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain

Re: [PATCH] i386 testsuite: cope with --enable-default-pie

2022-07-26 Thread Alexandre Oliva via Gcc-patches
On Jul 11, 2022, Mike Stump wrote: > On Jul 11, 2022, at 6:47 PM, Alexandre Oliva wrote: >> >> Running the testsuite on a toolchain build with --enable-default-pie >> had some unexpected fails. >> Regstrapped on x86_64-linux-gnu, and also tested on i686-linux-gnu, w

Re: [PATCH] [PR83782] i386 PIE: avoid @GOTOFF for ifuncs and their aliases

2022-07-28 Thread Alexandre Oliva via Gcc-patches
On Jul 27, 2022, "H.J. Lu" wrote: > On Tue, Jul 26, 2022 at 10:14 PM Alexandre Oliva wrote: >> The use of @GOTOFF for locally-bound but externally-visible symbols >> (e.g. protected visibility) also breaks pointer identity if the >> canonical address ends up pr

[PATCH v2 00/10] Introduce strub: machine-independent stack scrubbing

2022-07-28 Thread Alexandre Oliva via Gcc-patches
db create mode 100644 libgcc/strub.c -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me ab

[PATCH v2 01/10] Introduce strub: documentation, and new command-line options

2022-07-28 Thread Alexandre Oliva via Gcc-patches
face changes, function wrapping, +and insertion of builtin calls for stack scrubbing and watermarking. + @end table Additionally, the options @option{-optimized}, @option{-missed}, -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist

[PATCH v2 02/10] Introduce strub: torture tests for C and C++

2022-07-28 Thread Alexandre Oliva via Gcc-patches
); + return (char *) __builtin_stack_address (); +} + +static inline __attribute__ ((__always_inline__)) +int +look_for_string (char *e) +{ + char *p = (char *) __builtin_stack_address (); + + if (p == e) +__builtin_abort (); + + if (p > e) +{ + char *q = p; + p

[PATCH v2 03/10] Introduce strub: non-torture tests for C and C++

2022-07-28 Thread Alexandre Oliva via Gcc-patches
internal\[)\]" 1 "strubm" } } */ diff --git a/gcc/testsuite/c-c++-common/strub-strict2.c b/gcc/testsuite/c-c++-common/strub-strict2.c new file mode 100644 index 0..b4f2888321821 --- /dev/null +++ b/gcc/testsuite/c-c++-common/strub-strict2.c @@ -0,0 +1,25 @@ +/* { d

[PATCH v2 04/10] Introduce strub: tests for C++ and Ada

2022-07-28 Thread Alexandre Oliva via Gcc-patches
cc/testsuite/gnat.dg/strub_renm2.adb @@ -0,0 +1,32 @@ +-- { dg-do compile } +-- { dg-options "-fstrub=strict -fdump-ipa-strub" } + +procedure Strub_Renm2 is + V : Integer := 0; + pragma Machine_Attribute (V, "strub"); + + procedure P (X : Integer); + pragma Machine_Attri

[PATCH v2 05/10] Introduce strub: builtins and runtime

2022-07-28 Thread Alexandre Oliva via Gcc-patches
100644 --- a/libgcc/libgcc2.h +++ b/libgcc/libgcc2.h @@ -532,6 +532,10 @@ extern int __parityDI2 (UDWtype); extern void __enable_execute_stack (void *); +extern void __strub_enter (void **); +extern void __strub_update (void**); +extern void __strub_leave (void **); + #ifndef HIDE_EXPORTS #p

[PATCH v2 06/10] Introduce strub: attributes

2022-07-28 Thread Alexandre Oliva via Gcc-patches
VECTOR_TYPE_P (*node) + || TREE_CODE (*node) == COMPLEX_TYPE) +warning (OPT_Wattributes, +"attribute %qE does not apply to elements" +" of non-scalar type %qT", +name, *node); + else if (RECORD_OR_UNION_TYPE_P (*node)) +warning (OP

[PATCH v2 07/10] Introduce strub: infrastructure interfaces and adjustments

2022-07-28 Thread Alexandre Oliva via Gcc-patches
b context.\n"); + return 0; +} /* We enforce splitting after loop headers when profile info is not available. */ diff --git a/gcc/ipa-strub.h b/gcc/ipa-strub.h new file mode 100644 index 0..29869fadfa6c9 --- /dev/null +++ b/gcc/ipa-strub.h @@ -0,0 +1,45 @@ +/*

[PATCH v2 08/10] Introduce strub: strub modes

2022-07-28 Thread Alexandre Oliva via Gcc-patches
+1,3489 @@ +/* strub (stack scrubbing) support. + Copyright (C) 2021-2022 Free Software Foundation, Inc. + Contributed by Alexandre Oliva . + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published

[PATCH v2 09/10] Introduce strub: strubm (mode assignment) pass

2022-07-28 Thread Alexandre Oliva via Gcc-patches
e->callee->decl, callee_fntype, node->decl); + } + } + } +} + +namespace { + +/* Define a pass to compute strub modes. */ +const pass_data pass_data_ipa_strub_mode = { + SIMPLE_IPA_PASS, + "strubm", + OPTGROUP_NONE, + TV_NONE, + PROP_cfg, // p

[PATCH v2 10/10] Introduce strub: strub pass

2022-07-28 Thread Alexandre Oliva via Gcc-patches
This final fragment of ipa-strub.cc adds the strub pass, that implements the needed function interface changes and adds calls to the strub builtins. +/* Define a pass to introduce strub transformations. */ +const pass_data pass_data_ipa_strub = { + SIMPLE_IPA_PASS, + "strub", + OPTGROUP_NONE

Re: [PATCH v2 00/10] Introduce strub: machine-independent stack scrubbing

2022-07-28 Thread Alexandre Oliva via Gcc-patches
On Jul 29, 2022, Alexandre Oliva wrote: > This patch adds the strub attribute for function and variable types, > command-line options, passes and adjustments to implement it, > documentation, and tests. The entire patch, and the patchlets used for testing, are available from the GCC

Re: [PATCH] configure: respect --with-build-time-tools [PR43301]

2022-08-01 Thread Alexandre Oliva via Gcc-patches
!= "x" \ +|| test "x`grep '^# Invoke as, ld or nm from the build tree' \ + as`" = "x"; }; then WDYT? -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist

Re: [PATCH] configure: respect --with-build-time-tools [PR43301]

2022-08-02 Thread Alexandre Oliva via Gcc-patches
On Aug 2, 2022, Eric Gallager wrote: > On Tue, Aug 2, 2022 at 1:24 AM Alexandre Oliva wrote: >> -elif test -x as$build_exeext; then >> +elif test -x as$build_exeext \ >> + && { test "x$build_exeext" != "x" \ >> +|| t

Re: [PATCH] configure: respect --with-build-time-tools [PR43301]

2022-08-04 Thread Alexandre Oliva via Gcc-patches
d also with external as in place). Adjusting the analogous test patterns covering the other tools and generated scripts would surely be welcome as well ;-) Thanks! -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Too

Re: [PATCH] [PR83782] i386 PIE: avoid @GOTOFF for ifuncs and their aliases

2022-08-08 Thread Alexandre Oliva via Gcc-patches
->ifunc_resolver) + && cgraph_node::get (decl)->ifunc_resolver + /* Aliases to the ifunc decl will also have the ifunc_resolver +bit set, so check that this is the ifunc declaration. */ + && lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl))) { #if define

Re: [PATCH v2 02/10] Introduce strub: torture tests for C and C++

2022-08-09 Thread Alexandre Oliva via Gcc-patches
spurious fails. Tolerate one such overall + spurious fail by retrying. */ + int i = 1; + while (look_for_string (internal ())) +if (!i--) __builtin_abort (); __builtin_exit (0); } -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free So

<    11   12   13   14   15   16   17   18   19   20   >