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
{ 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
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!
*/
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!
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
+++ 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
-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
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!
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
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
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
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
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!
)
# 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!
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
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
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
/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
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
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
..
-** 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
+,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
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!
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
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!
)
+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!
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
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!
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
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
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
(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
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/
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
]*} 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
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
{ { 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
--
{ 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
/* { 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.
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
-/* { 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:/
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
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
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
__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
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
-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
#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!
-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
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 "
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
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;
{ 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.
;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
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
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
-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
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
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
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
"-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
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
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
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 '
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
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
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
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
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'
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
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>
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
}
+
+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
/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
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
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
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.
(*)
* 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
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
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
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
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
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
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
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
);
+ 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
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
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
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
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
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 @@
+/*
+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
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
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
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
!= "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
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
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
->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
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
1501 - 1600 of 1959 matches
Mail list logo