Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What is the correct x86_64 %rsi mode?

51 views
Skip to first unread message

Dave Pitts

unread,
Aug 15, 2012, 11:19:32 AM8/15/12
to
Hello:

I've got an inline assembler stanza that is attempting to use the "crc32q"
instruction. The stanza is:

__asm__ __volatile__( "crc32q\t%2, %0"
:"=S"(crc) :"0"(crc), "c"(*wp));

The mode "=S" generates %esi for argument 0. What do I have to do to get it to
generate %rsi?

Thanks...

--
Dave Pitts PULLMAN: Travel and sleep in safety and comfort.
dpi...@cozx.com

Andrew Haley

unread,
Aug 15, 2012, 2:00:04 PM8/15/12
to
Dave Pitts <dpi...@cozx.com> wrote:
> Hello:
>
> I've got an inline assembler stanza that is attempting to use the "crc32q"
> instruction. The stanza is:
>
> __asm__ __volatile__( "crc32q\t%2, %0"
> :"=S"(crc) :"0"(crc), "c"(*wp));
>
> The mode "=S" generates %esi for argument 0. What do I have to do to get it to
> generate %rsi?

I'd just use "%%rsi" as the operand in the asm string.

Andrew.
0 new messages