Skip to contentSkip to conversation

x86/syscall: Add suffix to "sysret" to silence an assembler warning

PATCH Applied Thomas Huth 2 participants 2 messages Mar 29, 2023 – Apr 5, 2023 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/syscall: Add suffix to "sysret" to silence an assembler warning

The assembler in Fedora 37 complains:

x86/syscall.c: Assembler messages:
x86/syscall.c:93: Warning: no instruction mnemonic suffix given and no
register operands; using default for `sysret'

Add the "l" suffix here to make it silent.

---
 x86/syscall.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
x86/syscall.c +1 -1
index b0df0720..402d3973 100644
@@ -90,7 +90,7 @@ static void test_syscall_tf(void)
     asm volatile("  push %%rbp\n"
                  "  mov %%rsp, (%%rax)\n"  // stack pointer for exception handler
                  "  pushf; pop %%rax\n"   // expected by syscall32_target
-                 "  sysret\n"
+                 "  sysretl\n"
                  "back_to_test:\n"
                  "  pop %%rbp"
                  : [sysret_target] "+c"(rcx), [sp0] "+a" (rax) :
Signature · 1 line
2.31.1
reviewer Applied
#1 lore raw
Quoted 9 lines · Thomas Huth

The assembler in Fedora 37 complains:

x86/syscall.c: Assembler messages:
x86/syscall.c:93: Warning: no instruction mnemonic suffix given and no
register operands; using default for `sysret'

Add the "l" suffix here to make it silent.

[...]

Applied to kvm-x86 next, thanks!

[1/1] x86/syscall: Add suffix to "sysret" to silence an assembler warning

      https://github.com/kvm-x86/kvm-unit-tests/commit/3c128d26cd4b

--
https://github.com/kvm-x86/kvm-unit-tests/tree/next