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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [shift_mask.c] - Blame information for rev 700

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

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2" } */
3
 
4
int test_sal (int a, int c)
5
{
6
  return a << (c & 0x1f);
7
}
8
 
9
int test_sar (int a, int c)
10
{
11
  return a >> (c & 0x1f);
12
}
13
 
14
unsigned int test_shr (unsigned int a, int c)
15
{
16
  return a >> (c & 0x1f);
17
}
18
 
19
unsigned int test_rol (unsigned int a, int c)
20
{
21
  int z = c & 0x1f;
22
  return (a << z) | (a >> (32 - z));
23
}
24
 
25
unsigned int test_ror (unsigned int a, int c)
26
{
27
  int z = c & 0x1f;
28
  return (a >> z) | (a << (32 - z));
29
}
30
 
31
/* { dg-final { scan-assembler-not "and" } } */

powered by: WebSVN 2.1.0

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