X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=device%2Finclude%2Ffloat.h;h=616c34f11d5ff6827374c8efb51e71b9edcd3339;hb=3d4664da32acec4a670ed7a3ca4ac420580403cc;hp=3d3bb4c051f50ba046472ea1381709f4eab8a99c;hpb=23c7a28e39b67f70ebf98aefaa112a74922a3900;p=fw%2Fsdcc diff --git a/device/include/float.h b/device/include/float.h index 3d3bb4c0..616c34f1 100644 --- a/device/include/float.h +++ b/device/include/float.h @@ -1,25 +1,25 @@ /*------------------------------------------------------------------------- float.h - ANSI functions forward declarations - + Written By - Sandeep Dutta . sandeep.dutta@usa.net (1998) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - + In other words, you are welcome to use, share and improve this program. You are forbidden to forbid anyone else to use, share and improve - what you give them. Help stamp out software-hoarding! + what you give them. Help stamp out software-hoarding! -------------------------------------------------------------------------*/ #ifndef __SDC51_FLOAT_H @@ -41,6 +41,7 @@ /* the following deal with IEEE single-precision numbers */ #define EXCESS 126 #define SIGNBIT ((unsigned long)0x80000000) +#define __INFINITY ((unsigned long)0x7F800000) #define HIDDEN (unsigned long)(1ul << 23) #define SIGN(fp) (((unsigned long)(fp) >> (8*sizeof(fp)-1)) & 1) #define EXP(fp) (((unsigned long)(fp) >> 23) & (unsigned int) 0x00FF) @@ -68,30 +69,30 @@ float __fsdiv (float, float); char __fslt (float, float); char __fseq (float, float); -char __fsqt (float, float); +char __fsgt (float, float); #if defined(SDCC_FLOAT_LIB) && defined(SDCC_mcs51) && !defined(SDCC_USE_XSTACK) && !defined(_SDCC_NO_ASM_LIB_FUNCS) #define FLOAT_ASM_MCS51 -// This adds extra code for proper round-off, in -// an attempt to match the results from gcc. +/* This adds extra code for proper round-off, in + an attempt to match the results from gcc. */ #define FLOAT_FULL_ACCURACY -// This adds about 66 bytes to the code size and -// significantly speeds up shift operations more -// than 8 bits (common when subtracting numbers -// of significantly different magnitude and scaling -// to fixed point) +/* This adds about 66 bytes to the code size and + significantly speeds up shift operations more + than 8 bits (common when subtracting numbers + of significantly different magnitude and scaling + to fixed point) */ #define FLOAT_SHIFT_SPEEDUP #define sign_a psw.1 #define sign_b psw.5 #define exp_a dpl #define exp_b dph -#endif // using mcs51 assembly +#endif /* using mcs51 assembly */ -#endif // __SDC51_FLOAT_H +#endif /* __SDC51_FLOAT_H */