translate: fcom and more
[ia32rtools.git] / tests / x87.asm
CommitLineData
d4a985bd 1
2_text segment para public 'CODE' use32
3
4sub_test proc near
5
6var_20 = dword ptr -20h
7var_18 = qword ptr -18h
8arg_0 = dword ptr 8
9
10 push ebp
11 mov ebp, esp
12 sub esp, 20h
13 fild [ebp+var_20]
14 fidiv [ebp+arg_0]
15 fmul [ebp+var_18]
16 fild [ebp+var_20]
17 fdiv st(1), st
18 faddp st(1), st
16057ce1 19 fcom [ebp+var_18]
20 xor eax, eax
21 fnstsw ax
22 test ah, 41h
23 mov eax, 0
24 setz al
d4a985bd 25 fld1
fe18df39 26 fdivr [ebp+var_18]
27 fxch st(1)
28 fchs
29 fsubrp st, st
622eb2ef 30 fld st
fe18df39 31 fyl2x
32 fld st
16057ce1 33 fistp [ebp+var_20]
34 fst [ebp+var_18]
d4a985bd 35 call __ftol
36 leave
37 retn
38sub_test endp
39
40
41_text ends
42
43; vim:expandtab