Sync usage with man page.
[netbsd-mini2440.git] / external / bsd / pcc / dist / pcc-libs / libpcc / _ftol.c
blob083b63ca82eba827cd560f7f3242e55eda25d727
1 /* $Id: _ftol.c,v 1.1.1.1 2009/09/04 00:27:36 gmcgarry Exp $ */
3 /*
4 * _ftol() and _ftol2() implementations used on win32 when linking against
5 * other code built with Visual Studio.
6 */
8 asm( " .text\n"
9 " .globl __ftol\n"
10 " .globl __ftol2\n"
11 "__ftol:\n"
12 "__ftol2:\n"
13 " fnstcw -2(%esp)\n"
14 " movw -2(%esp),%ax\n"
15 " or %ax,0x0c00\n"
16 " movw %ax,-4(%esp)\n"
17 " fldcw -4(%esp)\n"
18 " fistpl -12(%esp)\n"
19 " fldcw -2(%esp)\n"
20 " movl -12(%esp),%eax\n"
21 " movl -8(%esp),%edx\n"
22 " ret\n"