Changeset 89149 in vbox
- Timestamp:
- May 19, 2021 12:52:59 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 144490
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/mangling.h
r88813 r89149 283 283 # define ASMMemZeroPage RT_MANGLER(ASMMemZeroPage) 284 284 # define ASMMemZeroPage_EndProc RT_MANGLER(ASMMemZeroPage_EndProc) 285 # define ASMMultU64ByU32DivByU32 RT_MANGLER(ASMMultU64ByU32DivByU32) 286 # define ASMMultU64ByU32DivByU32_EndProc RT_MANGLER(ASMMultU64ByU32DivByU32_EndProc) 285 287 # define ASMNopPause RT_MANGLER(ASMNopPause) 286 288 # define ASMNopPause_EndProc RT_MANGLER(ASMNopPause_EndProc) -
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 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk
r89146 r89149 238 238 ../../../Runtime/common/asm/ASMSetFlags.asm \ 239 239 ../../../Runtime/common/asm/ASMGetFlags.asm \ 240 ../../../Runtime/common/asm/ASMMultU64ByU32DivByU32.asm \ 240 241 241 242 # The 16-bit BS3Kit library.
Note:
See TracChangeset
for help on using the changeset viewer.