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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.target/] [i386/] [asm-3.c] - Blame information for rev 154

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

Line No. Rev Author Line
1 149 jeremybenn
/* PR inline-asm/6806 */
2
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
3
/* { dg-options "-O2" } */
4
/* { dg-skip-if "" { ilp32 } { "-fpic" "-fPIC" } { "" } } */
5
/* { dg-skip-if "PIC default" { *-*-darwin* } { "*" } { "" } } */
6
 
7
extern void abort (void);
8
 
9
volatile int out = 1;
10
volatile int a = 2;
11
volatile int b = 4;
12
volatile int c = 8;
13
volatile int d = 16;
14
volatile int e = 32;
15
volatile int f = 64;
16
 
17
int
18
main ()
19
{
20
  asm volatile ("xorl %%eax, %%eax      \n\t"
21
                "xorl %%esi, %%esi      \n\t"
22
                "addl %1, %0            \n\t"
23
                "addl %2, %0            \n\t"
24
                "addl %3, %0            \n\t"
25
                "addl %4, %0            \n\t"
26
                "addl %5, %0            \n\t"
27
                "addl %6, %0"
28
                : "+r" (out)
29
                : "r" (a), "r" (b), "r" (c), "g" (d), "g" (e), "g" (f)
30
                : "%eax", "%esi");
31
 
32
  if (out != 127)
33
    abort ();
34
 
35
  return 0;
36
}

powered by: WebSVN 2.1.0

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