Changeset 16316 in vbox
- Timestamp:
- Jan 28, 2009 2:26:48 PM (16 years ago)
- Location:
- trunk/src/VBox/Runtime/common/math
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/math/ceill.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r8256 r16316 34 34 BEGINCODE 35 35 36 %ifdef RT_ARCH_AMD6437 %define _SP rsp38 %define _BP rbp39 %define _S 840 %else41 %define _SP esp42 %define _BP ebp43 %define _S 444 %endif45 46 36 ;; 47 37 ; Compute the smallest integral value not less than lrd. … … 49 39 ; @param lrd [rbp + 8] 50 40 BEGINPROC RT_NOCRT(ceill) 51 push _BP52 mov _BP, _SP53 sub _SP, 10h41 push xBP 42 mov xBP, xSP 43 sub xSP, 10h 54 44 55 fld tword [ _BP + _S*2]45 fld tword [xBP + xS*2] 56 46 57 47 ; Make it round up by modifying the fpu control word. 58 fstcw [ _BP - 10h]59 mov eax, [ _BP - 10h]48 fstcw [xBP - 10h] 49 mov eax, [xBP - 10h] 60 50 or eax, 00800h 61 51 and eax, 0fbffh 62 mov [ _BP - 08h], eax63 fldcw [ _BP - 08h]52 mov [xBP - 08h], eax 53 fldcw [xBP - 08h] 64 54 65 55 ; Round ST(0) to integer. … … 67 57 68 58 ; Restore the fpu control word. 69 fldcw [ _BP - 10h]59 fldcw [xBP - 10h] 70 60 71 61 leave -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/common/math/cosl.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r8256 r16316 33 33 BEGINCODE 34 34 35 %ifdef RT_ARCH_AMD6436 %define _SP rsp37 %define _BP rbp38 %define _S 839 %else40 %define _SP esp41 %define _BP ebp42 %define _S 443 %endif44 45 35 ;; 46 36 ; compute the cosine of ldr, measured in radians. 47 37 ; @returns st(0) 48 ; @param lrd [rbp + _S*2]38 ; @param lrd [rbp + xS*2] 49 39 BEGINPROC RT_NOCRT(cosl) 50 push _BP51 mov _BP, _SP52 sub _SP, 10h40 push xBP 41 mov xBP, xSP 42 sub xSP, 10h 53 43 54 fld tword [ _BP + _S*2]44 fld tword [xBP + xS*2] 55 45 fcos 56 46 fnstsw ax -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/common/math/fabs.asm
-
Property svn:keywords
set to
Author Date Id Revision
r8256 r16316 1 ; $Id :$1 ; $Id$ 2 2 ;; @file 3 3 ; IPRT - No-CRT fabs - AMD64 & X86. … … 33 33 BEGINCODE 34 34 35 %ifdef RT_ARCH_AMD6436 %define _SP rsp37 %define _BP rbp38 %define _S 839 %else40 %define _SP esp41 %define _BP ebp42 %define _S 443 %endif44 45 35 ;; 46 36 ; Compute the absolute value of rd (|rd|). … … 48 38 ; @param rd 32-bit: [ebp + 8] 64-bit: xmm0 49 39 BEGINPROC RT_NOCRT(fabs) 50 push _BP51 mov _BP, _SP40 push xBP 41 mov xBP, xSP 52 42 53 43 %ifdef RT_ARCH_AMD64 54 sub _SP, 10h44 sub xSP, 10h 55 45 56 movsd [ _SP], xmm057 fld qword [ _SP]46 movsd [xSP], xmm0 47 fld qword [xSP] 58 48 59 49 fabs 60 50 61 fstp qword [ _SP]62 movsd xmm0, [ _SP]51 fstp qword [xSP] 52 movsd xmm0, [xSP] 63 53 64 54 %else 65 fld qword [ _BP + _S*2]55 fld qword [xBP + xS*2] 66 56 fabs 67 57 %endif -
Property svn:keywords
set to
-
trunk/src/VBox/Runtime/common/math/fabsf.asm
-
Property svn:keywords
set to
Author Date Id Revision
r8256 r16316 1 ; $Id :$1 ; $Id$ 2 2 ;; @file 3 3 ; IPRT - No-CRT fabsf - AMD64 & X86. … … 33 33 BEGINCODE 34 34 35 %ifdef RT_ARCH_AMD6436 %define _SP rsp37 %define _BP rbp38 %define _S 839 %else40 %define _SP esp41 %define _BP ebp42 %define _S 443 %endif44 45 35 ;; 46 36 ; Compute the absolute value of rf (|rf|). … … 48 38 ; @param rf 32-bit: [ebp + 8] 64-bit: xmm0 49 39 BEGINPROC RT_NOCRT(fabsf) 50 push _BP51 mov _BP, _SP40 push xBP 41 mov xBP, xSP 52 42 53 43 %ifdef RT_ARCH_AMD64 54 sub _SP, 10h44 sub xSP, 10h 55 45 56 movsd [ _SP], xmm057 fld dword [ _SP]46 movsd [xSP], xmm0 47 fld dword [xSP] 58 48 59 49 fabs 60 50 61 fstp dword [ _SP]62 movsd xmm0, [ _SP]51 fstp dword [xSP] 52 movsd xmm0, [xSP] 63 53 64 54 %else 65 fld dword [ _BP + _S*2]55 fld dword [xBP + xS*2] 66 56 fabs 67 57 %endif -
Property svn:keywords
set to
-
trunk/src/VBox/Runtime/common/math/fabsl.asm
-
Property svn:keywords
set to
Author Date Id Revision
r8256 r16316 1 ; $Id :$1 ; $Id$ 2 2 ;; @file 3 3 ; IPRT - No-CRT fabsl - AMD64 & X86. … … 29 29 ; 30 30 31 32 31 %include "iprt/asmdefs.mac" 33 32 34 33 BEGINCODE 35 34 36 %ifdef RT_ARCH_AMD6437 %define _SP rsp38 %define _BP rbp39 %define _S 840 %else41 %define _SP esp42 %define _BP ebp43 %define _S 444 %endif45 46 35 ;; 47 36 ; Compute the absolute value of lrd (|lrd|). 48 37 ; @returns st(0) 49 ; @param lrd [ _SP + _S*2]38 ; @param lrd [xSP + xS*2] 50 39 BEGINPROC RT_NOCRT(fabsl) 51 push _BP52 mov _BP, _SP40 push xBP 41 mov xBP, xSP 53 42 54 fld tword [ _BP + _S*2]43 fld tword [xBP + xS*2] 55 44 fabs 56 45 -
Property svn:keywords
set to
-
trunk/src/VBox/Runtime/common/math/floor.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r8256 r16316 33 33 BEGINCODE 34 34 35 %ifdef RT_ARCH_AMD6436 %define _SP rsp37 %define _BP rbp38 %define _S 839 %else40 %define _SP esp41 %define _BP ebp42 %define _S 443 %endif44 45 35 ;; 46 36 ; Compute the largest integral value not greater than rd. … … 48 38 ; @param rd 32-bit: [ebp + 8] 64-bit: xmm0 49 39 BEGINPROC RT_NOCRT(floor) 50 push _BP51 mov _BP, _SP52 sub _SP, 10h40 push xBP 41 mov xBP, xSP 42 sub xSP, 10h 53 43 54 44 %ifdef RT_ARCH_AMD64 55 movsd [ _SP], xmm056 fld qword [ _SP]45 movsd [xSP], xmm0 46 fld qword [xSP] 57 47 %else 58 fld qword [ _BP + _S*2]48 fld qword [xBP + xS*2] 59 49 %endif 60 50 61 51 ; Make it round down by modifying the fpu control word. 62 fstcw [ _BP - 10h]63 mov eax, [ _BP - 10h]52 fstcw [xBP - 10h] 53 mov eax, [xBP - 10h] 64 54 or eax, 00400h 65 55 and eax, 0f7ffh 66 mov [ _BP - 08h], eax67 fldcw [ _BP - 08h]56 mov [xBP - 08h], eax 57 fldcw [xBP - 08h] 68 58 69 59 ; Round ST(0) to integer. … … 71 61 72 62 ; Restore the fpu control word. 73 fldcw [ _BP - 10h]63 fldcw [xBP - 10h] 74 64 75 65 %ifdef RT_ARCH_AMD64 76 fstp qword [ _SP]77 movsd xmm0, [ _SP]66 fstp qword [xSP] 67 movsd xmm0, [xSP] 78 68 %endif 79 69 leave -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/common/math/floorf.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r8256 r16316 33 33 BEGINCODE 34 34 35 %ifdef RT_ARCH_AMD6436 %define _SP rsp37 %define _BP rbp38 %define _S 839 %else40 %define _SP esp41 %define _BP ebp42 %define _S 443 %endif44 45 35 ;; 46 36 ; Compute the largest integral value not greater than rf. … … 48 38 ; @param rf 32-bit: [ebp + 8] 64-bit: xmm0 49 39 BEGINPROC RT_NOCRT(floorf) 50 push _BP51 mov _BP, _SP52 sub _SP, 10h40 push xBP 41 mov xBP, xSP 42 sub xSP, 10h 53 43 54 44 %ifdef RT_ARCH_AMD64 55 movss [ _SP], xmm056 fld dword [ _SP]45 movss [xSP], xmm0 46 fld dword [xSP] 57 47 %else 58 fld dword [ _BP + _S*2]48 fld dword [xBP + xS*2] 59 49 %endif 60 50 61 51 ; Make it round down by modifying the fpu control word. 62 fstcw [ _BP - 10h]63 mov eax, [ _BP - 10h]52 fstcw [xBP - 10h] 53 mov eax, [xBP - 10h] 64 54 or eax, 00400h 65 55 and eax, 0f7ffh 66 mov [ _BP - 08h], eax67 fldcw [ _BP - 08h]56 mov [xBP - 08h], eax 57 fldcw [xBP - 08h] 68 58 69 59 ; Round ST(0) to integer. … … 71 61 72 62 ; Restore the fpu control word. 73 fldcw [ _BP - 10h]63 fldcw [xBP - 10h] 74 64 75 65 %ifdef RT_ARCH_AMD64 76 fstp dword [ _SP]77 movss xmm0, [ _SP]66 fstp dword [xSP] 67 movss xmm0, [xSP] 78 68 %endif 79 69 leave -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/common/math/floorl.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r8256 r16316 33 33 BEGINCODE 34 34 35 %ifdef RT_ARCH_AMD6436 %define _SP rsp37 %define _BP rbp38 %define _S 839 %else40 %define _SP esp41 %define _BP ebp42 %define _S 443 %endif44 45 35 ;; 46 36 ; Compute the largest integral value not greater than lrd. … … 48 38 ; @param lrd [rbp + 8] 49 39 BEGINPROC RT_NOCRT(floorl) 50 push _BP51 mov _BP, _SP52 sub _SP, 10h40 push xBP 41 mov xBP, xSP 42 sub xSP, 10h 53 43 54 fld tword [ _BP + _S*2]44 fld tword [xBP + xS*2] 55 45 56 46 ; Make it round down by modifying the fpu control word. 57 fstcw [ _BP - 10h]58 mov eax, [ _BP - 10h]47 fstcw [xBP - 10h] 48 mov eax, [xBP - 10h] 59 49 or eax, 00400h 60 50 and eax, 0f7ffh 61 mov [ _BP - 08h], eax62 fldcw [ _BP - 08h]51 mov [xBP - 08h], eax 52 fldcw [xBP - 08h] 63 53 64 54 ; Round ST(0) to integer. … … 66 56 67 57 ; Restore the fpu control word. 68 fldcw [ _BP - 10h]58 fldcw [xBP - 10h] 69 59 70 60 leave -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/common/math/ldexpl.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r8256 r16316 33 33 BEGINCODE 34 34 35 %ifdef RT_ARCH_AMD6436 %define _SP rsp37 %define _BP rbp38 %define _S 839 %else40 %define _SP esp41 %define _BP ebp42 %define _S 443 %endif44 45 35 ;; 46 36 ; Computes lrd * 2^exp 47 37 ; @returns st(0) 48 ; @param lrd [rbp + _S*2]38 ; @param lrd [rbp + xS*2] 49 39 ; @param exp [ebp + 14h] GCC:edi MSC:ecx 50 40 BEGINPROC RT_NOCRT(ldexpl) 51 push _BP52 mov _BP, _SP53 sub _SP, 10h41 push xBP 42 mov xBP, xSP 43 sub xSP, 10h 54 44 55 45 ; load exp … … 58 48 fild dword [rsp] 59 49 %else 60 fild dword [ebp + _S*2 + RTLRD_CB]50 fild dword [ebp + xS*2 + RTLRD_CB] 61 51 %endif 62 fld tword [ _BP + _S*2]52 fld tword [xBP + xS*2] 63 53 fscale 64 54 fstp st1 -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/common/math/llrint.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/common/math/llrintf.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/common/math/llrintl.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r8256 r16316 33 33 BEGINCODE 34 34 35 %ifdef RT_ARCH_AMD6436 %define _SP rsp37 %define _BP rbp38 %define _S 839 %else40 %define _SP esp41 %define _BP ebp42 %define _S 443 %endif44 45 35 ;; 46 36 ; Round rd to the nearest integer value, rounding according to the current rounding direction. 47 37 ; @returns 32-bit: edx:eax 64-bit: rax 48 ; @param lrd [rbp + _S*2]38 ; @param lrd [rbp + xS*2] 49 39 BEGINPROC RT_NOCRT(llrintl) 50 push _BP51 mov _BP, _SP52 sub _SP, 10h40 push xBP 41 mov xBP, xSP 42 sub xSP, 10h 53 43 54 fld tword [ _BP + _S*2]55 fistp qword [ _SP]44 fld tword [xBP + xS*2] 45 fistp qword [xSP] 56 46 fwait 57 47 %ifdef RT_ARCH_AMD64 58 mov rax, [ _SP]48 mov rax, [xSP] 59 49 %else 60 mov eax, [ _SP]61 mov edx, [ _SP + 4]50 mov eax, [xSP] 51 mov edx, [xSP + 4] 62 52 %endif 63 53 -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/common/math/logl.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r16313 r16316 33 33 BEGINCODE 34 34 35 %ifdef RT_ARCH_AMD6436 %define _SP rsp37 %define _BP rbp38 %define _S 839 %else40 %define _SP esp41 %define _BP ebp42 %define _S 443 %endif44 45 35 ;; 46 36 ; compute the natural logarithm of lrd 47 37 ; @returns st(0) 48 ; @param lrd [rbp + _S*2]38 ; @param lrd [rbp + xS*2] 49 39 BEGINPROC RT_NOCRT(logl) 50 push _BP51 mov _BP, _SP52 sub _SP, 10h40 push xBP 41 mov xBP, xSP 42 sub xSP, 10h 53 43 54 44 fldln2 ; st0=log(2) 55 fld tword [ _BP + _S*2] ; st1=log(2) st0=lrd45 fld tword [xBP + xS*2] ; st1=log(2) st0=lrd 56 46 fld st0 ; st1=log(2) st0=lrd st0=lrd 57 47 fsub qword [.one xWrtRIP] ; st2=log(2) st1=lrd st0=lrd-1.0 -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/common/math/lrint.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/common/math/lrintf.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
-
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/common/math/lrintl.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r8256 r16316 29 29 ; 30 30 31 32 31 %include "iprt/asmdefs.mac" 33 32 34 33 BEGINCODE 35 34 36 %ifdef RT_ARCH_AMD6437 %define _SP rsp38 %define _BP rbp39 %define _S 840 %else41 %define _SP esp42 %define _BP ebp43 %define _S 444 %endif45 46 35 ;; 47 36 ; Round rd to the nearest integer value, rounding according to the current rounding direction. 48 37 ; @returns 32-bit: eax 64-bit: rax 49 ; @param lrd [rbp + _S*2]38 ; @param lrd [rbp + xS*2] 50 39 BEGINPROC RT_NOCRT(lrintl) 51 push _BP52 mov _BP, _SP53 sub _SP, 10h40 push xBP 41 mov xBP, xSP 42 sub xSP, 10h 54 43 55 fld tword [ _BP + _S*2]44 fld tword [xBP + xS*2] 56 45 %ifdef RT_ARCH_AMD64 57 fistp qword [ _SP]46 fistp qword [xSP] 58 47 fwait 59 mov rax, [ _SP]48 mov rax, [xSP] 60 49 %else 61 fistp dword [ _SP]50 fistp dword [xSP] 62 51 fwait 63 mov eax, [ _SP]52 mov eax, [xSP] 64 53 %endif 65 54 -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/common/math/remainder.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r8256 r16316 33 33 BEGINCODE 34 34 35 %ifdef RT_ARCH_AMD6436 %define _SP rsp37 %define _BP rbp38 %else39 %define _SP esp40 %define _BP ebp41 %endif42 43 35 ;; 44 36 ; See SUS. … … 47 39 ; @param rd2 [ebp + 10h] xmm1 48 40 BEGINPROC RT_NOCRT(remainder) 49 push _BP50 mov _BP, _SP51 sub _SP, 20h41 push xBP 42 mov xBP, xSP 43 sub xSP, 20h 52 44 ;int3 53 45 -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/common/math/remainderf.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r8256 r16316 33 33 BEGINCODE 34 34 35 %ifdef RT_ARCH_AMD6436 %define _SP rsp37 %define _BP rbp38 %else39 %define _SP esp40 %define _BP ebp41 %endif42 43 35 ;; 44 36 ; See SUS. … … 47 39 ; @param rf2 [ebp + 0ch] xmm1 48 40 BEGINPROC RT_NOCRT(remainderf) 49 push _BP50 mov _BP, _SP51 sub _SP, 20h41 push xBP 42 mov xBP, xSP 43 sub xSP, 20h 52 44 53 45 %ifdef RT_ARCH_AMD64 -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/common/math/remainderl.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r8256 r16316 33 33 BEGINCODE 34 34 35 %ifdef RT_ARCH_AMD6436 %define _SP rsp37 %define _BP rbp38 %else39 %define _SP esp40 %define _BP ebp41 %endif42 43 35 ;; 44 36 ; See SUS. … … 47 39 ; @param lrd2 [rbp + 20h] 48 40 BEGINPROC RT_NOCRT(remainderl) 49 push _BP50 mov _BP, _SP41 push xBP 42 mov xBP, xSP 51 43 52 44 %ifdef RT_ARCH_AMD64 -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/common/math/sinl.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r8256 r16316 29 29 ; 30 30 31 32 31 %include "iprt/asmdefs.mac" 33 32 34 33 BEGINCODE 35 34 36 %ifdef RT_ARCH_AMD6437 %define _SP rsp38 %define _BP rbp39 %define _S 840 %else41 %define _SP esp42 %define _BP ebp43 %define _S 444 %endif45 46 35 ;; 47 36 ; Compute the sine of lrd 48 37 ; @returns st(0) 49 ; @param lrd [ _SP + _S*2]38 ; @param lrd [xSP + xS*2] 50 39 BEGINPROC RT_NOCRT(sinl) 51 push _BP52 mov _BP, _SP53 sub _SP, 10h40 push xBP 41 mov xBP, xSP 42 sub xSP, 10h 54 43 55 fld tword [ _BP + _S*2]44 fld tword [xBP + xS*2] 56 45 fsin 57 46 fnstsw ax -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/common/math/tanl.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r8256 r16316 33 33 BEGINCODE 34 34 35 %ifdef RT_ARCH_AMD6436 %define _SP rsp37 %define _BP rbp38 %define _S 839 %else40 %define _SP esp41 %define _BP ebp42 %define _S 443 %endif44 45 35 ;; 46 36 ; Compute the sine of lrd 47 37 ; @returns st(0) 48 ; @param lrd [ _SP + _S*2]38 ; @param lrd [xSP + xS*2] 49 39 BEGINPROC RT_NOCRT(tanl) 50 push _BP51 mov _BP, _SP52 sub _SP, 10h40 push xBP 41 mov xBP, xSP 42 sub xSP, 10h 53 43 54 fld tword [ _BP + _S*2]44 fld tword [xBP + xS*2] 55 45 fptan 56 46 fnstsw ax -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/common/math/trunc.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r8256 r16316 34 34 BEGINCODE 35 35 36 %ifdef RT_ARCH_AMD6437 %define _SP rsp38 %define _BP rbp39 %define _S 840 %else41 %define _SP esp42 %define _BP ebp43 %define _S 444 %endif45 46 36 ;; 47 37 ; Round to truncated integer value. … … 49 39 ; @param rd 32-bit: [ebp + 8] 64-bit: xmm0 50 40 BEGINPROC RT_NOCRT(trunc) 51 push _BP52 mov _BP, _SP53 sub _SP, 10h41 push xBP 42 mov xBP, xSP 43 sub xSP, 10h 54 44 55 45 %ifdef RT_ARCH_AMD64 56 movsd [ _SP], xmm057 fld qword [ _SP]46 movsd [xSP], xmm0 47 fld qword [xSP] 58 48 %else 59 fld qword [ _BP + _S*2]49 fld qword [xBP + xS*2] 60 50 %endif 61 51 62 52 ; Make it truncate up by modifying the fpu control word. 63 fstcw [ _BP - 10h]64 mov eax, [ _BP - 10h]53 fstcw [xBP - 10h] 54 mov eax, [xBP - 10h] 65 55 or eax, 00c00h 66 mov [ _BP - 08h], eax67 fldcw [ _BP - 08h]56 mov [xBP - 08h], eax 57 fldcw [xBP - 08h] 68 58 69 59 ; Round ST(0) to integer. … … 71 61 72 62 ; Restore the fpu control word. 73 fldcw [ _BP - 10h]63 fldcw [xBP - 10h] 74 64 75 65 %ifdef RT_ARCH_AMD64 76 fstp qword [ _SP]77 movsd xmm0, [ _SP]66 fstp qword [xSP] 67 movsd xmm0, [xSP] 78 68 %endif 79 69 leave -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/common/math/truncf.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r8256 r16316 34 34 BEGINCODE 35 35 36 %ifdef RT_ARCH_AMD6437 %define _SP rsp38 %define _BP rbp39 %define _S 840 %else41 %define _SP esp42 %define _BP ebp43 %define _S 444 %endif45 46 36 ;; 47 37 ; Round to truncated integer value. … … 49 39 ; @param rf 32-bit: [ebp + 8] 64-bit: xmm0 50 40 BEGINPROC RT_NOCRT(truncf) 51 push _BP52 mov _BP, _SP53 sub _SP, 10h41 push xBP 42 mov xBP, xSP 43 sub xSP, 10h 54 44 55 45 %ifdef RT_ARCH_AMD64 56 movss [ _SP], xmm057 fld dword [ _SP]46 movss [xSP], xmm0 47 fld dword [xSP] 58 48 %else 59 fld dword [ _BP + _S*2]49 fld dword [xBP + xS*2] 60 50 %endif 61 51 62 52 ; Make it truncate up by modifying the fpu control word. 63 fstcw [ _BP - 10h]64 mov eax, [ _BP - 10h]53 fstcw [xBP - 10h] 54 mov eax, [xBP - 10h] 65 55 or eax, 00c00h 66 mov [ _BP - 08h], eax67 fldcw [ _BP - 08h]56 mov [xBP - 08h], eax 57 fldcw [xBP - 08h] 68 58 69 59 ; Round ST(0) to integer. … … 71 61 72 62 ; Restore the fpu control word. 73 fldcw [ _BP - 10h]63 fldcw [xBP - 10h] 74 64 75 65 %ifdef RT_ARCH_AMD64 76 fstp dword [ _SP]77 movss xmm0, [ _SP]66 fstp dword [xSP] 67 movss xmm0, [xSP] 78 68 %endif 79 69 leave -
Property svn:keywords
changed from
-
trunk/src/VBox/Runtime/common/math/truncl.asm
-
Property svn:keywords
changed from
Id
toAuthor Date Id Revision
r8256 r16316 34 34 BEGINCODE 35 35 36 %ifdef RT_ARCH_AMD6437 %define _SP rsp38 %define _BP rbp39 %define _S 840 %else41 %define _SP esp42 %define _BP ebp43 %define _S 444 %endif45 46 36 ;; 47 37 ; Round to truncated integer value. … … 49 39 ; @param rd [rbp + 8] 50 40 BEGINPROC RT_NOCRT(truncl) 51 push _BP52 mov _BP, _SP53 sub _SP, 10h41 push xBP 42 mov xBP, xSP 43 sub xSP, 10h 54 44 55 fld tword [ _BP + _S*2]45 fld tword [xBP + xS*2] 56 46 57 47 ; Make it truncate up by modifying the fpu control word. 58 fstcw [ _BP - 10h]59 mov eax, [ _BP - 10h]48 fstcw [xBP - 10h] 49 mov eax, [xBP - 10h] 60 50 or eax, 00c00h 61 mov [ _BP - 08h], eax62 fldcw [ _BP - 08h]51 mov [xBP - 08h], eax 52 fldcw [xBP - 08h] 63 53 64 54 ; Round ST(0) to integer. … … 66 56 67 57 ; Restore the fpu control word. 68 fldcw [ _BP - 10h]58 fldcw [xBP - 10h] 69 59 70 60 leave -
Property svn:keywords
changed from
Note:
See TracChangeset
for help on using the changeset viewer.