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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [sh4a-bitmovua.c] - Blame information for rev 149

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

Line No. Rev Author Line
1 149 jeremybenn
/* Verify that we generate movua to load unaligned 32-bit values.  */
2
/* { dg-do compile { target "sh*-*-*" } } */
3
/* { dg-options "-O" } */
4
/* { dg-final { scan-assembler-times "\tmovua\\.l\t" 6 } } */
5
 
6
#ifdef __SH4A__
7
/* Aligned.  */
8
struct s0 { long long d : 32; } x0;
9
long long f0() {
10
  return x0.d;
11
}
12
 
13
/* Unaligned load.  */
14
struct s1 { long long c : 8; long long d : 32; } x1;
15
long long f1() {
16
  return x1.d;
17
}
18
 
19
/* Unaligned load.  */
20
struct s2 { long long c : 16; long long d : 32; } x2;
21
long long f2() {
22
  return x2.d;
23
}
24
 
25
/* Unaligned load.  */
26
struct s3 { long long c : 24; long long d : 32; } x3;
27
long long f3() {
28
  return x3.d;
29
}
30
 
31
/* Aligned.  */
32
struct s4 { long long c : 32; long long d : 32; } x4;
33
long long f4() {
34
  return x4.d;
35
}
36
 
37
/* Aligned.  */
38
struct u0 { unsigned long long d : 32; } y0;
39
unsigned long long g0() {
40
  return y0.d;
41
}
42
 
43
/* Unaligned load.  */
44
struct u1 { long long c : 8; unsigned long long d : 32; } y1;
45
unsigned long long g1() {
46
  return y1.d;
47
}
48
 
49
/* Unaligned load.  */
50
struct u2 { long long c : 16; unsigned long long d : 32; } y2;
51
unsigned long long g2() {
52
  return y2.d;
53
}
54
 
55
/* Unaligned load.  */
56
struct u3 { long long c : 24; unsigned long long d : 32; } y3;
57
unsigned long long g3() {
58
  return y3.d;
59
}
60
 
61
/* Aligned.  */
62
struct u4 { long long c : 32; unsigned long long d : 32; } y4;
63
unsigned long long g4() {
64
  return y4.d;
65
}
66
#else
67
asm ("movua.l\t");
68
asm ("movua.l\t");
69
asm ("movua.l\t");
70
asm ("movua.l\t");
71
asm ("movua.l\t");
72
asm ("movua.l\t");
73
#endif

powered by: WebSVN 2.1.0

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