From 13ce047813f16c1400f04b346cf8af83d8e46ba1 Mon Sep 17 00:00:00 2001 From: borutr Date: Wed, 24 May 2006 19:52:20 +0000 Subject: [PATCH] * support/regression/tests/bug-221100.c: fixed xdata problem caused by modification of test for the pic16 port, put the array to the code memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4189 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 19 +++++++++++++ support/regression/tests/bug-221100.c | 41 ++++++++++++++++++++------- 2 files changed, 49 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 70e7bb09..d9554663 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,27 @@ +2006-05-24 Borut Razem + + * support/regression/tests/bug-221100.c: fixed xdata problem caused by + modification of test for the pic16 port, put the array to the code + memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann + 2006-05-23 Jesus Calvino-Fraga * src/pic/gen.c: MSC 6 does not have . Use pstdint.h instead. * support/Util/pstdint.h: added +2006-05-22 Borut Razem + + * src/regression/Makefile: removed bool2.c test, added -q linker option + * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c, + src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c, + src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c, + src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c, + src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c, + src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c, + src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c, + src/regression/add.c, src/regression/sub.c, src/regression/call1.c: + define SUPPORT_BIT_TYPES 0, removed unused bit variables + 2006-05-22 Raphael Neider * src/pic16/gen.c (pic16_storeForReturn): fragile fix for diff --git a/support/regression/tests/bug-221100.c b/support/regression/tests/bug-221100.c index 7b6c6f88..2095f80b 100644 --- a/support/regression/tests/bug-221100.c +++ b/support/regression/tests/bug-221100.c @@ -5,31 +5,50 @@ */ #include +#define ARRAY_SIZE 130 + #ifdef SDCC_pic16 -#define ARRAY_SIZE 60 +/* not enough pic16 data space, so put the array into the code memory */ +code static unsigned int +testArray[ARRAY_SIZE] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 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, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, +}; #else -#define ARRAY_SIZE 130 +xdata static unsigned int +testArray[ARRAY_SIZE]; #endif -static unsigned int -testArray[ARRAY_SIZE]; -static unsigned int test_int ; -static unsigned char test_index ; +static unsigned int test_int; +static unsigned char test_index; -static void -fetch(void) -{ - test_int = testArray [test_index] ; -} +static void +fetch(void) +{ + test_int = testArray [test_index]; +} static void testUnsignedCharIndex(void) { +#ifndef SDCC_pic16 int i; for (i = 0; i < 130; i++) { testArray[i] = i; } +#endif test_index = 5; fetch(); -- 2.47.2