Index: /trunk/src/VBox/Runtime/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Runtime/Makefile.kmk	(revision 96059)
+++ /trunk/src/VBox/Runtime/Makefile.kmk	(revision 96060)
@@ -1811,5 +1811,30 @@
   	r3/nocrt-per-thread-2.cpp \
   	r3/nocrt-errno.cpp
+
   RuntimeR3_SOURCES.x86 = $(RuntimeBaseR3_SOURCES.x86) \
+  	common/math/cos.asm  \
+  	common/math/cosf.asm  \
+  	common/math/ceil.asm  \
+  	common/math/ceilf.asm  \
+  	common/math/fabs.asm  \
+  	common/math/fabsf.asm \
+  	common/math/floor.asm \
+  	common/math/floorf.asm \
+  	common/math/ldexp.asm \
+  	common/math/ldexpf.asm \
+  	common/math/log.asm \
+  	common/math/logf.asm \
+  	common/math/llrint.asm \
+  	common/math/llrintf.asm \
+  	common/math/lrint.asm \
+  	common/math/lrintf.asm \
+  	common/math/remainder.asm \
+  	common/math/remainderf.asm \
+  	common/math/sin.asm \
+  	common/math/sinf.asm \
+  	common/math/tan.asm \
+  	common/math/tanf.asm \
+  	common/math/trunc.asm \
+  	common/math/truncf.asm \
   	common/misc/setjmp.asm \
   	common/string/memcpy.asm \
@@ -1832,4 +1857,28 @@
    	common/string/strpbrk.cpp
   RuntimeR3_SOURCES.amd64 = $(RuntimeBaseR3_SOURCES.amd64) \
+  	common/math/cos.asm  \
+  	common/math/cosf.asm  \
+  	common/math/ceil.asm  \
+  	common/math/ceilf.asm  \
+  	common/math/fabs.asm  \
+  	common/math/fabsf.asm \
+  	common/math/floor.asm \
+  	common/math/floorf.asm \
+  	common/math/ldexp.asm \
+  	common/math/ldexpf.asm \
+  	common/math/log.asm \
+  	common/math/logf.asm \
+  	common/math/llrint.asm \
+  	common/math/llrintf.asm \
+  	common/math/lrint.asm \
+  	common/math/lrintf.asm \
+  	common/math/remainder.asm \
+  	common/math/remainderf.asm \
+  	common/math/sin.asm \
+  	common/math/sinf.asm \
+  	common/math/tan.asm \
+  	common/math/tanf.asm \
+  	common/math/trunc.asm \
+  	common/math/truncf.asm \
   	common/misc/setjmp.asm \
   	common/string/memcpy.asm \
@@ -1881,5 +1930,16 @@
   	common/compiler/vcc/guard-vcc.asm \
   	common/compiler/vcc/stack-vcc.asm
-  RuntimeR3_VBOX_NOCRT_ALIASES.win = strtok_s=nocrt_strtok_r _strtok_s=nocrt_strtok_r nocrt_strtok_s=nocrt_strtok_r
+  RuntimeR3_VBOX_NOCRT_ALIASES.win = strtok_s=nocrt_strtok_r _strtok_s=nocrt_strtok_r nocrt_strtok_s=nocrt_strtok_r \
+  	cosl=nocrt_cos          _cosl=nocrt_cos \
+  	ceill=nocrt_ceil        _ceill=nocrt_ceil \
+  	fabsl=nocrt_fabs        _fabsl=nocrt_fabs \
+  	floorl=nocrt_floor      _floorl=nocrt_floor \
+  	ldexpl=nocrt_ldexp      _ldexpl=nocrt_ldexp \
+  	logl=nocrt_log          _logl=nocrt_log \
+  	lrintl=nocrt_lrint      _lrintl=nocrt_lrint \
+  	llrintl=nocrt_llrint    _llrintl=nocrt_llrint \
+  	remainderl=nocrt_remainder _remainderl=nocrt_remainder \
+  	sinl=nocrt_sin           _sinl=nocrt_sin \
+  	tanl=nocrt_tan           _tanl=nocrt_tan
  endif
 endif
Index: /trunk/src/VBox/Runtime/common/math/ceil.asm
===================================================================
--- /trunk/src/VBox/Runtime/common/math/ceil.asm	(revision 96060)
+++ /trunk/src/VBox/Runtime/common/math/ceil.asm	(revision 96060)
@@ -0,0 +1,69 @@
+; $Id$
+;; @file
+; IPRT - No-CRT ceil - AMD64 & X86.
+;
+
+;
+; Copyright (C) 2006-2022 Oracle Corporation
+;
+; This file is part of VirtualBox Open Source Edition (OSE), as
+; available from http://www.virtualbox.org. This file is free software;
+; you can redistribute it and/or modify it under the terms of the GNU
+; General Public License (GPL) as published by the Free Software
+; Foundation, in version 2 as it comes in the "COPYING" file of the
+; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+;
+; The contents of this file may alternatively be used under the terms
+; of the Common Development and Distribution License Version 1.0
+; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+; VirtualBox OSE distribution, in which case the provisions of the
+; CDDL are applicable instead of those of the GPL.
+;
+; You may elect to license modified versions of this file under the
+; terms and conditions of either the GPL or the CDDL or both.
+;
+
+
+%include "iprt/asmdefs.mac"
+
+BEGINCODE
+
+;;
+; Compute the smallest integral value not less than lrd.
+; @returns st(0) / xmm0
+; @param    rd      [rbp + 8] / xmm0
+RT_NOCRT_BEGINPROC ceil
+    push    xBP
+    mov     xBP, xSP
+    sub     xSP, 10h
+
+%ifdef RT_ARCH_AMD64 ;; @todo there is probably some sse instruction for this.
+    movsd   [xSP], xmm0
+    fld     qword [xSP]
+%else
+    fld     qword [xBP + xCB*2]
+%endif
+
+    ; Make it round up by modifying the fpu control word.
+    fstcw   [xBP - 10h]
+    mov     eax, [xBP - 10h]
+    or      eax, 00800h
+    and     eax, 0fbffh
+    mov     [xBP - 08h], eax
+    fldcw   [xBP - 08h]
+
+    ; Round ST(0) to integer.
+    frndint
+
+    ; Restore the fpu control word.
+    fldcw   [xBP - 10h]
+
+%ifdef RT_ARCH_AMD64
+    fstp    qword [xSP]
+    movsd   xmm0, [xSP]
+%endif
+    leave
+    ret
+ENDPROC   RT_NOCRT(ceil)
+
Index: /trunk/src/VBox/Runtime/common/math/ceilf.asm
===================================================================
--- /trunk/src/VBox/Runtime/common/math/ceilf.asm	(revision 96060)
+++ /trunk/src/VBox/Runtime/common/math/ceilf.asm	(revision 96060)
@@ -0,0 +1,69 @@
+; $Id$
+;; @file
+; IPRT - No-CRT ceilf - AMD64 & X86.
+;
+
+;
+; Copyright (C) 2006-2022 Oracle Corporation
+;
+; This file is part of VirtualBox Open Source Edition (OSE), as
+; available from http://www.virtualbox.org. This file is free software;
+; you can redistribute it and/or modify it under the terms of the GNU
+; General Public License (GPL) as published by the Free Software
+; Foundation, in version 2 as it comes in the "COPYING" file of the
+; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+;
+; The contents of this file may alternatively be used under the terms
+; of the Common Development and Distribution License Version 1.0
+; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+; VirtualBox OSE distribution, in which case the provisions of the
+; CDDL are applicable instead of those of the GPL.
+;
+; You may elect to license modified versions of this file under the
+; terms and conditions of either the GPL or the CDDL or both.
+;
+
+
+%include "iprt/asmdefs.mac"
+
+BEGINCODE
+
+;;
+; Compute the smallest integral value not less than r32.
+; @returns st(0) / xmm0
+; @param    r32      [rbp + 8] / xmm0
+RT_NOCRT_BEGINPROC ceilf
+    push    xBP
+    mov     xBP, xSP
+    sub     xSP, 10h
+
+%ifdef RT_ARCH_AMD64 ;; @todo there is probably some sse instruction for this.
+    movss   [xSP], xmm0
+    fld     dword [xSP]
+%else
+    fld     dword [xBP + xCB*2]
+%endif
+
+    ; Make it round up by modifying the fpu control word.
+    fstcw   [xBP - 10h]
+    mov     eax, [xBP - 10h]
+    or      eax, 00800h
+    and     eax, 0fbffh
+    mov     [xBP - 08h], eax
+    fldcw   [xBP - 08h]
+
+    ; Round ST(0) to integer.
+    frndint
+
+    ; Restore the fpu control word.
+    fldcw   [xBP - 10h]
+
+%ifdef RT_ARCH_AMD64
+    fstp    dword [xSP]
+    movss   xmm0, [xSP]
+%endif
+    leave
+    ret
+ENDPROC   RT_NOCRT(ceilf)
+
Index: /trunk/src/VBox/Runtime/common/math/cos.asm
===================================================================
--- /trunk/src/VBox/Runtime/common/math/cos.asm	(revision 96060)
+++ /trunk/src/VBox/Runtime/common/math/cos.asm	(revision 96060)
@@ -0,0 +1,71 @@
+; $Id$
+;; @file
+; IPRT - No-CRT cos - AMD64 & X86.
+;
+
+;
+; Copyright (C) 2006-2022 Oracle Corporation
+;
+; This file is part of VirtualBox Open Source Edition (OSE), as
+; available from http://www.virtualbox.org. This file is free software;
+; you can redistribute it and/or modify it under the terms of the GNU
+; General Public License (GPL) as published by the Free Software
+; Foundation, in version 2 as it comes in the "COPYING" file of the
+; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+;
+; The contents of this file may alternatively be used under the terms
+; of the Common Development and Distribution License Version 1.0
+; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+; VirtualBox OSE distribution, in which case the provisions of the
+; CDDL are applicable instead of those of the GPL.
+;
+; You may elect to license modified versions of this file under the
+; terms and conditions of either the GPL or the CDDL or both.
+;
+
+%include "iprt/asmdefs.mac"
+
+BEGINCODE
+
+;;
+; compute the cosine of dr, measured in radians.
+; @returns st(0) / xmm0
+; @param    rd      [rbp + xCB*2] / xmm0
+RT_NOCRT_BEGINPROC cos
+    push    xBP
+    mov     xBP, xSP
+%ifdef RT_ARCH_AMD64
+    sub     xSP, 10h
+
+    movsd   [xSP], xmm0
+    fld     qword [xSP]
+%else
+    fld     qword [xBP + xCB*2]
+%endif
+    fcos
+    fnstsw  ax
+    test    ah, 4
+    jz      .done
+
+    fldpi
+    fadd    st0, st0
+    fxch    st1
+.again:
+    fprem1
+    fnstsw  ax
+    test    ah, 4
+    jnz     .again
+
+    fstp    st0
+    fcos
+
+.done:
+%ifdef RT_ARCH_AMD64
+    fstp    qword [xSP]
+    movsd   xmm0, [xSP]
+%endif
+    leave
+    ret
+ENDPROC   RT_NOCRT(cos)
+
Index: /trunk/src/VBox/Runtime/common/math/cosf.asm
===================================================================
--- /trunk/src/VBox/Runtime/common/math/cosf.asm	(revision 96060)
+++ /trunk/src/VBox/Runtime/common/math/cosf.asm	(revision 96060)
@@ -0,0 +1,71 @@
+; $Id$
+;; @file
+; IPRT - No-CRT cosf - AMD64 & X86.
+;
+
+;
+; Copyright (C) 2006-2022 Oracle Corporation
+;
+; This file is part of VirtualBox Open Source Edition (OSE), as
+; available from http://www.virtualbox.org. This file is free software;
+; you can redistribute it and/or modify it under the terms of the GNU
+; General Public License (GPL) as published by the Free Software
+; Foundation, in version 2 as it comes in the "COPYING" file of the
+; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+;
+; The contents of this file may alternatively be used under the terms
+; of the Common Development and Distribution License Version 1.0
+; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+; VirtualBox OSE distribution, in which case the provisions of the
+; CDDL are applicable instead of those of the GPL.
+;
+; You may elect to license modified versions of this file under the
+; terms and conditions of either the GPL or the CDDL or both.
+;
+
+%include "iprt/asmdefs.mac"
+
+BEGINCODE
+
+;;
+; compute the cosine of r32, measured in radians.
+; @returns st(0) / xmm0
+; @param    r32     [rbp + xCB*2] / xmm0
+RT_NOCRT_BEGINPROC cosf
+    push    xBP
+    mov     xBP, xSP
+%ifdef RT_ARCH_AMD64
+    sub     xSP, 10h
+
+    movss   [xSP], xmm0
+    fld     dword [xSP]
+%else
+    fld     dword [xBP + xCB*2]
+%endif
+    fcos
+    fnstsw  ax
+    test    ah, 4
+    jz      .done
+
+    fldpi
+    fadd    st0, st0
+    fxch    st1
+.again:
+    fprem1
+    fnstsw  ax
+    test    ah, 4
+    jnz     .again
+
+    fstp    st0
+    fcos
+
+.done:
+%ifdef RT_ARCH_AMD64
+    fstp    dword [xSP]
+    movss   xmm0, [xSP]
+%endif
+    leave
+    ret
+ENDPROC   RT_NOCRT(cosf)
+
Index: /trunk/src/VBox/Runtime/common/math/ldexp.asm
===================================================================
--- /trunk/src/VBox/Runtime/common/math/ldexp.asm	(revision 96060)
+++ /trunk/src/VBox/Runtime/common/math/ldexp.asm	(revision 96060)
@@ -0,0 +1,69 @@
+; $Id$
+;; @file
+; IPRT - No-CRT ldexp - AMD64 & X86.
+;
+
+;
+; Copyright (C) 2006-2022 Oracle Corporation
+;
+; This file is part of VirtualBox Open Source Edition (OSE), as
+; available from http://www.virtualbox.org. This file is free software;
+; you can redistribute it and/or modify it under the terms of the GNU
+; General Public License (GPL) as published by the Free Software
+; Foundation, in version 2 as it comes in the "COPYING" file of the
+; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+;
+; The contents of this file may alternatively be used under the terms
+; of the Common Development and Distribution License Version 1.0
+; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+; VirtualBox OSE distribution, in which case the provisions of the
+; CDDL are applicable instead of those of the GPL.
+;
+; You may elect to license modified versions of this file under the
+; terms and conditions of either the GPL or the CDDL or both.
+;
+
+%include "iprt/asmdefs.mac"
+
+BEGINCODE
+
+;;
+; Computes rd * 2^exp
+; @returns st(0) / xmm0
+; @param    rd      [rbp + xCB*2] / xmm0
+; @param    exp     [ebp + 10h]  gcc:edi  msc:ecx
+RT_NOCRT_BEGINPROC ldexp
+    push    xBP
+    mov     xBP, xSP
+%ifdef RT_ARCH_AMD64
+    sub     xSP, 20h
+%else
+    sub     xSP, 10h
+%endif
+
+    ; load exp
+%ifdef RT_ARCH_AMD64
+ %ifdef ASM_CALL64_GCC
+    mov     [rsp], edi
+ %else
+    mov     [rsp], ecx
+ %endif
+    fild    dword [rsp]
+    movsd   [rsp + 8], xmm0
+    fld     qword [rsp + 8]
+%else
+    fild    dword [ebp + xCB*2 + 8]
+    fld     qword [xBP + xCB*2]
+%endif
+    fscale
+    fstp    st1
+
+%ifdef RT_ARCH_AMD64
+    fstp    qword [xSP]
+    movsd   xmm0, [xSP]
+%endif
+    leave
+    ret
+ENDPROC   RT_NOCRT(ldexp)
+
Index: /trunk/src/VBox/Runtime/common/math/ldexpf.asm
===================================================================
--- /trunk/src/VBox/Runtime/common/math/ldexpf.asm	(revision 96060)
+++ /trunk/src/VBox/Runtime/common/math/ldexpf.asm	(revision 96060)
@@ -0,0 +1,69 @@
+; $Id$
+;; @file
+; IPRT - No-CRT ldexpf - AMD64 & X86.
+;
+
+;
+; Copyright (C) 2006-2022 Oracle Corporation
+;
+; This file is part of VirtualBox Open Source Edition (OSE), as
+; available from http://www.virtualbox.org. This file is free software;
+; you can redistribute it and/or modify it under the terms of the GNU
+; General Public License (GPL) as published by the Free Software
+; Foundation, in version 2 as it comes in the "COPYING" file of the
+; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+;
+; The contents of this file may alternatively be used under the terms
+; of the Common Development and Distribution License Version 1.0
+; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+; VirtualBox OSE distribution, in which case the provisions of the
+; CDDL are applicable instead of those of the GPL.
+;
+; You may elect to license modified versions of this file under the
+; terms and conditions of either the GPL or the CDDL or both.
+;
+
+%include "iprt/asmdefs.mac"
+
+BEGINCODE
+
+;;
+; Computes r32 * 2^exp
+; @returns st(0) / xmm0
+; @param    r32     [rbp + xCB*2] / xmm0
+; @param    exp     [ebp + 10h]  gcc:edi  msc:ecx
+RT_NOCRT_BEGINPROC ldexpf
+    push    xBP
+    mov     xBP, xSP
+%ifdef RT_ARCH_AMD64
+    sub     xSP, 20h
+%else
+    sub     xSP, 10h
+%endif
+
+    ; load exp
+%ifdef RT_ARCH_AMD64
+ %ifdef ASM_CALL64_GCC
+    mov     [rsp], edi
+ %else
+    mov     [rsp], ecx
+ %endif
+    fild    dword [rsp]
+    movss   [rsp + 8], xmm0
+    fld     dword [rsp + 8]
+%else
+    fild    dword [ebp + xCB*2 + 8]
+    fld     dword [xBP + xCB*2]
+%endif
+    fscale
+    fstp    st1
+
+%ifdef RT_ARCH_AMD64
+    fstp    dword [xSP]
+    movss   xmm0, [xSP]
+%endif
+    leave
+    ret
+ENDPROC   RT_NOCRT(ldexpf)
+
Index: /trunk/src/VBox/Runtime/common/math/log.asm
===================================================================
--- /trunk/src/VBox/Runtime/common/math/log.asm	(revision 96060)
+++ /trunk/src/VBox/Runtime/common/math/log.asm	(revision 96060)
@@ -0,0 +1,76 @@
+; $Id$
+;; @file
+; IPRT - No-CRT log - AMD64 & X86.
+;
+
+;
+; Copyright (C) 2006-2022 Oracle Corporation
+;
+; This file is part of VirtualBox Open Source Edition (OSE), as
+; available from http://www.virtualbox.org. This file is free software;
+; you can redistribute it and/or modify it under the terms of the GNU
+; General Public License (GPL) as published by the Free Software
+; Foundation, in version 2 as it comes in the "COPYING" file of the
+; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+;
+; The contents of this file may alternatively be used under the terms
+; of the Common Development and Distribution License Version 1.0
+; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+; VirtualBox OSE distribution, in which case the provisions of the
+; CDDL are applicable instead of those of the GPL.
+;
+; You may elect to license modified versions of this file under the
+; terms and conditions of either the GPL or the CDDL or both.
+;
+
+%include "iprt/asmdefs.mac"
+
+BEGINCODE
+
+;;
+; compute the natural logarithm of rd
+; @returns st(0) / xmm0
+; @param    rd      [rbp + xCB*2] / xmm0
+RT_NOCRT_BEGINPROC log
+    push    xBP
+    mov     xBP, xSP
+%ifdef RT_ARCH_AMD64
+    sub     xSP, 10h
+%endif
+
+    fldln2                              ; st0=log(2)
+%ifdef RT_ARCH_AMD64
+    movsd   [xSP], xmm0
+    fld     qword [xSP]
+%else
+    fld     qword [xBP + xCB*2]         ; st1=log(2) st0=lrd
+%endif
+    fld     st0                         ; st1=log(2) st0=lrd st0=lrd
+    fsub    qword [.one xWrtRIP]        ; st2=log(2) st1=lrd st0=lrd-1.0
+    fld     st0                         ; st3=log(2) st2=lrd st1=lrd-1.0 st0=lrd-1.0
+    fabs                                ; st3=log(2) st2=lrd st1=lrd-1.0 st0=abs(lrd-1.0)
+    fcomp   qword [.limit xWrtRIP]      ; st2=log(2) st1=lrd st0=lrd-1.0
+    fnstsw  ax
+    and     eax, 04500h
+    jnz     .use_st1
+
+    fstp    st0                         ; st1=log(2) st0=lrd
+    fyl2x                               ; log(lrd)
+    jmp     .done
+
+.use_st1:
+    fstp    st1                         ; st1=log(2) st0=lrd-1.0
+    fyl2xp1                             ; log(lrd)
+
+.done:
+%ifdef RT_ARCH_AMD64
+    fstp    qword [xSP]
+    movsd   xmm0, [xSP]
+%endif
+    leave
+    ret
+.one:   dq  1.0
+.limit: dq  0.29
+ENDPROC   RT_NOCRT(log)
+
Index: /trunk/src/VBox/Runtime/common/math/logf.asm
===================================================================
--- /trunk/src/VBox/Runtime/common/math/logf.asm	(revision 96060)
+++ /trunk/src/VBox/Runtime/common/math/logf.asm	(revision 96060)
@@ -0,0 +1,76 @@
+; $Id$
+;; @file
+; IPRT - No-CRT logf - AMD64 & X86.
+;
+
+;
+; Copyright (C) 2006-2022 Oracle Corporation
+;
+; This file is part of VirtualBox Open Source Edition (OSE), as
+; available from http://www.virtualbox.org. This file is free software;
+; you can redistribute it and/or modify it under the terms of the GNU
+; General Public License (GPL) as published by the Free Software
+; Foundation, in version 2 as it comes in the "COPYING" file of the
+; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+;
+; The contents of this file may alternatively be used under the terms
+; of the Common Development and Distribution License Version 1.0
+; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+; VirtualBox OSE distribution, in which case the provisions of the
+; CDDL are applicable instead of those of the GPL.
+;
+; You may elect to license modified versions of this file under the
+; terms and conditions of either the GPL or the CDDL or both.
+;
+
+%include "iprt/asmdefs.mac"
+
+BEGINCODE
+
+;;
+; compute the natural logarithm of r32
+; @returns st(0) / xmm0
+; @param    r32     [rbp + xCB*2] / xmm0
+RT_NOCRT_BEGINPROC logf
+    push    xBP
+    mov     xBP, xSP
+%ifdef RT_ARCH_AMD64
+    sub     xSP, 10h
+%endif
+
+    fldln2                              ; st0=log(2)
+%ifdef RT_ARCH_AMD64
+    movss   [xSP], xmm0
+    fld     dword [xSP]
+%else
+    fld     dword [xBP + xCB*2]         ; st1=log(2) st0=lrd
+%endif
+    fld     st0                         ; st1=log(2) st0=lrd st0=lrd
+    fsub    qword [.one xWrtRIP]        ; st2=log(2) st1=lrd st0=lrd-1.0
+    fld     st0                         ; st3=log(2) st2=lrd st1=lrd-1.0 st0=lrd-1.0
+    fabs                                ; st3=log(2) st2=lrd st1=lrd-1.0 st0=abs(lrd-1.0)
+    fcomp   qword [.limit xWrtRIP]      ; st2=log(2) st1=lrd st0=lrd-1.0
+    fnstsw  ax
+    and     eax, 04500h
+    jnz     .use_st1
+
+    fstp    st0                         ; st1=log(2) st0=lrd
+    fyl2x                               ; log(lrd)
+    jmp     .done
+
+.use_st1:
+    fstp    st1                         ; st1=log(2) st0=lrd-1.0
+    fyl2xp1                             ; log(lrd)
+
+.done:
+%ifdef RT_ARCH_AMD64
+    fstp    dword [xSP]
+    movss   xmm0, [xSP]
+%endif
+    leave
+    ret
+.one:   dq  1.0
+.limit: dq  0.29
+ENDPROC   RT_NOCRT(logf)
+
Index: /trunk/src/VBox/Runtime/common/math/sin.asm
===================================================================
--- /trunk/src/VBox/Runtime/common/math/sin.asm	(revision 96060)
+++ /trunk/src/VBox/Runtime/common/math/sin.asm	(revision 96060)
@@ -0,0 +1,71 @@
+; $Id$
+;; @file
+; IPRT - No-CRT sin - AMD64 & X86.
+;
+
+;
+; Copyright (C) 2006-2022 Oracle Corporation
+;
+; This file is part of VirtualBox Open Source Edition (OSE), as
+; available from http://www.virtualbox.org. This file is free software;
+; you can redistribute it and/or modify it under the terms of the GNU
+; General Public License (GPL) as published by the Free Software
+; Foundation, in version 2 as it comes in the "COPYING" file of the
+; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+;
+; The contents of this file may alternatively be used under the terms
+; of the Common Development and Distribution License Version 1.0
+; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+; VirtualBox OSE distribution, in which case the provisions of the
+; CDDL are applicable instead of those of the GPL.
+;
+; You may elect to license modified versions of this file under the
+; terms and conditions of either the GPL or the CDDL or both.
+;
+
+%include "iprt/asmdefs.mac"
+
+BEGINCODE
+
+;;
+; Compute the sine of rd
+; @returns st(0)/xmm0
+; @param    rd      [xSP + xCB*2] / xmm0
+RT_NOCRT_BEGINPROC sin
+    push    xBP
+    mov     xBP, xSP
+
+%ifdef RT_ARCH_AMD64
+    sub     xSP, 10h
+
+    movsd   [xSP], xmm0
+    fld     qword [xSP]
+%else
+    fld     qword [xBP + xCB*2]
+%endif
+    fsin
+    fnstsw  ax
+    test    ah, 04h
+    jz      .done
+
+    fldpi
+    fadd    st0
+    fxch    st1
+.again:
+    fprem1
+    fnstsw  ax
+    test    ah, 04h
+    jnz     .again
+    fstp    st1
+    fsin
+
+.done:
+%ifdef RT_ARCH_AMD64
+    fstp    qword [xSP]
+    movsd   xmm0, [xSP]
+%endif
+    leave
+    ret
+ENDPROC   RT_NOCRT(sin)
+
Index: /trunk/src/VBox/Runtime/common/math/sinf.asm
===================================================================
--- /trunk/src/VBox/Runtime/common/math/sinf.asm	(revision 96060)
+++ /trunk/src/VBox/Runtime/common/math/sinf.asm	(revision 96060)
@@ -0,0 +1,71 @@
+; $Id$
+;; @file
+; IPRT - No-CRT sinf - AMD64 & X86.
+;
+
+;
+; Copyright (C) 2006-2022 Oracle Corporation
+;
+; This file is part of VirtualBox Open Source Edition (OSE), as
+; available from http://www.virtualbox.org. This file is free software;
+; you can redistribute it and/or modify it under the terms of the GNU
+; General Public License (GPL) as published by the Free Software
+; Foundation, in version 2 as it comes in the "COPYING" file of the
+; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+;
+; The contents of this file may alternatively be used under the terms
+; of the Common Development and Distribution License Version 1.0
+; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+; VirtualBox OSE distribution, in which case the provisions of the
+; CDDL are applicable instead of those of the GPL.
+;
+; You may elect to license modified versions of this file under the
+; terms and conditions of either the GPL or the CDDL or both.
+;
+
+%include "iprt/asmdefs.mac"
+
+BEGINCODE
+
+;;
+; Compute the sine of r32
+; @returns st(0)/xmm0
+; @param    r32     [xSP + xCB*2] / xmm0
+RT_NOCRT_BEGINPROC sinf
+    push    xBP
+    mov     xBP, xSP
+
+%ifdef RT_ARCH_AMD64
+    sub     xSP, 10h
+
+    movss   [xSP], xmm0
+    fld     dword [xSP]
+%else
+    fld     dword [xBP + xCB*2]
+%endif
+    fsin
+    fnstsw  ax
+    test    ah, 04h
+    jz      .done
+
+    fldpi
+    fadd    st0
+    fxch    st1
+.again:
+    fprem1
+    fnstsw  ax
+    test    ah, 04h
+    jnz     .again
+    fstp    st1
+    fsin
+
+.done:
+%ifdef RT_ARCH_AMD64
+    fstp    dword [xSP]
+    movss   xmm0, [xSP]
+%endif
+    leave
+    ret
+ENDPROC   RT_NOCRT(sinf)
+
Index: /trunk/src/VBox/Runtime/common/math/tan.asm
===================================================================
--- /trunk/src/VBox/Runtime/common/math/tan.asm	(revision 96060)
+++ /trunk/src/VBox/Runtime/common/math/tan.asm	(revision 96060)
@@ -0,0 +1,72 @@
+; $Id$
+;; @file
+; IPRT - No-CRT tan - AMD64 & X86.
+;
+
+;
+; Copyright (C) 2006-2022 Oracle Corporation
+;
+; This file is part of VirtualBox Open Source Edition (OSE), as
+; available from http://www.virtualbox.org. This file is free software;
+; you can redistribute it and/or modify it under the terms of the GNU
+; General Public License (GPL) as published by the Free Software
+; Foundation, in version 2 as it comes in the "COPYING" file of the
+; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+;
+; The contents of this file may alternatively be used under the terms
+; of the Common Development and Distribution License Version 1.0
+; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+; VirtualBox OSE distribution, in which case the provisions of the
+; CDDL are applicable instead of those of the GPL.
+;
+; You may elect to license modified versions of this file under the
+; terms and conditions of either the GPL or the CDDL or both.
+;
+
+%include "iprt/asmdefs.mac"
+
+BEGINCODE
+
+;;
+; Compute the sine of rd
+; @returns st(0) / xmm0
+; @param    rd      [xSP + xCB*2] / xmm0
+RT_NOCRT_BEGINPROC tan
+    push    xBP
+    mov     xBP, xSP
+
+%ifdef RT_ARCH_AMD64
+    sub     xSP, 10h
+
+    movsd   [xSP], xmm0
+    fld     qword [xSP]
+%else
+    fld     qword [xBP + xCB*2]
+%endif
+    fptan
+    fnstsw  ax
+    test    ah, 04h                     ; check for C2
+    jz      .done
+
+    fldpi
+    fadd    st0
+    fxch    st1
+.again:
+    fprem1
+    fnstsw  ax
+    test    ah, 04h
+    jnz     .again
+    fstp    st1
+    fptan
+
+.done:
+    fstp    st0
+%ifdef RT_ARCH_AMD64
+    fstp    qword [xSP]
+    movsd   xmm0, [xSP]
+%endif
+    leave
+    ret
+ENDPROC   RT_NOCRT(tan)
+
Index: /trunk/src/VBox/Runtime/common/math/tanf.asm
===================================================================
--- /trunk/src/VBox/Runtime/common/math/tanf.asm	(revision 96060)
+++ /trunk/src/VBox/Runtime/common/math/tanf.asm	(revision 96060)
@@ -0,0 +1,72 @@
+; $Id$
+;; @file
+; IPRT - No-CRT tanf - AMD64 & X86.
+;
+
+;
+; Copyright (C) 2006-2022 Oracle Corporation
+;
+; This file is part of VirtualBox Open Source Edition (OSE), as
+; available from http://www.virtualbox.org. This file is free software;
+; you can redistribute it and/or modify it under the terms of the GNU
+; General Public License (GPL) as published by the Free Software
+; Foundation, in version 2 as it comes in the "COPYING" file of the
+; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+;
+; The contents of this file may alternatively be used under the terms
+; of the Common Development and Distribution License Version 1.0
+; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+; VirtualBox OSE distribution, in which case the provisions of the
+; CDDL are applicable instead of those of the GPL.
+;
+; You may elect to license modified versions of this file under the
+; terms and conditions of either the GPL or the CDDL or both.
+;
+
+%include "iprt/asmdefs.mac"
+
+BEGINCODE
+
+;;
+; Compute the sine of r32
+; @returns st(0) / xmm0
+; @param    r32     [xSP + xCB*2] / xmm0
+RT_NOCRT_BEGINPROC tanf
+    push    xBP
+    mov     xBP, xSP
+
+%ifdef RT_ARCH_AMD64
+    sub     xSP, 10h
+
+    movss   [xSP], xmm0
+    fld     dword [xSP]
+%else
+    fld     dword [xBP + xCB*2]
+%endif
+    fptan
+    fnstsw  ax
+    test    ah, 04h                     ; check for C2
+    jz      .done
+
+    fldpi
+    fadd    st0
+    fxch    st1
+.again:
+    fprem1
+    fnstsw  ax
+    test    ah, 04h
+    jnz     .again
+    fstp    st1
+    fptan
+
+.done:
+    fstp    st0
+%ifdef RT_ARCH_AMD64
+    fstp    dword [xSP]
+    movss   xmm0, [xSP]
+%endif
+    leave
+    ret
+ENDPROC   RT_NOCRT(tanf)
+
