#ifdef __V3_32BIT__
+// Note that RAX is saved in the VMCB, so we don't touch it here
+
#define Save_SVM_Registers(location) \
pushl %eax; \
movl location, %eax; \
movl %ebx, 32(%eax); \
movl %edx, 40(%eax); \
movl %ecx, 48(%eax); \
- pushl %ebx; \
- movl 8(%esp), %ebx; \
- movl %ebx, 56(%eax); \
- popl %ebx; \
popl %eax;
#elif __V3_64BIT__
+// Note that RAX is saved in the VMCB, so we don't touch it here
+
#define Save_SVM_Registers(location) \
pushq %rax; \
movq location, %rax; \
movq %rbx, 32(%rax); \
movq %rdx, 40(%rax); \
movq %rcx, 48(%rax); \
- pushq %rbx; \
- movq 16(%rsp), %rbx; \
- movq %rbx, 56(%rax); \
- popq %rbx; \
\
movq %r8, 64(%rax); \
movq %r9, 72(%rax); \