OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gcc.target/] [i386/] [asm-3.c] - Diff between revs 318 and 384

Only display areas with differences | Details | Blame | View Log

Rev 318 Rev 384
/* PR inline-asm/6806 */
/* PR inline-asm/6806 */
/* { dg-do run } */
/* { dg-do run } */
/* { dg-skip-if "" { ilp32 && { ! nonpic } } { "*" } { "" } } */
/* { dg-skip-if "" { ilp32 && { ! nonpic } } { "*" } { "" } } */
/* { dg-options "-O2" } */
/* { dg-options "-O2" } */
 
 
extern void abort (void);
extern void abort (void);
 
 
volatile int out = 1;
volatile int out = 1;
volatile int a = 2;
volatile int a = 2;
volatile int b = 4;
volatile int b = 4;
volatile int c = 8;
volatile int c = 8;
volatile int d = 16;
volatile int d = 16;
volatile int e = 32;
volatile int e = 32;
volatile int f = 64;
volatile int f = 64;
 
 
int
int
main ()
main ()
{
{
  asm volatile ("xorl %%eax, %%eax      \n\t"
  asm volatile ("xorl %%eax, %%eax      \n\t"
                "xorl %%esi, %%esi      \n\t"
                "xorl %%esi, %%esi      \n\t"
                "addl %1, %0            \n\t"
                "addl %1, %0            \n\t"
                "addl %2, %0            \n\t"
                "addl %2, %0            \n\t"
                "addl %3, %0            \n\t"
                "addl %3, %0            \n\t"
                "addl %4, %0            \n\t"
                "addl %4, %0            \n\t"
                "addl %5, %0            \n\t"
                "addl %5, %0            \n\t"
                "addl %6, %0"
                "addl %6, %0"
                : "+r" (out)
                : "+r" (out)
                : "r" (a), "r" (b), "r" (c), "g" (d), "g" (e), "g" (f)
                : "r" (a), "r" (b), "r" (c), "g" (d), "g" (e), "g" (f)
                : "%eax", "%esi");
                : "%eax", "%esi");
 
 
  if (out != 127)
  if (out != 127)
    abort ();
    abort ();
 
 
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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