This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/38925] gcc ignores use of %rbp via assembly, generates bad code
- From: "egallager at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 28 Jul 2017 14:14:49 +0000
- Subject: [Bug inline-asm/38925] gcc ignores use of %rbp via assembly, generates bad code
- Auto-submitted: auto-generated
- References: <bug-38925-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38925
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |egallager at gcc dot gnu.org
--- Comment #11 from Eric Gallager <egallager at gcc dot gnu.org> ---
When I compile the testcase on i386-apple-darwin9.8.0, I get:
$ /usr/local/bin/gcc -m64 -c 38925.c
38925.c:76:1: warning: always_inline function might not be inlinable
[-Wattributes]
VMRUN(uint64 vmcb)
^~~~~
38925.c: In function ‘test_function’:
38925.c:116:1: error: bp cannot be used in asm here
}
^
$
After adding an additional 'inline' to the testcase to silence the -Wattributes
warning, with any optimization level (-O1, -O2, -O3, -Os, -Og, -Ofast) I then
get:
$ /usr/local/bin/gcc -m64 -O2 -c 38925.c
38925.c:93:no such instruction: `vmrun'
$
So I can't confirm, but I'm assuming that's because I'm not using the right
kind of computer...