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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [ia64/] [asm-1.c] - Blame information for rev 764

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

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do run } */
2
/* { dg-options } */
3
 
4
extern void abort (void);
5
 
6
/* Test that "=S" properly avoids the post-increment on the memory address.  */
7
 
8
static void foo(int *x)
9
{
10
  long i;
11
  for (i = 0; i < 100; ++i)
12
    __asm__("st4 %0 = r0" : "=S"(x[i]));
13
}
14
 
15
int main()
16
{
17
  int array[100];
18
  long i;
19
 
20
  for (i = 0; i < 100; ++i)
21
    array[i] = -1;
22
 
23
  foo(array);
24
 
25
  for (i = 0; i < 100; ++i)
26
    if (array[i])
27
      abort ();
28
  return 0;
29
}

powered by: WebSVN 2.1.0

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