[PATCH 4/8] selftests: x86: fsgsbase_restore: fix asm directive from =rm to =r

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The clang gives unknown use of instruction mnemonic error. Fix it by
specifying =r only. The operand would be placed in register only.

fsgsbase_restore.c:45:16: error: unknown use of instruction mnemonic without a size suffix
   45 |         asm volatile ("mov %" SEG ":(0), %0" : "=rm" (ret));
      |                       ^
<inline asm>:1:2: note: instantiated into assembly here
    1 |         mov %fs:(0), 20(%esp)
      |         ^
fsgsbase_restore.c:45:16: error: unknown use of instruction mnemonic without a size suffix
   45 |         asm volatile ("mov %" SEG ":(0), %0" : "=rm" (ret));
      |                       ^
<inline asm>:1:2: note: instantiated into assembly here
    1 |         mov %fs:(0), 20(%esp)
      |         ^

Signed-off-by: Muhammad Usama Anjum <usama.anjum@xxxxxxxxxxxxx>
---
 tools/testing/selftests/x86/fsgsbase_restore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/x86/fsgsbase_restore.c b/tools/testing/selftests/x86/fsgsbase_restore.c
index 6fffadc515791..12871b482185b 100644
--- a/tools/testing/selftests/x86/fsgsbase_restore.c
+++ b/tools/testing/selftests/x86/fsgsbase_restore.c
@@ -42,7 +42,7 @@
 static unsigned int dereference_seg_base(void)
 {
 	int ret;
-	asm volatile ("mov %" SEG ":(0), %0" : "=rm" (ret));
+	asm volatile ("mov %" SEG ":(0), %0" : "=r" (ret));
 	return ret;
 }
 
-- 
2.39.2





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux