OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc
    from Rev 319 to Rev 320
    Reverse comparison

Rev 319 → Rev 320

/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ld.c
0,0 → 1,14
/* { dg-do compile } */
/* { dg-skip-if "" { ! *-linux-* } { "*" } { "" } } */
/* { dg-options "-O2 -fpic" } */
/* { dg-final { scan-assembler "foo@TLSLDM\\(\%a5\\)" } } */
/* { dg-final { scan-assembler "bsr.l __tls_get_addr@PLTPC" } } */
/* { dg-final { scan-assembler "lea \\(foo@TLSLDO,\%a0\\)" } } */
 
static int __thread foo;
 
int *
bar (void)
{
return &foo;
}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ld.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/m68k.exp =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/m68k.exp (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/m68k.exp (revision 320) @@ -0,0 +1,41 @@ +# Copyright (C) 1997, 2004, 2006, 2007 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 +# . + +# GCC testsuite that uses the `dg.exp' driver. + +# Exit immediately if this isn't an m68k target. +if { ![istarget m68k*-*-*] && ![istarget fido*-*-*] } then { + return +} + +# Load support procs. +load_lib gcc-dg.exp + +# If a testcase doesn't have special options, use these. +global DEFAULT_CFLAGS +if ![info exists DEFAULT_CFLAGS] then { + set DEFAULT_CFLAGS " -ansi -pedantic-errors" +} + +# Initialize `dg'. +dg-init + +# Main loop. +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \ + "" $DEFAULT_CFLAGS + +# All done. +dg-finish Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-le.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-le.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-le.c (revision 320) @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-skip-if "" { ! *-linux-* } { "*" } { "" } } */ +/* { dg-options "-O2" } */ +/* { dg-final { scan-assembler "jsr __m68k_read_tp" } } */ +/* { dg-final { scan-assembler "lea \\(foo@TLSLE,\%a0\\)" } } */ + +static int __thread foo; + +int * +bar (void) +{ + return &foo; +}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-le.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ld-xgot-xtls.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ld-xgot-xtls.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ld-xgot-xtls.c (revision 320) @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-skip-if "" { ! *-linux-* } { "*" } { "" } } */ +/* { dg-options "-O2 -fpic -mxgot -mxtls" } */ +/* { dg-final { scan-assembler "#foo@TLSLDM,\%\[ad\]\[0-7\]" } } */ +/* { dg-final { scan-assembler "bsr.l __tls_get_addr@PLTPC" } } */ +/* { dg-final { scan-assembler "#foo@TLSLDO,\%\[ad\]\[0-7\]" } } */ + +static int __thread foo; + +int * +bar (void) +{ + return &foo; +}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ld-xgot-xtls.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/20090709-1.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/20090709-1.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/20090709-1.c (revision 320) @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* There should be 3 occurrences of .LC0 in the code: + one for the definition of "0", + one for use in test1() and + one for use in test2(). + FIXME: At the moment m68k GCC does not optimize test1() to nop + for some reason. */ +/* { dg-final { scan-assembler-times ".LC0" 3 } } */ + +void dummy(char *arg); + +void test1(void) +{ + char tmp[2] = "0"; +} + +void test2(void) +{ + dummy("0"); +}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/20090709-1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pic-1.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pic-1.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pic-1.c (revision 320) @@ -0,0 +1,18 @@ +/* { dg-do compile { target m68k-*-* fido-*-* } } */ +/* { dg-options "-O2 -fpic" } */ + +extern void Foo (void *); + +char *ary[] = {"a", "b", "c", "d", "e"}; + +void Bar (void) +{ + int cnt = 0; + + for (cnt = 0; cnt < 4; ++cnt) + { + char *ptr = ary[cnt]; + + Foo (&ptr); + } +}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pic-1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-gd-xgot.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-gd-xgot.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-gd-xgot.c (revision 320) @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-skip-if "" { ! *-linux-* } { "*" } { "" } } */ +/* { dg-options "-O2 -fpic -mxgot" } */ +/* { dg-final { scan-assembler "#foo@TLSGD,\%\[ad\]\[0-7\]" } } */ +/* { dg-final { scan-assembler "bsr.l __tls_get_addr@PLTPC" } } */ + +extern int __thread foo; + +int * +bar (void) +{ + return &foo; +}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-gd-xgot.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pr41302.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pr41302.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pr41302.c (revision 320) @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* { dg-final { scan-assembler "move.l \%d0,\%a0" { target *-*-*linux* } } } */ + +struct pts { + int c; +}; + +unsigned int bar (struct pts *a, int b); + +struct pts * foo (struct pts *a, int b) +{ + return (struct pts *) bar (a, b); +}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pr41302.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ie-xgot.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ie-xgot.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ie-xgot.c (revision 320) @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-skip-if "" { ! *-linux-* } { "*" } { "" } } */ +/* { dg-options "-O2 -mxgot" } */ +/* { dg-final { scan-assembler "jsr __m68k_read_tp" } } */ +/* { dg-final { scan-assembler "#foo@TLSIE,\%\[ad\]\[0-7\]" } } */ + +extern int __thread foo; + +int * +bar (void) +{ + return &foo; +}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ie-xgot.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ld-xgot.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ld-xgot.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ld-xgot.c (revision 320) @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-skip-if "" { ! *-linux-* } { "*" } { "" } } */ +/* { dg-options "-O2 -fpic -mxgot" } */ +/* { dg-final { scan-assembler "#foo@TLSLDM,\%\[ad\]\[0-7\]" } } */ +/* { dg-final { scan-assembler "bsr.l __tls_get_addr@PLTPC" } } */ +/* { dg-final { scan-assembler "lea \\(foo@TLSLDO,\%a0\\)" } } */ + +static int __thread foo; + +int * +bar (void) +{ + return &foo; +}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ld-xgot.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/xgot-1.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/xgot-1.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/xgot-1.c (revision 320) @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fpic -mxgot -mcpu=5206" } */ +/* { dg-final { scan-assembler "foo@GOT,\%\[ad\]\[0-7\]" } } */ + +extern int foo; + +int +bar (void) +{ + return foo; +}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/xgot-1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pr45015.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pr45015.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pr45015.c (revision 320) @@ -0,0 +1,26 @@ +/* PR debug/45015 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -g" } */ + +unsigned int +foo (unsigned int *x, const unsigned int *y, int z, unsigned int w) +{ + unsigned int a, b, c, s; + int j; + j = -z; + x -= j; + y -= j; + a = 0; + do + { + __asm__ ("move.l %2, %0; move.l %3, %1" : "=d" (b), "=d" (c) : "g<>" (y[j]), "d" (w)); + c += a; + a = (c < a) + b; + s = x[j]; + c = s + c; + a += (c < s); + x[j] = c; + } + while (++j != 0); + return a; +}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pr45015.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/crash1.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/crash1.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/crash1.c (revision 320) @@ -0,0 +1,42 @@ +/* { dg-do compile } */ +/* { dg-options "-Os -fomit-frame-pointer" } */ + +/* Caused an ICE because of forgotten auto increment. */ + +register void *current __asm__("%a2"); + +struct kernel_stat +{ + long long user; + long long nice; + long long system; + long long idle; + long long steal; + unsigned irqs[256]; +}; +extern struct kernel_stat per_cpu__kstat; + +void show_stat(void) +{ + int i; + long long user, nice, system, idle, steal; + long long sum = 0; + + user = nice = system = idle = steal = 0; + for (i = 0; i < 1; i++) + { + int j; + user = user + per_cpu__kstat.user; + nice = nice + per_cpu__kstat.nice; + system = system + per_cpu__kstat.system; + idle = idle + per_cpu__kstat.idle; + steal = steal + per_cpu__kstat.steal; + + for (j = 0 ; j < 256 ; j++) + sum += per_cpu__kstat.irqs[j]; + } + seq_printf(user, nice, system, idle, steal); + seq_printf(sum); + for (i = 0; i < 256; i++) + seq_printf (i); +}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/crash1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/interrupt_thread-1.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/interrupt_thread-1.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/interrupt_thread-1.c (revision 320) @@ -0,0 +1,43 @@ +/* { dg-do compile } */ +/* { dg-options "-mcpu=fidoa -O2 -fomit-frame-pointer" } */ + +/* Check that interrupt_thread attribute works. */ + +#ifdef __mfido__ +extern void foo (void) __attribute__ ((interrupt_thread)); + +int a, b, c, d; + +void bar (void); + +void +foo (void) +{ + int w, x, y, z; + + w = a; + x = b; + y = c; + z = d; + + bar (); + + a = w; + b = x; + c = y; + d = z; +} +#else +/* If the current mutilib is, say, -mcpu=5485, the compiler gets + -mcpu=fidoa -mcpu=5485, where -mcpu=fidoa is overridden. In that + case, we just print out "sleep" in the assembly file and pretend + that everything is all right. */ +asm ("sleep"); +#endif + +/* "sleep" should be generated in place of "rts". */ +/* { dg-final { scan-assembler-times "sleep" 1 } } */ +/* { dg-final { scan-assembler-times "rts" 0 } } */ + +/* There should be no stack adjustment. */ +/* { dg-final { scan-assembler-times "sp" 0 } } */
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/interrupt_thread-1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pr36133.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pr36133.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pr36133.c (revision 320) @@ -0,0 +1,16 @@ +/* pr36133.c + + This test ensures that conditional branches can use the condition codes + written by shift instructions, without the need for an extra TST. */ + +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* { dg-final { scan-assembler-not "tst" } } */ + +void +f (unsigned int a) +{ + if (a >> 4) + asm volatile ("nop"); + asm volatile ("nop"); +}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pr36133.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pr36134.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pr36134.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pr36134.c (revision 320) @@ -0,0 +1,23 @@ +/* pr36134.c + + This test ensures that the shorter LEA instruction is used in preference + to the longer ADD instruction. */ + +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* { dg-final { scan-assembler "lea" } } */ +/* { dg-final { scan-assembler-not "add" } } */ + +int *a, *b; + +void +f () +{ + while (a > b) + { + *a++ = *b++; + *a++ = *b++; + *a++ = *b++; + *a++ = *b++; + } +}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pr36134.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pr35018.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pr35018.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pr35018.c (revision 320) @@ -0,0 +1,31 @@ +/* { dg-do compile } */ +/* { dg-options "-Os -mcpu=5249" } */ + +static inline void vect_add(int *x, int *y, int n) +{ + asm volatile ("nop;" + : [n] "+d" (n), [x] "+a" (x), [y] "+a" (y) + : : "%d0", "%d1", "%d2", "%d3", "%a0", "%a1", "%a2", "%a3", + "cc", "memory"); +} + +extern void vect_copy (int *, int *, int); + +void vorbis_synthesis_blockin(int *blocksizes) +{ + int j, *pcm, *p; + + int n=blocksizes[*p]/2; + int n0=blocksizes[0]/2; + int n1=blocksizes[1]/2; + + for(j=0;j<*p;j++) + { + vect_add(p, pcm, n1); + vect_add(pcm, p, n0); + vect_add(p, pcm, n0); + vect_add(p, pcm, n0); + vect_copy(pcm, p, n); + } +} +
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/pr35018.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/interrupt_thread-2.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/interrupt_thread-2.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/interrupt_thread-2.c (revision 320) @@ -0,0 +1,23 @@ +/* { dg-do compile } */ +/* { dg-options "-mcpu=fidoa" } */ + +/* Check that an error is issued for using more than one + interrupt_attribute at the same time. */ + +/* If the current mutilib is, say, -mcpu=5485, the compiler gets + -mcpu=fidoa -mcpu=5485, where -mcpu=fidoa is overridden. In that + case, we just use two interrupt_handler attributes and expect the + same error. */ +#ifdef __mfido___ +#define IH interrupt_thread +#else +#define IH interrupt_handler +#endif + +extern void f1 (void) __attribute__((interrupt_handler, interrupt_handler)); /* { dg-error "multiple interrupt attributes not allowed" } */ + +extern void f2 (void) __attribute__((interrupt_handler, IH)); /* { dg-error "multiple interrupt attributes not allowed" } */ + +extern void f3 (void) __attribute__((IH, interrupt_handler)); /* { dg-error "multiple interrupt attributes not allowed" } */ + +extern void f4 (void) __attribute__((IH, IH)); /* { dg-error "multiple interrupt attributes not allowed" } */
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/interrupt_thread-2.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/interrupt_thread-3.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/interrupt_thread-3.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/interrupt_thread-3.c (revision 320) @@ -0,0 +1,7 @@ +/* { dg-do compile } */ +/* { dg-options "-mcpu=cpu32" } */ + +/* Check that interrupt_thread is rejected on CPUs other than + fido. */ + +extern void foo (void) __attribute__((interrupt_thread)); /* { dg-error "interrupt_thread is available only on fido" } */
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/interrupt_thread-3.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ld-xtls.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ld-xtls.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ld-xtls.c (revision 320) @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-skip-if "" { ! *-linux-* } { "*" } { "" } } */ +/* { dg-options "-O2 -fpic -mxtls" } */ +/* { dg-final { scan-assembler "foo@TLSLDM\\(\%a5\\)" } } */ +/* { dg-final { scan-assembler "bsr.l __tls_get_addr@PLTPC" } } */ +/* { dg-final { scan-assembler "#foo@TLSLDO,\%\[ad\]\[0-7\]" } } */ + +static int __thread foo; + +int * +bar (void) +{ + return &foo; +}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ld-xtls.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-le-xtls.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-le-xtls.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-le-xtls.c (revision 320) @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-skip-if "" { ! *-linux-* } { "*" } { "" } } */ +/* { dg-options "-O2 -mxtls" } */ +/* { dg-final { scan-assembler "jsr __m68k_read_tp" } } */ +/* { dg-final { scan-assembler "#foo@TLSLE,\%\[ad\]\[0-7\]" } } */ + +static int __thread foo; + +int * +bar (void) +{ + return &foo; +}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-le-xtls.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/interrupt-1.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/interrupt-1.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/interrupt-1.c (revision 320) @@ -0,0 +1,24 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* { dg-final { scan-assembler "j(ra|mp)\[ \t\]*interrupt_sibcall" } } */ +/* { dg-final { scan-assembler "j(b|)sr\[ \t\]*interrupt_call" } } */ +/* { dg-final { scan-assembler "j(ra|mp)\[ \t\]*normal_sibcall" } } */ + +void normal_sibcall (void); +void interrupt_call (void); +void __attribute ((interrupt)) interrupt_sibcall (void); + +void normal (void) +{ + normal_sibcall (); +} + +void __attribute ((interrupt)) interrupt (void) +{ + interrupt_call (); +} + +void __attribute ((interrupt)) interrupt_2 (void) +{ + interrupt_sibcall (); +}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/interrupt-1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-gd.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-gd.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-gd.c (revision 320) @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-skip-if "" { ! *-linux-* } { "*" } { "" } } */ +/* { dg-options "-O2 -fpic" } */ +/* { dg-final { scan-assembler "foo@TLSGD\\(\%a5\\)" } } */ +/* { dg-final { scan-assembler "bsr.l __tls_get_addr@PLTPC" } } */ + +extern int __thread foo; + +int * +bar (void) +{ + return &foo; +}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-gd.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/interrupt-2.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/interrupt-2.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/interrupt-2.c (revision 320) @@ -0,0 +1,22 @@ +/* { dg-do compile } */ +int x; +volatile unsigned int y; + +#define REPEAT10(X, Y) \ + X(Y##0); X(Y##1); X(Y##2); X(Y##3); X(Y##4); \ + X(Y##5); X(Y##6); X(Y##7); X(Y##8); X(Y##9) + +#define REPEAT30(X) REPEAT10 (X, 0); REPEAT10 (X, 1); REPEAT10 (X, 2) +#define IN(X) unsigned int x##X = y +#define OUT(X) y = x##X + +void __attribute__ ((interrupt_handler)) f1 (void) +{ + x = y + 11; +} + +void __attribute__ ((interrupt_handler)) f2 (void) +{ + REPEAT30 (IN); + REPEAT30 (OUT); +}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/interrupt-2.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/slp-ice.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/slp-ice.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/slp-ice.c (revision 320) @@ -0,0 +1,15 @@ +/* From PR 7872, test for optabs segfault when strict low part is present. */ +/* { dg-do compile { target m68k-*-* } } */ +/* { dg-options "-O0" } */ +extern void (**table)(void); + +typedef unsigned short uw16; +typedef unsigned int gshort; + +register uw16 *pc asm("%a4"); +register gshort code asm("%d6"); + +void QMExecuteLoop(uw16 *oldPC) +{ + table[code=(*(uw16*)(pc++))](); +}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/slp-ice.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ie.c =================================================================== --- trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ie.c (nonexistent) +++ trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ie.c (revision 320) @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-skip-if "" { ! *-linux-* } { "*" } { "" } } */ +/* { dg-options "-O2" } */ +/* { dg-final { scan-assembler "jsr __m68k_read_tp" } } */ +/* { dg-final { scan-assembler "foo@TLSIE\\(\%a5\\)" } } */ + +extern int __thread foo; + +int * +bar (void) +{ + return &foo; +}
trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/m68k/tls-ie.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.