- Timestamp:
- Apr 14, 2016 9:38:28 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
-
include/iprt/uint32.h (modified) (1 diff)
-
include/iprt/uint64.h (modified) (2 diffs)
-
src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk (modified) (3 diffs)
-
src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-UInt32Div.c (added)
-
src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-UInt64Div.c (added)
-
src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U4D.asm (modified) (3 diffs)
-
src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8DQ.asm (modified) (2 diffs)
-
src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8DR.asm (modified) (2 diffs)
-
src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-U8D.asm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/uint32.h
r60484 r60485 929 929 DECLINLINE(bool) RTUInt32BitAreAllSet(PRTUINT32U pValue) 930 930 { 931 return pValue->s.Hi == UINT 32_MAX932 && pValue->s.Lo == UINT 32_MAX;931 return pValue->s.Hi == UINT16_MAX 932 && pValue->s.Lo == UINT16_MAX; 933 933 } 934 934 -
trunk/include/iprt/uint64.h
r60484 r60485 799 799 { 800 800 /* (left shift) */ 801 cBits &= 31 801 cBits &= 31; 802 802 if (cBits >= 32) 803 803 { … … 816 816 /* (right shift) */ 817 817 cBits = -cBits; 818 cBits &= 31 818 cBits &= 31; 819 819 if (cBits >= 32) 820 820 { -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk
r60439 r60485 165 165 bs3-cmn-PerCpuData.c \ 166 166 bs3-cmn-ConvertRMStackToP16UsingCxReturnToAx.asm \ 167 bs3-cmn-UInt64Div.c \ 168 bs3-cmn-UInt32Div.c \ 167 169 bs3-wc16-U8DR.asm \ 168 170 bs3-wc16-U8DQ.asm \ … … 175 177 bs3-wc16-I4D.asm \ 176 178 bs3-c16-Trap16Generic.asm 179 bs3kit-common-16_bs3-cmn-UInt64Div.c_CFLAGS = -oh -d0 # -d1+ vs -d0 saves 0x6a3-0x577 = 0x12C (300)! 177 180 178 181 # The 32-bit BS3Kit library. … … 183 186 bs3kit-common-32_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE 184 187 bs3kit-common-32_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) \ 188 bs3-cmn-UInt64Div.c \ 185 189 bs3-wc32-U8D.asm \ 186 190 bs3-wc32-I8D.asm \ -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U4D.asm
r58809 r60485 28 28 29 29 30 30 31 ;; 31 32 ; 32-bit unsigned integer division. … … 39 40 global $_?U4D 40 41 $_?U4D: 42 %if TMPL_BITS >= 32 41 43 ; Move dividend into EDX:EAX 42 44 shl eax, 10h … … 59 61 mov edx, eax 60 62 shr edx, 10h 63 %else 64 push ds 65 push es 61 66 67 ; 68 ; Convert to a C __cdecl call - too lazy to do this in assembly. 69 ; 70 71 ; Set up a frame of sorts, allocating 8 bytes for the result buffer. 72 push bp 73 sub sp, 08h 74 mov bp, sp 75 76 ; Pointer to the return buffer. 77 push ss 78 push bp 79 add bp, 08h ; Correct bp. 80 81 ; The divisor. 82 push cx 83 push bx 84 85 ; The dividend. 86 push dx 87 push ax 88 89 BS3_EXTERN_CMN Bs3UInt32Div 90 call Bs3UInt32Div 91 92 ; Load the reminder. 93 mov cx, [bp - 08h + 6] 94 mov bx, [bp - 08h + 4] 95 ; Load the quotient. 96 mov dx, [bp - 08h + 2] 97 mov ax, [bp - 08h] 98 99 mov sp, bp 100 pop bp 101 pop es 102 pop ds 103 104 %endif 62 105 ret 63 106 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8DQ.asm
r58809 r60485 77 77 78 78 ; The divisor. 79 push dword [es:si + 4] 80 push dword [es:si] 79 push word [es:si + 6] 80 push word [es:si + 4] 81 push word [es:si + 2] 82 push word [es:si] 81 83 82 84 ; The dividend. … … 89 91 90 92 ; Load the quotient. 91 mov ax, [bp - 10h + 8 +6]92 mov bx, [bp - 10h + 8 +4]93 mov cx, [bp - 10h + 8 +2]94 mov dx, [bp - 10h + 8]93 mov ax, [bp - 10h + 6] 94 mov bx, [bp - 10h + 4] 95 mov cx, [bp - 10h + 2] 96 mov dx, [bp - 10h] 95 97 96 leave 98 mov sp, bp 99 pop bp 97 100 pop es 98 101 pop ds -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8DR.asm
r58809 r60485 77 77 78 78 ; The divisor. 79 push dword [es:si + 4] 80 push dword [es:si] 79 push word [es:si + 6] 80 push word [es:si + 4] 81 push word [es:si + 2] 82 push word [es:si] 81 83 82 84 ; The dividend. … … 94 96 mov dx, [bp - 10h + 8] 95 97 96 leave 98 mov sp, bp 99 pop bp 97 100 pop es 98 101 pop ds -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc32-U8D.asm
r58809 r60485 51 51 push esp 52 52 53 ; The divi dend.53 ; The divisor. 54 54 push ecx 55 55 push ebx
Note:
See TracChangeset
for help on using the changeset viewer.

