This is the mail archive of the gcc-bugs@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]

[Bug inline-asm/51863] invlpg with -masm=intel generates memory operand size error in assembly stage


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)?


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