Changeset 89149 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- May 19, 2021 12:52:59 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 144490
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/asm/ASMMultU64ByU32DivByU32.asm
r82968 r89149 40 40 ; 41 41 BEGINPROC_EXPORTED ASMMultU64ByU32DivByU32 42 %if def RT_ARCH_AMD6442 %if ARCH_BITS == 64 43 43 44 44 %ifdef ASM_CALL64_MSC … … 54 54 div r8 55 55 56 %else ; X8656 %else ; 16 or 32 bit 57 57 ; 58 58 ; This implementation is converted from the GCC inline … … 60 60 ; performance wise. 61 61 ; 62 %if ARCH_BITS == 16 63 push bp 64 mov bp, sp 65 push eax ; push all return registers to preserve high value (paranoia) 66 push ebx 67 push ecx 68 push edx 69 %endif 62 70 push esi 63 71 push edi 64 72 65 %define u64A_Lo [esp + 04h + 08h] 66 %define u64A_Hi [esp + 08h + 08h] 67 %define u32B [esp + 0ch + 08h] 68 %define u32C [esp + 10h + 08h] 73 %if ARCH_BITS == 16 74 %define u64A_Lo [bp + 4 + 04h] 75 %define u64A_Hi [bp + 4 + 08h] 76 %define u32B [bp + 4 + 0ch] 77 %define u32C [bp + 4 + 10h] 78 %else 79 %define u64A_Lo [esp + 04h + 08h] 80 %define u64A_Hi [esp + 08h + 08h] 81 %define u32B [esp + 0ch + 08h] 82 %define u32C [esp + 10h + 08h] 83 %endif 69 84 70 85 ; Load parameters into registers. … … 97 112 pop edi 98 113 pop esi 114 %if ARCH_BITS == 16 115 ; DX:CX:BX:AX, where DX holds bits 15:0, CX bits 31:16, BX bits 47:32, and AX bits 63:48. 116 mov ax, [bp - 4*4] ; dx = bits 15:0 117 shr eax, 16 118 mov ax, [bp - 3*4] ; cx = bits 31:16 119 mov dx, [bp - 2*4] ; bx = bits 47:32 120 shr edx, 16 121 mov dx, [bp - 1*4] ; ax = bits 63:48 122 pop edx 123 pop ecx 124 pop ebx 125 pop eax 126 leave 127 %endif 99 128 %endif 100 129 ret
Note:
See TracChangeset
for help on using the changeset viewer.