Skip to content

Commit e3bf172

Browse files
japaricgnzlbg
authored andcommitted
acle/{dsp,simd32}: add leading underscores to match ACLE spec
1 parent c44308f commit e3bf172

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

crates/core_arch/src/acle/dsp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extern "C" {
3737
/// Returns the 32-bit saturating signed equivalent of a + b.
3838
#[inline]
3939
#[cfg_attr(test, assert_instr(qadd))]
40-
pub unsafe fn qadd(a: i32, b: i32) -> i32 {
40+
pub unsafe fn __qadd(a: i32, b: i32) -> i32 {
4141
arm_qadd(a, b)
4242
}
4343

@@ -46,6 +46,6 @@ pub unsafe fn qadd(a: i32, b: i32) -> i32 {
4646
/// Returns the 32-bit saturating signed equivalent of a - b.
4747
#[inline]
4848
#[cfg_attr(test, assert_instr(qsub))]
49-
pub unsafe fn qsub(a: i32, b: i32) -> i32 {
49+
pub unsafe fn __qsub(a: i32, b: i32) -> i32 {
5050
arm_qsub(a, b)
5151
}

crates/core_arch/src/acle/simd32.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ extern "C" {
157157
/// res\[3\] = a\[3\] + b\[3\]
158158
#[inline]
159159
#[cfg_attr(test, assert_instr(qadd8))]
160-
pub unsafe fn qadd8(a: int8x4_t, b: int8x4_t) -> int8x4_t {
160+
pub unsafe fn __qadd8(a: int8x4_t, b: int8x4_t) -> int8x4_t {
161161
dsp_call!(arm_qadd8, a, b)
162162
}
163163

@@ -171,7 +171,7 @@ pub unsafe fn qadd8(a: int8x4_t, b: int8x4_t) -> int8x4_t {
171171
/// res\[3\] = a\[3\] - b\[3\]
172172
#[inline]
173173
#[cfg_attr(test, assert_instr(qsub8))]
174-
pub unsafe fn qsub8(a: int8x4_t, b: int8x4_t) -> int8x4_t {
174+
pub unsafe fn __qsub8(a: int8x4_t, b: int8x4_t) -> int8x4_t {
175175
dsp_call!(arm_qsub8, a, b)
176176
}
177177

@@ -183,7 +183,7 @@ pub unsafe fn qsub8(a: int8x4_t, b: int8x4_t) -> int8x4_t {
183183
/// res\[1\] = a\[1\] - b\[1\]
184184
#[inline]
185185
#[cfg_attr(test, assert_instr(qsub16))]
186-
pub unsafe fn qsub16(a: int16x2_t, b: int16x2_t) -> int16x2_t {
186+
pub unsafe fn __qsub16(a: int16x2_t, b: int16x2_t) -> int16x2_t {
187187
dsp_call!(arm_qsub16, a, b)
188188
}
189189

@@ -195,7 +195,7 @@ pub unsafe fn qsub16(a: int16x2_t, b: int16x2_t) -> int16x2_t {
195195
/// res\[1\] = a\[1\] + b\[1\]
196196
#[inline]
197197
#[cfg_attr(test, assert_instr(qadd16))]
198-
pub unsafe fn qadd16(a: int16x2_t, b: int16x2_t) -> int16x2_t {
198+
pub unsafe fn __qadd16(a: int16x2_t, b: int16x2_t) -> int16x2_t {
199199
dsp_call!(arm_qadd16, a, b)
200200
}
201201

@@ -205,7 +205,7 @@ pub unsafe fn qadd16(a: int16x2_t, b: int16x2_t) -> int16x2_t {
205205
/// res\[1\] = a\[1\] + b\[0\]
206206
#[inline]
207207
#[cfg_attr(test, assert_instr(qasx))]
208-
pub unsafe fn qasx(a: int16x2_t, b: int16x2_t) -> int16x2_t {
208+
pub unsafe fn __qasx(a: int16x2_t, b: int16x2_t) -> int16x2_t {
209209
dsp_call!(arm_qasx, a, b)
210210
}
211211

@@ -215,7 +215,7 @@ pub unsafe fn qasx(a: int16x2_t, b: int16x2_t) -> int16x2_t {
215215
/// res\[1\] = a\[1\] - b\[0\]
216216
#[inline]
217217
#[cfg_attr(test, assert_instr(qsax))]
218-
pub unsafe fn qsax(a: int16x2_t, b: int16x2_t) -> int16x2_t {
218+
pub unsafe fn __qsax(a: int16x2_t, b: int16x2_t) -> int16x2_t {
219219
dsp_call!(arm_qsax, a, b)
220220
}
221221

@@ -227,7 +227,7 @@ pub unsafe fn qsax(a: int16x2_t, b: int16x2_t) -> int16x2_t {
227227
/// and the GE bits of the APSR are set.
228228
#[inline]
229229
#[cfg_attr(test, assert_instr(sadd16))]
230-
pub unsafe fn sadd16(a: int16x2_t, b: int16x2_t) -> int16x2_t {
230+
pub unsafe fn __sadd16(a: int16x2_t, b: int16x2_t) -> int16x2_t {
231231
dsp_call!(arm_sadd16, a, b)
232232
}
233233

@@ -241,7 +241,7 @@ pub unsafe fn sadd16(a: int16x2_t, b: int16x2_t) -> int16x2_t {
241241
/// and the GE bits of the APSR are set.
242242
#[inline]
243243
#[cfg_attr(test, assert_instr(sadd8))]
244-
pub unsafe fn sadd8(a: int8x4_t, b: int8x4_t) -> int8x4_t {
244+
pub unsafe fn __sadd8(a: int8x4_t, b: int8x4_t) -> int8x4_t {
245245
dsp_call!(arm_sadd8, a, b)
246246
}
247247

@@ -252,7 +252,7 @@ pub unsafe fn sadd8(a: int8x4_t, b: int8x4_t) -> int8x4_t {
252252
/// res = a\[0\] * b\[0\] + a\[1\] * b\[1\] + c
253253
#[inline]
254254
#[cfg_attr(test, assert_instr(smlad))]
255-
pub unsafe fn smlad(a: int16x2_t, b: int16x2_t, c: i32) -> i32 {
255+
pub unsafe fn __smlad(a: int16x2_t, b: int16x2_t, c: i32) -> i32 {
256256
arm_smlad(::mem::transmute(a), ::mem::transmute(b), c)
257257
}
258258

@@ -263,7 +263,7 @@ pub unsafe fn smlad(a: int16x2_t, b: int16x2_t, c: i32) -> i32 {
263263
/// res = a\[0\] * b\[0\] - a\[1\] * b\[1\] + c
264264
#[inline]
265265
#[cfg_attr(test, assert_instr(smlsd))]
266-
pub unsafe fn smlsd(a: int16x2_t, b: int16x2_t, c: i32) -> i32 {
266+
pub unsafe fn __smlsd(a: int16x2_t, b: int16x2_t, c: i32) -> i32 {
267267
arm_smlsd(::mem::transmute(a), ::mem::transmute(b), c)
268268
}
269269

@@ -275,7 +275,7 @@ pub unsafe fn smlsd(a: int16x2_t, b: int16x2_t, c: i32) -> i32 {
275275
/// and the GE bits of the APSR are set.
276276
#[inline]
277277
#[cfg_attr(test, assert_instr(sasx))]
278-
pub unsafe fn sasx(a: int16x2_t, b: int16x2_t) -> int16x2_t {
278+
pub unsafe fn __sasx(a: int16x2_t, b: int16x2_t) -> int16x2_t {
279279
dsp_call!(arm_sasx, a, b)
280280
}
281281

@@ -291,7 +291,7 @@ pub unsafe fn sasx(a: int16x2_t, b: int16x2_t) -> int16x2_t {
291291
/// where GE are bits of APSR
292292
#[inline]
293293
#[cfg_attr(test, assert_instr(sel))]
294-
pub unsafe fn sel(a: int8x4_t, b: int8x4_t) -> int8x4_t {
294+
pub unsafe fn __sel(a: int8x4_t, b: int8x4_t) -> int8x4_t {
295295
dsp_call!(arm_sel, a, b)
296296
}
297297

@@ -305,7 +305,7 @@ pub unsafe fn sel(a: int8x4_t, b: int8x4_t) -> int8x4_t {
305305
/// res\[3\] = (a\[3\] + b\[3\]) / 2
306306
#[inline]
307307
#[cfg_attr(test, assert_instr(shadd8))]
308-
pub unsafe fn shadd8(a: int8x4_t, b: int8x4_t) -> int8x4_t {
308+
pub unsafe fn __shadd8(a: int8x4_t, b: int8x4_t) -> int8x4_t {
309309
dsp_call!(arm_shadd8, a, b)
310310
}
311311

@@ -317,7 +317,7 @@ pub unsafe fn shadd8(a: int8x4_t, b: int8x4_t) -> int8x4_t {
317317
/// res\[1\] = (a\[1\] + b\[1\]) / 2
318318
#[inline]
319319
#[cfg_attr(test, assert_instr(shadd16))]
320-
pub unsafe fn shadd16(a: int16x2_t, b: int16x2_t) -> int16x2_t {
320+
pub unsafe fn __shadd16(a: int16x2_t, b: int16x2_t) -> int16x2_t {
321321
dsp_call!(arm_shadd16, a, b)
322322
}
323323

@@ -331,7 +331,7 @@ pub unsafe fn shadd16(a: int16x2_t, b: int16x2_t) -> int16x2_t {
331331
/// res\[3\] = (a\[3\] - b\[3\]) / 2
332332
#[inline]
333333
#[cfg_attr(test, assert_instr(shsub8))]
334-
pub unsafe fn shsub8(a: int8x4_t, b: int8x4_t) -> int8x4_t {
334+
pub unsafe fn __shsub8(a: int8x4_t, b: int8x4_t) -> int8x4_t {
335335
dsp_call!(arm_shsub8, a, b)
336336
}
337337

@@ -343,7 +343,7 @@ pub unsafe fn shsub8(a: int8x4_t, b: int8x4_t) -> int8x4_t {
343343
/// res\[1\] = (a\[1\] - b\[1\]) / 2
344344
#[inline]
345345
#[cfg_attr(test, assert_instr(shsub16))]
346-
pub unsafe fn shsub16(a: int16x2_t, b: int16x2_t) -> int16x2_t {
346+
pub unsafe fn __shsub16(a: int16x2_t, b: int16x2_t) -> int16x2_t {
347347
dsp_call!(arm_shsub16, a, b)
348348
}
349349

@@ -356,7 +356,7 @@ pub unsafe fn shsub16(a: int16x2_t, b: int16x2_t) -> int16x2_t {
356356
/// and sets the Q flag if overflow occurs on the addition.
357357
#[inline]
358358
#[cfg_attr(test, assert_instr(smuad))]
359-
pub unsafe fn smuad(a: int16x2_t, b: int16x2_t) -> i32 {
359+
pub unsafe fn __smuad(a: int16x2_t, b: int16x2_t) -> i32 {
360360
arm_smuad(::mem::transmute(a), ::mem::transmute(b))
361361
}
362362

@@ -369,7 +369,7 @@ pub unsafe fn smuad(a: int16x2_t, b: int16x2_t) -> i32 {
369369
/// and sets the Q flag if overflow occurs on the addition.
370370
#[inline]
371371
#[cfg_attr(test, assert_instr(smuadx))]
372-
pub unsafe fn smuadx(a: int16x2_t, b: int16x2_t) -> i32 {
372+
pub unsafe fn __smuadx(a: int16x2_t, b: int16x2_t) -> i32 {
373373
arm_smuadx(::mem::transmute(a), ::mem::transmute(b))
374374
}
375375

@@ -382,7 +382,7 @@ pub unsafe fn smuadx(a: int16x2_t, b: int16x2_t) -> i32 {
382382
/// and sets the Q flag if overflow occurs on the addition.
383383
#[inline]
384384
#[cfg_attr(test, assert_instr(smusd))]
385-
pub unsafe fn smusd(a: int16x2_t, b: int16x2_t) -> i32 {
385+
pub unsafe fn __smusd(a: int16x2_t, b: int16x2_t) -> i32 {
386386
arm_smusd(::mem::transmute(a), ::mem::transmute(b))
387387
}
388388

@@ -395,7 +395,7 @@ pub unsafe fn smusd(a: int16x2_t, b: int16x2_t) -> i32 {
395395
/// and sets the Q flag if overflow occurs on the addition.
396396
#[inline]
397397
#[cfg_attr(test, assert_instr(smusdx))]
398-
pub unsafe fn smusdx(a: int16x2_t, b: int16x2_t) -> i32 {
398+
pub unsafe fn __smusdx(a: int16x2_t, b: int16x2_t) -> i32 {
399399
arm_smusdx(::mem::transmute(a), ::mem::transmute(b))
400400
}
401401

@@ -407,7 +407,7 @@ pub unsafe fn smusdx(a: int16x2_t, b: int16x2_t) -> i32 {
407407
/// (a\[2\] - b\[2\]) + (a\[3\] - b\[3\])
408408
#[inline]
409409
#[cfg_attr(test, assert_instr(usad8))]
410-
pub unsafe fn usad8(a: int8x4_t, b: int8x4_t) -> u32 {
410+
pub unsafe fn __usad8(a: int8x4_t, b: int8x4_t) -> u32 {
411411
arm_usad8(::mem::transmute(a), ::mem::transmute(b))
412412
}
413413

@@ -419,7 +419,7 @@ pub unsafe fn usad8(a: int8x4_t, b: int8x4_t) -> u32 {
419419
/// (a\[2\] - b\[2\]) + (a\[3\] - b\[3\]) + c
420420
#[inline]
421421
#[cfg_attr(test, assert_instr(usad8))]
422-
pub unsafe fn usada8(a: int8x4_t, b: int8x4_t, c: u32) -> u32 {
422+
pub unsafe fn __usada8(a: int8x4_t, b: int8x4_t, c: u32) -> u32 {
423423
usad8(a, b) + c
424424
}
425425

0 commit comments

Comments
 (0)