* sources in device/lib/pic16/libsdcc/float/*.c were empty,
[fw/sdcc] / device / lib / pic16 / libsdcc / float / fsneq.c
1 /*
2 ** libgcc support for software floating point.
3 ** Copyright (C) 1991 by Pipeline Associates, Inc.  All rights reserved.
4 ** Permission is granted to do *anything* you want with this file,
5 ** commercial or otherwise, provided this message remains intact.  So there!
6 ** I would appreciate receiving any updates/patches/changes that anyone
7 ** makes, and am willing to be the repository for said changes (am I
8 ** making a big mistake?).
9 **
10 ** Pat Wood
11 ** Pipeline Associates, Inc.
12 ** pipeline!phw@motown.com or
13 ** sun!pipeline!phw or
14 ** uunet!motown!pipeline!phw
15 */
16
17 /*
18 ** $Id$
19 */
20
21 /* (c)2000/2001: hacked a little by johan.knol@iduna.nl for sdcc */
22
23 #include <float.h>
24
25 union float_long
26   {
27     float f;
28     long l;
29   };
30
31 /* compare two floats */
32 char __fsneq (float a1, float a2)
33 // reentrant
34 {
35   volatile union float_long fl1, fl2;
36
37   fl1.f = a1;
38   fl2.f = a2;
39
40 #if 0
41   if (fl1.l<0 && fl2.l<0)
42     {
43       fl1.l ^= SIGNBIT;
44       fl2.l ^= SIGNBIT;
45     }
46 #endif
47
48   if (fl1.l == fl2.l)
49     return (0);
50   return (1);
51 }