[PATCH v4 3/3] RISC-V: Scalar crypto instruction and Entropy Source CSR testcases
Jan Beulich
jbeulich@suse.com
Tue Dec 21 16:06:28 GMT 2021
On 15.11.2021 04:03, jiawei wrote:
> --- /dev/null
> +++ b/gas/testsuite/gas/riscv/k-ext-64.d
> @@ -0,0 +1,47 @@
> +#as: -march=rv64i_zbkb_zbkc_zbkx_zknd_zkne_zknh_zkr_zksed_zksh_zkt
> +#source: k-ext-64.s
> +#objdump: -d
> +
> +.*:[ ]+file format .*
> +
> +
> +Disassembly of section .text:
> +
> +0+000 <target>:
> +[ ]+.*:[ ]+.*[ ]+ror[ ]+a0,a1,a2
> +[ ]+.*:[ ]+.*[ ]+rol[ ]+a0,a1,a2
> +[ ]+.*:[ ]+.*[ ]+rori[ ]+a0,a1,0x2
> +[ ]+.*:[ ]+.*[ ]+rorw[ ]+a0,a1,a2
> +[ ]+.*:[ ]+.*[ ]+rolw[ ]+a0,a1,a2
> +[ ]+.*:[ ]+.*[ ]+roriw[ ]+a0,a1,0x2
> +[ ]+.*:[ ]+.*[ ]+andn[ ]+a0,a1,a2
> +[ ]+.*:[ ]+.*[ ]+orn[ ]+a0,a1,a2
> +[ ]+.*:[ ]+.*[ ]+xnor[ ]+a0,a1,a2
> +[ ]+.*:[ ]+.*[ ]+pack[ ]+a0,a1,a2
> +[ ]+.*:[ ]+.*[ ]+packh[ ]+a0,a1,a2
> +[ ]+.*:[ ]+.*[ ]+packw[ ]+a0,a1,a2
> +[ ]+.*:[ ]+.*[ ]+brev8[ ]+a0,a0
> +[ ]+.*:[ ]+.*[ ]+rev8[ ]+a0,a0
> +[ ]+.*:[ ]+.*[ ]+clmul[ ]+a0,a1,a2
> +[ ]+.*:[ ]+.*[ ]+clmulh[ ]+a0,a1,a2
> +[ ]+.*:[ ]+.*[ ]+xperm4[ ]+a0,a1,a2
> +[ ]+.*:[ ]+.*[ ]+xperm8[ ]+a0,a1,a2
> +[ ]+.*:[ ]+.*[ ]+aes64ds[ ]+a0,a1,a2
> +[ ]+.*:[ ]+.*[ ]+aes64dsm[ ]+a0,a1,a2
> +[ ]+.*:[ ]+.*[ ]+aes64im[ ]+a0,a0
> +[ ]+.*:[ ]+.*[ ]+aes64ks1i[ ]+a0,a1,0x4
> +[ ]+.*:[ ]+.*[ ]+aes64ks2[ ]+a0,a1,a2
> +[ ]+.*:[ ]+.*[ ]+aes64es[ ]+a0,a1,a2
> +[ ]+.*:[ ]+.*[ ]+aes64esm[ ]+a0,a1,a2
> +[ ]+.*:[ ]+.*[ ]+sha256sig0[ ]+a0,a0
> +[ ]+.*:[ ]+.*[ ]+sha256sig1[ ]+a0,a0
> +[ ]+.*:[ ]+.*[ ]+sha256sum0[ ]+a0,a0
> +[ ]+.*:[ ]+.*[ ]+sha256sum1[ ]+a0,a0
> +[ ]+.*:[ ]+.*[ ]+sha512sig0[ ]+a0,a0
> +[ ]+.*:[ ]+.*[ ]+sha512sig1[ ]+a0,a0
> +[ ]+.*:[ ]+.*[ ]+sha512sum0[ ]+a0,a0
> +[ ]+.*:[ ]+.*[ ]+sha512sum1[ ]+a0,a0
> +[ ]+.*:[ ]+.*[ ]+sm4ed[ ]+a0,a1,a2,0x2
> +[ ]+.*:[ ]+.*[ ]+sm4ks[ ]+a0,a1,a2,0x2
> +[ ]+.*:[ ]+.*[ ]+sm3p0[ ]+a0,a0
> +[ ]+.*:[ ]+.*[ ]+sm3p1[ ]+a0,a0
Since most (all) other insn-specific tests are different in this regard,
I wonder whether it is on purpose that the actual encodings get omitted
here (or to be precise, skipped by way of using .* ). Since these tests
serve as both assembler and disassembler ones, I think checking that the
correct encodings get produced (and consumed) would be at least helpful.
Jan
More information about the Binutils
mailing list