* support/regression/tests/staticinit.c,
authorborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 27 May 2006 18:41:47 +0000 (18:41 +0000)
committerborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 27 May 2006 18:41:47 +0000 (18:41 +0000)
  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

ChangeLog
support/regression/ports/pic16/spec.mk
support/regression/tests/float.c
support/regression/tests/staticinit.c

index 0ec01fb98a539c86ad6f47ccc1222692fd7f0db4..4b238a25e94851e03679aca6d77550a3c5bc9761 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,12 @@
 
        * 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>
 
index 1e77dd024dbee47cfbd56913403d7ac9cc21d86f..b1fdcb0e71960182ddcc0936a600e3f65c8ad704 100644 (file)
@@ -8,8 +8,8 @@ else
 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
index 0cc2fbace61d7ac216b894f37847bb4aa7b3577d..448782ee76f36b8fdcaeeb5b8cd7143e25fd71f9 100644 (file)
@@ -1,7 +1,6 @@
 /* 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 {
@@ -80,12 +78,10 @@ char compare (float is, float should) {
     return 1;
   }
 }
-#endif  /* SDCC_pic16 */
 
 void
 testFloatMath(void)
 {
-#ifndef SDCC_pic16
   int i;
   int t = sizeof(cases)/sizeof(cases[0]);
   float result;
@@ -123,7 +119,6 @@ testFloatMath(void)
     #endif
   }
   DEBUG(printf ("%d tests, %d errors\n", tests, errors));
-#endif  /* SDCC_pic16 */
 }
 
 #ifndef REENTRANT
index e20063d8a7c532614f10da1c64e4309d621b08d3..4f03698eb08d584cfec2571079f7083d5549d01d 100644 (file)
@@ -4,8 +4,6 @@
     type: char, int, long
 */
 
-//error: no target memory available for section ".idata"
-
 #include <testfwk.h>
 
 static {type} smallDense[] = {
@@ -23,7 +21,7 @@ testSmallDense(void)
     ASSERT(smallDense[5] == 6);
 }
 
-#ifdef __mcs51
+#ifdef SDCC_mcs51
 idata at 0xa0  /* leave space for the stack */
 #endif
 static {type} smallSparse[] = {
@@ -44,7 +42,7 @@ testSmallSparse(void)
     ASSERT(smallSparse[8] == 1);
 }
 
-#ifdef __mcs51
+#ifdef SDCC_mcs51
 idata at 0xd0
 #endif
 static {type} smallSparseZero[] = {
@@ -72,9 +70,10 @@ testSmallSparseZero(void)
     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 */
@@ -113,12 +112,10 @@ static {type} largeMixed[] = {
     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);
@@ -129,5 +126,4 @@ testLargeMixed(void)
     ASSERT(largeMixed[143+1] == 4);
     ASSERT(largeMixed[143+8+1] == 4);
     ASSERT(largeMixed[143+16+1] == 4);
-#endif
 }