This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386]: Fix PR 41900, call *%esp shouldn't be generated because of CPU errata
On 11/03/2009 07:47 PM, Uros Bizjak wrote:
works OK on Fedora 11 and CentOS 5.3.
The extra volatile doesn't help at all, it still fails here (Fedora
11,
x86_64 kernel, SELinux enforcing).
Hm, indeed. Is there a solution by somehow enabling execution (like
trampolines)?
You can assemble with -Wa,--execstack or link with -Wl,-z,execstack.
But it helps only in some cases, some versions of the policy won't allow
unconfined processes to have exec stack, you'd need to chcon -t
java_exec_t
or similar. This is highly Linux specific though.
No, this test failed due to missing "volatile" (fixed now). AFAICS, it
I think I'll just make the test compile-only and scan for call without
*%esp argument, as you suggested in your previous mails.
Like this:
2009-11-03 Uros Bizjak <ubizjak@gmail.com>
* gcc.target/i386/pr41900.c: Make test compile only. Scan assembler
dump to not include "call *%esp".
Tested on F11, -m32.
Uros.
Index: gcc.target/i386/pr41900.c
===================================================================
--- gcc.target/i386/pr41900.c (revision 153863)
+++ gcc.target/i386/pr41900.c (working copy)
@@ -1,4 +1,4 @@
-/* { dg-do run } */
+/* { dg-do compile } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O2 -fomit-frame-pointer
-mpreferred-stack-boundary=2" } */
@@ -9,3 +9,5 @@
((void (*)(void)) &code) ();
return 0;
}
+
+/* { dg-final { scan-assembler-not "call\[ \\t\]+\\*%esp" } } */
- References:
- [PATCH, i386]: Fix PR 41900, call *%esp shouldn't be generated because of CPU errata
- Re: [PATCH, i386]: Fix PR 41900, call *%esp shouldn't be generated because of CPU errata
- Re: [PATCH, i386]: Fix PR 41900, call *%esp shouldn't be generated because of CPU errata
- Re: [PATCH, i386]: Fix PR 41900, call *%esp shouldn't be generated because of CPU errata
- Re: [PATCH, i386]: Fix PR 41900, call *%esp shouldn't be generated because of CPU errata
- Re: [PATCH, i386]: Fix PR 41900, call *%esp shouldn't be generated because of CPU errata
- Re: [PATCH, i386]: Fix PR 41900, call *%esp shouldn't be generated because of CPU errata