~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to rtl/go32v2/fpu.as

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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  !!! */
5
 
/* by Pierre Muller */
6
 
 
7
 
/* This routine assumes DS == SS since [ESI] coding shorter than [EBP] coding */
8
 
 
9
 
        .global __detect_80387          /* direct from the Intel manual */
10
 
__detect_80387:                         /* returns 1 if 387 (or more), else 0 */
11
 
        pushl   %esi
12
 
        pushl   %eax                    /* Dummy work area on stack */
13
 
        movl    %esp,%esi
14
 
        fninit
15
 
        movw    $0x5a5a,(%esi)
16
 
        fnstsw  (%esi)
17
 
        cmpb    $0,(%esi)
18
 
        jne     Lno_387
19
 
 
20
 
        fnstcw  (%esi)
21
 
        movl    (%esi),%eax             /* Only ax significant */
22
 
        andl    $0x103f,%eax
23
 
        cmpl    $0x3f,%eax
24
 
        jne     Lno_387
25
 
 
26
 
        fld1
27
 
        fldz
28
 
/*      fdiv                               GAS encodes this as 0xdcf1 !! BUG */
29
 
        .byte   0xde,0xf9
30
 
        fld     %st
31
 
        fchs
32
 
        fcompp
33
 
        fstsw   (%esi)
34
 
        movzwl  (%esi),%eax             /* Clears upper %eax */
35
 
        sahf
36
 
        je      Lno_387
37
 
        fninit                          /* 387 present, initialize. */
38
 
        fnstcw  (%esi)
39
 
        wait
40
 
        andw    $0x0fffa,(%esi)
41
 
/* enable invalid operation exception */
42
 
        fldcw   (%esi)
43
 
        movw    $1,%ax
44
 
        jmp     Lexit
45
 
Lno_387:
46
 
        xorl    %eax,%eax
47
 
Lexit:
48
 
        popl    %esi                    /* Fix stack first */
49
 
        popl    %esi
50
 
        ret
51
 
/*
52
 
  $Log: fpu.as,v $
53
 
  Revision 1.4  2002/09/08 09:16:15  jonas
54
 
    * added closing of comment for logs to avoid warning
55
 
 
56
 
  Revision 1.3  2002/09/07 16:01:18  peter
57
 
    * old logs removed and tabs fixed
58
 
 
59
 
*/