remainderf.asm revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
0N/A; $Id$
2362N/A;; @file
0N/A; InnoTek Portable Runtime - No-CRT remainderf - AMD64 & X86.
0N/A;
0N/A
0N/A;
2362N/A; Copyright (C) 2006 InnoTek Systemberatung GmbH
0N/A;
2362N/A; This file is part of VirtualBox Open Source Edition (OSE), as
0N/A; available from http://www.virtualbox.org. This file is free software;
0N/A; you can redistribute it and/or modify it under the terms of the GNU
0N/A; General Public License as published by the Free Software Foundation,
0N/A; in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
0N/A; distribution. VirtualBox OSE is distributed in the hope that it will
0N/A; be useful, but WITHOUT ANY WARRANTY of any kind.
0N/A;
0N/A; If you received this file as part of a commercial VirtualBox
0N/A; distribution, then only the terms of your commercial VirtualBox
0N/A; license agreement apply instead of the previous paragraph.
0N/A;
2362N/A
2362N/A%include "iprt/asmdefs.mac"
2362N/A
0N/ABEGINCODE
0N/A
0N/A%ifdef __AMD64__
0N/A %define _SP rsp
0N/A %define _BP rbp
0N/A%else
0N/A %define _SP esp
0N/A %define _BP ebp
0N/A%endif
0N/A
0N/A;;
0N/A; See SUS.
0N/A; @returns st(0)
0N/A; @param rf1 [ebp + 08h] xmm0
0N/A; @param rf2 [ebp + 0ch] xmm1
0N/ABEGINPROC RT_NOCRT(remainderf)
0N/A push _BP
0N/A mov _BP, _SP
0N/A sub _SP, 20h
0N/A
0N/A%ifdef __AMD64__
movss [rsp], xmm1
movss [rsp + 10h], xmm0
fld dword [rsp]
fld dword [rsp + 10h]
%else
fld dword [ebp + 0ch]
fld dword [ebp + 8h]
%endif
fprem1
fstsw ax
test ah, 04h
jnz .done
fstp st1
.done:
%ifdef __AMD64__
fstp dword [rsp]
movss xmm0, [rsp]
%endif
leave
ret
ENDPROC RT_NOCRT(remainderf)