~ubuntu-branches/ubuntu/raring/avr-libc/raring-proposed

« back to all changes in this revision

Viewing changes to libm/fplib/fp_zero.S

  • Committer: Bazaar Package Importer
  • Author(s): Hakan Ardo
  • Date: 2008-04-04 17:05:32 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20080404170532-tiwwl2e2qln7ri0w
Tags: 1:1.6.2-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  -*- Mode: Asm -*-  */
2
 
 
3
1
/* Copyright (c) 2002  Michael Stumpf  <mistumpf@de.pepperl-fuchs.com>
 
2
   Copyright (c) 2006  Dmitry Xmelkov
4
3
   All rights reserved.
5
4
 
6
 
 
7
5
   Redistribution and use in source and binary forms, with or without
8
6
   modification, are permitted provided that the following conditions are met:
9
7
 
10
8
   * Redistributions of source code must retain the above copyright
11
9
     notice, this list of conditions and the following disclaimer.
12
 
   
13
10
   * Redistributions in binary form must reproduce the above copyright
14
11
     notice, this list of conditions and the following disclaimer in
15
12
     the documentation and/or other materials provided with the
16
13
     distribution.
17
 
     
18
14
   * Neither the name of the copyright holders nor the names of
19
15
     contributors may be used to endorse or promote products derived
20
16
     from this software without specific prior written permission.
29
25
   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30
26
   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31
27
   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32
 
   POSSIBILITY OF SUCH DAMAGE. 
33
 
*/
34
 
 
35
 
/* $Id: fp_zero.S,v 1.4 2005/06/30 22:31:07 joerg_wunsch Exp $ */
36
 
 
37
 
/*
38
 
    fp_zero.S is part of     FPlib V 0.3.0       ported to avr-as
39
 
    for details see readme.fplib
40
 
 
41
 
 *----------------------------------------------------------------------------------------*/
42
 
 
43
 
#include "gasava.inc"
44
 
#include "macros.inc"
45
 
#include "fplib.inc"
46
 
 
47
 
          TEXT_SEG(fplib, __fp_zero)
48
 
          FUNCTION(__fp_zero)
49
 
 
50
 
GLOBAL(__fp_zero)
51
 
    CLR     rA0     ; 0.0 = 0x00 00 00 00
52
 
    CLR     rA1
53
 
    CLR     rA2
54
 
GLOBAL(__fp_zerox)
55
 
    CLR     rA3     ; rA3 == 0 -> merge sets everything to 0
56
 
    RET
57
 
 
58
 
          ENDFUNC
59
 
 
60
 
 
 
28
   POSSIBILITY OF SUCH DAMAGE. */
 
29
 
 
30
/* $Id: fp_zero.S,v 1.5 2007/01/14 15:10:11 dmix Exp $ */
 
31
 
 
32
#include "fp32def.h"
 
33
#include "asmdef.h"
 
34
 
 
35
/* __fp_zero() return 0.0
 
36
   __fp_szero() return 0.0 with sign bit.
 
37
 */
 
38
 
 
39
ENTRY   __fp_zero
 
40
        clt
 
41
ENTRY   __fp_szero
 
42
        clr     rAE
 
43
        clr     rA0
 
44
        clr     rA1
 
45
        X_movw  rA2, rA0
 
46
        bld     rA3, 7
 
47
        ret
 
48
ENDFUNC