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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [asm-3.c] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* 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
 
6
extern void abort (void);
7
 
8
volatile int out = 1;
9
volatile int a = 2;
10
volatile int b = 4;
11
volatile int c = 8;
12
volatile int d = 16;
13
volatile int e = 32;
14
volatile int f = 64;
15
 
16
int
17
main ()
18
{
19
  asm volatile ("xorl %%eax, %%eax      \n\t"
20
                "xorl %%esi, %%esi      \n\t"
21
                "addl %1, %0            \n\t"
22
                "addl %2, %0            \n\t"
23
                "addl %3, %0            \n\t"
24
                "addl %4, %0            \n\t"
25
                "addl %5, %0            \n\t"
26
                "addl %6, %0"
27
                : "+r" (out)
28
                : "r" (a), "r" (b), "r" (c), "g" (d), "g" (e), "g" (f)
29
                : "%eax", "%esi");
30
 
31
  if (out != 127)
32
    abort ();
33
 
34
  return 0;
35
}

powered by: WebSVN 2.1.0

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