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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [darwin-abi-2.c] - Blame information for rev 378

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 322 jeremybenn
/* { dg-do run { target powerpc*-*-darwin* } } */
2
 
3
/* You might think you'd need -maltivec for this, but actually you
4
   don't; GCC will happily do everything in GPRs, and it still
5
   tests that the ABI is correct.  */
6
 
7
#include <stdio.h>
8
#include <stdlib.h>
9
 
10
#define vector __attribute__((vector_size(16)))
11
 
12
int main(void)
13
{
14
  vector unsigned int v = { 100, 200, 300, 400 };
15
  vector unsigned int w = { 4, 5, 6, 7 };
16
  char x[64];
17
  sprintf (x, "%lvu,%d,%lvu", v, 1, w);
18
  if (strcmp (x, "100 200 300 400,1,4 5 6 7") != 0)
19
    {
20
      puts (x);
21
      abort ();
22
    }
23
  return 0;
24
}

powered by: WebSVN 2.1.0

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