OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [x86_64/] [abi/] [callabi/] [func-2a.c] - Blame information for rev 328

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 328 jeremybenn
/* Test for cross x86_64<->w64 abi standard calls.  */
2
/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
3
/* { dg-options "-O2 -mabi=ms -std=gnu99 -ffast-math -fno-builtin" } */
4
/* { dg-additional-sources "func-2b.c" } */
5
 
6
extern void __attribute__ ((sysv_abi)) abort (void);
7
long double func_cross (long double, double, float, long, int, char);
8
 
9
long double __attribute__ ((sysv_abi))
10
func_native (long double a, double b, float c, long d, int e, char f)
11
{
12
  long double ret;
13
  ret = a + (long double) b + (long double) c;
14
  ret *= (long double) (d + (long) e);
15
  if (f>0)
16
    ret += func_native (a,b,c,d,e,-f);
17
  return ret;
18
}
19
 
20
int __attribute__ ((sysv_abi))
21
main ()
22
{
23
  if (func_cross (1.0,2.0,3.0,1,2,3)
24
      != func_native (1.0,2.0,3.0,1,2,3))
25
    abort ();
26
  return 0;
27
}

powered by: WebSVN 2.1.0

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