]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
x86: move quoting of __ASM_{STAC,CLAC}
authorJan Beulich <jbeulich@suse.com>
Wed, 29 Aug 2018 14:31:32 +0000 (16:31 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 29 Aug 2018 14:31:32 +0000 (16:31 +0200)
Both consumers want them quoted, so quote them right away instead of
using __stringify() upon use. In the spirit of other recent additions
also make the assembly forms assembler macros, allowing the helper
#define-s to be #undef-ed subsequently.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/include/asm-x86/asm_defns.h

index e0096834e6dbb60c26cb6ed9d108b3c03edb0181..89a0fb41a2bebcf18eff0666a636bee7358985ab 100644 (file)
@@ -189,26 +189,33 @@ void ret_from_intr(void);
 #endif
 
 /* "Raw" instruction opcodes */
-#define __ASM_CLAC      .byte 0x0f,0x01,0xca
-#define __ASM_STAC      .byte 0x0f,0x01,0xcb
+#define __ASM_CLAC      ".byte 0x0f,0x01,0xca"
+#define __ASM_STAC      ".byte 0x0f,0x01,0xcb"
 
 #ifdef __ASSEMBLY__
-#define ASM_STAC ALTERNATIVE "", __stringify(__ASM_STAC), X86_FEATURE_XEN_SMAP
-#define ASM_CLAC ALTERNATIVE "", __stringify(__ASM_CLAC), X86_FEATURE_XEN_SMAP
+.macro ASM_STAC
+    ALTERNATIVE "", __ASM_STAC, X86_FEATURE_XEN_SMAP
+.endm
+.macro ASM_CLAC
+    ALTERNATIVE "", __ASM_CLAC, X86_FEATURE_XEN_SMAP
+.endm
 #else
 static always_inline void clac(void)
 {
     /* Note: a barrier is implicit in alternative() */
-    alternative("", __stringify(__ASM_CLAC), X86_FEATURE_XEN_SMAP);
+    alternative("", __ASM_CLAC, X86_FEATURE_XEN_SMAP);
 }
 
 static always_inline void stac(void)
 {
     /* Note: a barrier is implicit in alternative() */
-    alternative("", __stringify(__ASM_STAC), X86_FEATURE_XEN_SMAP);
+    alternative("", __ASM_STAC, X86_FEATURE_XEN_SMAP);
 }
 #endif
 
+#undef __ASM_STAC
+#undef __ASM_CLAC
+
 #ifdef __ASSEMBLY__
 .macro SAVE_ALL op, compat=0
 .ifeqs "\op", "CLAC"