This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR58066] preferred_stack_boundary update for tls expanded call
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Wei Mi <wmi at google dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, David Li <davidxl at google dot com>, Uros Bizjak <ubizjak at gmail dot com>
- Date: Wed, 12 Mar 2014 15:07:24 -0700
- Subject: Re: [PATCH, PR58066] preferred_stack_boundary update for tls expanded call
- Authentication-results: sourceware.org; auth=none
- References: <CA+4CFy5BdB2=mnd=o+8GmQ5EBtJfGUFB-0AKFou2xMHvekCAJw at mail dot gmail dot com> <CAMe9rOrrF5zTYh6=KoKcmNDZYi_oirh6SNC+_JdCY4U6NpBMTQ at mail dot gmail dot com> <CA+4CFy7SHAHmEmreq+GsTzA9nYnWiSG_Fut_fs16BnFH+LOQow at mail dot gmail dot com> <CAMe9rOpG8N8YPA=dHMDq7fL6Kyn1PU1-RrD6bqBjHFUOfz7n9Q at mail dot gmail dot com> <CA+4CFy79py1XrgDygpRg9j4ZLz9waKMKkoAvvA_QnN6M7usCaA at mail dot gmail dot com> <CAMe9rOqdN=ebqYnN7skYzJF5sEK0Q_2rAX1SQ=hWouZtUaqJGw at mail dot gmail dot com> <CA+4CFy7wt4EKUwQAQ8zqP=gbVwAZmUu57oKNxjvyNRfkYoPdPw at mail dot gmail dot com> <CAMe9rOrOXkKB99AzmMsmHEPQENG=tUhqBoNEW+s_6E2MAL+c-A at mail dot gmail dot com> <CA+4CFy6XnBNbgWgoQmR2Mso9gJCKQSo1ek1f-NyUT7FpEqP9DA at mail dot gmail dot com> <CA+4CFy4PrriWXnfdixdpJO-6XmQSwCPWV9a3-GsZ2Uy2U+bQVA at mail dot gmail dot com>
On Wed, Mar 12, 2014 at 2:58 PM, Wei Mi <wmi@google.com> wrote:
> This is the updated testcase.
Does my patch fix the original problem?
> Thanks,
> Wei.
>
> ===================================================================
> --- testsuite/gcc.dg/pr58066.c (revision 0)
> +++ testsuite/gcc.dg/pr58066.c (revision 0)
> @@ -0,0 +1,18 @@
> +/* { dg-do compile { target {{ i?86-*-* x86_64-*-* } && { ! ia32 } } } } */
Since it is a C testcase and we should test it under ia32, it
should be moved to gcc.target/i386 and remove target.
> +/* { 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 } } */
>
> On Wed, Mar 12, 2014 at 2:51 PM, Wei Mi <wmi@google.com> wrote:
>> Oh, I see. Thanks!
>>
>> Wei.
>>
>> On Wed, Mar 12, 2014 at 2:42 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> On Wed, Mar 12, 2014 at 2:36 PM, Wei Mi <wmi@google.com> wrote:
>>>> Hi H.J.,
>>>>
>>>> Could you show me why you postpone the setting
>>>> ix86_tls_descriptor_calls_expanded_in_cfun until reload_complete and
>>>> use ix86_tls_descriptor_calls_expanded_in_cfun instead of
>>>> ix86_current_function_calls_tls_descriptor? Isn't
>>>> ix86_current_function_calls_tls_descriptor useful to consider the case
>>>> that tls call is optimized away?
>>>>
>>>
>>> When a tls call is optimized away, it won't survive reload.
>>> If it does survive reload, it isn't optimized away. Also
>>> checking df_regs_ever_live_p (SP_REG) isn't reliable
>>> when called from ix86_compute_frame_layout.
>>>
>>> --
>>> H.J.
--
H.J.
- References:
- [PATCH, PR58066] preferred_stack_boundary update for tls expanded call
- Re: [PATCH, PR58066] preferred_stack_boundary update for tls expanded call
- Re: [PATCH, PR58066] preferred_stack_boundary update for tls expanded call
- Re: [PATCH, PR58066] preferred_stack_boundary update for tls expanded call
- Re: [PATCH, PR58066] preferred_stack_boundary update for tls expanded call
- Re: [PATCH, PR58066] preferred_stack_boundary update for tls expanded call
- Re: [PATCH, PR58066] preferred_stack_boundary update for tls expanded call
- Re: [PATCH, PR58066] preferred_stack_boundary update for tls expanded call
- Re: [PATCH, PR58066] preferred_stack_boundary update for tls expanded call
- Re: [PATCH, PR58066] preferred_stack_boundary update for tls expanded call