This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Avoiding paradoxical subregs


On 18/01/14 20:11, pinskia@gmail.com wrote:


On Jan 18, 2014, at 12:04 PM, "Paulo J. Matos" <paulo@matos-sorge.com> wrote:

On 17/01/14 17:36, Eric Botcazou wrote:
I am not implying that this is a GCC bug, unless you think
WORD_REISTER_OPERATIONS should have avoided the creation of such
paradoxical subreg.

No, that's precisely the contrary, WORD_REGISTER_OPERATIONS tends to create
paradoxical subregs.

I might then, be misunderstanding the reason to enable WORD_REGISTER_OPERATIONS. From the documentation:

"Macro: WORD_REGISTER_OPERATIONS

    Define this macro if operations between registers with integral mode smaller than a word are always performed on the entire register. Most RISC machines have this property and most CISC machines do not. "

The machine I am targeting is a 64bit vector machine. When you perform a 16 bit operation, the whole register is changed because the operation actually changes every 16bit group of the register. So it seems I should enable WORD_REGISTER_OPERATIONS.

As an aside, is there any machine in gcc mainline like this?

Yes spu.  It is a 128bit vector machine, operations happen in that size and compares are done in the same size.


Thanks for the reference.

I think you misunderstood WORD_REGISTER_OPERATIONS, it means the operation happens on the whole register in that a 16bit add is the same as a 32bit one.


Oh... my... you're right. If I now read the doc for WORD_REGISTER_OPERATIONS what you're saying makes sense. I shouldn't have it enabled.

Thanks for your help.

Paulo Matos

Thanks,
Andrew Pinski



--
PMatos


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]