swar-all-elms.c
3.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
////A: --has-swar
//C: -daiteq-swar-enable
#include <stdint.h>
typedef unsigned int su32x1b __attribute__((subword(1)));
typedef unsigned int su15x1b __attribute__((subword(1, 15)));
typedef unsigned int su16x2b __attribute__((subword(2)));
typedef unsigned int su13x2b __attribute__((subword(2, 15)));
typedef unsigned int su10x3b __attribute__((subword(3)));
typedef unsigned int su7x3b __attribute__((subword(3, 7)));
typedef unsigned int su8x4b __attribute__((subword(4)));
typedef unsigned int su5x4b __attribute__((subword(4, 5)));
typedef unsigned int su6x5b __attribute__((subword(5)));
typedef unsigned int su5x5b __attribute__((subword(5, 5)));
typedef unsigned int su5x6b __attribute__((subword(6)));
typedef unsigned int su4x6b __attribute__((subword(6, 4)));
typedef unsigned int su4x7b __attribute__((subword(7)));
typedef unsigned int su3x7b __attribute__((subword(7, 3)));
typedef unsigned int su4x8b __attribute__((subword(8)));
typedef unsigned int su3x8b __attribute__((subword(8, 3)));
typedef unsigned int su3x9b __attribute__((subword(9)));
typedef unsigned int su2x9b __attribute__((subword(9, 2)));
typedef unsigned int su3x10b __attribute__((subword(10)));
typedef unsigned int su2x10b __attribute__((subword(10, 2)));
typedef unsigned int su2x11b __attribute__((subword(11)));
typedef unsigned int su1x11b __attribute__((subword(11, 1)));
typedef unsigned int su2x12b __attribute__((subword(12)));
typedef unsigned int su1x12b __attribute__((subword(12, 1)));
typedef unsigned int su2x13b __attribute__((subword(13)));
typedef unsigned int su1x13b __attribute__((subword(13, 1)));
typedef unsigned int su2x14b __attribute__((subword(14)));
typedef unsigned int su1x14b __attribute__((subword(14, 1)));
typedef unsigned int su2x15b __attribute__((subword(15)));
typedef unsigned int su1x15b __attribute__((subword(15, 1)));
typedef unsigned int su2x16b __attribute__((subword(16)));
typedef unsigned int su1x16b __attribute__((subword(16, 1)));
typedef unsigned int su1x17b __attribute__((subword(17)));
typedef unsigned int su1x18b __attribute__((subword(18)));
typedef unsigned int su1x19b __attribute__((subword(19)));
typedef unsigned int su1x20b __attribute__((subword(20)));
typedef unsigned int su1x21b __attribute__((subword(21)));
typedef unsigned int su1x22b __attribute__((subword(22)));
typedef unsigned int su1x23b __attribute__((subword(23)));
typedef unsigned int su1x24b __attribute__((subword(24)));
typedef unsigned int su1x25b __attribute__((subword(25)));
typedef unsigned int su1x26b __attribute__((subword(26)));
typedef unsigned int su1x27b __attribute__((subword(27)));
typedef unsigned int su1x28b __attribute__((subword(28)));
typedef unsigned int su1x29b __attribute__((subword(29)));
typedef unsigned int su1x30b __attribute__((subword(30)));
typedef unsigned int su1x31b __attribute__((subword(31)));
typedef unsigned int su1x32b __attribute__((subword(32)));
void t_1b(void)
{
volatile su32x1b a,b,z;
volatile su15x1b c,d,y;
z = a + b;
y = c + d;
}
void t_2b(void)
{
volatile su16x2b a,b,z;
volatile su13x2b c,d,y;
z = a + b;
y = c + d;
}
void t_3b(void)
{
volatile su10x3b a,b,z;
volatile su7x3b c,d,y;
z = a + b;
y = c + d;
}
void t_4b(void)
{
volatile su8x4b a,b,z;
volatile su5x4b c,d,y;
z = a + b;
y = c + d;
}
/*
void t_5b(void)
{
volatile su6x5b a,b,z;
volatile su5x5b c,d,y;
z = a + b;
y = c + d;
}
void t_6b(void)
{
volatile su5x6b a,b,z;
volatile su4x6b c,d,y;
z = a + b;
y = c + d;
}
*/
int main(void)
{
t_1b();
t_2b();
t_3b();
t_4b();
// t_5b();
// t_6b();
return 0;
}