This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH,committed][4.3] Remove __ea tests accidently committed to the 4.3 branch
- From: Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 11 Dec 2008 12:13:14 -0500
- Subject: [PATCH,committed][4.3] Remove __ea tests accidently committed to the 4.3 branch
It looks like I copied the __ea tests to the wrong branch, and committed them
to the 4.3 branch, and not just in the named-addr-4_3-branch. This patch
deletes those files.
2008-12-11 Michael Meissner <meissner@linux.vnet.ibm.com>
* gcc.target/spu/ea: Delete __ea testsuite directory accidently
committed to 4.3 branch.
Index: gcc/testsuite/gcc.target/spu/ea/errors2.c
===================================================================
--- gcc/testsuite/gcc.target/spu/ea/errors2.c (revision 142680)
+++ gcc/testsuite/gcc.target/spu/ea/errors2.c (working copy)
@@ -1,87 +0,0 @@
-/* Invalid conversions of __ea pointers to local pointers. */
-/* { dg-do compile } */
-/* { dg-options "-O2 -std=gnu99 -pedantic-errors -mno-ea-to-generic-conversion" } */
-
-/* This is the same code as compile2.c but it should generate errors. If you
- modify this file, you should modify errors2.c as well. */
-#ifndef TYPE
-#define TYPE void
-#endif
-
-typedef __ea TYPE *ea_ptr_t;
-typedef TYPE *lm_ptr_t;
-
-extern ea_ptr_t ea_ptr;
-extern lm_ptr_t lm_ptr;
-
-extern void arg_ea (ea_ptr_t);
-extern void arg_lm (lm_ptr_t);
-
-#ifdef NO_CAST
-#define EA_CAST(ARG) (ARG)
-#define LM_CAST(ARG) (ARG)
-
-#else
-#define EA_CAST(ARG) ((ea_ptr_t)(ARG))
-#define LM_CAST(ARG) ((lm_ptr_t)(ARG))
-#endif
-
-void ea_to_ea_arg (void)
-{
- arg_ea (ea_ptr);
-}
-
-void ea_to_lm_arg (void)
-{
- arg_lm (LM_CAST (ea_ptr)); /* { dg-error "cast to generic address space pointer from __ea address space pointer" } */
-}
-
-void lm_to_ea_arg (void)
-{
- arg_ea (EA_CAST (lm_ptr));
-}
-
-void lm_to_lm_arg (void)
-{
- arg_lm (lm_ptr);
-}
-
-ea_ptr_t ea_to_ea_ret (void)
-{
- return ea_ptr;
-}
-
-lm_ptr_t ea_to_lm_ret (void)
-{
- return LM_CAST (ea_ptr); /* { dg-error "cast to generic address space pointer from __ea address space pointer" } */
-}
-
-ea_ptr_t lm_to_ea_ret (void)
-{
- return EA_CAST (lm_ptr);
-}
-
-lm_ptr_t lm_to_lm_ret (void)
-{
- return lm_ptr;
-}
-
-void ea_to_ea_store (ea_ptr_t ptr)
-{
- ea_ptr = ptr;
-}
-
-void ea_to_lm_store (ea_ptr_t ptr)
-{
- lm_ptr = LM_CAST (ptr); /* { dg-error "cast to generic address space pointer from __ea address space pointer" } */
-}
-
-void lm_to_ea_store (lm_ptr_t ptr)
-{
- ea_ptr = EA_CAST (ptr);
-}
-
-void lm_to_lm_store (lm_ptr_t ptr)
-{
- lm_ptr = ptr;
-}
Index: gcc/testsuite/gcc.target/spu/ea/cache-common.h
===================================================================
--- gcc/testsuite/gcc.target/spu/ea/cache-common.h (revision 142680)
+++ gcc/testsuite/gcc.target/spu/ea/cache-common.h (working copy)
@@ -1,201 +0,0 @@
-#include <stdlib.h>
-#include <string.h>
-#include <spu_cache.h>
-extern void *malloc (__SIZE_TYPE__);
-extern void *memset (void *, int, __SIZE_TYPE__);
-extern void abort (void);
-
-#ifdef __EA64__
-#define addr unsigned long long
-#else
-#define addr unsigned long
-#endif
-
-#ifdef __EA64__
-#define malloc_ea __malloc_ea64
-#define memset_ea __memset_ea64
-#define memcpy_ea __memcpy_ea64
-
-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
-#define memcpy_ea __memcpy_ea32
-
-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;
-static __ea void *block;
-static int *ls_block;
-
-extern void __cache_tag_array_size;
-#define CACHE_SIZE (4 * (int) &__cache_tag_array_size)
-
-void
-init_mem (void)
-{
- bigblock = malloc_ea (CACHE_SIZE + 2 * LINE_SIZE);
- block = malloc_ea (2 * LINE_SIZE);
- ls_block = malloc (LINE_SIZE);
-
- memset_ea (bigblock, 0, CACHE_SIZE + 2 * LINE_SIZE);
- memset_ea (block, -1, 2 * LINE_SIZE);
- memset (ls_block, -1, LINE_SIZE);
- cache_flush ();
-}
-
-/* Test 1: Simple cache fetching. */
-void
-test1 (void)
-{
- addr aligned = ((((addr) block) + LINE_SIZE - 1) & -LINE_SIZE);
- int *p1 = NULL;
- int *p2 = NULL;
- int i = 0;
-
- /* First, check if the same addr give the same cache ptr. */
- p1 = cache_fetch ((__ea void *) aligned);
- p2 = cache_fetch ((__ea void *) aligned);
-
- if (p1 != p2)
- abort ();
-
- /* Check that the data actually is in the cache. */
- for (i = 0; i < LINE_SIZE / sizeof (int); i++)
- {
- if (p1[i] != -1)
- abort ();
- }
-
- /* Check returning within the cache line. */
- p2 = cache_fetch ((__ea void *) (aligned + sizeof (int)));
-
- if (p2 - p1 != 1)
- abort ();
-
- /* Finally, check that fetching an LS pointer returns that pointer. */
- p1 = cache_fetch ((__ea char *) ls_block);
- if (p1 != ls_block)
- abort ();
-}
-
-/* Test 2: Eviction testing. */
-void
-test2 (void)
-{
- addr aligned = ((((addr) block) + LINE_SIZE - 1) & -LINE_SIZE);
- int *p = NULL;
- int i = 0;
-
- /* First check that clean evictions don't write back. */
- p = cache_fetch ((__ea void *) aligned);
- for (i = 0; i < LINE_SIZE / sizeof (int); i++)
- p[i] = 0;
-
- cache_evict ((__ea void *) aligned);
- memcpy_ea ((__ea char *) ls_block, (__ea void *) aligned, LINE_SIZE);
-
- for (i = 0; i < LINE_SIZE / sizeof (int); i++)
- {
- if (ls_block[i] == 0)
- abort ();
- }
-
- /* Now check that dirty evictions do write back. */
- p = cache_fetch_dirty ((__ea void *) aligned, LINE_SIZE);
- for (i = 0; i < LINE_SIZE / sizeof (int); i++)
- p[i] = 0;
-
- cache_evict ((__ea void *) aligned);
- memcpy_ea ((__ea char *) ls_block, (__ea void *) aligned, LINE_SIZE);
-
- for (i = 0; i < LINE_SIZE / sizeof (int); i++)
- {
- if (ls_block[i] != 0)
- abort ();
- }
-
- /* Finally, check that non-atomic writeback only writes dirty bytes. */
-
- for (i = 0; i < LINE_SIZE / sizeof (int); i++)
- {
- p = cache_fetch_dirty ((__ea void *) (aligned + i * sizeof (int)),
- (i % 2) * sizeof (int));
- p[0] = -1;
- }
-
- cache_evict ((__ea void *) aligned);
- memcpy_ea ((__ea char *) ls_block, (__ea void *) aligned, LINE_SIZE);
-
- for (i = 0; i < LINE_SIZE / sizeof (int); i++)
- {
- if ((ls_block[i] == -1) && (i % 2 == 0))
- abort ();
- if ((ls_block[i] == 0) && (i % 2 == 1))
- abort ();
- }
-}
-
-/* Test LS forced-eviction. */
-void
-test3 (void)
-{
- addr aligned = ((((addr) bigblock) + LINE_SIZE - 1) & -LINE_SIZE);
- char *test = NULL;
- char *ls = NULL;
- int i = 0;
-
- /* Init memory, fill the cache to capacity. */
- ls = cache_fetch_dirty ((__ea void *) aligned, LINE_SIZE);
- for (i = 1; i < (CACHE_SIZE / LINE_SIZE); i++)
- cache_fetch_dirty ((__ea void *) (aligned + i * LINE_SIZE), LINE_SIZE);
-
- memset (ls, -1, LINE_SIZE);
- test = cache_fetch ((__ea void *) (aligned + CACHE_SIZE));
-
- /* test == ls indicates cache collision. */
- if (test != ls)
- abort ();
-
- /* Make sure it actually wrote the cache line. */
- for (i = 0; i < LINE_SIZE; i++)
- {
- if (ls[i] != 0)
- abort ();
- }
-
- ls = cache_fetch ((__ea void *) aligned);
-
- /* test != ls indicates another entry was evicted. */
- if (test == ls)
- abort ();
-
- /* Make sure that the previous eviction actually wrote back. */
- for (i = 0; i < LINE_SIZE; i++)
- {
- if (ls[i] != 0xFF)
- abort ();
- }
-}
-
-int
-main (int argc, char **argv)
-{
- init_mem ();
- test1 ();
- test2 ();
- test3 ();
-
- return 0;
-}
Index: gcc/testsuite/gcc.target/spu/ea/errors3.c
===================================================================
--- gcc/testsuite/gcc.target/spu/ea/errors3.c (revision 142680)
+++ gcc/testsuite/gcc.target/spu/ea/errors3.c (working copy)
@@ -1,44 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -std=gnu99 -pedantic-errors -mno-address-space-conversion" } */
-
-/* This is the same as compile3.c except it should generate errors where
- pointers are mixed. If you modify this code, please modify compile3.c as
- well. */
-typedef __ea int *ea_ptr_t;
-typedef int *lm_ptr_t;
-
-ea_ptr_t ea, ea2;
-lm_ptr_t lm, lm2;
-
-extern void call_ea (ea_ptr_t);
-extern void call_lm (lm_ptr_t);
-
-/* Errors should be generated here. */
-void to_ea (void) { ea = lm; } /* { dg-error "assignment to a pointer to an incompatible address space" } */
-void to_lm (void) { lm = ea; } /* { dg-error "assignment to a pointer to an incompatible address space" } */
-ea_ptr_t ret_ea (void) { return lm; } /* { dg-error "return of a pointer to an incompatible address space" } */
-lm_ptr_t ret_lm (void) { return ea; } /* { dg-error "return of a pointer to an incompatible address space" } */
-void call_ea2 (void) { call_ea (lm); } /* { dg-error "passing argument 1 of 'call_ea' is a pointer to an incompatible address space" } */
-void call_lm2 (void) { call_lm (ea); } /* { dg-error "passing argument 1 of 'call_lm' is a pointer to an incompatible address space" } */
-int sub_ea (void) { return ea - lm; } /* { dg-error "invalid operands to binary -" } */
-int sub_lm (void) { return lm - ea; } /* { dg-error "invalid operands to binary -" } */
-int if_ea (int test) { return *((test) ? ea : lm); } /* { dg-error "pointers to incompatible address spaces used in conditional expression" } */
-int if_lm (int test) { return *((test) ? lm : ea); } /* { dg-error "pointers to incompatible address spaces used in conditional expression" } */
-
-/* No errors here. */
-void to_ea2 (void) { ea = ea2; }
-void to_lm2 (void) { lm = lm2; }
-
-void to_ea_with_cast (void) { ea = (ea_ptr_t)lm; }
-void to_lm_with_cast (void) { lm = (lm_ptr_t)ea; }
-ea_ptr_t ret_ea_with_cast (void) { return (ea_ptr_t)lm; }
-lm_ptr_t ret_lm_with_cast (void) { return (lm_ptr_t)ea; }
-void call_ea2_with_cast (void) { call_ea ((ea_ptr_t)lm); }
-void call_lm2_with_cast (void) { call_lm ((lm_ptr_t)ea); }
-int sub_ea_with_cast (void) { return ea - (ea_ptr_t)lm; }
-int sub_lm_with_cast (void) { return lm - (lm_ptr_t)ea; }
-int if_ea_with_cast (int test) { return *((test) ? ea : (ea_ptr_t)lm); }
-int if_lm_with_cast (int test) { return *((test) ? lm : (lm_ptr_t)ea); }
-
-void void_ea (void) { ea = (void *)0; }
-void void_lm (void) { lm = (__ea void *)0; }
Index: gcc/testsuite/gcc.target/spu/ea/ea.exp
===================================================================
--- gcc/testsuite/gcc.target/spu/ea/ea.exp (revision 142680)
+++ gcc/testsuite/gcc.target/spu/ea/ea.exp (working copy)
@@ -1,77 +0,0 @@
-# Copyright (C) 2008 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GCC; see the file COPYING3. If not see
-# <http://www.gnu.org/licenses/>.
-
-# GCC testsuite that uses the `dg.exp' driver.
-
-# Exit immediately if this isn't a SPU target.
-if { ![istarget spu-*-*] } then {
- return
-}
-
-# Load support procs.
-load_lib gcc-dg.exp
-
-# Return 1 if -mea64 target library functions are available
-proc check_effective_target_ea64 { } {
- return [check_no_compiler_messages ea64 executable {
- #include <stdlib.h>
- #include <string.h>
- #include <spu_cache.h>
-
- __ea void *ptr;
- __ea void *__malloc_ea64 (unsigned long long);
-
- int main (void)
- {
- ptr = __malloc_ea64 (1024LL);
- return 0;
- }
- } "-O2 -mea64" ]
-}
-
-# Return 1 if -mea32 target library functions are available
-proc check_effective_target_ea32 { } {
- return [check_no_compiler_messages ea32 executable {
- #include <stdlib.h>
- #include <string.h>
- #include <spu_cache.h>
-
- __ea void *ptr;
- __ea void *__malloc_ea32 (unsigned long);
-
- int main (void)
- {
- ptr = __malloc_ea32 (1024L);
- return 0;
- }
- } "-O2 -mea32" ]
-}
-
-# If a testcase doesn't have special options, use these.
-global DEFAULT_CFLAGS
-if ![info exists DEFAULT_CFLAGS] then {
- set DEFAULT_CFLAGS "-std=gnu89 -pedantic-errors -O2"
-}
-
-# Initialize `dg'.
-dg-init
-
-# Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
- "" $DEFAULT_CFLAGS
-
-# All done.
-dg-finish
Index: gcc/testsuite/gcc.target/spu/ea/cppdefine32.c
===================================================================
--- gcc/testsuite/gcc.target/spu/ea/cppdefine32.c (revision 142680)
+++ gcc/testsuite/gcc.target/spu/ea/cppdefine32.c (working copy)
@@ -1,9 +0,0 @@
-/* Test default __EA32__ define. */
-/* { dg-options "-std=gnu89 -pedantic-errors -mea32" } */
-/* { dg-do compile } */
-
-#ifdef __EA32__
-int x;
-#else
-#error __EA32__ undefined
-#endif
Index: gcc/testsuite/gcc.target/spu/ea/cppdefine64.c
===================================================================
--- gcc/testsuite/gcc.target/spu/ea/cppdefine64.c (revision 142680)
+++ gcc/testsuite/gcc.target/spu/ea/cppdefine64.c (working copy)
@@ -1,8 +0,0 @@
-/* { dg-options "-std=gnu89 -mea64" } */
-/* { dg-do compile } */
-
-#ifdef __EA64__
-int x;
-#else
-#error __EA64__ undefined
-#endif
Index: gcc/testsuite/gcc.target/spu/ea/cache32.c
===================================================================
--- gcc/testsuite/gcc.target/spu/ea/cache32.c (revision 142680)
+++ gcc/testsuite/gcc.target/spu/ea/cache32.c (working copy)
@@ -1,26 +0,0 @@
-/* Copyright (C) 2008 Free Software Foundation, Inc.
-
- This file is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License as published by the Free
- Software Foundation; either version 2 of the License, or (at your option)
- any later version.
-
- This file is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with this file; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-/* { dg-do run } */
-/* { dg-require-effective-target "ea32" } */
-/* { dg-options "-mcache-size=8 -O2 -mea32 -g" } */
-
-#ifndef __EA32__
-#error "You must use -mea32 for this test"
-#endif
-
-#include "cache-common.h"
Index: gcc/testsuite/gcc.target/spu/ea/test-sizes.c
===================================================================
--- gcc/testsuite/gcc.target/spu/ea/test-sizes.c (revision 142680)
+++ gcc/testsuite/gcc.target/spu/ea/test-sizes.c (working copy)
@@ -1,590 +0,0 @@
-/* { dg-do run { target spu-*-* } } */
-/* { dg-options "-std=gnu99 -mea64" } */
-
-#ifndef __EA64__
-#error "-mea64 must be used"
-#endif
-
-#if !defined(LEVEL1) && !defined(LEVEL2) && !defined(LEVEL3)
-#define LEVEL1 1 /* single pointer indirection */
-#define LEVEL2 1 /* 2 levels of pointer indirection */
-#define LEVEL3 1 /* 3 levels of pointer indirection */
-
-#else
-#ifndef LEVEL1
-#define LEVEL1 0
-#endif
-
-#ifndef LEVEL2
-#define LEVEL2 0
-#endif
-
-#ifndef LEVEL3
-#define LEVEL3 0
-#endif
-#endif
-
-#if !defined(USE_SIMPLE) && !defined(USE_COMPLEX)
-#define USE_SIMPLE 1 /* build up pointers via multiple typedefs */
-#define USE_COMPLEX 1 /* single typedef for pointer indirections */
-
-#else
-#ifndef USE_SIMPLE
-#define USE_SIMPLE 0
-#endif
-
-#ifndef USE_COMPLEX
-#define USE_COMPLEX 0
-#endif
-#endif
-
-#if !defined(USE_LOCAL_VAR) && !defined(USE_EA_VAR)
-#define USE_LOCAL_VAR 1 /* use variables declared locally */
-#define USE_EA_VAR 1 /* use variables on the host */
-
-#else
-#ifndef USE_LOCAL_VAR
-#define USE_LOCAL_VAR 0
-#endif
-
-#ifndef USE_EA_VAR
-#define USE_EA_VAR 0
-#endif
-#endif
-
-static int errors;
-
-#ifdef USE_PRINTF /* print results via printf */
-#include <stdio.h>
-#include <stdlib.h>
-
-static int num_tests;
-
-#define TEST_SIZE(EXPR, EXPECTED) \
-do { \
- char *msg; \
- \
- if (sizeof (EXPR) != EXPECTED) \
- { \
- msg = ", FAIL"; \
- errors++; \
- } \
- else \
- msg = ""; \
- \
- num_tests++; \
- printf ("sizeof %-20s = %2u, expected = %2u%s\n", \
- #EXPR, \
- (unsigned) sizeof (EXPR), \
- (unsigned) EXPECTED, \
- msg); \
-} while (0)
-
-#define PRINT1(FMT) printf (FMT)
-#define PRINT2(FMT,A1) printf (FMT,A1)
-#define PRINT3(FMT,A1,A2) printf (FMT,A1,A2)
-
-#else /* standalone */
-extern void abort (void);
-
-#define TEST_SIZE(EXPR, EXPECTED) \
-do { \
- if (sizeof (EXPR) != EXPECTED) \
- abort (); \
-} while (0)
-
-#define PRINT1(FMT)
-#define PRINT2(FMT,ARG)
-#define PRINT3(FMT,A1,A2)
-#endif
-
-/* 'local memory' hack to keep the same spacing. */
-#define __lm
-
-#if USE_SIMPLE
-#if (LEVEL1 || LEVEL2 || LEVEL3)
-typedef __lm char *lm_ptr_t;
-typedef __ea char *ea_ptr_t;
-#endif
-
-#if LEVEL1
-#if USE_LOCAL_VAR
-__lm lm_ptr_t lm_ptr;
-__lm ea_ptr_t ea_ptr;
-#endif
-
-#if USE_EA_VAR
-__ea lm_ptr_t lm_ptr_ea;
-__ea ea_ptr_t ea_ptr_ea;
-#endif
-#endif
-
-#if (LEVEL2 || LEVEL3)
-typedef __lm lm_ptr_t *lm_lm_ptr_t;
-typedef __ea lm_ptr_t *ea_lm_ptr_t;
-typedef __lm ea_ptr_t *lm_ea_ptr_t;
-typedef __ea ea_ptr_t *ea_ea_ptr_t;
-#endif
-
-#if LEVEL2
-#if USE_LOCAL_VAR
-__lm lm_lm_ptr_t lm_lm_ptr;
-__lm ea_lm_ptr_t ea_lm_ptr;
-__lm lm_ea_ptr_t lm_ea_ptr;
-__lm ea_ea_ptr_t ea_ea_ptr;
-#endif
-
-#if USE_EA_VAR
-__ea lm_lm_ptr_t lm_lm_ptr_ea;
-__ea ea_lm_ptr_t ea_lm_ptr_ea;
-__ea lm_ea_ptr_t lm_ea_ptr_ea;
-__ea ea_ea_ptr_t ea_ea_ptr_ea;
-#endif
-#endif
-
-#if LEVEL3
-typedef __lm lm_lm_ptr_t *lm_lm_lm_ptr_t;
-typedef __ea lm_lm_ptr_t *ea_lm_lm_ptr_t;
-typedef __lm ea_lm_ptr_t *lm_ea_lm_ptr_t;
-typedef __ea ea_lm_ptr_t *ea_ea_lm_ptr_t;
-typedef __lm lm_ea_ptr_t *lm_lm_ea_ptr_t;
-typedef __ea lm_ea_ptr_t *ea_lm_ea_ptr_t;
-typedef __lm ea_ea_ptr_t *lm_ea_ea_ptr_t;
-typedef __ea ea_ea_ptr_t *ea_ea_ea_ptr_t;
-
-#if USE_LOCAL_VAR
-__lm lm_lm_lm_ptr_t lm_lm_lm_ptr;
-__lm ea_lm_lm_ptr_t ea_lm_lm_ptr;
-__lm lm_ea_lm_ptr_t lm_ea_lm_ptr;
-__lm ea_ea_lm_ptr_t ea_ea_lm_ptr;
-__lm lm_lm_ea_ptr_t lm_lm_ea_ptr;
-__lm ea_lm_ea_ptr_t ea_lm_ea_ptr;
-__lm lm_ea_ea_ptr_t lm_ea_ea_ptr;
-__lm ea_ea_ea_ptr_t ea_ea_ea_ptr;
-#endif
-
-#if USE_EA_VAR
-__ea lm_lm_lm_ptr_t lm_lm_lm_ptr_ea;
-__ea ea_lm_lm_ptr_t ea_lm_lm_ptr_ea;
-__ea lm_ea_lm_ptr_t lm_ea_lm_ptr_ea;
-__ea ea_ea_lm_ptr_t ea_ea_lm_ptr_ea;
-__ea lm_lm_ea_ptr_t lm_lm_ea_ptr_ea;
-__ea ea_lm_ea_ptr_t ea_lm_ea_ptr_ea;
-__ea lm_ea_ea_ptr_t lm_ea_ea_ptr_ea;
-__ea ea_ea_ea_ptr_t ea_ea_ea_ptr_ea;
-#endif
-#endif
-#endif
-
-#if USE_COMPLEX
-#if LEVEL1
-#if USE_LOCAL_VAR
-__lm char *__lm lm_cptr;
-__ea char *__lm ea_cptr;
-#endif
-
-#if USE_EA_VAR
-__lm char *__ea lm_cptr_ea;
-__ea char *__ea ea_cptr_ea;
-#endif
-#endif
-
-#if LEVEL2
-#if USE_LOCAL_VAR
-__lm char *__lm *__lm lm_lm_cptr;
-__lm char *__ea *__lm ea_lm_cptr;
-__ea char *__lm *__lm lm_ea_cptr;
-__ea char *__ea *__lm ea_ea_cptr;
-#endif
-
-#if USE_EA_VAR
-__lm char *__lm *__ea lm_lm_cptr_ea;
-__lm char *__ea *__ea ea_lm_cptr_ea;
-__ea char *__lm *__ea lm_ea_cptr_ea;
-__ea char *__ea *__ea ea_ea_cptr_ea;
-#endif
-#endif
-
-#if LEVEL3
-#if USE_LOCAL_VAR
-__lm char *__lm *__lm *__lm lm_lm_lm_cptr;
-__lm char *__ea *__lm *__lm lm_ea_lm_cptr;
-__ea char *__lm *__lm *__lm lm_lm_ea_cptr;
-__ea char *__ea *__lm *__lm lm_ea_ea_cptr;
-__lm char *__lm *__ea *__lm ea_lm_lm_cptr;
-__lm char *__ea *__ea *__lm ea_ea_lm_cptr;
-__ea char *__lm *__ea *__lm ea_lm_ea_cptr;
-__ea char *__ea *__ea *__lm ea_ea_ea_cptr;
-#endif
-
-#if USE_EA_VAR
-__lm char *__lm *__lm *__ea lm_lm_lm_cptr_ea;
-__lm char *__ea *__lm *__ea lm_ea_lm_cptr_ea;
-__ea char *__lm *__lm *__ea lm_lm_ea_cptr_ea;
-__ea char *__ea *__lm *__ea lm_ea_ea_cptr_ea;
-__lm char *__lm *__ea *__ea ea_lm_lm_cptr_ea;
-__lm char *__ea *__ea *__ea ea_ea_lm_cptr_ea;
-__ea char *__lm *__ea *__ea ea_lm_ea_cptr_ea;
-__ea char *__ea *__ea *__ea ea_ea_ea_cptr_ea;
-#endif
-#endif
-#endif
-
-int
-main ()
-{
- PRINT2 ("LEVEL1 = %d\n", LEVEL1);
- PRINT2 ("LEVEL2 = %d\n", LEVEL2);
- PRINT2 ("LEVEL3 = %d\n", LEVEL3);
- PRINT2 ("USE_SIMPLE = %d\n", USE_SIMPLE);
- PRINT2 ("USE_COMPLEX = %d\n", USE_COMPLEX);
- PRINT2 ("USE_LOCAL_VAR = %d\n", USE_LOCAL_VAR);
- PRINT2 ("USE_EA_VAR = %d\n", USE_EA_VAR);
- PRINT1 ("\n");
-
-#if USE_SIMPLE
-#if LEVEL1
-#if USE_LOCAL_VAR
- TEST_SIZE ( lm_ptr, 4);
- TEST_SIZE (*lm_ptr, 1);
- TEST_SIZE ( ea_ptr, 8);
- TEST_SIZE (*ea_ptr, 1);
- PRINT1 ("\n");
-#endif
-
-#if USE_EA_VAR
- TEST_SIZE ( lm_ptr_ea, 4);
- TEST_SIZE (*lm_ptr_ea, 1);
- TEST_SIZE ( ea_ptr_ea, 8);
- TEST_SIZE (*ea_ptr_ea, 1);
- PRINT1 ("\n");
-#endif
-#endif
-
-#if LEVEL2
-#if USE_LOCAL_VAR
- TEST_SIZE ( lm_lm_ptr, 4);
- TEST_SIZE ( *lm_lm_ptr, 4);
- TEST_SIZE (**lm_lm_ptr, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( lm_ea_ptr, 4);
- TEST_SIZE ( *lm_ea_ptr, 8);
- TEST_SIZE (**lm_ea_ptr, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_lm_ptr, 8);
- TEST_SIZE ( *ea_lm_ptr, 4);
- TEST_SIZE (**ea_lm_ptr, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_ea_ptr, 8);
- TEST_SIZE ( *ea_ea_ptr, 8);
- TEST_SIZE (**ea_ea_ptr, 1);
- PRINT1 ("\n");
-#endif
-
-#if USE_EA_VAR
- TEST_SIZE ( lm_lm_ptr_ea, 4);
- TEST_SIZE ( *lm_lm_ptr_ea, 4);
- TEST_SIZE (**lm_lm_ptr_ea, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( lm_ea_ptr_ea, 4);
- TEST_SIZE ( *lm_ea_ptr_ea, 8);
- TEST_SIZE (**lm_ea_ptr_ea, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_lm_ptr_ea, 8);
- TEST_SIZE ( *ea_lm_ptr_ea, 4);
- TEST_SIZE (**ea_lm_ptr_ea, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_ea_ptr_ea, 8);
- TEST_SIZE ( *ea_ea_ptr_ea, 8);
- TEST_SIZE (**ea_ea_ptr_ea, 1);
- PRINT1 ("\n");
-#endif
-#endif
-
-#if LEVEL3
-#if USE_LOCAL_VAR
- TEST_SIZE ( lm_lm_lm_ptr, 4);
- TEST_SIZE ( *lm_lm_lm_ptr, 4);
- TEST_SIZE ( **lm_lm_lm_ptr, 4);
- TEST_SIZE (***lm_lm_lm_ptr, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( lm_lm_ea_ptr, 4);
- TEST_SIZE ( *lm_lm_ea_ptr, 4);
- TEST_SIZE ( **lm_lm_ea_ptr, 8);
- TEST_SIZE (***lm_lm_ea_ptr, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( lm_ea_lm_ptr, 4);
- TEST_SIZE ( *lm_ea_lm_ptr, 8);
- TEST_SIZE ( **lm_ea_lm_ptr, 4);
- TEST_SIZE (***lm_ea_lm_ptr, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( lm_ea_ea_ptr, 4);
- TEST_SIZE ( *lm_ea_ea_ptr, 8);
- TEST_SIZE ( **lm_ea_ea_ptr, 8);
- TEST_SIZE (***lm_ea_ea_ptr, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_lm_lm_ptr, 8);
- TEST_SIZE ( *ea_lm_lm_ptr, 4);
- TEST_SIZE ( **ea_lm_lm_ptr, 4);
- TEST_SIZE (***ea_lm_lm_ptr, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_lm_ea_ptr, 8);
- TEST_SIZE ( *ea_lm_ea_ptr, 4);
- TEST_SIZE ( **ea_lm_ea_ptr, 8);
- TEST_SIZE (***ea_lm_ea_ptr, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_ea_lm_ptr, 8);
- TEST_SIZE ( *ea_ea_lm_ptr, 8);
- TEST_SIZE ( **ea_ea_lm_ptr, 4);
- TEST_SIZE (***ea_ea_lm_ptr, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_ea_ea_ptr, 8);
- TEST_SIZE ( *ea_ea_ea_ptr, 8);
- TEST_SIZE ( **ea_ea_ea_ptr, 8);
- TEST_SIZE (***ea_ea_ea_ptr, 1);
- PRINT1 ("\n");
-#endif
-
-#if USE_EA_VAR
- TEST_SIZE ( lm_lm_lm_ptr_ea, 4);
- TEST_SIZE ( *lm_lm_lm_ptr_ea, 4);
- TEST_SIZE ( **lm_lm_lm_ptr_ea, 4);
- TEST_SIZE (***lm_lm_lm_ptr_ea, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( lm_lm_ea_ptr_ea, 4);
- TEST_SIZE ( *lm_lm_ea_ptr_ea, 4);
- TEST_SIZE ( **lm_lm_ea_ptr_ea, 8);
- TEST_SIZE (***lm_lm_ea_ptr_ea, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( lm_ea_lm_ptr_ea, 4);
- TEST_SIZE ( *lm_ea_lm_ptr_ea, 8);
- TEST_SIZE ( **lm_ea_lm_ptr_ea, 4);
- TEST_SIZE (***lm_ea_lm_ptr_ea, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( lm_ea_ea_ptr_ea, 4);
- TEST_SIZE ( *lm_ea_ea_ptr_ea, 8);
- TEST_SIZE ( **lm_ea_ea_ptr_ea, 8);
- TEST_SIZE (***lm_ea_ea_ptr_ea, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_lm_lm_ptr_ea, 8);
- TEST_SIZE ( *ea_lm_lm_ptr_ea, 4);
- TEST_SIZE ( **ea_lm_lm_ptr_ea, 4);
- TEST_SIZE (***ea_lm_lm_ptr_ea, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_lm_ea_ptr_ea, 8);
- TEST_SIZE ( *ea_lm_ea_ptr_ea, 4);
- TEST_SIZE ( **ea_lm_ea_ptr_ea, 8);
- TEST_SIZE (***ea_lm_ea_ptr_ea, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_ea_lm_ptr_ea, 8);
- TEST_SIZE ( *ea_ea_lm_ptr_ea, 8);
- TEST_SIZE ( **ea_ea_lm_ptr_ea, 4);
- TEST_SIZE (***ea_ea_lm_ptr_ea, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_ea_ea_ptr_ea, 8);
- TEST_SIZE ( *ea_ea_ea_ptr_ea, 8);
- TEST_SIZE ( **ea_ea_ea_ptr_ea, 8);
- TEST_SIZE (***ea_ea_ea_ptr_ea, 1);
- PRINT1 ("\n");
-#endif
-#endif
-#endif
-
-#if USE_COMPLEX
-#if LEVEL1
-#if USE_LOCAL_VAR
- TEST_SIZE ( lm_cptr, 4);
- TEST_SIZE (*lm_cptr, 1);
- TEST_SIZE ( ea_cptr, 8);
- TEST_SIZE (*ea_cptr, 1);
- PRINT1 ("\n");
-#endif
-
-#if USE_EA_VAR
- TEST_SIZE ( lm_cptr_ea, 4);
- TEST_SIZE (*lm_cptr_ea, 1);
- TEST_SIZE ( ea_cptr_ea, 8);
- TEST_SIZE (*ea_cptr_ea, 1);
- PRINT1 ("\n");
-#endif
-#endif
-
-#if LEVEL2
-#if USE_LOCAL_VAR
- TEST_SIZE ( lm_lm_cptr, 4);
- TEST_SIZE ( *lm_lm_cptr, 4);
- TEST_SIZE (**lm_lm_cptr, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( lm_ea_cptr, 4);
- TEST_SIZE ( *lm_ea_cptr, 8);
- TEST_SIZE (**lm_ea_cptr, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_lm_cptr, 8);
- TEST_SIZE ( *ea_lm_cptr, 4);
- TEST_SIZE (**ea_lm_cptr, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_ea_cptr, 8);
- TEST_SIZE ( *ea_ea_cptr, 8);
- TEST_SIZE (**ea_ea_cptr, 1);
- PRINT1 ("\n");
-#endif
-
-#if USE_EA_VAR
- TEST_SIZE ( lm_lm_cptr_ea, 4);
- TEST_SIZE ( *lm_lm_cptr_ea, 4);
- TEST_SIZE (**lm_lm_cptr_ea, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( lm_ea_cptr_ea, 4);
- TEST_SIZE ( *lm_ea_cptr_ea, 8);
- TEST_SIZE (**lm_ea_cptr_ea, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_lm_cptr_ea, 8);
- TEST_SIZE ( *ea_lm_cptr_ea, 4);
- TEST_SIZE (**ea_lm_cptr_ea, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_ea_cptr_ea, 8);
- TEST_SIZE ( *ea_ea_cptr_ea, 8);
- TEST_SIZE (**ea_ea_cptr_ea, 1);
- PRINT1 ("\n");
-#endif
-#endif
-
-#if LEVEL3
-#if USE_LOCAL_VAR
- TEST_SIZE ( lm_lm_lm_cptr, 4);
- TEST_SIZE ( *lm_lm_lm_cptr, 4);
- TEST_SIZE ( **lm_lm_lm_cptr, 4);
- TEST_SIZE (***lm_lm_lm_cptr, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( lm_lm_ea_cptr, 4);
- TEST_SIZE ( *lm_lm_ea_cptr, 4);
- TEST_SIZE ( **lm_lm_ea_cptr, 8);
- TEST_SIZE (***lm_lm_ea_cptr, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( lm_ea_lm_cptr, 4);
- TEST_SIZE ( *lm_ea_lm_cptr, 8);
- TEST_SIZE ( **lm_ea_lm_cptr, 4);
- TEST_SIZE (***lm_ea_lm_cptr, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( lm_ea_ea_cptr, 4);
- TEST_SIZE ( *lm_ea_ea_cptr, 8);
- TEST_SIZE ( **lm_ea_ea_cptr, 8);
- TEST_SIZE (***lm_ea_ea_cptr, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_lm_lm_cptr, 8);
- TEST_SIZE ( *ea_lm_lm_cptr, 4);
- TEST_SIZE ( **ea_lm_lm_cptr, 4);
- TEST_SIZE (***ea_lm_lm_cptr, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_lm_ea_cptr, 8);
- TEST_SIZE ( *ea_lm_ea_cptr, 4);
- TEST_SIZE ( **ea_lm_ea_cptr, 8);
- TEST_SIZE (***ea_lm_ea_cptr, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_ea_lm_cptr, 8);
- TEST_SIZE ( *ea_ea_lm_cptr, 8);
- TEST_SIZE ( **ea_ea_lm_cptr, 4);
- TEST_SIZE (***ea_ea_lm_cptr, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_ea_ea_cptr, 8);
- TEST_SIZE ( *ea_ea_ea_cptr, 8);
- TEST_SIZE ( **ea_ea_ea_cptr, 8);
- TEST_SIZE (***ea_ea_ea_cptr, 1);
- PRINT1 ("\n");
-#endif
-
-#if USE_EA_VAR
- TEST_SIZE ( lm_lm_lm_cptr_ea, 4);
- TEST_SIZE ( *lm_lm_lm_cptr_ea, 4);
- TEST_SIZE ( **lm_lm_lm_cptr_ea, 4);
- TEST_SIZE (***lm_lm_lm_cptr_ea, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( lm_lm_ea_cptr_ea, 4);
- TEST_SIZE ( *lm_lm_ea_cptr_ea, 4);
- TEST_SIZE ( **lm_lm_ea_cptr_ea, 8);
- TEST_SIZE (***lm_lm_ea_cptr_ea, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( lm_ea_lm_cptr_ea, 4);
- TEST_SIZE ( *lm_ea_lm_cptr_ea, 8);
- TEST_SIZE ( **lm_ea_lm_cptr_ea, 4);
- TEST_SIZE (***lm_ea_lm_cptr_ea, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( lm_ea_ea_cptr_ea, 4);
- TEST_SIZE ( *lm_ea_ea_cptr_ea, 8);
- TEST_SIZE ( **lm_ea_ea_cptr_ea, 8);
- TEST_SIZE (***lm_ea_ea_cptr_ea, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_lm_lm_cptr_ea, 8);
- TEST_SIZE ( *ea_lm_lm_cptr_ea, 4);
- TEST_SIZE ( **ea_lm_lm_cptr_ea, 4);
- TEST_SIZE (***ea_lm_lm_cptr_ea, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_lm_ea_cptr_ea, 8);
- TEST_SIZE ( *ea_lm_ea_cptr_ea, 4);
- TEST_SIZE ( **ea_lm_ea_cptr_ea, 8);
- TEST_SIZE (***ea_lm_ea_cptr_ea, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_ea_lm_cptr_ea, 8);
- TEST_SIZE ( *ea_ea_lm_cptr_ea, 8);
- TEST_SIZE ( **ea_ea_lm_cptr_ea, 4);
- TEST_SIZE (***ea_ea_lm_cptr_ea, 1);
- PRINT1 ("\n");
-
- TEST_SIZE ( ea_ea_ea_cptr_ea, 8);
- TEST_SIZE ( *ea_ea_ea_cptr_ea, 8);
- TEST_SIZE ( **ea_ea_ea_cptr_ea, 8);
- TEST_SIZE (***ea_ea_ea_cptr_ea, 1);
- PRINT1 ("\n");
-#endif
-#endif
-#endif
-
- if (errors)
- {
- PRINT3 ("%d error(s), %d test(s)\n", errors, num_tests);
- abort ();
- }
- else
- PRINT2 ("No errors, %d test(s)\n", num_tests);
-
- return 0;
-}
Index: gcc/testsuite/gcc.target/spu/ea/compile2.c
===================================================================
--- gcc/testsuite/gcc.target/spu/ea/compile2.c (revision 142680)
+++ gcc/testsuite/gcc.target/spu/ea/compile2.c (working copy)
@@ -1,86 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -std=gnu99 -pedantic-errors -mea-to-generic-conversion" } */
-
-/* This is the same code as errors2.c but it should compile cleanly. If you
- modify this file, you should modify errors2.c as well. */
-#ifndef TYPE
-#define TYPE void
-#endif
-
-typedef __ea TYPE *ea_ptr_t;
-typedef TYPE *lm_ptr_t;
-
-extern ea_ptr_t ea_ptr;
-extern lm_ptr_t lm_ptr;
-
-extern void arg_ea (ea_ptr_t);
-extern void arg_lm (lm_ptr_t);
-
-#ifdef NO_CAST
-#define EA_CAST(ARG) (ARG)
-#define LM_CAST(ARG) (ARG)
-
-#else
-#define EA_CAST(ARG) ((ea_ptr_t)(ARG))
-#define LM_CAST(ARG) ((lm_ptr_t)(ARG))
-#endif
-
-void ea_to_ea_arg (void)
-{
- arg_ea (ea_ptr);
-}
-
-void ea_to_lm_arg (void)
-{
- arg_lm (LM_CAST (ea_ptr));
-}
-
-void lm_to_ea_arg (void)
-{
- arg_ea (EA_CAST (lm_ptr));
-}
-
-void lm_to_lm_arg (void)
-{
- arg_lm (lm_ptr);
-}
-
-ea_ptr_t ea_to_ea_ret (void)
-{
- return ea_ptr;
-}
-
-lm_ptr_t ea_to_lm_ret (void)
-{
- return LM_CAST (ea_ptr);
-}
-
-ea_ptr_t lm_to_ea_ret (void)
-{
- return EA_CAST (lm_ptr);
-}
-
-lm_ptr_t lm_to_lm_ret (void)
-{
- return lm_ptr;
-}
-
-void ea_to_ea_store (ea_ptr_t ptr)
-{
- ea_ptr = ptr;
-}
-
-void ea_to_lm_store (ea_ptr_t ptr)
-{
- lm_ptr = LM_CAST (ptr);
-}
-
-void lm_to_ea_store (lm_ptr_t ptr)
-{
- ea_ptr = EA_CAST (ptr);
-}
-
-void lm_to_lm_store (lm_ptr_t ptr)
-{
- lm_ptr = ptr;
-}
Index: gcc/testsuite/gcc.target/spu/ea/compile3.c
===================================================================
--- gcc/testsuite/gcc.target/spu/ea/compile3.c (revision 142680)
+++ gcc/testsuite/gcc.target/spu/ea/compile3.c (working copy)
@@ -1,42 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -std=gnu99 -pedantic-errors -maddress-space-conversion" } */
-
-/* This is the same as errors3.c except it should not generate any errors.
- If you modify this code, please modify errors3.c as well. */
-typedef __ea int *ea_ptr_t;
-typedef int *lm_ptr_t;
-
-ea_ptr_t ea, ea2;
-lm_ptr_t lm, lm2;
-
-extern void call_ea (ea_ptr_t);
-extern void call_lm (lm_ptr_t);
-
-/* No errors here. */
-void to_ea (void) { ea = lm; }
-void to_lm (void) { lm = ea; }
-ea_ptr_t ret_ea (void) { return lm; }
-lm_ptr_t ret_lm (void) { return ea; }
-void call_ea2 (void) { call_ea (lm); }
-void call_lm2 (void) { call_lm (ea); }
-int sub_ea (void) { return ea - lm; }
-int sub_lm (void) { return lm - ea; }
-int if_ea (int test) { return *((test) ? ea : lm); }
-int if_lm (int test) { return *((test) ? lm : ea); }
-
-void to_ea2 (void) { ea = ea2; }
-void to_lm2 (void) { lm = lm2; }
-
-void to_ea_with_cast (void) { ea = (ea_ptr_t)lm; }
-void to_lm_with_cast (void) { lm = (lm_ptr_t)ea; }
-ea_ptr_t ret_ea_with_cast (void) { return (ea_ptr_t)lm; }
-lm_ptr_t ret_lm_with_cast (void) { return (lm_ptr_t)ea; }
-void call_ea2_with_cast (void) { call_ea ((ea_ptr_t)lm); }
-void call_lm2_with_cast (void) { call_lm ((lm_ptr_t)ea); }
-int sub_ea_with_cast (void) { return ea - (ea_ptr_t)lm; }
-int sub_lm_with_cast (void) { return lm - (lm_ptr_t)ea; }
-int if_ea_with_cast (int test) { return *((test) ? ea : (ea_ptr_t)lm); }
-int if_lm_with_cast (int test) { return *((test) ? lm : (lm_ptr_t)ea); }
-
-void void_ea (void) { ea = (void *)0; }
-void void_lm (void) { lm = (__ea void *)0; }
Index: gcc/testsuite/gcc.target/spu/ea/cast1.c
===================================================================
--- gcc/testsuite/gcc.target/spu/ea/cast1.c (revision 142680)
+++ gcc/testsuite/gcc.target/spu/ea/cast1.c (working copy)
@@ -1,29 +0,0 @@
-/* { dg-do run { target spu-*-* } } */
-/* { dg-require-effective-target "ea32" } */
-/* { dg-options "-std=gnu99 -O2 -mea32" } */
-
-extern void abort (void);
-extern unsigned long long __ea_local_store;
-
-__ea int *ppu;
-int x, *spu = &x, *spu2;
-
-int
-main (int argc, char **argv)
-{
- ppu = (__ea int *) spu;
- spu2 = (int *) ppu;
-
-#ifdef __EA32__
- if ((int) ppu != (int) __ea_local_store + (int) spu)
-#else
- if ((unsigned long long) ppu != __ea_local_store + (unsigned long long)(int) spu)
-#endif
-
- abort ();
-
- if (spu != spu2)
- abort ();
-
- return 0;
-}
Index: gcc/testsuite/gcc.target/spu/ea/options1.c
===================================================================
--- gcc/testsuite/gcc.target/spu/ea/options1.c (revision 142680)
+++ gcc/testsuite/gcc.target/spu/ea/options1.c (working copy)
@@ -1,5 +0,0 @@
-/* Test -mcache-size. */
-/* { dg-options "-mcache-size=128" } */
-/* { dg-do compile } */
-
-int x;
Index: gcc/testsuite/gcc.target/spu/ea/errors.c
===================================================================
--- gcc/testsuite/gcc.target/spu/ea/errors.c (revision 142680)
+++ gcc/testsuite/gcc.target/spu/ea/errors.c (working copy)
@@ -1,41 +0,0 @@
-/* Invalid __ea declarations. */
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99 -pedantic-errors" } */
-
-extern __ea void f1 (); /* { dg-error "'__ea' specified for function 'f1'" } */
-
-void func ()
-{
- register __ea int local1; /* { dg-error "'__ea' combined with 'register' qualifier for 'local1'" } */
- auto __ea int local2; /* { dg-error "'__ea' combined with 'auto' qualifier for 'local2'" } */
- __ea int local3; /* { dg-error "'__ea' specified for auto variable 'local3'" } */
- register int *__ea p1; /* { dg-error "'__ea' combined with 'register' qualifier for 'p1'" } */
- auto char *__ea p2; /* { dg-error "'__ea' combined with 'auto' qualifier for 'p2'" } */
- void *__ea p3; /* { dg-error "'__ea' specified for auto variable 'p3'" } */
- register __ea int a1[2]; /* { dg-error "'__ea' combined with 'register' qualifier for 'a1'" } */
- auto __ea char a2[1]; /* { dg-error "'__ea' combined with 'auto' qualifier for 'a2'" } */
- __ea char a3[5]; /* { dg-error "'__ea' specified for auto variable 'a3'" } */
-}
-
-void func2 (__ea int x) /* { dg-error "'__ea' specified for parameter 'x'" } */
-{ }
-
-struct st {
- __ea int x; /* { dg-error "'__ea' specified for structure field 'x'" } */
- int *__ea q; /* { dg-error "'__ea' specified for structure field 'q'" } */
-} s;
-
-__ea int func3 (int x) { /* { dg-error "'__ea' specified for function 'func3'" } */
- return x;
-}
-
-struct A { int a; };
-
-int func4 (int *__ea x) /* { dg-error "'__ea' specified for parameter 'x'" } */
-{
- struct A i = (__ea struct A) { 1 }; /* { dg-error "compound literal qualified by address-space qualifier" } */
- return i.a;
-}
-
-extern __ea int ea_var; /* { dg-error "previous.*decl" } */
-int ea_var; /* { dg-error "conflicting named address spaces" } */
Index: gcc/testsuite/gcc.target/spu/ea/cache64.c
===================================================================
--- gcc/testsuite/gcc.target/spu/ea/cache64.c (revision 142680)
+++ gcc/testsuite/gcc.target/spu/ea/cache64.c (working copy)
@@ -1,26 +0,0 @@
-/* Copyright (C) 2008 Free Software Foundation, Inc.
-
- This file is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License as published by the Free
- Software Foundation; either version 2 of the License, or (at your option)
- any later version.
-
- This file is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with this file; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-/* { dg-do run } */
-/* { dg-require-effective-target "ea64" } */
-/* { dg-options "-mcache-size=8 -O2 -mea64 -g" } */
-
-#ifndef __EA64__
-#error "You must use -mea64 for this test"
-#endif
-
-#include "cache-common.h"
Index: gcc/testsuite/gcc.target/spu/ea/compile.c
===================================================================
--- gcc/testsuite/gcc.target/spu/ea/compile.c (revision 142680)
+++ gcc/testsuite/gcc.target/spu/ea/compile.c (working copy)
@@ -1,93 +0,0 @@
-/* Valid __ea declarations. */
-/* { dg-do compile } */
-/* { dg-options "-O2 -std=gnu99 -pedantic-errors" } */
-
-/* Typedefs. */
-typedef __ea int ea_int_t;
-typedef __ea int *ea_int_star_t;
-typedef int outer_t;
-
-/* Externs. */
-
-__ea extern int i1;
-extern __ea int i2;
-extern int __ea i3;
-extern __ea ea_int_t i4; /* __ea qualifier permitted via typedef. */
-extern int __ea __ea __ea dupe; /* __ea duplicate permitted directly. */
-extern int __ea *ppu;
-
-/* Pointers. */
-__ea int *i4p;
-
-/* Structs. */
-struct st {
- __ea int *p;
-};
-
-/* Variable definitions. */
-__ea int ii0;
-int *__ea ii1;
-static int __ea ii2;
-
-void
-f1 ()
-{
- int *spu;
- ppu = (ea_int_t *) spu;
- ppu = (ea_int_star_t) spu;
-}
-
-void
-f2 ()
-{
- int *spu;
- spu = (int *) ppu;
- ppu = (__ea int *) spu;
-}
-
-void
-f3 ()
-{
- int i = sizeof (__ea int);
-}
-
-__ea int *f4 (void)
-{
- return 0;
-}
-
-int f5 (__ea int *parm)
-{
- static __ea int local4;
- int tmp = local4;
- local4 = *parm;
- return tmp;
-}
-
-static inline __ea void *f6 (__ea void *start)
-{
- return 0;
-}
-
-void f7 (void)
-{
- __ea void *s1;
- auto __ea void *s2;
-}
-
-__ea int *f8 (__ea int *x)
-{
- register __ea int *y = x;
- __ea int *z = y;
- return z;
-}
-
-long long f9 (__ea long long x[2])
-{
- return x[0] + x[1];
-}
-
-void f10 ()
-{
- static __ea outer_t o;
-}
--
Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA
meissner@linux.vnet.ibm.com