Message ID | CA+4CFy5NmXE656_hCOmC3_J2Pmm_KiamoLX7Pep0Z7yPNuObqQ@mail.gmail.com |
---|---|
State | New |
Headers | show |
>> Does my patch fix the original problem? > > Yes, it works. I am doing bootstrap and regression test for your patch. Thanks! > The patch passes bootstrap and regression test on x86_64-linux-gnu. Thanks, Wei.
Index: testsuite/gcc.target/i386/pr58066.c =================================================================== --- testsuite/gcc.target/i386/pr58066.c (revision 0) +++ testsuite/gcc.target/i386/pr58066.c (revision 0) @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-options "-fPIC -O2" } */ + +/* Check whether the stack frame starting addresses of tls expanded calls + in foo and goo are 16bytes aligned. */ +static __thread char ccc1; +void* foo() +{ + return &ccc1; +} + +__thread char ccc2; +void* goo() +{ + return &ccc2; +} + +/* { dg-final { scan-assembler-times ".cfi_def_cfa_offset 16" 2 } } */