1
/* $Id: fpu.as,v 1.4 2002/09/08 09:16:15 jonas Exp $ */
2
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
3
/* Translated from tasm to GAS by C. Sandmann */
4
/* One comment displaced to get it compiled by as.exe directly !!! */
7
/* This routine assumes DS == SS since [ESI] coding shorter than [EBP] coding */
9
.global __detect_80387 /* direct from the Intel manual */
10
__detect_80387: /* returns 1 if 387 (or more), else 0 */
12
pushl %eax /* Dummy work area on stack */
21
movl (%esi),%eax /* Only ax significant */
28
/* fdiv GAS encodes this as 0xdcf1 !! BUG */
34
movzwl (%esi),%eax /* Clears upper %eax */
37
fninit /* 387 present, initialize. */
41
/* enable invalid operation exception */
48
popl %esi /* Fix stack first */
53
Revision 1.4 2002/09/08 09:16:15 jonas
54
* added closing of comment for logs to avoid warning
56
Revision 1.3 2002/09/07 16:01:18 peter
57
* old logs removed and tabs fixed