This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[named-addr-spaces-branch][Patch,committed] Minor testsuite cleanup
- From: Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 28 Nov 2008 20:39:02 -0500
- Subject: [named-addr-spaces-branch][Patch,committed] Minor testsuite cleanup
Some minor cleanup in the cache tests.
2008-11-28 Michael Meissner <meissner@linux.vnet.ibm.com>
* gcc.target/spu/ea/cache-common.h (init_mem): Use proper
prototype.
(test1): Ditto.
(test2): Ditto.
(test3): Ditto.
(LINE_SIZE): For -mea64, make the type be long long.
Index: gcc/testsuite/gcc.target/spu/ea/cache-common.h
===================================================================
--- gcc/testsuite/gcc.target/spu/ea/cache-common.h (revision 142261)
+++ gcc/testsuite/gcc.target/spu/ea/cache-common.h (working copy)
@@ -21,6 +21,7 @@ typedef unsigned long long size_ea_t;
__ea void *__malloc_ea64 (size_ea_t);
__ea void *__memset_ea64 (__ea void *, int, size_ea_t);
__ea void *__memcpy_ea64 (__ea void *, __ea const void *, size_ea_t);
+#define LINE_SIZE 128LL
#else
#define malloc_ea __malloc_ea32
#define memset_ea __memset_ea32
@@ -31,6 +32,7 @@ typedef unsigned long size_ea_t;
__ea void *__malloc_ea32 (size_ea_t size);
__ea void *__memset_ea32 (__ea void *, int, size_ea_t);
__ea void *__memcpy_ea32 (__ea void *, __ea const void *, size_ea_t);
+#define LINE_SIZE 128
#endif
static __ea void *bigblock;
@@ -39,10 +41,9 @@ static int *ls_block;
extern void __cache_tag_array_size;
#define CACHE_SIZE (4 * (int) &__cache_tag_array_size)
-#define LINE_SIZE 128
void
-init_mem ()
+init_mem (void)
{
bigblock = malloc_ea (CACHE_SIZE + 2 * LINE_SIZE);
block = malloc_ea (2 * LINE_SIZE);
@@ -56,7 +57,7 @@ init_mem ()
/* Test 1: Simple cache fetching. */
void
-test1 ()
+test1 (void)
{
addr aligned = ((((addr) block) + LINE_SIZE - 1) & -LINE_SIZE);
int *p1 = NULL;
@@ -91,7 +92,7 @@ test1 ()
/* Test 2: Eviction testing. */
void
-test2 ()
+test2 (void)
{
addr aligned = ((((addr) block) + LINE_SIZE - 1) & -LINE_SIZE);
int *p = NULL;
@@ -148,7 +149,7 @@ test2 ()
/* Test LS forced-eviction. */
void
-test3 ()
+test3 (void)
{
addr aligned = ((((addr) bigblock) + LINE_SIZE - 1) & -LINE_SIZE);
char *test = NULL;
Index: gcc/testsuite/ChangeLog.named
===================================================================
--- gcc/testsuite/ChangeLog.named (revision 142261)
+++ gcc/testsuite/ChangeLog.named (working copy)
@@ -1,3 +1,12 @@
+2008-11-28 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * gcc.target/spu/ea/cache-common.h (init_mem): Use proper
+ prototype.
+ (test1): Ditto.
+ (test2): Ditto.
+ (test3): Ditto.
+ (LINE_SIZE): For -mea64, make the type be long long.
+
2008-11-25 Michael Meissner <meissner@linux.vnet.ibm.com>
* gcc.target/spu/ea/errors.c (ea_var): Check for conflicting named
--
Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA
meissner@linux.vnet.ibm.com