On Sat, Mar 17, 2012 at 10:50 PM, H.J. Lu <hjl.to...@gmail.com> wrote:

>>>>> Since we must use reg64 in %fs:(%reg) memory operand like
>>>>>
>>>>> movq x@gottpoff(%rip),%reg64;
>>>>> mov %fs:(%reg64),%reg
>>>>>
>>>>> this patch optimizes x32 TLS IE load and store by wrapping
>>>>> %reg64 inside of UNSPEC when Pmode == SImode.  OK for
>>>>> trunk?
>>>>
>>>> Can you implement this with define_insn_and_split, like i.e.
>>>> *tls_dynamic_gnu2_combine_32 ?
>>>>
>>>
>>> I will give it a try again.  Last time when I tried it, GCC didn't
>>> like memory operand in DImode when Pmode == SImode.
>>
>> You should remove mode for tls_symbolic_operand predicate.
>>
>
> I am testing this patch.  OK for trunk if it passes all tests?

No, force_reg will generate a pseudo, so this conversion is valid only
for !can_create_pseudo ().

At least for *tls_initial_exec_x32_store, you will need a temporary to
split the pattern after reload.

Uros.

Reply via email to