VirtualBox

source: vbox/trunk/src/VBox/Runtime/math/remainderf.asm@ 2919

Last change on this file since 2919 was 1, checked in by vboxsync, 55 years ago

import

  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1; $Id: remainderf.asm 1 1970-01-01 00:00:00Z vboxsync $
2;; @file
3; InnoTek Portable Runtime - No-CRT remainderf - AMD64 & X86.
4;
5
6;
7; Copyright (C) 2006 InnoTek Systemberatung GmbH
8;
9; This file is part of VirtualBox Open Source Edition (OSE), as
10; available from http://www.virtualbox.org. This file is free software;
11; you can redistribute it and/or modify it under the terms of the GNU
12; General Public License as published by the Free Software Foundation,
13; in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14; distribution. VirtualBox OSE is distributed in the hope that it will
15; be useful, but WITHOUT ANY WARRANTY of any kind.
16;
17; If you received this file as part of a commercial VirtualBox
18; distribution, then only the terms of your commercial VirtualBox
19; license agreement apply instead of the previous paragraph.
20;
21
22%include "iprt/asmdefs.mac"
23
24BEGINCODE
25
26%ifdef __AMD64__
27 %define _SP rsp
28 %define _BP rbp
29%else
30 %define _SP esp
31 %define _BP ebp
32%endif
33
34;;
35; See SUS.
36; @returns st(0)
37; @param rf1 [ebp + 08h] xmm0
38; @param rf2 [ebp + 0ch] xmm1
39BEGINPROC RT_NOCRT(remainderf)
40 push _BP
41 mov _BP, _SP
42 sub _SP, 20h
43
44%ifdef __AMD64__
45 movss [rsp], xmm1
46 movss [rsp + 10h], xmm0
47 fld dword [rsp]
48 fld dword [rsp + 10h]
49%else
50 fld dword [ebp + 0ch]
51 fld dword [ebp + 8h]
52%endif
53
54 fprem1
55 fstsw ax
56 test ah, 04h
57 jnz .done
58 fstp st1
59
60.done:
61%ifdef __AMD64__
62 fstp dword [rsp]
63 movss xmm0, [rsp]
64%endif
65
66 leave
67 ret
68ENDPROC RT_NOCRT(remainderf)
69
70
Note: See TracBrowser for help on using the repository browser.

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