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] - Rev 154

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

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

Go to most recent revision | 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.