~ubuntu-branches/ubuntu/breezy/avr-libc/breezy

« back to all changes in this revision

Viewing changes to libm/fplib/fp_nan.S

  • Committer: Bazaar Package Importer
  • Author(s): Hakan Ardo
  • Date: 2002-04-15 14:53:38 UTC
  • Revision ID: james.westby@ubuntu.com-20020415145338-c8hi0tn5bx74w7o3
Tags: upstream-20020203
ImportĀ upstreamĀ versionĀ 20020203

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*  -*- Mode: Asm -*-  */
 
2
/*
 
3
    fp_nan.S is part of     FPlib V 0.3.0       ported to avr-as
 
4
    for copyright and details see readme.fplib
 
5
 
 
6
 *----------------------------------------------------------------------------------------*/
 
7
 
 
8
#include "gasava.inc"
 
9
#include "fplib.inc"
 
10
 
 
11
          TEXT_SEG(fplib, __fp_nan)
 
12
          FUNCTION(__fp_nan)
 
13
 
 
14
GLOBAL(__fp_nanEDOM)
 
15
 #ifdef __ERRNO__
 
16
   LDI     rA3,EDOM             ; the most used errno value
 
17
   RJMP    __fp_nan
 
18
 #endif
 
19
GLOBAL(__fp_nanERANGE)
 
20
 #ifdef __ERRNO__
 
21
   LDI     rA3,ERANGE           ; the most used errno value
 
22
 #endif
 
23
GLOBAL(__fp_nan)                ; -> -NaN
 
24
 #ifdef __ERRNO__
 
25
   STS     _errno,rA3
 
26
   #if __ERRNO__ == 2
 
27
     STS     _errno+1,rT1c
 
28
   #endif
 
29
 #endif
 
30
GLOBAL(__fp_nanx)               ;
 
31
    LDI     rA3,0xFF
 
32
    LDI     rA2,0xC0
 
33
    RET
 
34
 
 
35
          ENDFUNC
 
36
 
 
37