+2004-12-28 Paul Stoffregen <paul AT pjrc.com>
+
+ * device/lib/printf_fast.c: only build on supported arch.
+ * device/lib/printf_tiny.c: only build on supported arch.
+ * device/lib/printf_fast_f.c: only build if asm float lib
+ * device/lib/_fsget1arg.c: only build if asm float lib
+ * device/lib/_fsget2args.c: only build if asm float lib
+ * device/lib/_fsnormalize.c: only build if asm float lib
+ * device/lib/_fsreturnval.c: only build if asm float lib
+ * device/lib/_fsrshift.c: only build if asm float lib
+ * device/lib/_fsswapargs.c: only build if asm float lib
+ * device/include/stdio.h: don't provide print_fast,
+ print_fast_f, print_tiny prototypes if --xstack used
+
2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
* device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
extern char getchar(void);
extern void putchar(char);
-#ifdef __mcs51
+#if defined(SDCC_mcs51) && !defined(SDCC_USE_XSTACK)
extern void printf_fast(code char *fmt, ...) _REENTRANT;
extern void printf_fast_f(code char *fmt, ...) _REENTRANT;
extern void printf_tiny(code char *fmt, ...) _REENTRANT;
#include <float.h>
+#ifdef FLOAT_ASM_MCS51
+
static void dummy(void) _naked
{
// input passed in a,b,dph,dpl
_endasm;
}
-
+#endif
#include <float.h>
-
+#ifdef FLOAT_ASM_MCS51
static void dummy(void) _naked
{
_endasm;
}
+#endif
#define SDCC_FLOAT_LIB
#include <float.h>
+
+#ifdef FLOAT_ASM_MCS51
+
static void dummy(void) _naked
{
_asm
ret
_endasm;
}
+
+#endif
+
#define SDCC_FLOAT_LIB
#include <float.h>
+
+#ifdef FLOAT_ASM_MCS51
+
static void dummy(void) _naked
{
_asm
_endasm;
}
+#endif
+
#include <float.h>
+#ifdef FLOAT_ASM_MCS51
+
static void dummy(void) _naked
{
_asm
_endasm;
}
+#endif
+
#define SDCC_FLOAT_LIB
#include <float.h>
+
+#ifdef FLOAT_ASM_MCS51
+
static void dummy(void) _naked
{
_asm
_endasm;
}
+#endif
+
#define PRINTF_FAST printf_fast
#endif
+
+#if !defined(SDCC_mcs51) || defined(SDCC_USE_XSTACK) || defined(_SDCC_NO_ASM_LIB_FUNCS)
+// Does printf_fast really work on ds390 and ds400?
+// If it does, enable them in the line above
+#if defined(SDCC_USE_XSTACK)
+#warning "printf_fast not built, does not support --xstack"
+#elif defined(_SDCC_NO_ASM_LIB_FUNCS)
+#warning "printf_fast not built, _SDCC_NO_ASM_LIB_FUNCS defined"
+#endif
+#else // defines are compatible with printf_fast
+
+
void PRINTF_FAST(code char *fmt, ...) reentrant
{
fmt; /* supress unreferenced variable warning */
#endif // FLOAT
-
+#endif // defines compatible with printf_fast
// Same as printf_fast, but with floating point enabled
+#define SDCC_FLOAT_LIB
+#include <float.h>
+
+#ifdef FLOAT_ASM_MCS51
+
#define FLOAT
#define PRINTF_FAST printf_fast_f
#include "printf_fast.c"
+#endif
#define print_zero_flag PSW.5
+#if !defined(SDCC_mcs51) || defined(SDCC_USE_XSTACK) || defined(_SDCC_NO_ASM_LIB_FUNCS)
+// Does printf_tiny really work on ds390 and ds400?
+// If it does, enable them in the line above
+#if defined(SDCC_USE_XSTACK)
+#warning "printf_tiny not built, does not support --xstack"
+#elif defined(_SDCC_NO_ASM_LIB_FUNCS)
+#warning "printf_tiny not built, _SDCC_NO_ASM_LIB_FUNCS defined"
+#endif
+#else // defines are compatible with printf_tiny
+
+
+
void printf_tiny(code char *fmt, ...) reentrant
{
fmt; /* supress unreferenced variable warning */
}
+#endif // defines compatible with printf_tiny
+