Changeset 87321 in vbox
- Timestamp:
- Jan 20, 2021 12:36:53 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 142294
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMR0A.asm
r87311 r87321 59 59 %endif 60 60 61 ;; @def MYPUSHAD61 ;; @def PUSH_CALLEE_PRESERVED_REGISTERS 62 62 ; Macro generating an equivalent to PUSHAD instruction. 63 63 64 ;; @def MYPOPAD64 ;; @def POP_CALLEE_PRESERVED_REGISTERS 65 65 ; Macro generating an equivalent to POPAD instruction. 66 66 67 ;; @def MYPUSHSEGS67 ;; @def PUSH_RELEVANT_SEGMENT_REGISTERS 68 68 ; Macro saving all segment registers on the stack. 69 69 ; @param 1 Full width register name. 70 70 ; @param 2 16-bit register name for \a 1. 71 71 72 ;; @def MYPOPSEGS72 ;; @def POP_RELEVANT_SEGMENT_REGISTERS 73 73 ; Macro restoring all segment registers on the stack. 74 74 ; @param 1 Full width register name. … … 76 76 77 77 %ifdef ASM_CALL64_GCC 78 %macro MYPUSHAD078 %macro PUSH_CALLEE_PRESERVED_REGISTERS 0 79 79 push r15 80 80 push r14 … … 83 83 push rbx 84 84 %endmacro 85 %macro MYPOPAD085 %macro POP_CALLEE_PRESERVED_REGISTERS 0 86 86 pop rbx 87 87 pop r12 … … 92 92 93 93 %else ; ASM_CALL64_MSC 94 %macro MYPUSHAD094 %macro PUSH_CALLEE_PRESERVED_REGISTERS 0 95 95 push r15 96 96 push r14 … … 101 101 push rdi 102 102 %endmacro 103 %macro MYPOPAD0103 %macro POP_CALLEE_PRESERVED_REGISTERS 0 104 104 pop rdi 105 105 pop rsi … … 113 113 114 114 %ifdef VBOX_SKIP_RESTORE_SEG 115 %macro MYPUSHSEGS 2115 %macro PUSH_RELEVANT_SEGMENT_REGISTERS 2 116 116 %endmacro 117 117 118 %macro MYPOPSEGS 2118 %macro POP_RELEVANT_SEGMENT_REGISTERS 2 119 119 %endmacro 120 120 %else ; !VBOX_SKIP_RESTORE_SEG 121 121 ; Trashes, rax, rdx & rcx. 122 %macro MYPUSHSEGS 2122 %macro PUSH_RELEVANT_SEGMENT_REGISTERS 2 123 123 %ifndef HM_64_BIT_USE_NULL_SEL 124 124 mov %2, es … … 150 150 151 151 ; trashes, rax, rdx & rcx 152 %macro MYPOPSEGS 2152 %macro POP_RELEVANT_SEGMENT_REGISTERS 2 153 153 ; Note: do not step through this code with a debugger! 154 154 %ifndef HM_64_BIT_USE_NULL_SEL … … 836 836 837 837 ; Restore segment registers. 838 MYPOPSEGS xAX, ax838 POP_RELEVANT_SEGMENT_REGISTERS xAX, ax 839 839 840 840 ; Restore the host XCR0 if necessary. … … 848 848 849 849 ; Restore general purpose registers. 850 MYPOPAD850 POP_CALLEE_PRESERVED_REGISTERS 851 851 %endmacro 852 852 … … 871 871 872 872 ; Save all general purpose host registers. 873 MYPUSHAD873 PUSH_CALLEE_PRESERVED_REGISTERS 874 874 875 875 ; First we have to save some final CPU context registers. … … 925 925 ; Note! Trashes rdx & rcx, so we moved it here (amd64 case). 926 926 ; 927 MYPUSHSEGS xAX, ax927 PUSH_RELEVANT_SEGMENT_REGISTERS xAX, ax 928 928 929 929 ; Save the pCtx pointer. … … 1078 1078 1079 1079 ; Save all general purpose host registers. 1080 MYPUSHAD1080 PUSH_CALLEE_PRESERVED_REGISTERS 1081 1081 1082 1082 ; Load pCtx into xSI. … … 1202 1202 1203 1203 ; Restore host general purpose registers. 1204 MYPOPAD1204 POP_CALLEE_PRESERVED_REGISTERS 1205 1205 1206 1206 mov eax, VINF_SUCCESS
Note:
See TracChangeset
for help on using the changeset viewer.