+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,
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 \
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))
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 \
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
unsigned char failures = 0;
-bit bit0 = 0;
unsigned int aint0 = 0;
unsigned int aint1 = 0;
unsigned char achar0 = 0;
#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;
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;
typedef unsigned int word;
-word at 0x2007 CONFIG = wdt_off & pwrte_on;
+//word at 0x2007 CONFIG = wdt_off & pwrte_on;
void
done()
typedef unsigned int word;
-word at 0x2007 CONFIG = wdt_off & pwrte_on;
+//word at 0x2007 CONFIG = wdt_off & pwrte_on;
void
done()
typedef unsigned int word;
-word at 0x2007 CONFIG = wdt_off & pwrte_on;
+//word at 0x2007 CONFIG = wdt_off & pwrte_on;
void
done()
typedef unsigned int word;
-word at 0x2007 CONFIG = wdt_off & pwrte_on;
+//word at 0x2007 CONFIG = wdt_off & pwrte_on;
void
done()
* be assigned */
unsigned char failures=0;
+unsigned char dummy;
/* copied from 16f877.inc file supplied with gpasm */
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,
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++;
}
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++;
}
void main(void)
{
- dummy = 0;
-
c1 = 1;
c3 = 5;
// Pointer tests
unsigned char failures = 0;
+unsigned char dummy;
-bit bit0 = 0;
unsigned int aint0 = 0;
unsigned int aint1 = 0;
unsigned char achar0 = 0;
void index_by_pointer(unsigned char *index, unsigned char expected_value)
{
-
+/*
if(buff[*index] != expected_value)
failures++;
-
+*/
}
unsigned char failures=0;
-bit bit0 = 0;
signed int aint0 = 0;
signed int aint1 = 0;
signed char achar0 = 0;
#include "gpsim_assert.h"
+#include "pic16f877.h"
+
unsigned char failures=0;
//unsigned bit bit1;
byte uchar0;
const byte arr[] = { 1,2,8,9,0 };
-bit at 0x30 B1;
-
void
done()
{
if(arr[3]!=9)
failures++;
PORTB = 7;
- B1=1;
}
void lcd1(const unsigned char *str)
void main(void)
{
- dummy = 0;
-
lcd1("str");
- B1=0;
done();
}
/* 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;) */