1 #include <linux/linkage.h>
2 #include <linux/errno.h>
3 #include <asm/dwarf2.h>
9 * int {rdmsr,wrmsr}_safe_regs(u32 gprs[8]);
11 * reg layout: u32 gprs[eax, ecx, edx, ebx, esp, ebp, esi, edi]
14 .macro op_safe_regs op
15 ENTRY(\op\()_safe_regs)
19 movq %rdi, %r10 /* Save pointer */
20 xorl %r11d, %r11d /* Return value */
31 movl %r11d, %eax /* Return value */
48 ENDPROC(\op\()_safe_regs)
53 .macro op_safe_regs op
54 ENTRY(\op\()_safe_regs)
60 pushl_cfi $0 /* Return value */
75 CFI_ADJUST_CFA_OFFSET -4
95 ENDPROC(\op\()_safe_regs)