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/] [ia64/] [asm-1.c] - Rev 319

Compare with Previous | Blame | View Log

/* { 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;
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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