src/regression/arrays.c, src/regression/bank1.c, src/regression/bool2.c, src/regressi...
authorfrief <frief@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 21 Nov 2006 17:15:18 +0000 (17:15 +0000)
committerfrief <frief@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 21 Nov 2006 17:15:18 +0000 (17:15 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4477 4a8a32a2-be11-0410-ad9d-d568d2c75423

16 files changed:
ChangeLog
src/regression/Makefile
src/regression/arrays.c
src/regression/bank1.c
src/regression/bool2.c
src/regression/compare10.c
src/regression/compare7.c
src/regression/compare8.c
src/regression/compare9.c
src/regression/configword.c
src/regression/for.c
src/regression/mult1.c
src/regression/pointer1.c
src/regression/rotate6.c
src/regression/string1.c
src/regression/struct1.c

index f65be90839345bd0af9e89cea6208c128b91bb74..2e9d2ff53b37d56ed02ed414eee5619604fee4cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2006-11-21 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
+
+       * src/regression/arrays.c,
+       * src/regression/bank1.c,
+       * src/regression/bool2.c,
+       * src/regression/compare7.c,
+       * src/regression/compare8.c,
+       * src/regression/compare9.c,
+       * src/regression/compare10.c,
+       * src/regression/configword.c,
+       * src/regression/for.c,
+       * src/regression/mult1.c,
+       * src/regression/pointer1.c,
+       * src/regression/rotate6.c,
+       * src/regression/string1.c,
+       * src/regression/struct1.c,
+       * src/regression/Makefile: make PIC14 regression tests run again
+         (3 fail, 6 won't compile)
+
 2006-11-21 Raphael Neider <rneider AT web.de>
 
        * device/include/pic16/pic18f4550.h,
index d2914e34fb86565e46e8bafb361f71cb6651392c..1abd1d97f1569e7d6a476395e87ed217b3d6e24b 100644 (file)
@@ -66,26 +66,27 @@ CREATESTC = create_stc
 SIMULATE = simulate
 
 # List the C files to be test here:
-SRC = b.c \
-       add.c \
+SRC =  add.c \
        add2.c \
        add3.c \
-       and1.c \
+       add4.c \
        and2.c \
+       arrays.c \
        b.c \
+       bank1.c \
        bool1.c \
+       bool2.c \
        bool3.c \
        call1.c \
        compare.c \
        compare2.c \
        compare3.c \
-       compare4.c \
-       compare5.c \
-       compare6.c \
+       configword.c \
        for.c \
        inline.c \
+       mult1.c \
        nestfor.c \
-       or1.c \
+       pointer1.c \
        ptrarg.c \
        ptrfunc.c \
        rotate1.c \
@@ -93,30 +94,24 @@ SRC = b.c \
        rotate3.c \
        rotate4.c \
        rotate5.c \
+       string1.c \
+       struct1.c \
        sub.c \
        sub2.c \
        switch1.c \
        while.c \
        xor.c
-#      arrays.c \
-#      add4.c \
-#      bank1.c \
 #      compare7.c \
 #      compare8.c \
 #      compare9.c \
 #      compare10.c \
-#      configword.c \
-#      mult1.c \
-#      pointer1.c \
 #      rotate6.c \
 #      rotate7.c \
-#      string1.c \
-#      struct1.c \
-#      bool2.c \
 
 COD := $(patsubst %.c, %.cod, $(SRC))
 ASM := $(patsubst %.c, %.asm, $(SRC))
-O := $(patsubst %.c, %.o, $(SRC))
+O   := $(patsubst %.c, %.o,   $(SRC))
+P   := $(patsubst %.c, %.p,   $(SRC))
 STC := $(patsubst %.c, %.stc, $(SRC))
 HEX := $(patsubst %.c, %.hex, $(SRC))
 LST := $(patsubst %.c, %.lst, $(SRC))
@@ -164,6 +159,12 @@ cleano:
          if [ -f $$f ]; then rm $$f; fi \
        done ; \
 
+cleanp:
+       files="$(P)" ; \
+       for f in $$files ; do \
+         if [ -f $$f ]; then rm $$f; fi \
+       done ; \
+
 cleanasm:
        files="$(ASM)" ; \
        for f in $$files ; do \
@@ -188,5 +189,11 @@ cleanlst:
          if [ -f $$f ]; then rm $$f; fi \
        done ; \
 
-clean: cleancod cleanasm cleanstc cleano cleanhex cleanlst
+cleanmap:
+       files="$(MAP)" ; \
+       for f in $$files ; do \
+         if [ -f $$f ]; then rm $$f; fi \
+       done ; \
+
+clean: cleancod cleanasm cleanstc cleano cleanp cleanhex cleanlst cleanmap
        if [ -f "$(LOGFILE)" ]; then rm $(LOGFILE); fi
index fc04ddba266c8b9dde5da86d5b6c67dd217e0eb2..8877692dbcf4b4690c86dd2b2316e3ef76922466 100644 (file)
@@ -2,7 +2,6 @@
 
 unsigned char failures = 0;
 
-bit bit0 = 0;
 unsigned int aint0 = 0;
 unsigned int aint1 = 0;
 unsigned char achar0 = 0;
index c52c6dc779165f9dd982ce38a8c3d0bbbe02206f..05fcd8d73177d6452b7ffed2f6f7ae6c485dbd98 100644 (file)
@@ -1,5 +1,11 @@
 #include "gpsim_assert.h"
 
+#if SUPPORT_BIT_TYPES
+# define bit bit
+#else
+# define bit unsigned char
+#endif
+
 unsigned char success=0;
 unsigned char failures=0;
 unsigned char dummy=0;
index 6b977be18e7c7902940c2b3c0b35a09709b86917..3289d7c9e5160bd51f7b3fcc397d54d068877131 100644 (file)
@@ -2,6 +2,12 @@
 
 unsigned char failures=0;
 
+#if SUPPORT_BIT_TYPES
+# define bit bit
+#else
+# define bit unsigned char
+#endif
+
 bit bit0 = 0;
 bit bit1 = 0;
 unsigned int aint0 = 0;
index 67e4f8bd4a6796c39d7abfa459d166da2e8a05fa..cc9ab9a73fdbbd03c4d417b159bd36340bd4ce92 100644 (file)
@@ -28,7 +28,7 @@ char long1 = 0;
 
 typedef unsigned int word;
 
-word at 0x2007  CONFIG = wdt_off & pwrte_on;
+//word at 0x2007  CONFIG = wdt_off & pwrte_on;
 
 void
 done()
index ea0e8b2e0c8f5f5b602bb823662631f8afda8618..ed07ed8d442e19db0b5df1dabff20a675c805f9c 100644 (file)
@@ -27,7 +27,7 @@ char long1 = 0;
 
 typedef unsigned int word;
 
-word at 0x2007  CONFIG = wdt_off & pwrte_on;
+//word at 0x2007  CONFIG = wdt_off & pwrte_on;
 
 void
 done()
index 67021a9939467566bfbcf95f2683eb2faa260785..1f67b707a9616d1d8356055d45d43c3d6bf1ed75 100644 (file)
@@ -28,7 +28,7 @@ char long1 = 0;
 
 typedef unsigned int word;
 
-word at 0x2007  CONFIG = wdt_off & pwrte_on;
+//word at 0x2007  CONFIG = wdt_off & pwrte_on;
 
 void
 done()
index e344e058de03906408a2a8169ea5fa1c98461225..4fe81f873f59831feac0350c70acfcce456a5395 100644 (file)
@@ -23,7 +23,7 @@ signed char char1 = 0;
 
 typedef unsigned int word;
 
-word at 0x2007  CONFIG = wdt_off & pwrte_on;
+//word at 0x2007  CONFIG = wdt_off & pwrte_on;
 
 void
 done()
index e3d9aefe565223ab1d927502e1cbb17a841e2f6a..39beb9e8729c0b05cab5cfc237a48c2746ba6e14 100644 (file)
@@ -3,6 +3,7 @@
  * be assigned */
 
 unsigned char failures=0;
+unsigned char dummy;
 
 /* copied from 16f877.inc file supplied with gpasm */
 
@@ -31,7 +32,7 @@ unsigned char failures=0;
 
 typedef unsigned int word;
 
-word at 0x2007  CONFIG = _WDT_OFF & _PWRTE_ON;
+//word at 0x2007  CONFIG = _WDT_OFF & _PWRTE_ON;
 
 
 /* to do -- write a test that puts the PIC to sleep,
index a22a098199fcf70c39651f939b61417a9ba06cff..9c9314e3bc9b2507661e6af9e360441472c814a9 100644 (file)
@@ -29,11 +29,14 @@ void for1(void)
 void for2(void)
 {
   unsigned char i=0;
+  unsigned char j;
 
   for(i=0; i<10; i++)
     uchar0++;
 
-  if(i < 10)
+  j = (volatile)i;
+
+  if(j != 10)
     failures++;
 
 }
@@ -41,11 +44,13 @@ void for2(void)
 void for3(void)
 {
   unsigned int i=0;
+  volatile unsigned int j;
 
   for(i=0; i<10; i++)
     uint0++;
 
-  if(i < 10)
+  j = i;
+  if(j != 10)
     failures++;
 
 }
index 69633f2195f527ce455a3766c2c1c69a8e284c13..bcf9c71b31f5b59d1af076086805e93a01175bd4 100644 (file)
@@ -88,8 +88,6 @@ void m3(unsigned char uc)
 
 void main(void)
 {
-  dummy = 0;
-
   c1 = 1;
   c3 = 5;
 
index 735f668d570c475c26f61ee23248268aeef3c125..a0236b1a8da13f41ea5eee4bf2fbe9a9d5023428 100644 (file)
@@ -3,8 +3,8 @@
 // Pointer tests
 
 unsigned char failures = 0;
+unsigned char dummy;
 
-bit bit0 = 0;
 unsigned int aint0 = 0;
 unsigned int aint1 = 0;
 unsigned char achar0 = 0;
@@ -92,10 +92,10 @@ void check_array(char base_value)
 
 void index_by_pointer(unsigned char *index, unsigned char expected_value)
 {
-
+/*
   if(buff[*index] != expected_value)
     failures++;
-
+*/
 }
 
 
index 78ab7753c2152693ffcc70dabfd7aabc157ae73d..bc43c068d16732ece69657ee16ba74366593678f 100644 (file)
@@ -3,7 +3,6 @@
 
 unsigned char failures=0;
 
-bit bit0 = 0;
 signed int aint0 = 0;
 signed int aint1 = 0;
 signed char achar0 = 0;
index adf3660bbd23cdda89d4159821d0195bf31a115f..4b80abcb0a368fc71ef3cb58d96fbd3777f7dc5d 100644 (file)
@@ -1,4 +1,6 @@
 #include "gpsim_assert.h"
+#include "pic16f877.h"
+
 unsigned char failures=0;
 //unsigned bit bit1;
 
@@ -8,8 +10,6 @@ typedef unsigned char byte;
 byte uchar0;
 const byte arr[] = { 1,2,8,9,0 };
 
-bit at 0x30 B1;
-
 void
 done()
 {
@@ -23,7 +23,6 @@ void  isr(void) interrupt 1 using 1
   if(arr[3]!=9)
     failures++;
   PORTB = 7;
-  B1=1;
 }
 
 void lcd1(const unsigned char *str)
@@ -49,9 +48,6 @@ void lcd1(const unsigned char *str)
 
 void main(void)
 {
-  dummy = 0;
-
   lcd1("str");
-  B1=0;
   done();
 }
index 6929ecd6ccb6b3b69e1a05f7ab0d515b667db4e3..99b9f21c3aa817611f673d712d8e62a05dc31b84 100644 (file)
@@ -3,7 +3,7 @@
 
 /* bit types are not ANSI - so provide a way of disabling bit types
  * if this file is used to test other compilers besides SDCC */
-#define SUPPORT_BIT_TYPES 1
+#define SUPPORT_BIT_TYPES 0
 
 /* Some compilers that support bit types do not support bit arithmetic 
  * (like bitx = bity + bitz;) */