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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [crc32-1.c] - Diff between revs 318 and 338

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 318 Rev 338
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "-O2 -mcrc32" } */
/* { dg-options "-O2 -mcrc32" } */
/* { dg-final { scan-assembler "crc32b\[^\\n\]*eax" } } */
/* { dg-final { scan-assembler "crc32b\[^\\n\]*eax" } } */
/* { dg-final { scan-assembler "crc32w\[^\\n\]*eax" } } */
/* { dg-final { scan-assembler "crc32w\[^\\n\]*eax" } } */
/* { dg-final { scan-assembler "crc32l\[^\\n\]*eax" } } */
/* { dg-final { scan-assembler "crc32l\[^\\n\]*eax" } } */
 
 
unsigned int
unsigned int
crc32b (unsigned int x, unsigned char y)
crc32b (unsigned int x, unsigned char y)
{
{
  return __builtin_ia32_crc32qi (x, y);
  return __builtin_ia32_crc32qi (x, y);
}
}
 
 
unsigned int
unsigned int
crc32w (unsigned int x, unsigned short y)
crc32w (unsigned int x, unsigned short y)
{
{
  return __builtin_ia32_crc32hi (x, y);
  return __builtin_ia32_crc32hi (x, y);
}
}
 
 
unsigned int
unsigned int
crc32d (unsigned int x, unsigned int y)
crc32d (unsigned int x, unsigned int y)
{
{
  return __builtin_ia32_crc32si (x, y);
  return __builtin_ia32_crc32si (x, y);
}
}
 
 

powered by: WebSVN 2.1.0

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