@@ -35,20 +35,22 @@ struct saved_msrs {
3535};
3636
3737/*
38- * both i386 and x86_64 returns 64-bit value in edx:eax, but gcc's "A"
39- * constraint has different meanings. For i386, "A" means exactly
40- * edx:eax, while for x86_64 it doesn't mean rdx:rax or edx:eax. Instead,
41- * it means rax *or* rdx.
38+ * Both i386 and x86_64 returns 64-bit values in edx:eax for certain
39+ * instructions, but GCC's "A" constraint has different meanings.
40+ * For i386, "A" means exactly edx:eax, while for x86_64 it
41+ * means rax *or* rdx.
42+ *
43+ * These helpers wrapping these semantic differences save one instruction
44+ * clearing the high half of 'low':
4245 */
4346#ifdef CONFIG_X86_64
44- /* Using 64-bit values saves one instruction clearing the high half of low */
45- #define DECLARE_ARGS (val , low , high ) unsigned long low, high
46- #define EAX_EDX_VAL (val , low , high ) ((low) | (high) << 32)
47- #define EAX_EDX_RET (val , low , high ) "=a" (low), "=d" (high)
47+ # define DECLARE_ARGS (val , low , high ) unsigned long low, high
48+ # define EAX_EDX_VAL (val , low , high ) ((low) | (high) << 32)
49+ # define EAX_EDX_RET (val , low , high ) "=a" (low), "=d" (high)
4850#else
49- #define DECLARE_ARGS (val , low , high ) u64 val
50- #define EAX_EDX_VAL (val , low , high ) (val)
51- #define EAX_EDX_RET (val , low , high ) "=A" (val)
51+ # define DECLARE_ARGS (val , low , high ) u64 val
52+ # define EAX_EDX_VAL (val , low , high ) (val)
53+ # define EAX_EDX_RET (val , low , high ) "=A" (val)
5254#endif
5355
5456/*
0 commit comments