This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/51863] invlpg with -masm=intel generates memory operand size error in assembly stage
- From: "th020394 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 15 Jan 2012 08:49:26 +0000
- Subject: [Bug inline-asm/51863] invlpg with -masm=intel generates memory operand size error in assembly stage
- Auto-submitted: auto-generated
- References: <bug-51863-4@http.gcc.gnu.org/bugzilla/>
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)?