File: neon-vfp-reglist-post.s

package info (click to toggle)
binutils-avr 2.26.20160125%2BAtmel3.6.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 365,552 kB
  • sloc: ansic: 2,480,046; asm: 892,807; exp: 188,218; cpp: 133,829; makefile: 63,886; sh: 32,212; yacc: 26,783; lisp: 16,709; xml: 7,490; perl: 6,449; python: 4,555; ada: 4,318; pascal: 3,174; lex: 2,250; cs: 879; sed: 334; f90: 298; awk: 168; objc: 134; java: 73; fortran: 43
file content (196 lines) | stat: -rw-r--r-- 5,586 bytes parent folder | download | duplicates (30)
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196

	# ARMv8 tests to test neon register 
	# lists syntax.
	.text
	.arch armv8-a

	# Post-index multiple elements

	.macro ldst1_reg_list_post_imm_64 inst type
	\inst\()1 {v0.\type}, [x0], #8
	\inst\()1 {v0.\type, v1.\type}, [x0], #16
	\inst\()1 {v0.\type, v1.\type, v2.\type}, [x0], #24
	\inst\()1 {v0.\type, v1.\type, v2.\type, v3.\type}, [x0], #32
	.endm
	
	.irp instr ld,st
	.irp bits_64 8b, 4h, 2s, 1d
	ldst1_reg_list_post_imm_64 \instr \bits_64
	.endr
	.endr

	.macro ldst1_reg_list_post_imm_128 inst type
	\inst\()1 {v0.\type}, [x0], #16
	\inst\()1 {v0.\type, v1.\type}, [x0], #32
	\inst\()1 {v0.\type, v1.\type, v2.\type}, [x0], #48
	\inst\()1 {v0.\type, v1.\type, v2.\type, v3.\type}, [x0], #64
	.endm

	.irp instr ld,st
	.irp bits_128 16b, 8h, 4s, 2d
	ldst1_reg_list_post_imm_128 \instr \bits_128
	.endr
	.endr

	.macro ldst1_reg_list_post_reg inst type postreg
	\inst\()1 {v0.\type}, [x0], \postreg
	\inst\()1 {v0.\type, v1.\type}, [x0], \postreg
	\inst\()1 {v0.\type, v1.\type, v2.\type}, [x0], \postreg
	\inst\()1 {v0.\type, v1.\type, v2.\type, v3.\type}, [x0], \postreg
	.endm

	.irp instr ld,st
	.irp bits 8b, 4h, 2s, 1d, 16b, 8h, 4s, 2d
	ldst1_reg_list_post_reg \instr \bits x7
	.endr
	.endr

	.macro ldst2_reg_list_post_imm_reg_64 inst type postreg
	\inst\()2 {v0.\type, v1.\type}, [x0], #16
	.ifnb \postreg
	\inst\()2 {v0.\type, v1.\type}, [x0], \postreg
	.endif
	.endm

	.macro ldst2_reg_list_post_imm_reg_128 inst type postreg
	\inst\()2 {v0.\type, v1.\type}, [x0], #32
	.ifnb \postreg
	\inst\()2 {v0.\type, v1.\type}, [x0], \postreg
	.endif
	.endm

	.irp instr ld,st
	.irp bits_64 8b, 4h, 2s
	ldst2_reg_list_post_imm_reg_64 \instr \bits_64 x7
	.endr
	.endr

	.irp instr ld,st
	.irp bits_128 16b, 8h, 4s, 2d
	ldst2_reg_list_post_imm_reg_128 \instr \bits_128 x7
	.endr
	.endr

	.macro ldst34_reg_list_post_imm_reg_64 inst type postreg
	\inst\()3 {v0.\type, v1.\type, v2.\type}, [x0], #24
	\inst\()4 {v0.\type, v1.\type, v2.\type, v3.\type}, [x0], #32
	\inst\()3 {v0.\type, v1.\type, v2.\type}, [x0], \postreg
	\inst\()4 {v0.\type, v1.\type, v2.\type, v3.\type}, [x0], \postreg
	.endm

	.macro ldst34_reg_list_post_imm_reg_128 inst type postreg
	\inst\()3 {v0.\type, v1.\type, v2.\type}, [x0], #48
	\inst\()4 {v0.\type, v1.\type, v2.\type, v3.\type}, [x0], #64
	\inst\()3 {v0.\type, v1.\type, v2.\type}, [x0], \postreg
	\inst\()4 {v0.\type, v1.\type, v2.\type, v3.\type}, [x0], \postreg
	.endm

	.irp instr ld,st
	.irp bits_64 8b, 4h, 2s
	ldst34_reg_list_post_imm_reg_64 \instr \bits_64 x7
	.endr
	.endr

	.irp instr ld,st
	.irp bits_128 16b, 8h, 4s, 2d
	ldst34_reg_list_post_imm_reg_128 \instr \bits_128 x7
	.endr
	.endr


	# Post Index Vector-element form with replicate (Immediate offset)

	# Consecutive registers in reg list

	.macro ldstn_index_rep_B_imm inst index type rep
	\inst\()1\rep {v0.\type}\index, [x0], #1
	\inst\()2\rep {v0.\type, v1.\type}\index, [x0], #2
	\inst\()3\rep {v0.\type, v1.\type, v2.\type}\index, [x0], #3
	\inst\()4\rep {v0.\type, v1.\type, v2.\type, v3.\type}\index, [x0], #4
	.endm

	# Vector element with index

	.irp instr, ld, st
	ldstn_index_rep_B_imm  \instr index="[1]" type=b rep=""
	.ifnc \instr, st
	.irp types 8b, 16b
	ldstn_index_rep_B_imm  \instr index="" type=\types rep="r"
	.endr
	.endif
	.endr

	.macro ldstn_index_rep_H_imm inst index type rep
	\inst\()1\rep {v0.\type}\index, [x0], #2
	\inst\()2\rep {v0.\type, v1.\type}\index, [x0], #4
	\inst\()3\rep {v0.\type, v1.\type, v2.\type}\index, [x0], #6
	\inst\()4\rep {v0.\type, v1.\type, v2.\type, v3.\type}\index, [x0], #8
	.endm

	.irp instr, ld, st
	ldstn_index_rep_H_imm  \instr index="[1]" type=h rep=""
	.ifnc \instr, st
	.irp types 4h, 8h
	ldstn_index_rep_H_imm  \instr index="" type=\types rep="r"
	.endr
	.endif
	.endr

	.macro ldstn_index_rep_S_imm inst index type rep
	\inst\()1\rep {v0.\type}\index, [x0], #4
	\inst\()2\rep {v0.\type, v1.\type}\index, [x0], #8
	\inst\()3\rep {v0.\type, v1.\type, v2.\type}\index, [x0], #12
	\inst\()4\rep {v0.\type, v1.\type, v2.\type, v3.\type}\index, [x0], #16
	.endm

	.irp instr, ld, st
	ldstn_index_rep_S_imm  \instr index="[1]" type=s rep=""
	.ifnc \instr, st
	.irp types 2s, 4s
	ldstn_index_rep_S_imm  \instr index="" type=\types rep="r"
	.endr
	.endif
	.endr

	.macro ldstn_index_rep_D_imm inst index type rep
	\inst\()1\rep {v0.\type}\index, [x0], #8
	\inst\()2\rep {v0.\type, v1.\type}\index, [x0], #16
	\inst\()3\rep {v0.\type, v1.\type, v2.\type}\index, [x0], #24
	\inst\()4\rep {v0.\type, v1.\type, v2.\type, v3.\type}\index, [x0], #32
	.endm

	.irp instr, ld, st
	ldstn_index_rep_D_imm  \instr index="[1]" type=d rep=""
	.ifnc \instr, st
	.irp types 1d, 2d
	ldstn_index_rep_D_imm  \instr index="" type=\types rep="r"
	.endr
	.endif
	.endr

	# Post Index Vector-element form with replicate (Register offset)
	# This could have been factored into Post-index multiple 
	# element macros but this would make this already-looking-complex
	# testcase look more complex!

	# Consecutive registers in reg list

	.macro ldstn_index_rep_reg inst index type rep postreg
	\inst\()1\rep {v0.\type}\index, [x0], \postreg
	\inst\()2\rep {v0.\type, v1.\type}\index, [x0], \postreg
	\inst\()3\rep {v0.\type, v1.\type, v2.\type}\index, [x0], \postreg
	\inst\()4\rep {v0.\type, v1.\type, v2.\type, v3.\type}\index, [x0], \postreg
	.endm

	.irp instr, ld, st
	.irp itypes b,h,s,d
	ldstn_index_rep_reg  \instr index="[1]" type=\itypes rep="" postreg=x7
	.endr
	.ifnc \instr, st
	.irp types 8b, 16b, 4h, 8h, 2s, 4s, 1d, 2d
	ldstn_index_rep_reg  \instr index="" type=\types rep="r" postreg=x7
	.endr
	.endif
	.endr

	# ### End of test