[Bug inline-asm/51863] invlpg with -masm=intel generates memory operand size error in assembly stage
th020394 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Jan 15 11:17:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51863
Tyler Hardin <th020394 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
--- Comment #3 from Tyler Hardin <th020394 at gmail dot com> 2012-01-15 08:49:26 UTC ---
(In reply to comment #2)
> I think you should use:
> asm("invlpg %0" :: "r"(pointer_to_page) : "memory");
> Instead.
invlpg only accepts memory operands. But, if I adapt your idea just a little,
it works:
asm("invlpg [%0]" :: "r"(pointer_to_page) : "memory");
It would be nice if it would work without having to trick the compiler (telling
it I'm using a register but actually referencing memory), but it works now,
that's all I care about. Thanks.
> What GCC is doing is correct in that it outputs the byte/word/dword
> correctly for -masm=intel.
But why for -masm=intel and not for -masm=att (the default)?
More information about the Gcc-bugs
mailing list