+2008-09-11 Borut Razem <borut.razem AT siol.net>
+
+ * tests\bug-221100.c, tests\shifts.c, tests\absolute.c:
+ applied patch #2105615: Some PIC16 testcase fixlets
+ thanks Mauro Giachero
+
2008-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
* src/z80/gen.c (genCmpGt, genCmpLt): fixed bug 2094505
*/
#include <testfwk.h>
+#ifdef SDCC_pic16
+# define ADDRESS(x) (0x02 ## x)
+#else
+# define ADDRESS(x) (0xCA ## x)
+#endif
+
typedef struct
{
- int a,b;
+ int a,b;
} TestStruct;
-{mem} volatile at(0xCABC) TestStruct TestVar = {0,0};
-{mem} at(0xCAB7) char u;
-{mem} at(0xCAB7) char x = 'x';
-{mem} at(0xCAB9) char y = 'y';
-{mem} at(0xCAB0) int k = 0x1234;
+{mem} volatile at(ADDRESS(BC)) TestStruct TestVar = {0,0};
+{mem} at(ADDRESS(B7)) char u;
+{mem} at(ADDRESS(B7)) char x = 'x';
+{mem} at(ADDRESS(B9)) char y = 'y';
+{mem} at(ADDRESS(B0)) int k = 0x1234;
char z = 'z';
testAbsolute(void)
{
#if defined(SDCC_mcs51) || defined(SDCC_ds390) || defined(SDCC_hc08)
- static {mem} at(0xCAB6) char s = 's';
- char {mem} *pC = (char {mem} *)(0xCAB0);
- int {mem} *pI = (int {mem} *)(0xCAB0);
+ static {mem} at(ADDRESS(B6)) char s = 's';
+ char {mem} *pC = (char {mem} *)(ADDRESS(B0));
+ int {mem} *pI = (int {mem} *)(ADDRESS(B0));
ASSERT(u == 'x');
ASSERT(pC[7] == 'x');
/* bug-221100.c
- If test_index is char, loses high bit when indexes table
- workaround is to use [(unsigned int) test_index]
+ If test_index is char, loses high bit when indexes table
+ workaround is to use [(unsigned int) test_index]
*/
#include <testfwk.h>
70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
- 100, 101, 02, 103, 104, 105, 106, 107, 108, 109,
+ 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
};