VirtualBox

Ignore:
Timestamp:
Aug 19, 2022 3:07:12 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
153154
Message:

IPRT/nocrt: Implemented powf. bugref:10261

Location:
trunk/src/VBox/Runtime/common/math
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/math/pow.asm

    r96337 r96338  
    3939; @returns st(0) / xmm0
    4040; @param    rdBase      [xSP + xCB*2] / xmm0
    41 ; @param    rdExp       [xSP + xCB*2 + RTLRD_CB] / xmm1
     41; @param    rdExp       [xSP + xCB*2 + 8] / xmm1
     42;
    4243RT_NOCRT_BEGINPROC pow
    4344        push    xBP
  • trunk/src/VBox/Runtime/common/math/powf.asm

    r96337 r96338  
    11; $Id$
    22;; @file
    3 ; IPRT - No-CRT pow - AMD64 & X86.
     3; IPRT - No-CRT powf - AMD64 & X86.
    44;
    55
     
    3636
    3737;;
    38 ; Compute the rdBase to the power of rdExp.
     38; Compute the rfBase to the power of rfExp.
    3939; @returns st(0) / xmm0
    40 ; @param    rdBase      [xSP + xCB*2] / xmm0
    41 ; @param    rdExp       [xSP + xCB*2 + RTLRD_CB] / xmm1
    42 RT_NOCRT_BEGINPROC pow
     40; @param    rfBase      [xSP + xCB*2] / xmm0
     41; @param    rfExp       [xSP + xCB*2 + 4] / xmm1
     42;
     43RT_NOCRT_BEGINPROC powf
    4344        push    xBP
    4445        SEH64_PUSH_xBP
     
    5556        ;
    5657%ifdef RT_ARCH_AMD64
    57         movsd   [xBP - 20h], xmm0
    58         fld     qword [xBP - 20h]
     58        movss   [xBP - 20h], xmm0
     59        fld     dword [xBP - 20h]
    5960        fxam
    6061        fnstsw  ax
    6162        mov     dx, ax                      ; dx=fxam(base)
    6263
    63         movsd   [xBP - 30h], xmm1
    64         fld     qword [xBP - 30h]
     64        movss   [xBP - 30h], xmm1
     65        fld     dword [xBP - 30h]
    6566%else
    66         fld     qword [xBP + xCB*2]
     67        fld     dword [xBP + xCB*2]
    6768        fxam
    6869        fnstsw  ax
    6970        mov     dx, ax                      ; dx=fxam(base)
    7071
    71         fld     qword [xBP + xCB*2 + RTLRD_CB]
     72        fld     dword [xBP + xCB*2 + RTLRD_CB]
    7273%endif
    7374
     
    8586        jne     .return_input_reg
    8687
    87         fstp    qword [xSP - 30h]
    88         movsd   xmm0, [xSP - 30h]
     88        fstp    dword [xSP - 30h]
     89        movss   xmm0, [xSP - 30h]
    8990
    9091.return:
     
    111112
    112113.return_exp:
    113         movsd   xmm0, xmm1
     114        movss   xmm0, xmm1
    114115        jmp     .return
    115 ENDPROC   RT_NOCRT(pow)
     116ENDPROC   RT_NOCRT(powf)
    116117
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette