Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
8687 | turbocat | 1 | /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ |
2 | .text |
||
3 | |||
4 | .global modf; |
||
5 | |||
6 | modf: |
||
7 | pushl %ebp |
||
8 | movl %esp,%ebp |
||
9 | subl $16,%esp |
||
10 | pushl %ebx |
||
11 | fnstcw -4(%ebp) |
||
12 | fwait |
||
13 | movw -4(%ebp),%ax |
||
14 | orw $0x0c3f,%ax |
||
15 | movw %ax,-8(%ebp) |
||
16 | fldcw -8(%ebp) |
||
17 | fwait |
||
18 | fldl 8(%ebp) |
||
19 | frndint |
||
20 | fstpl -16(%ebp) |
||
21 | fwait |
||
22 | movl -16(%ebp),%edx |
||
23 | movl -12(%ebp),%ecx |
||
24 | movl 16(%ebp),%ebx |
||
25 | movl %edx,(%ebx) |
||
26 | movl %ecx,4(%ebx) |
||
27 | fldl 8(%ebp) |
||
28 | fsubl -16(%ebp) |
||
29 | leal -20(%ebp),%esp |
||
30 | fclex |
||
31 | fldcw -4(%ebp) |
||
32 | fwait |
||
33 | popl %ebx |
||
34 | leave |
||
35 | ret |