1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
;; Licensed to the .NET Foundation under one or more agreements.
;; The .NET Foundation licenses this file to you under the MIT license.
;; See the LICENSE file in the project root for more information.
include asmmacros.inc
LEAF_ENTRY RhpFltRemRev, _TEXT
sub rsp, 18h
movss dword ptr [rsp + 10h], xmm1 ; divisor
movss dword ptr [rsp + 8h], xmm0 ; dividend
fld dword ptr [rsp + 10h] ; divisor
fld dword ptr [rsp + 8h] ; dividend
fremloop:
fprem
fstsw ax
test ax, 0400h
jnz fremloop
fstp dword ptr [rsp]
movlps xmm0,qword ptr [rsp]
fstp st(0)
add rsp,18h
ret
LEAF_END RhpFltRemRev, _TEXT
LEAF_ENTRY RhpDblRemRev, _TEXT
sub rsp, 18h
movsd qword ptr [rsp + 10h], xmm1 ; divisor
movsd qword ptr [rsp + 8h], xmm0 ; dividend
fld qword ptr [rsp + 10h] ; divisor
fld qword ptr [rsp + 8h] ; dividend
fremloopd:
fprem
fstsw ax
test ax, 0400h
jnz fremloopd
fstp qword ptr [rsp]
movlpd xmm0,qword ptr [rsp]
fstp st(0)
add rsp,18h
ret
LEAF_END RhpDblRemRev, _TEXT
END
|