aosp12/external/arm-neon-tests
hcl 7be3fd486c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
..
Android.bp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Init.s init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
InitCache.s init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
LICENSE init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
METADATA init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
MODULE_LICENSE_MIT init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Makefile init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Makefile.gcc init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
OWNERS init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
README init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
armscript.inc init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
compute_ref.axf init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
compute_ref.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
compute_ref.gccarm init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
compute_ref.gccarm-rvct init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
compute_ref_data.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
expected_input4gcc-nofp16.txt init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
expected_input4gcc.txt init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
license.html init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref-rvct-all.txt init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref-rvct-neon-nofp16.txt init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref-rvct-neon.txt init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_dsp.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_dspfns.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_integer.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_v_binary_op.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_v_binary_sat_op.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_v_comp_f_op.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_v_comp_op.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_v_unary_op.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_v_unary_sat_op.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vaba.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vabal.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vabd.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vabdl.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vabs.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vadd.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vaddhn.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vaddl.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vaddw.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vand.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vbic.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vbsl.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vcage.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vcagt.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vcale.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vcalt.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vceq.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vcge.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vcgt.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vcle.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vcls.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vclt.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vclz.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vcnt.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vcombine.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vcreate.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vcvt.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vdup.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vdup_lane.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_veor.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vext.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vget_high.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vget_lane.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vget_low.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vhadd.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vhsub.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vld1.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vld1_dup.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vld1_lane.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vldX.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vldX_dup.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vldX_lane.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmax.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmin.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmla.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmla_lane.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmla_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmlal.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmlal_lane.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmlal_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmls.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmls_lane.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmls_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmlsl.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmlsl_lane.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmlsl_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmovl.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmovn.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmul.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmul_lane.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmul_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmull.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmull_lane.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmull_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vmvn.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vneg.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vorn.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vorr.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vpadal.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vpadd.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vpaddl.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vpmax.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vpmin.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqabs.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqadd.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqdmlal.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqdmlal_lane.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqdmlal_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqdmlsl.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqdmlsl_lane.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqdmlsl_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqdmulh.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqdmulh_lane.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqdmulh_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqdmull.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqdmull_lane.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqdmull_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqmovn.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqmovun.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqneg.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqrdmulh.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqrdmulh_lane.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqrdmulh_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqrshl.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqrshrn_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqrshrun_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqshl.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqshl_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqshlu_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqshrn_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqshrun_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vqsub.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vraddhn.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vrecpe.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vrecps.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vreinterpret.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vrev.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vrhadd.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vrshl.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vrshr_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vrshrn_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vrsqrte.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vrsqrts.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vrsra_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vrsubhn.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vsXi_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vset_lane.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vshl.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vshl_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vshll_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vshr_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vshrn_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vsli_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vsra_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vsri_n.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vst1_lane.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vstX_lane.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vsub.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vsubhn.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vsubl.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vsubw.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vtbX.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vtrn.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vtst.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vuzp.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ref_vzip.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
retarget.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
scatter.scat init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
stm-arm-neon-ref.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00

README

ARM Neon reference tests
========================
This package contains extensive tests for the ARM/Neon instructions.

It works by building a program which uses all of them, and then
executing it on an actual target or a simulator.

It can be used to validate the simulator against an actual HW target,
or to validate C compilers in presence of Neon intrinsics calls.

The supplied Makefile enables to build with both ARM RVCT compiler and
GNU GCC (for the ARM target), and supports execution with ARM RVDEBUG
on an ARM simulator and with QEMU.

For convenience, the ARM ELF binary file (as compiled with RVCT) is
supplied (compute_ref.axf), as well as expected output (ref-rvct.txt).

A second file containing expected output is also supplied:
ref-rvct-neon.txt, which contains only the results of the Neon
instrinsics tests. It is aimed at being used to check GCC's results,
since this compiler does not support the integer & dsp builtins whose
results are also present in ref-rvct.txt.

Typical usage when used to debug QEmu:
$ make all # to build the test program with ARM rvct and execute with QEmu
$ make check # to compare the results with the expected output


Known issues:
-------------
Some tests currently fail to build with GCC/ARM:
- missing include files: dspfns.h, armdsp.h

As GCC/ARM provides no support for the
Neon_Cumulative_Saturation/fpsrc register, auxiliary accessor
functions have been implemented in stm-arm-neon-ref.h.

Engineering:
------------
In order to cover all the Neon instructions extensively, these tests
make intensive use of the C-preprocessor, to save maintenance efforts.

Most tests (the more regular ones) share a common basic structure. In
general, variable names are suffixed by their type name, so as to
differentiate variables with the same purpose but of differente types.
Hence vector1_int8x8, vector1_int16x4 etc...

For instance in ref_vmul.c the layout of the code is as follows:

- declare input and output vectors (named 'vector1', 'vector2' and
  'vector_res') of each possible type (s/u, 8/16/32/64 bits).

- clean the result buffers.

- initialize input vectors 'vector1' and 'vector2'.

- call each variant of the intrinsic and store the result in a buffer
  named 'buffer', whose contents is printed after execution.

One can then compare the actual result with the expected one.