This is the mail archive of the gcc-patches@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: [i386, patch, RFC] HLE support in GCC


On Wed, Apr 11, 2012 at 6:06 PM, Andi Kleen <andi@firstfloor.org> wrote:

> + ?static char buf[128], hle[16];
>
> The hle buffer does not need to be static.
> BTW I'm surprised there is no better way to do this in machine descriptions
> than to use static buffers.

Oh, there is. Since we are looking at the operands, we can process
this operand with operand modifier in the asm template.

Basically, "lock{%;} %K4 cmpxchg{<imodesuffix>}\t{%3, %1|%1, %3}",
where K modifier would print correct string from x86_print_operand,
depending on the INTVAL value of operand4.

Uros.


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