On Mon, Mar 19, 2012 at 5:55 PM, H.J. Lu <hjl.to...@gmail.com> wrote:

>>> For x32,  thread pointer is an unsigned 32bit value.
>>>
>>> movl %fs:0, %eax
>>>
>>> is the correct instruction to load thread pointer into EAX and RAX.
>>
>> So, where is ZERO_EXTEND RTX then?
>>
>
> Thread pointer (TP) is an opaque value to GCC.  GCC needs to load
> TP into a SImode or DImode register.  ZERO_EXTEND isn't needed
> when there is a single instruction to load TP into a DImode register.

I don't agree with this explanation. The mode can't be SImode and
DImode. TP is either SImode or ZERO_EXTENDed to DImode, this is the
reason we went for all that TARGET_X32 stuff in TP load RTX.

Please test my proposed patch. If it works OK, I will commit it to SVN.

Thanks,
Uros.

Reply via email to