support/regression/tests/float.c: regression tests fully enabled
for pic16 port by putting the initialized data arrays into the code
section
* support/regression/ports/pic16/spec.mk: don't link default libraries.
This was changed by mistake in the previous version.
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4193
4a8a32a2-be11-0410-ad9d-
d568d2c75423
* support/regression/fwk/lib/testfwk.c: increase stack size
from deafult 64 bytes to 128 bytes
+ * support/regression/tests/staticinit.c,
+ support/regression/tests/float.c: regression tests fully enabled
+ for pic16 port by putting the initialized data arrays into the code
+ section
+ * support/regression/ports/pic16/spec.mk: don't link default libraries.
+ This was changed by mistake in the previous version.
2006-05-28 Vangelis Rokas <vrokas AT users.sourceforge.net>
endif
SDCCFLAGS += -mpic16 -pp18f452 -I$(top_srcdir)/device/include/pic16 --nostdinc --less-pedantic -Wl,-q -DREENTRANT=reentrant -I$(top_srcdir)
-#LINKFLAGS = --nostdlib
-#LINKFLAGS += libsdcc.lib libc18f.lib libm18f.lib
+LINKFLAGS = --nostdlib
+LINKFLAGS += libsdcc.lib libc18f.lib libm18f.lib
LIBDIR = $(top_builddir)device/lib/build/pic16
OBJEXT = .o
/* Float tests.
operation: ADD, SUB, MUL, DIV, REVDIV
- Test excluded from pic16 regression test
*/
#if 1
#ifdef SDCC_mcs51
#define STORAGE xdata
#define XDATA xdata
-#else
-#define STORAGE
+#elif SDCC_pic16
+#define STORAGE code
#define XDATA
#endif
-#ifndef SDCC_pic16
XDATA volatile float left, right, result;
struct {
return 1;
}
}
-#endif /* SDCC_pic16 */
void
testFloatMath(void)
{
-#ifndef SDCC_pic16
int i;
int t = sizeof(cases)/sizeof(cases[0]);
float result;
#endif
}
DEBUG(printf ("%d tests, %d errors\n", tests, errors));
-#endif /* SDCC_pic16 */
}
#ifndef REENTRANT
type: char, int, long
*/
-//error: no target memory available for section ".idata"
-
#include <testfwk.h>
static {type} smallDense[] = {
ASSERT(smallDense[5] == 6);
}
-#ifdef __mcs51
+#ifdef SDCC_mcs51
idata at 0xa0 /* leave space for the stack */
#endif
static {type} smallSparse[] = {
ASSERT(smallSparse[8] == 1);
}
-#ifdef __mcs51
+#ifdef SDCC_mcs51
idata at 0xd0
#endif
static {type} smallSparseZero[] = {
ASSERT(smallSparseZeroTail[0] == 1);
}
-#ifndef SDCC_pic16
-#ifdef __mcs51
+#ifdef SDCC_mcs51
xdata
+#elif SDCC_pic16
+code
#endif
static {type} largeMixed[] = {
1, 2, 3, 4, 5, 6, 7, /* 0-6 */
3, 4, 5, 6, 3, 4, 5, 6,
3, 4, 5, 6, 3, 4, 5, 6
};
-#endif
static void
testLargeMixed(void)
{
-#ifndef SDCC_pic16
ASSERT(largeMixed[0] == 1);
ASSERT(largeMixed[1] == 2);
ASSERT(largeMixed[7] == 1);
ASSERT(largeMixed[143+1] == 4);
ASSERT(largeMixed[143+8+1] == 4);
ASSERT(largeMixed[143+16+1] == 4);
-#endif
}