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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [mod-1.c] - Blame information for rev 691

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-Os -mtune=generic" } */
3
 
4
typedef struct {
5
  int a;
6
} VCR;
7
 
8
typedef struct {
9
  VCR vcr[8];
10
} VCRC;
11
 
12
typedef struct {
13
  char vcr;
14
} OWN;
15
 
16
OWN Own[16];
17
 
18
void
19
f (VCRC *x, OWN *own)
20
{
21
  x[own->vcr / 8].vcr[own->vcr % 8].a--;
22
  x[own->vcr / 8].vcr[own->vcr % 8].a = x[own->vcr / 8].vcr[own->vcr % 8].a;
23
}
24
 
25
/* { dg-final { scan-assembler-times "idivb" 1 } } */
26
/* { dg-final { scan-assembler-not "incl" } } */
27
/* { dg-final { scan-assembler-not "orl" } } */
28
/* { dg-final { scan-assembler-not "andb" } } */
29
/* { dg-final { scan-assembler-not "jns" } } */

powered by: WebSVN 2.1.0

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