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

Subversion Repositories openrisc

Compare Revisions

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

Rev 318 → Rev 319

/openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/mno-fused-madd-vect.c
0,0 → 1,31
/* { dg-do compile */
/* { dg-options "-O2 -mno-fused-madd -ftree-vectorize" } */
/* { dg-final { scan-assembler "fpmpy" } } */
 
/* fpma and fpms will show in either way because there are no
specific vector add/sub instructions. So we just check for fpmpy. */
 
#define N 16
extern bar(float *, float *, float *, float *);
void foo()
{
int i;
float a[N], b[N], c[N], d[N];
bar(a,b,c,d);
for (i = 0; i < N; i++) {
a[i] = b[i] + c[i] * d[i];
}
bar(a,b,c,d);
for (i = 0; i < N; i++) {
a[i] = b[i] - c[i] * d[i];
}
bar(a,b,c,d);
for (i = 0; i < N; i++) {
a[i] = b[i] * c[i] + d[i];
}
bar(a,b,c,d);
for (i = 0; i < N; i++) {
a[i] = b[i] * c[i] - d[i];
}
bar(a,b,c,d);
}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/mno-fused-madd-vect.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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/fpreg-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/fpreg-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/fpreg-1.c (revision 319) @@ -0,0 +1,82 @@ +/* Test permitted and invalid uses of __fpreg. */ +/* Origin: Joseph Myers */ +/* { dg-do compile } */ +/* { dg-options "" } */ + +__float80 f80; +double d; +/* Default initialized __fpreg is OK. */ +__fpreg fpreg, fpreg2; +/* But explicitly zero-initialized is an invalid conversion. */ +__fpreg fi = 0; /* { dg-error "invalid conversion to '__fpreg'" } */ + +__fpreg f0 (__fpreg); +int f1 (__float80); + +/* __fpreg in a structure is OK. */ +struct s { + __float80 b; + __fpreg a; +} x; + +void +f (void) +{ + __fpreg *p; + /* Valid operations. */ + fpreg = fpreg2; + fpreg2 = (__fpreg) fpreg; + fpreg = f0 (fpreg2); + fpreg = +fpreg2; + p = &fpreg; + (void) fpreg; + fpreg = x.a; + fpreg2 = (struct s) { 0 }.a; + fpreg = (d ? fpreg : fpreg2); + d = sizeof (fpreg); + (void)(fpreg, fpreg); + /* Invalid operations. */ + ++fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + --fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + fpreg++; /* { dg-error "invalid operation on '__fpreg'" } */ + fpreg--; /* { dg-error "invalid operation on '__fpreg'" } */ + fpreg = -fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + fpreg = ~fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + d = !fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + d = *fpreg; /* { dg-error "invalid type argument" } */ + if (fpreg) /* { dg-error "invalid operation on '__fpreg'" } */ + return; + d = fpreg; /* { dg-error "invalid conversion from '__fpreg'" } */ + d = (double) fpreg; /* { dg-error "invalid conversion from '__fpreg'" } */ + fpreg = (__fpreg) d; /* { dg-error "invalid conversion to '__fpreg'" } */ + fpreg = fpreg * fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + fpreg = fpreg / fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + fpreg = fpreg % fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + fpreg = fpreg + fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + fpreg = fpreg - fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + fpreg = fpreg << fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + fpreg = fpreg >> fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + d = fpreg < fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + d = fpreg > fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + d = fpreg <= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + d = fpreg >= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + d = fpreg == fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + d = fpreg != fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + d = fpreg & fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + d = fpreg ^ fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + d = fpreg | fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + d = fpreg && fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + d = fpreg || fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + d = (fpreg ? 1 : 2); /* { dg-error "invalid operation on '__fpreg'" } */ + fpreg = (d ? fpreg : d); /* { dg-error "invalid conversion to '__fpreg'" } */ + fpreg *= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + fpreg /= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + fpreg %= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + fpreg += fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + fpreg -= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + fpreg <<= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + fpreg >>= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + fpreg &= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + fpreg ^= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ + fpreg |= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */ +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/fpreg-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/fpreg-2.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/fpreg-2.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/fpreg-2.c (revision 319) @@ -0,0 +1,21 @@ +/* Test __fpreg ABI. */ +/* Origin: Joseph Myers */ +/* { dg-do compile } */ +/* { dg-options "" } */ +/* { dg-final { scan-assembler "ldf.fill" } } */ +/* { dg-final { scan-assembler "stf.spill" } } */ + +__fpreg x; + +void f (void); + +void +g (void) +{ + __fpreg b = x; + f (); + x = b; +} + +char t1[(sizeof (__fpreg) == sizeof (__float80) ? 1 : -1)]; +char t2[(__alignof (__fpreg) == __alignof (__float80) ? 1 : -1)];
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/fpreg-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/types-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/types-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/types-1.c (revision 319) @@ -0,0 +1,41 @@ +/* { dg-do compile { target ia64*-hp-hpux* } } */ + +/* Test that __fpreg is distinct from any other builtin type. */ + +extern float fr1; /* { dg-message "note: previous declaration of " } */ +extern __fpreg fr1; /* { dg-error "" } */ +extern double fr2; /* { dg-message "note: previous declaration of " } */ +extern __fpreg fr2; /* { dg-error "" } */ +extern long double fr3; /* { dg-message "note: previous declaration of " } */ +extern __fpreg fr3; /* { dg-error "" } */ +extern __float80 fr4; /* { dg-message "note: previous declaration of " } */ +extern __fpreg fr4; /* { dg-error "" } */ +extern __float128 fr5; /* { dg-message "note: previous declaration of " } */ +extern __fpreg fr5; /* { dg-error "" } */ + +/* Test that __float80 is distinct from any other builtin type. */ + +extern float f801; /* { dg-message "note: previous declaration of " } */ +extern __float80 f801; /* { dg-error "" } */ +extern double f802; /* { dg-message "note: previous declaration of " } */ +extern __float80 f802; /* { dg-error "" } */ +extern long double f803; /* { dg-message "note: previous declaration of " } */ +extern __float80 f803; /* { dg-error "" } */ +extern __fpreg f804; /* { dg-message "note: previous declaration of " } */ +extern __float80 f804; /* { dg-error "" } */ +extern __float128 f805; /* { dg-message "note: previous declaration of " } */ +extern __float80 f805; /* { dg-error "" } */ + +/* Test that __float128 is distinct from any other builtin type -- + except "long double", for which it is a synonym. */ + +extern float f1281; /* { dg-message "note: previous declaration of " } */ +extern __float128 f1281; /* { dg-error "" } */ +extern double f1282; /* { dg-message "note: previous declaration of " } */ +extern __float128 f1282; /* { dg-error "" } */ +extern long double f1283; +extern __float128 f1283; +extern __fpreg f1284; /* { dg-message "note: previous declaration of " } */ +extern __float128 f1284; /* { dg-error "" } */ +extern __float80 f1285; /* { dg-message "note: previous declaration of " } */ +extern __float128 f1285; /* { dg-error "" } */
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/types-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/types-2.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/types-2.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/types-2.c (revision 319) @@ -0,0 +1,20 @@ +/* { dg-do run { target ia64*-hp-hpux* } } */ +/* { dg-options } */ + +/* Test that the sizes and alignments of the extra floating-point + types are correct. */ + +int main () { + if (sizeof (__fpreg) != 16) + return 1; + if (__alignof__ (__fpreg) != 16) + return 2; + + if (sizeof (__float80) != 16) + return 3; + if (__alignof__ (__float80) != 16) + return 4; + + return 0; +} +
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/types-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/sibcall-opt-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/sibcall-opt-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/sibcall-opt-1.c (revision 319) @@ -0,0 +1,12 @@ +/* PR target/38056. Do not do sibcall optimization across object file + boundery when -mconstant-gp is not used. */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* { dg-final { scan-assembler "br.call.*bar" } } */ + +int bar(int x); + +int foo(int x) +{ + return (bar(x + 1)); +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/sibcall-opt-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/sibcall-opt-2.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/sibcall-opt-2.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/sibcall-opt-2.c (revision 319) @@ -0,0 +1,12 @@ +/* PR target/38056. Do sibcall optimization across object file + boundery when -mconstant-gp is used. */ +/* { dg-do compile } */ +/* { dg-options "-O2 -mconstant-gp" } */ +/* { dg-final { scan-assembler-not "br.call.*bar" } } */ + +int bar(int x); + +int foo(int x) +{ + return (bar(x + 1)); +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/sibcall-opt-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/fptr-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/fptr-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/fptr-1.c (revision 319) @@ -0,0 +1,31 @@ +/* { dg-do compile { target ia64-*-linux* } } */ +/* { dg-options "-O2" } */ + +/* { dg-final { scan-assembler-not "@ltoffx\\(os_boot_rendez#\\)" } } */ +/* { dg-final { scan-assembler "@ltoff\\(@fptr\\(os_boot_rendez#\\)\\)" } } */ + +/* Test function descriptor access. */ + +struct ia64_fdesc +{ + unsigned long func; + unsigned long gp; +}; + +void +os_boot_rendez (void) +{ +} + +extern int check (unsigned long); + +int +main (int argc, char **argv) +{ + int i; + int res = 0; + + for (i = 0; i < 1; i++) + res += check (((struct ia64_fdesc *) os_boot_rendez)->gp); + return res; +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/fptr-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/ia64.exp =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/ia64.exp (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/ia64.exp (revision 319) @@ -0,0 +1,41 @@ +# Copyright (C) 1997, 2007, 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 IA-64 target. +if ![istarget ia64*-*-*] 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/*.\[cS\]]] \ + "" $DEFAULT_CFLAGS + +# All done. +dg-finish Index: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/float80-varargs-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/float80-varargs-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/float80-varargs-1.c (revision 319) @@ -0,0 +1,33 @@ +/* Test for a bug with passing __float80 in varargs. The __float80 + value was wrongly passed, leading to an abort. */ +/* Origin: Joseph Myers */ +/* { dg-do run } */ +/* { dg-options "" } */ + +#include + +extern void abort (void); +extern void exit (int); + +__float80 s = 1.234L; +__float80 d; + +void vf (int a0, ...); + +int +main (void) +{ + vf (0, s); + if (d != s) + abort (); + exit (0); +} + +void +vf (int a0, ...) +{ + va_list ap; + va_start (ap, a0); + d = va_arg (ap, __float80); + va_end (ap); +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/float80-varargs-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/small-addr-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/small-addr-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/small-addr-1.c (revision 319) @@ -0,0 +1,23 @@ +/* PR target/21632 */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +struct S +{ + void *s[256]; +}; + +struct T +{ + long t[23]; + struct S *u; +}; + +extern struct T __attribute__((model (small))) v; + +void * +foo (void) +{ + return v.u->s[0]; +} +
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/small-addr-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/mfused-madd.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/mfused-madd.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/mfused-madd.c (revision 319) @@ -0,0 +1,64 @@ +/* { dg-do compile */ +/* { dg-options "-O2" } */ +/* { dg-final { scan-assembler-not "fmpy" } } */ +/* { dg-final { scan-assembler-not "fadd" } } */ +/* { dg-final { scan-assembler-not "fsub" } } */ +/* { dg-final { scan-assembler "fma" } } */ +/* { dg-final { scan-assembler "fms" } } */ +/* { dg-final { scan-assembler "fnma" } } */ + +float foo01(float a, float b, float c) {return (a + b * c);} +float foo02(float a, float b, float c) {return (a - b * c);} +float foo03(float a, float b, float c) {return (a * b + c);} +float foo04(float a, float b, float c) {return (a * b - c);} + +double foo05(double a, double b, double c) {return (a + b * c);} +double foo06(double a, double b, double c) {return (a - b * c);} +double foo07(double a, double b, double c) {return (a * b + c);} +double foo08(double a, double b, double c) {return (a * b - c);} + +__float80 foo09(__float80 a, __float80 b, __float80 c) {return (a + b * c);} +__float80 foo10(__float80 a, __float80 b, __float80 c) {return (a - b * c);} +__float80 foo11(__float80 a, __float80 b, __float80 c) {return (a * b + c);} +__float80 foo12(__float80 a, __float80 b, __float80 c) {return (a * b - c);} + + + +float foo20(double a, double b, double c) {return (float) (a + b * c);} +float foo21(double a, double b, double c) {return (float) (a - b * c);} +float foo22(double a, double b, double c) {return (float) (a * b + c);} +float foo23(double a, double b, double c) {return (float) (a * b - c);} + +float foo24(__float80 a, __float80 b, __float80 c) {return (float) (a + b * c);} +float foo25(__float80 a, __float80 b, __float80 c) {return (float) (a - b * c);} +float foo26(__float80 a, __float80 b, __float80 c) {return (float) (a * b + c);} +float foo27(__float80 a, __float80 b, __float80 c) {return (float) (a * b - c);} + +double foo28(__float80 a, __float80 b, __float80 c) {return (double) (a + b * c);} +double foo29(__float80 a, __float80 b, __float80 c) {return (double) (a - b * c);} +double foo30(__float80 a, __float80 b, __float80 c) {return (double) (a * b + c);} +double foo31(__float80 a, __float80 b, __float80 c) {return (double) (a * b - c);} + + +float foo001(float a, float b, double c) { return (a + b * c); } +float foo002(float a, float b, double c) { return (a - b * c); } + +float foo005(float a, double b, double c) { return (a + b * c); } +float foo006(float a, double b, double c) { return (a - b * c); } +float foo007(float a, double b, double c) { return (a * b + c); } +float foo008(float a, double b, double c) { return (a * b - c); } + +double foo009(double a, float b, double c) { return (a + b * c); } +double foo010(double a, float b, double c) { return (a - b * c); } +double foo011(double a, float b, double c) { return (a * b + c); } +double foo012(double a, float b, double c) { return (a * b - c); } + +float foo013(float a, double b, __float80 c) { return (a + b * c); } +float foo014(float a, double b, __float80 c) { return (a - b * c); } +float foo017(double a, float b, __float80 c) { return (a + b * c); } +float foo018(double a, float b, __float80 c) { return (a - b * c); } + +float foo021(float a, __float80 b, double c) { return (a + b * c); } +float foo022(float a, __float80 b, double c) { return (a - b * c); } +float foo023(float a, __float80 b, double c) { return (a * b + c); } +float foo024(float a, __float80 b, double c) { return (a * b - c); }
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/mfused-madd.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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20010423-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20010423-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20010423-1.c (revision 319) @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +int __sync_fetch_and_add_si (int *, int); + +inline unsigned int +bar (volatile unsigned int *mem, unsigned int val) +{ + return __sync_fetch_and_add_si((int *)mem, (int)val); +} + +volatile unsigned int x; + +void foo (unsigned short *a) +{ + *a = bar (&x, 1) + 1; +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20010423-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20040303-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20040303-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20040303-1.c (revision 319) @@ -0,0 +1,20 @@ +/* Test floating point division on ia64. There was a bug in the + max-throughput version of the inline division code. Expecting an + exact value from a floating point expression is unwise but GCC + depends on it in allocno_compare. */ + +/* { dg-do run } */ +/* { dg-options "-minline-float-divide-max-throughput" } */ + +extern void abort (void); + +volatile int i = 24; +volatile int j = 30; +volatile int k = 1; + +int main() +{ + int pri2 = (((double) i / j) * (10000 / 1000) * k); + if (pri2 != 8) abort(); + return 0; +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20040303-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20030405-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20030405-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20030405-1.c (revision 319) @@ -0,0 +1,29 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +int +foo (int x, int y) +{ + if (y == 0) + { + register long r8 asm ("r8"); + register long r15 asm ("r15") = 1; + long retval; + __asm __volatile ("foo" : "=r" (r8), "=r" (r15) : "1" (r15)); + retval = r8; + y = retval; + } + + { + register long r8 asm ("r8"); + register long r15 asm ("r15") = 2; + long retval; + register long _out1 asm ("out1") = x; + register long _out0 asm ("out0") = y; + __asm __volatile ("foo" + : "=r" (r8), "=r" (r15) , "=r" (_out0), "=r" (_out1) + : "1" (r15) , "2" (_out0), "3" (_out1)); + retval = r8; + return retval; + } +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20030405-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20071210-2.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20071210-2.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20071210-2.c (revision 319) @@ -0,0 +1,68 @@ +/* { dg-do compile } */ +/* { dg-options "-Os -fselective-scheduling2" } */ + +extern void abort (void); + +struct S +{ + int n1, n2, n3, n4; +}; + +__attribute__((noinline)) struct S +foo (int x, int y, int z) +{ + if (x != 10 || y != 9 || z != 8) + abort (); + struct S s = { 1, 2, 3, 4 }; + return s; +} + +__attribute__((noinline)) void ** +bar (void **u, int *v) +{ + void **w = u; + int *s = v, x, y, z; + void **p, **q; + static void *l[] = { &&lab1, &&lab1, &&lab2, &&lab3, &&lab4 }; + + if (!u) + return l; + + q = *w++; + goto *q; +lab2: + p = q; + q = *w++; + x = s[2]; + y = s[1]; + z = s[0]; + s -= 1; + struct S r = foo (x, y, z); + s[3] = r.n1; + s[2] = r.n2; + s[1] = r.n3; + s[0] = r.n4; + goto *q; +lab3: + p = q; + q = *w++; + s += 1; + s[0] = 23; +lab1: + goto *q; +lab4: + return 0; +} + +int +main (void) +{ + void **u = bar ((void **) 0, (int *) 0); + void *t[] = { u[2], u[4] }; + int s[] = { 7, 8, 9, 10, 11, 12 }; + if (bar (t, &s[1]) != (void **) 0 + || s[0] != 4 || s[1] != 3 || s[2] != 2 || s[3] != 1 + || s[4] != 11 || s[5] != 12) + abort (); + return 0; +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20071210-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20030225-2.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20030225-2.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20030225-2.c (revision 319) @@ -0,0 +1,46 @@ +/* { dg-do run } */ +/* { dg-options "-O3" } */ + +extern void abort (void); +extern void exit (int); + +int __attribute__((noinline, const)) +ret4 (float value) +{ + return 4; +} + +int __attribute__((noinline, const)) +ret0 (float value) +{ + return 0; +} + +float __attribute__((noinline)) +test (float x, float y) +{ + int clsx = ret4 (x); + int clsy = ret0 (y); + + if (clsx == 0 || clsy == 0 + || (y < 0 && clsx == 1 && clsy == 1)) + return x - y; + + return x < y ? 0 : x - y; +} + +float a = 0.0, b; + +int main (void) +{ + unsigned long e; + b = a / a; + __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (e)); + e &= ~0x7e000UL; + __asm__ __volatile__ ("mov.m ar.fpsr=%0" :: "r" (e) : "memory"); + a = test (0, b); + __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (e)); + if (e & 0x2000) + abort (); + exit (0); +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20030225-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20020326-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20020326-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20020326-1.c (revision 319) @@ -0,0 +1,11 @@ +/* PR target/6054 */ +/* { dg-do compile } */ +/* { dg-options "-O -mconstant-gp" } */ +/* { dg-final { scan-assembler "mov r1 =" } } */ + +extern void direct (void); +void foo(void (*indirect) (void)) +{ + indirect (); + direct (); +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20020326-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/pr29682.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/pr29682.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/pr29682.c (revision 319) @@ -0,0 +1,51 @@ +/* { dg-do compile { target ia64-*-* } } */ +/* { dg-options "-O3 -msched-control-spec" } */ +typedef long unsigned int size_t; +typedef unsigned char uint8_t; +typedef unsigned int uint32_t; +typedef uint8_t byte; +typedef enum pgpArmor_e +{ + PGPARMOR_ERR_CRC_CHECK = -7, PGPARMOR_ERR_BODY_DECODE = + -3, PGPARMOR_ERR_UNKNOWN_ARMOR_TYPE = -2, PGPARMOR_ERR_NO_BEGIN_PGP = + -1, PGPARMOR_NONE = 0, PGPARMOR_MESSAGE = 1, PGPARMOR_PUBKEY = + 5, PGPARMOR_PRIVKEY = 6, PGPARMOR_SECKEY = 7 +} +pgpArmor; +pgpCRC (const byte * octets, size_t len) +{ + unsigned int crc = 0xb704ce; + int i; + while (len--) + { + for (i = 0; i < 8; i++) + { + crc <<= 1; + if (crc & 0x1000000) + crc ^= 0x1864cfb; + } + } +} +pgpReadPkts (const char *fn, const byte ** pkt, size_t * pktlen) +{ + const byte *b = ((void *) 0); + const char *enc = ((void *) 0); + byte *dec; + size_t declen; + uint32_t crcpkt, crc; + int pstate = 0; + pgpArmor ec = PGPARMOR_ERR_NO_BEGIN_PGP; + { + switch (pstate) + { + case 0: + if (b64decode (enc, (void **) &dec, &declen) != 0) + { + goto exit; + } + crc = pgpCRC (dec, declen); + } + } +exit:if (ec > PGPARMOR_NONE && pkt) + *pkt = b; +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/pr29682.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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/versionid-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/versionid-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/versionid-1.c (revision 319) @@ -0,0 +1,10 @@ +/* { dg-do compile { target ia64-*-hpux* } } */ + +extern int foo () __attribute__((version_id ("20040821"))); + +int bar(int i) +{ + return (foo() + 1); +} + +/* { dg-final { scan-assembler "alias.*foo.*foo\\\{20040821\\\}" } } */
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/versionid-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/mno-fused-madd.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/mno-fused-madd.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/mno-fused-madd.c (revision 319) @@ -0,0 +1,64 @@ +/* { dg-do compile */ +/* { dg-options "-O2 -mno-fused-madd" } */ +/* { dg-final { scan-assembler-not "fma" } } */ +/* { dg-final { scan-assembler-not "fms" } } */ +/* { dg-final { scan-assembler-not "fnma" } } */ +/* { dg-final { scan-assembler "fmpy" } } */ +/* { dg-final { scan-assembler "fadd" } } */ +/* { dg-final { scan-assembler "fsub" } } */ + +float foo01(float a, float b, float c) {return (a + b * c);} +float foo02(float a, float b, float c) {return (a - b * c);} +float foo03(float a, float b, float c) {return (a * b + c);} +float foo04(float a, float b, float c) {return (a * b - c);} + +double foo05(double a, double b, double c) {return (a + b * c);} +double foo06(double a, double b, double c) {return (a - b * c);} +double foo07(double a, double b, double c) {return (a * b + c);} +double foo08(double a, double b, double c) {return (a * b - c);} + +__float80 foo09(__float80 a, __float80 b, __float80 c) {return (a + b * c);} +__float80 foo10(__float80 a, __float80 b, __float80 c) {return (a - b * c);} +__float80 foo11(__float80 a, __float80 b, __float80 c) {return (a * b + c);} +__float80 foo12(__float80 a, __float80 b, __float80 c) {return (a * b - c);} + + + +float foo20(double a, double b, double c) {return (float) (a + b * c);} +float foo21(double a, double b, double c) {return (float) (a - b * c);} +float foo22(double a, double b, double c) {return (float) (a * b + c);} +float foo23(double a, double b, double c) {return (float) (a * b - c);} + +float foo24(__float80 a, __float80 b, __float80 c) {return (float) (a + b * c);} +float foo25(__float80 a, __float80 b, __float80 c) {return (float) (a - b * c);} +float foo26(__float80 a, __float80 b, __float80 c) {return (float) (a * b + c);} +float foo27(__float80 a, __float80 b, __float80 c) {return (float) (a * b - c);} + +double foo28(__float80 a, __float80 b, __float80 c) {return (double) (a + b * c);} +double foo29(__float80 a, __float80 b, __float80 c) {return (double) (a - b * c);} +double foo30(__float80 a, __float80 b, __float80 c) {return (double) (a * b + c);} +double foo31(__float80 a, __float80 b, __float80 c) {return (double) (a * b - c);} + + +float foo001(float a, float b, double c) { return (a + b * c); } +float foo002(float a, float b, double c) { return (a - b * c); } + +float foo005(float a, double b, double c) { return (a + b * c); } +float foo006(float a, double b, double c) { return (a - b * c); } +float foo007(float a, double b, double c) { return (a * b + c); } +float foo008(float a, double b, double c) { return (a * b - c); } + +double foo009(double a, float b, double c) { return (a + b * c); } +double foo010(double a, float b, double c) { return (a - b * c); } +double foo011(double a, float b, double c) { return (a * b + c); } +double foo012(double a, float b, double c) { return (a * b - c); } + +float foo013(float a, double b, __float80 c) { return (a + b * c); } +float foo014(float a, double b, __float80 c) { return (a - b * c); } +float foo017(double a, float b, __float80 c) { return (a + b * c); } +float foo018(double a, float b, __float80 c) { return (a - b * c); } + +float foo021(float a, __float80 b, double c) { return (a + b * c); } +float foo022(float a, __float80 b, double c) { return (a - b * c); } +float foo023(float a, __float80 b, double c) { return (a * b + c); } +float foo024(float a, __float80 b, double c) { return (a * b - c); }
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/mno-fused-madd.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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/versionid-2.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/versionid-2.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/versionid-2.c (revision 319) @@ -0,0 +1,10 @@ +/* { dg-do compile { target ia64-*-hpux* } } */ + +extern int foo () __attribute__((version_id ("20040821"))); + +int foo(int i) +{ + return (1); +} + +/* { dg-final { scan-assembler "alias.*foo.*foo\\\{20040821\\\}" } } */
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/versionid-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20090324-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20090324-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20090324-1.c (revision 319) @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -fmodulo-sched" } */ + +static char *place_region_bounds_x, *place_region_bounds_y; +static void read_place () { + char msg[300]; + update_screen (msg); +} +static void alloc_and_load_placement_structs () { + int i, j; + for (j=0; + j<100; + j++) { + place_region_bounds_x[i] = place_region_bounds_x[i-1]; + place_region_bounds_y[i] = place_region_bounds_y[i-1]; + } +} +void place_and_route () { + read_place (); + alloc_and_load_placement_structs (); +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20090324-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20080802-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20080802-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20080802-1.c (revision 319) @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -msched-control-spec" } */ + +struct cpp_reader; + +extern const char * parse_include (struct cpp_reader *, int *m, void *); +extern int _cpp_compare_file_date (struct cpp_reader *, const char *, int); + +void +_cpp_init_internal_pragmas (struct cpp_reader *pfile) +{ + const char *fname; + int angle_brackets, ordering; + + fname = parse_include (pfile, &angle_brackets, (void *) 0); + if (!fname) + return; + ordering = _cpp_compare_file_date (pfile, fname, angle_brackets); +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20080802-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20040709-2.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20040709-2.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20040709-2.c (revision 319) @@ -0,0 +1,151 @@ +/* Check for ia64 data speculation failure with '-O2 -funroll-loops'. */ + +/* { dg-do compile } */ +/* { dg-options "-O2 -funroll-loops -Wno-overflow" } */ + +extern void abort (void); +extern void exit (int); + +unsigned int +myrnd (void) +{ + static unsigned int s = 1388815473; + s *= 1103515245; + s += 12345; + return (s / 65536) % 2048; +} + +#define T(S) \ +struct S s##S; \ +struct S retme##S (struct S x) \ +{ \ + return x; \ +} \ + \ +unsigned int fn1##S (unsigned int x) \ +{ \ + struct S y = s##S; \ + y.k += x; \ + y = retme##S (y); \ + return y.k; \ +} \ + \ +unsigned int fn2##S (unsigned int x) \ +{ \ + struct S y = s##S; \ + y.k += x; \ + y.k %= 15; \ + return y.k; \ +} \ + \ +unsigned int retit##S (void) \ +{ \ + return s##S.k; \ +} \ + \ +unsigned int fn3##S (unsigned int x) \ +{ \ + s##S.k += x; \ + return retit##S (); \ +} \ + \ +void test##S (void) \ +{ \ + int i; \ + unsigned int mask, v, a, r; \ + struct S x; \ + char *p = (char *) &s##S; \ + for (i = 0; i < sizeof (s##S); ++i) \ + *p++ = myrnd (); \ + if (__builtin_classify_type (s##S.l) == 8) \ + s##S.l = 5.25; \ + s##S.k = -1; \ + mask = s##S.k; \ + v = myrnd (); \ + a = myrnd (); \ + s##S.k = v; \ + x = s##S; \ + r = fn1##S (a); \ + if (x.i != s##S.i || x.j != s##S.j \ + || x.k != s##S.k || x.l != s##S.l \ + || ((v + a) & mask) != r) \ + abort (); \ + v = myrnd (); \ + a = myrnd (); \ + s##S.k = v; \ + x = s##S; \ + r = fn2##S (a); \ + if (x.i != s##S.i || x.j != s##S.j \ + || x.k != s##S.k || x.l != s##S.l \ + || ((((v + a) & mask) % 15) & mask) != r) \ + abort (); \ + v = myrnd (); \ + a = myrnd (); \ + s##S.k = v; \ + x = s##S; \ + r = fn3##S (a); \ + if (x.i != s##S.i || x.j != s##S.j \ + || s##S.k != r || x.l != s##S.l \ + || ((v + a) & mask) != r) \ + abort (); \ +} + +#define pck __attribute__((packed)) +struct pck A { unsigned short i : 1, l : 1, j : 3, k : 11; }; T(A) +struct pck B { unsigned short i : 4, j : 1, k : 11; unsigned int l; }; T(B) +struct pck C { unsigned int l; unsigned short i : 4, j : 1, k : 11; }; T(C) +struct pck D { unsigned long long l : 6, i : 6, j : 23, k : 29; }; T(D) +struct pck E { unsigned long long l, i : 12, j : 23, k : 29; }; T(E) +struct pck F { unsigned long long i : 12, j : 23, k : 29, l; }; T(F) +struct pck G { unsigned short i : 1, j : 1, k : 6; unsigned long long l; }; T(G) +struct pck H { unsigned short i : 6, j : 2, k : 8; unsigned long long l; }; T(H) +struct pck I { unsigned short i : 1, j : 6, k : 1; unsigned long long l; }; T(I) +struct pck J { unsigned short i : 1, j : 8, k : 7; unsigned short l; }; T(J) +struct pck K { unsigned int k : 6, l : 1, j : 10, i : 15; }; T(K) +struct pck L { unsigned int k : 6, j : 11, i : 15; unsigned int l; }; T(L) +struct pck M { unsigned int l; unsigned short k : 6, j : 11, i : 15; }; T(M) +struct pck N { unsigned long long l : 6, k : 6, j : 23, i : 29; }; T(N) +struct pck O { unsigned long long l, k : 12, j : 23, i : 29; }; T(O) +struct pck P { unsigned long long k : 12, j : 23, i : 29, l; }; T(P) +struct pck Q { unsigned short k : 12, j : 1, i : 3; unsigned long long l; }; T(Q) +struct pck R { unsigned short k : 2, j : 11, i : 3; unsigned long long l; }; T(R) +struct pck S { unsigned short k : 1, j : 6, i : 9; unsigned long long l; }; T(S) +struct pck T { unsigned short k : 1, j : 8, i : 7; unsigned short l; }; T(T) +struct pck U { unsigned short j : 6, k : 1, i : 9; unsigned long long l; }; T(U) +struct pck V { unsigned short j : 8, k : 1, i : 7; unsigned short l; }; T(V) +struct pck W { long double l; unsigned int k : 12, j : 13, i : 7; }; T(W) +struct pck X { unsigned int k : 12, j : 13, i : 7; long double l; }; T(X) +struct pck Y { unsigned int k : 12, j : 11, i : 9; long double l; }; T(Y) +struct pck Z { long double l; unsigned int j : 13, i : 7, k : 12; }; T(Z) + +int +main (void) +{ + testA (); + testB (); + testC (); + testD (); + testE (); + testF (); + testG (); + testH (); + testI (); + testJ (); + testK (); + testL (); + testM (); + testN (); + testO (); + testP (); + testQ (); + testR (); + testS (); + testT (); + testU (); + testV (); + testW (); + testX (); + testY (); + testZ (); + exit (0); +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20040709-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/sibcall-unwind-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/sibcall-unwind-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/sibcall-unwind-1.c (revision 319) @@ -0,0 +1,10 @@ +/* PR 13158. Emit ".restore sp" for a sibcall. */ +/* { dg-do compile } */ +/* { dg-options "-O2 -w" } */ +/* { dg-final { scan-assembler-times "\\.restore sp" 1 } } */ + +static void do_date (char *); +void rfc822_date (char *date) +{ + do_date (date); +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/sibcall-unwind-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/builtin-popcount-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/builtin-popcount-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/builtin-popcount-1.c (revision 319) @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* { dg-final { scan-assembler "popcnt" } } */ + +int foo (int x) +{ + return __builtin_popcount (x); +} +
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/builtin-popcount-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/sync-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/sync-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/sync-1.c (revision 319) @@ -0,0 +1,23 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* { dg-final { scan-assembler "xchg4 .*, r0" } } */ +/* { dg-final { scan-assembler "cmpxchg4.*, r0, .*" } } */ +/* { dg-final { scan-assembler "cmpxchg8.*, r0, .*" { target lp64 } } } */ + +int +foo1 (int *p) +{ + return __sync_lock_test_and_set (p, 0); +} + +int +foo2 (int *p, int v) +{ + return __sync_bool_compare_and_swap (p, v, 0); +} + +long +foo3 (long *p, long v) +{ + return __sync_bool_compare_and_swap (p, v, 0); +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/sync-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/sibcall-unwind-2.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/sibcall-unwind-2.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/sibcall-unwind-2.c (revision 319) @@ -0,0 +1,11 @@ +/* PR 18987. This caused an assembler error because we emitted ".restore sp" + twice. */ +/* { dg-do compile } */ +/* { dg-options "-O2 -fno-omit-frame-pointer -w" } */ +/* { dg-final { scan-assembler-times "\\.restore sp" 1 } } */ + +static void do_date (char *); +void rfc822_date (char *date) +{ + do_date (date); +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/sibcall-unwind-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/builtin-popcount-2.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/builtin-popcount-2.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/builtin-popcount-2.c (revision 319) @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* { dg-final { scan-assembler-not "popcnt" } } */ + +int foo (int x) +{ + return __builtin_popcount (x) == 0; +} +
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/builtin-popcount-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/float80-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/float80-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/float80-1.c (revision 319) @@ -0,0 +1,12 @@ +/* Bug 14610 */ +/* { dg-do run } */ + +extern void abort(void); +volatile __float80 x = 30.0; + +int main(void) +{ + double d = x; + if (d != 30.0) abort (); + return 0; +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/float80-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/float80-2.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/float80-2.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/float80-2.c (revision 319) @@ -0,0 +1,13 @@ +/* Bug 14610 */ +/* { dg-do run } */ +/* { dg-options "-minline-int-divide-max-throughput" } */ + +extern void abort(void); +volatile int j = 30; + +int main(void) +{ + if (29 % j != 29) abort(); + if (30 % j != 0) abort(); + return 0; +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/float80-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/postinc-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/postinc-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/postinc-1.c (revision 319) @@ -0,0 +1,23 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* { dg-options "-O2 -mlp64" { target ia64-*-hpux* } } */ + +void copy_loop_ldouble (void *xdest, + const void *xsrc, + long roff, + long soff, + long len, + long shift) +{ __float128 *dest = xdest; + const long double *src; + long i; + roff /= sizeof (__float128); + soff /= sizeof (__float128); + src = xsrc; + src += shift * soff; + for (i = 0; i < len - shift; ++i) { + *dest = *src; + dest += roff; + src += soff; + } +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/postinc-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/asm-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/asm-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/asm-1.c (revision 319) @@ -0,0 +1,29 @@ +/* { dg-do run } */ +/* { dg-options } */ + +extern void abort (void); + +/* Test that "=S" properly avoids the post-increment on the memory address. */ + +static void foo(int *x) +{ + long i; + for (i = 0; i < 100; ++i) + __asm__("st4 %0 = r0" : "=S"(x[i])); +} + +int main() +{ + int array[100]; + long i; + + for (i = 0; i < 100; ++i) + array[i] = -1; + + foo(array); + + for (i = 0; i < 100; ++i) + if (array[i]) + abort (); + return 0; +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/asm-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/builtin-bswap-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/builtin-bswap-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/builtin-bswap-1.c (revision 319) @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* { dg-final { scan-assembler "mux1" } } */ + +long foo (long x) +{ + return __builtin_bswap64 (x); +} +
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/builtin-bswap-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/builtin-bswap-2.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/builtin-bswap-2.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/builtin-bswap-2.c (revision 319) @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* { dg-final { scan-assembler "mux1" } } */ + +int foo (int x) +{ + return __builtin_bswap32 (x); +} +
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/builtin-bswap-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/pr42542-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/pr42542-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/pr42542-1.c (revision 319) @@ -0,0 +1,68 @@ +/* { dg-do run } */ +/* { dg-options "-O1 -ftree-vectorize" } */ + +unsigned int v1[] __attribute__ ((aligned(16))) = +{ + 0x80000000, 1, 0xa0000000, 2, + 3, 0xd0000000, 0xf0000000, 0xe0000000 +}; +unsigned int v2[] __attribute__ ((aligned(16))) = +{ + 4, 0xb0000000, 5, 0xc0000000, + 0xd0000000, 6, 7, 8 +}; + +unsigned int max[] = +{ + 0x80000000, 0xb0000000, 0xa0000000, 0xc0000000, + 0xd0000000, 0xd0000000, 0xf0000000, 0xe0000000 +}; + +unsigned int min[] = +{ + 4, 1, 5, 2, + 3, 6, 7, 8 +}; + +unsigned int res[8] __attribute__ ((aligned(16))); + +extern void abort (void); + +void +find_max (void) +{ + int i; + + for (i = 0; i < 8; i++) + res[i] = v1[i] < v2[i] ? v2[i] : v1[i]; +} + +void +find_min (void) +{ + int i; + + for (i = 0; i < 8; i++) + res[i] = v1[i] > v2[i] ? v2[i] : v1[i]; +} + +int main (void) +{ + int i; + int err = 0; + + find_max (); + for (i = 0; i < 8; i++) + if (res[i] != max[i]) + err++; + + find_min (); + for (i = 0; i < 8; i++) + if (res[i] != min[i]) + err++; + + if (err) + abort (); + + return 0; +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/pr42542-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/pr42542-2.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/pr42542-2.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/pr42542-2.c (revision 319) @@ -0,0 +1,68 @@ +/* { dg-do run } */ +/* { dg-options "-O1 -ftree-vectorize" } */ + +unsigned short v1[] __attribute__ ((aligned(16))) = +{ + 0x8000, 0x9000, 1, 10, 0xa000, 0xb000, 2, 20, + 3, 30, 0xd000, 0xe000, 0xf000, 0xe000, 25, 30 +}; +unsigned short v2[] __attribute__ ((aligned(16))) = +{ + 4, 40, 0xb000, 0x8000, 5, 50, 0xc000, 0xf000, + 0xd000, 0xa000, 6, 65, 7, 75, 0xe000, 0xc000 +}; + +unsigned short max[] = +{ + 0x8000, 0x9000, 0xb000, 0x8000, 0xa000, 0xb000, 0xc000, 0xf000, + 0xd000, 0xa000, 0xd000, 0xe000, 0xf000, 0xe000, 0xe000, 0xc000 +}; + +unsigned short min[] = +{ + 4, 40, 1, 10, 5, 50, 2, 20, + 3, 30, 6, 65, 7, 75, 25, 30 +}; + +unsigned short res[16] __attribute__ ((aligned(16))); + +extern void abort (void); + +void +find_max (void) +{ + int i; + + for (i = 0; i < 16; i++) + res[i] = v1[i] < v2[i] ? v2[i] : v1[i]; +} + +void +find_min (void) +{ + int i; + + for (i = 0; i < 16; i++) + res[i] = v1[i] > v2[i] ? v2[i] : v1[i]; +} + +int main (void) +{ + int i; + int err = 0; + + find_max (); + for (i = 0; i < 16; i++) + if (res[i] != max[i]) + err++; + + find_min (); + for (i = 0; i < 16; i++) + if (res[i] != min[i]) + err++; + + if (err) + abort (); + + return 0; +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/pr42542-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/pr42542-3.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/pr42542-3.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/pr42542-3.c (revision 319) @@ -0,0 +1,76 @@ +/* { dg-do run } */ +/* { dg-options "-O1 -ftree-vectorize" } */ + +unsigned char v1[] __attribute__ ((aligned(16))) = +{ + 0x80, 0xd0, 0x90, 0xa0, 1, 15, 10, 15, + 0xa0, 0xc0, 0xb0, 0xf0, 2, 25, 20, 35, + 3, 34, 30, 36, 0xd0, 0x80, 0xe0, 0xb0, + 0xf0, 0xe0, 0xe0, 0x80, 25, 34, 30, 40 +}; +unsigned char v2[] __attribute__ ((aligned(16))) = +{ + 4, 44, 40, 48, 0xb0, 0x80, 0x80, 0x90, + 5, 55, 50, 51, 0xc0, 0xb0, 0xf0, 0xd0, + 0xd0, 0x80, 0xa0, 0xf0, 6, 61, 65, 68, + 7, 76, 75, 81, 0xe0, 0xf0, 0xc0, 0x90 +}; + +unsigned char max[] = +{ + 0x80, 0xd0, 0x90, 0xa0, 0xb0, 0x80, 0x80, 0x90, + 0xa0, 0xc0, 0xb0, 0xf0, 0xc0, 0xb0, 0xf0, 0xd0, + 0xd0, 0x80, 0xa0, 0xf0, 0xd0, 0x80, 0xe0, 0xb0, + 0xf0, 0xe0, 0xe0, 0x80, 0xe0, 0xf0, 0xc0, 0x90 +}; + +unsigned char min[] = +{ + 4, 44, 40, 48, 1, 15, 10, 15, + 5, 55, 50, 51, 2, 25, 20, 35, + 3, 34, 30, 36, 6, 61, 65, 68, + 7, 76, 75, 81, 25, 34, 30, 40 +}; + +unsigned char res[32] __attribute__ ((aligned(16))); + +extern void abort (void); + +void +find_max (void) +{ + int i; + + for (i = 0; i < 32; i++) + res[i] = v1[i] < v2[i] ? v2[i] : v1[i]; +} + +void +find_min (void) +{ + int i; + + for (i = 0; i < 32; i++) + res[i] = v1[i] > v2[i] ? v2[i] : v1[i]; +} + +int main (void) +{ + int i; + int err = 0; + + find_max (); + for (i = 0; i < 32; i++) + if (res[i] != max[i]) + err++; + + find_min (); + for (i = 0; i < 32; i++) + if (res[i] != min[i]) + err++; + + if (err) + abort (); + + return 0; +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/pr42542-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/mfused-madd-vect.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/mfused-madd-vect.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/mfused-madd-vect.c (revision 319) @@ -0,0 +1,33 @@ +/* { dg-do compile */ +/* { dg-options "-O2 -ftree-vectorize" } */ +/* { dg-final { scan-assembler-not "fpmpy" } } */ + +/* fpma and fpms will show in either way because there are no + specific vector add/sub instructions. So we just check for fpmpy. */ + +#define N 16 +extern bar(float *, float *, float *, float *); +void foo() +{ + int i; + float a[N], b[N], c[N], d[N]; + bar(a,b,c,d); + for (i = 0; i < N; i++) { + a[i] = b[i] + c[i] * d[i]; + } + bar(a,b,c,d); +#if 0 + for (i = 0; i < N; i++) { + a[i] = b[i] - c[i] * d[i]; + } + bar(a,b,c,d); +#endif + for (i = 0; i < N; i++) { + a[i] = b[i] * c[i] + d[i]; + } + bar(a,b,c,d); + for (i = 0; i < N; i++) { + a[i] = b[i] * c[i] - d[i]; + } + bar(a,b,c,d); +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/mfused-madd-vect.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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/visibility-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/visibility-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/visibility-1.c (revision 319) @@ -0,0 +1,38 @@ +/* Test visibility attribute. */ +/* { dg-do compile { target ia64*-*-linux* } } */ +/* { dg-options "-O2 -fpic" } */ +/* { dg-final { scan-assembler "\\.hidden.*variable_j" } } */ +/* { dg-final { scan-assembler "\\.hidden.*variable_m" } } */ +/* { dg-final { scan-assembler "\\.protected.*baz" } } */ +/* { dg-final { scan-assembler "gprel.*variable_i" } } */ +/* { dg-final { scan-assembler "gprel.*variable_j" } } */ +/* { dg-final { scan-assembler "ltoff.*variable_k" } } */ +/* { dg-final { scan-assembler "gprel.*variable_l" } } */ +/* { dg-final { scan-assembler "gprel.*variable_m" } } */ +/* { dg-final { scan-assembler "ltoff.*variable_n" } } */ + +static int variable_i; +int variable_j __attribute__((visibility ("hidden"))); +int variable_k; +struct A { char a[64]; }; +static struct A variable_l __attribute__((section (".sbss"))); +struct A variable_m __attribute__((visibility ("hidden"), section(".sbss"))); +struct A variable_n __attribute__((section (".sbss"))); + +void foo (void) +{ + variable_i = 0; + variable_j = 0; + variable_k = 0; +} + +void bar (void) +{ + variable_l.a[10] = 0; + variable_m.a[10] = 0; + variable_n.a[10] = 0; +} + +void __attribute__((visibility ("protected"))) baz (void) +{ +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/visibility-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/visibility-2.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/visibility-2.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/visibility-2.c (revision 319) @@ -0,0 +1,15 @@ +/* Test visibility attribute. */ +/* { dg-do link { target ia64*-*-linux* } } */ +/* { dg-options "-O2 -fpic" } */ + +int foo (int x); +int bar (int x) __asm__ ("foo") __attribute__ ((visibility ("hidden"))); +int bar (int x) +{ + return x; +} + +int main () +{ + return 0; +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/visibility-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/got-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/got-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/got-1.c (revision 319) @@ -0,0 +1,23 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fPIC" } */ + +/* { dg-final { scan-assembler "@ltoffx\\(object#\\)" } } */ +/* { dg-final { scan-assembler "@ltoffx\\(object#\[-+\]16384\\)" } } */ +/* { dg-final { scan-assembler-not "@ltoffx\\(object#\[-+\]1\\)" } } */ +/* { dg-final { scan-assembler-not "@ltoffx\\(object#\[-+\]8191\\)" } } */ +/* { dg-final { scan-assembler-not "@ltoffx\\(object#\[-+\]8192\\)" } } */ +/* { dg-final { scan-assembler-not "@ltoffx\\(object#\[-+\]8193\\)" } } */ +/* { dg-final { scan-assembler-not "@ltoffx\\(object#\[-+\]16383\\)" } } */ +/* { dg-final { scan-assembler-not "@ltoffx\\(object#\[-+\]16385\\)" } } */ + +/* must not be in sdata */ +extern char object[]; + +#define r(n) char *r_##n (void) { return &object[n]; } +#define R(n) char *R_##n (void) { return &object[-n]; } + +#define t(n) r(n) R(n) + +t(0) t(1) +t(8191) t(8192) t(8193) +t(16383) t(16384) t(16385)
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/got-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20020313-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20020313-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20020313-1.c (revision 319) @@ -0,0 +1,72 @@ +/* PR 5312 + The problem here is that the ia64 scheduler saw a sequence of L L M type + insns, and messed up its internal state on which slot it was issuing + to, and aborted. */ + +/* { dg-do compile } */ +/* In ILP32 mode, we get warnings about large integer constants. + Those cause spurious FAILs. */ +/* { dg-options "-w -O2 -mconstant-gp" } */ + +typedef unsigned long __u64; +typedef unsigned int __u32; +typedef struct { } spinlock_t; +struct cpuinfo_ia64 { + union { + struct { + __u32 irq_count; + __u32 bh_count; + } f; + __u64 irq_and_bh_counts; + } irq_stat; + __u32 softirq_pending; +} __attribute__ ((aligned ((1UL << 14)))) ; +enum +{ + TCA_UNSPEC, + TCA_KIND, + TCA_OPTIONS, + TCA_STATS, + TCA_XSTATS, + TCA_RATE, +}; +struct tc_stats +{ + __u64 bytes; + __u32 packets; + __u32 drops; + __u32 overlimits; + __u32 bps; + __u32 pps; + __u32 qlen; + __u32 backlog; + spinlock_t *lock; +}; +struct sk_buff { + unsigned int data_len; + unsigned char *tail; + unsigned char *end; +}; +static inline int skb_is_nonlinear(const struct sk_buff *skb) +{ + return skb->data_len; +} +static inline int skb_tailroom(const struct sk_buff *skb) +{ + return skb_is_nonlinear(skb) ? 0 : skb->end-skb->tail; +} +struct rtattr +{ + unsigned short rta_len; + unsigned short rta_type; +}; +int qdisc_copy_stats(struct sk_buff *skb, struct tc_stats *st) +{ + do { do { (((struct cpuinfo_ia64 *) (0xa000000000000000 + 2*(1UL << 14)))->irq_stat.f.bh_count)++; __asm__ __volatile__("": : :"memory"); } while (0); (void)(st->lock); } while (0); + ({ if (skb_tailroom(skb) < (int)( (((( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + ((char*)&st->lock - (char*)st)))+4 -1) & ~(4 -1) )) goto rtattr_failure; __rta_fill(skb, TCA_STATS, (char*)&st->lock - (char*)st, st); }); + do { do { } while(0); do { do { __asm__ __volatile__("": : :"memory"); (((struct cpuinfo_ia64 *) (0xa000000000000000 + 2*(1UL << 14)))->irq_stat.f.bh_count)--; } while (0); if (__builtin_expect((((struct cpuinfo_ia64 *) (0xa000000000000000 + 2*(1UL << 14)))->softirq_pending), 0) && (((struct cpuinfo_ia64 *) (0xa000000000000000 + 2*(1UL << 14)))->irq_stat.f.bh_count) == 0) do_softirq(); } while (0); } while (0); + return 0; +rtattr_failure: + do { do { } while(0); do { do { __asm__ __volatile__("": : :"memory"); (((struct cpuinfo_ia64 *) (0xa000000000000000 + 2*(1UL << 14)))->irq_stat.f.bh_count)--; } while (0); if (__builtin_expect((((struct cpuinfo_ia64 *) (0xa000000000000000 + 2*(1UL << 14)))->softirq_pending), 0) && (((struct cpuinfo_ia64 *) (0xa000000000000000 + 2*(1UL << 14)))->irq_stat.f.bh_count) == 0) do_softirq(); } while (0); } while (0); + return -1; +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20020313-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: openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20030811-1.c =================================================================== --- openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20030811-1.c (nonexistent) +++ openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20030811-1.c (revision 319) @@ -0,0 +1,59 @@ +/* Origin: PR target/11693 from Andreas Schwab */ +/* { dg-do compile } */ +/* { dg-options "-O2 -frename-registers" } */ + +static inline unsigned long long +foo (void) +{ + unsigned long long x; + __asm__ __volatile__ ("" : "=r" (x) :: "memory"); + return x; +} + +static inline void +bar (unsigned long long x, unsigned long long y) +{ + __asm__ __volatile__ ("" :: "r"(x), "r"(y) : "memory"); +} + +static inline void +baz (unsigned long long x, unsigned long long y, unsigned long long z, + unsigned long long p, unsigned long long q) +{ + __asm__ __volatile__ ("" :: "r" (q << 2) : "memory"); + __asm__ __volatile__ ("" :: "r" (z) : "memory"); + if (x & 0x1) + __asm__ __volatile__ ("" :: "r" (y), "r" (p) : "memory"); + if (x & 0x2) + __asm__ __volatile__ ("" :: "r" (y), "r" (p) : "memory"); +} + +static inline unsigned long long +ffz (unsigned long long x) +{ + unsigned long long r; + __asm__ ("" : "=r" (r) : "r" (x & (~x - 1))); + return r; +} + +void die (const char *, ...) __attribute__ ((noreturn)); + +void +test (void *x) +{ + unsigned long long a, c; + + a = foo (); + bar (0xc000000000000000LL, 0x660); + bar (0xa00000000000c000LL, 0x539); + baz (2, 1, 0xa000000000008000LL, + ({ unsigned long long b; + b = ({ unsigned long long d; __asm__ ("" : "=r" (d) : "r" (x)); d; }) + + 0x10000000000661LL; + b; + }), + 14); + c = ffz (0x1fffffffffffffffLL); + if (c < 51 || c > 61) + die ("die", c - 1); +}
openrisc/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.target/ia64/20030811-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

powered by: WebSVN 2.1.0

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