~ubuntu-branches/ubuntu/gutsy/avr-libc/gutsy

« back to all changes in this revision

Viewing changes to libm/fplib/fplib.inc

  • Committer: Bazaar Package Importer
  • Author(s): Hakan Ardo
  • Date: 2006-05-01 12:03:39 UTC
  • mto: (3.1.1 edgy)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20060501120339-q93dxulpunby36dj
Tags: upstream-1.4.4
ImportĀ upstreamĀ versionĀ 1.4.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
   This file is part of     FPlib V 0.3.0       Floating point library for Atmel AVR uC
5
5
 
6
 
   Copyright (c) Michael Stumpf   <mistumpf@de.pepperl-fuchs.com>
 
6
   Copyright (c) 2006 Michael Stumpf   <mistumpf@de.pepperl-fuchs.com>
7
7
   All rights reserved.
8
8
 
9
9
 
42
42
 *------------------------------------------------------------------------------------------
43
43
 */
44
44
 
45
 
#ifndef __FPLIB_INC
46
 
#define __FPLIB_INC
47
 
 
48
45
;--------------------------------------------------------------------
49
46
; fp lib register nicknames
50
47
 
67
64
#define rT1c     __zero_reg__   /* 2nd temporary, clear after use */
68
65
 
69
66
/*--------------------------------------------------------------------------
 
67
 * Library constant :
 
68
 */
 
69
#define EMAX    255
 
70
#define EMIN    0
 
71
 
 
72
/*--------------------------------------------------------------------------
70
73
 * Library shapening :
71
74
 */
72
75
 
82
85
 * math function macro
83
86
 */
84
87
 
85
 
        .macro  mLPMRdZpp rr
86
 
#ifdef __AVR_ENHANCED__
87
 
        lpm     \rr, Z+
88
 
#else
89
 
        lpm
90
 
        mov     \rr, r0
91
 
        adiw    ZL, 1
92
 
#endif
93
 
        .endm
94
 
 
95
 
#define LPMRdZpp(Rd) mLPMRdZpp Rd
96
 
 
97
88
/*--------------------------------------------------------------------------
98
89
 * avr-as specific definitions for segments, functions and labels.
99
90
 */
103
94
#define DCB     .byte
104
95
 
105
96
#define ACCURACY        7       /* decimal digits */
106
 
#define retByte rByte           /* FIXME: why has this been renamed ?  */
107
97
 
108
98
/* Put constant tables at low addresses in program memory, so they are
109
99
   reachable for "lpm" without using RAMPZ on >64K devices.  */
187
177
#define FPSWAP \
188
178
        fpswap
189
179
 
190
 
#endif
191