On Wed, Apr 11, 2012 at 6:06 PM, Andi Kleen <a...@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.


Reply via email to