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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [cris/] [peep2-andu1.c] - Blame information for rev 708

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

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do compile } */
2
/* { dg-final { scan-assembler-not "and.d " } } */
3
/* { dg-final { scan-assembler-not "move.d " } } */
4
/* { dg-final { scan-assembler "cLear.b" } } */
5
/* { dg-final { scan-assembler "movu.b" } } */
6
/* { dg-final { scan-assembler "and.b" } } */
7
/* { dg-final { scan-assembler "movu.w" } } */
8
/* { dg-final { scan-assembler "and.w" } } */
9
/* { dg-final { scan-assembler "andq" } } */
10
/* { dg-options "-O2" } */
11
 
12
/* Test the "andu" peephole2 trivially, memory operand.  */
13
 
14
int
15
clearb (int x, int *y)
16
{
17
  return *y & 0xff00;
18
}
19
 
20
int
21
andb (int x, int *y)
22
{
23
  return *y & 0x3f;
24
}
25
 
26
int
27
andw (int x, int *y)
28
{
29
  return *y & 0xfff;
30
}
31
 
32
int
33
andq (int x, int *y)
34
{
35
  return *y & 0xf0;
36
}
37
 
38
int
39
andq2 (int x, int *y)
40
{
41
  return *y & 0xfff0;
42
}

powered by: WebSVN 2.1.0

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