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/] [cmov1.c] - Rev 12

Compare with Previous | Blame | View Log

/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -march=k8" } */
/* { dg-final { scan-assembler "sar\[^\\n\]*magic_namea" } } */
/* { dg-final { scan-assembler "sar\[^\\n\]*magic_nameb" } } */
/* { dg-final { scan-assembler "sar\[^\\n\]*magic_namec" } } */
/* { dg-final { scan-assembler "shr\[^\\n\]*magic_named" } } */
/* { dg-final { scan-assembler "shr\[^\\n\]*magic_namee" } } */
/* { dg-final { scan-assembler "shr\[^\\n\]*magic_namef" } } */
 
/* Check code generation for several conditional moves doable by single arithmetics.  */
 
static int magic_namea;
static char magic_nameb;
static short magic_namec;
static int magic_named;
static char magic_namee;
static short magic_namef;
 
unsigned int gen;
void m(void)
{
  magic_namec=magic_namec>=0?0:-1;
  magic_namea=magic_namea>=0?0:-1;
  magic_nameb=magic_nameb>=0?0:-1;
  magic_named=magic_named>=0?0:1;
  magic_namee=magic_namee>=0?0:1;
  magic_namef=magic_namef>=0?0:1;
}
 
 

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.