[PATCH 30/43] aarch64: Add new test conditional-compare.d

Richard Earnshaw (lists) Richard.Earnshaw@arm.com
Thu May 8 14:38:13 GMT 2025


On 21/04/2025 22:25, Alice Carlotti wrote:
> The register form of ccmp was already tested.
> 
> 
> diff --git a/gas/testsuite/gas/aarch64/conditional-compare.d b/gas/testsuite/gas/aarch64/conditional-compare.d
> new file mode 100644
> index 0000000000000000000000000000000000000000..c075cb9dd8cc2bd2dd0c0eaf067584eb81476640
> --- /dev/null
> +++ b/gas/testsuite/gas/aarch64/conditional-compare.d
> @@ -0,0 +1,69 @@
> +#as: -march=armv8-a
> +#objdump: -dr
> +
> +.*:     file format .*
> +
> +
> +Disassembly of section \.text:
> +
> +0+ <\.text>:
> + *[0-9a-f]+:	3a400800 	ccmn	w0, #0x0, #0x0, eq	// eq = none
> + *[0-9a-f]+:	3a400be0 	ccmn	wzr, #0x0, #0x0, eq	// eq = none
> + *[0-9a-f]+:	3a5f0800 	ccmn	w0, #0x1f, #0x0, eq	// eq = none
> + *[0-9a-f]+:	3a40080f 	ccmn	w0, #0x0, #0xf, eq	// eq = none
> + *[0-9a-f]+:	3a40f800 	ccmn	w0, #0x0, #0x0, nv
> + *[0-9a-f]+:	ba400800 	ccmn	x0, #0x0, #0x0, eq	// eq = none
> + *[0-9a-f]+:	ba400be0 	ccmn	xzr, #0x0, #0x0, eq	// eq = none
> + *[0-9a-f]+:	ba5f0800 	ccmn	x0, #0x1f, #0x0, eq	// eq = none
> + *[0-9a-f]+:	ba40080f 	ccmn	x0, #0x0, #0xf, eq	// eq = none
> + *[0-9a-f]+:	ba40f800 	ccmn	x0, #0x0, #0x0, nv
> + *[0-9a-f]+:	7a400800 	ccmp	w0, #0x0, #0x0, eq	// eq = none
> + *[0-9a-f]+:	7a400be0 	ccmp	wzr, #0x0, #0x0, eq	// eq = none
> + *[0-9a-f]+:	7a5f0800 	ccmp	w0, #0x1f, #0x0, eq	// eq = none
> + *[0-9a-f]+:	7a40080f 	ccmp	w0, #0x0, #0xf, eq	// eq = none
> + *[0-9a-f]+:	7a40f800 	ccmp	w0, #0x0, #0x0, nv
> + *[0-9a-f]+:	fa400800 	ccmp	x0, #0x0, #0x0, eq	// eq = none
> + *[0-9a-f]+:	fa400be0 	ccmp	xzr, #0x0, #0x0, eq	// eq = none
> + *[0-9a-f]+:	fa5f0800 	ccmp	x0, #0x1f, #0x0, eq	// eq = none
> + *[0-9a-f]+:	fa40080f 	ccmp	x0, #0x0, #0xf, eq	// eq = none
> + *[0-9a-f]+:	fa40f800 	ccmp	x0, #0x0, #0x0, nv
> + *[0-9a-f]+:	3a400000 	ccmn	w0, w0, #0x0, eq	// eq = none
> + *[0-9a-f]+:	3a4003e0 	ccmn	wzr, w0, #0x0, eq	// eq = none
> + *[0-9a-f]+:	3a5f0000 	ccmn	w0, wzr, #0x0, eq	// eq = none
> + *[0-9a-f]+:	3a40000f 	ccmn	w0, w0, #0xf, eq	// eq = none
> + *[0-9a-f]+:	3a40f000 	ccmn	w0, w0, #0x0, nv
> + *[0-9a-f]+:	ba400000 	ccmn	x0, x0, #0x0, eq	// eq = none
> + *[0-9a-f]+:	ba4003e0 	ccmn	xzr, x0, #0x0, eq	// eq = none
> + *[0-9a-f]+:	ba5f0000 	ccmn	x0, xzr, #0x0, eq	// eq = none
> + *[0-9a-f]+:	ba40000f 	ccmn	x0, x0, #0xf, eq	// eq = none
> + *[0-9a-f]+:	ba40f000 	ccmn	x0, x0, #0x0, nv
> + *[0-9a-f]+:	7a400000 	ccmp	w0, w0, #0x0, eq	// eq = none
> + *[0-9a-f]+:	7a4003e0 	ccmp	wzr, w0, #0x0, eq	// eq = none
> + *[0-9a-f]+:	7a5f0000 	ccmp	w0, wzr, #0x0, eq	// eq = none
> + *[0-9a-f]+:	7a40000f 	ccmp	w0, w0, #0xf, eq	// eq = none
> + *[0-9a-f]+:	7a40f000 	ccmp	w0, w0, #0x0, nv
> + *[0-9a-f]+:	fa400000 	ccmp	x0, x0, #0x0, eq	// eq = none
> + *[0-9a-f]+:	fa4003e0 	ccmp	xzr, x0, #0x0, eq	// eq = none
> + *[0-9a-f]+:	fa5f0000 	ccmp	x0, xzr, #0x0, eq	// eq = none
> + *[0-9a-f]+:	fa40000f 	ccmp	x0, x0, #0xf, eq	// eq = none
> + *[0-9a-f]+:	fa40f000 	ccmp	x0, x0, #0x0, nv
> + *[0-9a-f]+:	3a400800 	ccmn	w0, #0x0, #0x0, eq	// eq = none
> + *[0-9a-f]+:	3a400800 	ccmn	w0, #0x0, #0x0, eq	// eq = none
> + *[0-9a-f]+:	3a401800 	ccmn	w0, #0x0, #0x0, ne	// ne = any
> + *[0-9a-f]+:	3a401800 	ccmn	w0, #0x0, #0x0, ne	// ne = any
> + *[0-9a-f]+:	3a402800 	ccmn	w0, #0x0, #0x0, cs	// cs = hs, nlast
> + *[0-9a-f]+:	3a402800 	ccmn	w0, #0x0, #0x0, cs	// cs = hs, nlast
> + *[0-9a-f]+:	3a403800 	ccmn	w0, #0x0, #0x0, cc	// cc = lo, ul, last
> + *[0-9a-f]+:	3a403800 	ccmn	w0, #0x0, #0x0, cc	// cc = lo, ul, last
> + *[0-9a-f]+:	3a404800 	ccmn	w0, #0x0, #0x0, mi	// mi = first
> + *[0-9a-f]+:	3a405800 	ccmn	w0, #0x0, #0x0, pl	// pl = nfrst
> + *[0-9a-f]+:	3a406800 	ccmn	w0, #0x0, #0x0, vs
> + *[0-9a-f]+:	3a407800 	ccmn	w0, #0x0, #0x0, vc
> + *[0-9a-f]+:	3a408800 	ccmn	w0, #0x0, #0x0, hi	// hi = pmore
> + *[0-9a-f]+:	3a409800 	ccmn	w0, #0x0, #0x0, ls	// ls = plast
> + *[0-9a-f]+:	3a40a800 	ccmn	w0, #0x0, #0x0, ge	// ge = tcont
> + *[0-9a-f]+:	3a40b800 	ccmn	w0, #0x0, #0x0, lt	// lt = tstop
> + *[0-9a-f]+:	3a40c800 	ccmn	w0, #0x0, #0x0, gt
> + *[0-9a-f]+:	3a40d800 	ccmn	w0, #0x0, #0x0, le
> + *[0-9a-f]+:	3a40e800 	ccmn	w0, #0x0, #0x0, al
> + *[0-9a-f]+:	3a40f800 	ccmn	w0, #0x0, #0x0, nv
> diff --git a/gas/testsuite/gas/aarch64/conditional-compare.s b/gas/testsuite/gas/aarch64/conditional-compare.s
> new file mode 100644
> index 0000000000000000000000000000000000000000..ce5804ee121f08a6854f2fc0930a6932fbcfb9e8
> --- /dev/null
> +++ b/gas/testsuite/gas/aarch64/conditional-compare.s
> @@ -0,0 +1,68 @@
> +	ccmn	w0, #0, #0, eq
> +	ccmn	wzr, #0, #0, eq
> +	ccmn	w0, #31, #0, eq
> +	ccmn	w0, #0, #15, eq
> +	ccmn	w0, #0, #0, nv
> +
> +	ccmn	x0, #0, #0, eq
> +	ccmn	xzr, #0, #0, eq
> +	ccmn	x0, #31, #0, eq
> +	ccmn	x0, #0, #15, eq
> +	ccmn	x0, #0, #0, nv
> +
> +	ccmp	w0, #0, #0, eq
> +	ccmp	wzr, #0, #0, eq
> +	ccmp	w0, #31, #0, eq
> +	ccmp	w0, #0, #15, eq
> +	ccmp	w0, #0, #0, nv
> +
> +	ccmp	x0, #0, #0, eq
> +	ccmp	xzr, #0, #0, eq
> +	ccmp	x0, #31, #0, eq
> +	ccmp	x0, #0, #15, eq
> +	ccmp	x0, #0, #0, nv
> +
> +	ccmn	w0, w0, #0, eq
> +	ccmn	wzr, w0, #0, eq
> +	ccmn	w0, wzr, #0, eq
> +	ccmn	w0, w0, #15, eq
> +	ccmn	w0, w0, #0, nv
> +
> +	ccmn	x0, x0, #0, eq
> +	ccmn	xzr, x0, #0, eq
> +	ccmn	x0, xzr, #0, eq
> +	ccmn	x0, x0, #15, eq
> +	ccmn	x0, x0, #0, nv
> +
> +	ccmp	w0, w0, #0, eq
> +	ccmp	wzr, w0, #0, eq
> +	ccmp	w0, wzr, #0, eq
> +	ccmp	w0, w0, #15, eq
> +	ccmp	w0, w0, #0, nv
> +
> +	ccmp	x0, x0, #0, eq
> +	ccmp	xzr, x0, #0, eq
> +	ccmp	x0, xzr, #0, eq
> +	ccmp	x0, x0, #15, eq
> +	ccmp	x0, x0, #0, nv
> +
> +	ccmn	w0, #0, #0, eq
> +	ccmn	w0, #0, #0, none
> +	ccmn	w0, #0, #0, ne
> +	ccmn	w0, #0, #0, any
> +	ccmn	w0, #0, #0, hs
> +	ccmn	w0, #0, #0, cs
> +	ccmn	w0, #0, #0, lo
> +	ccmn	w0, #0, #0, cc
> +	ccmn	w0, #0, #0, mi
> +	ccmn	w0, #0, #0, pl
> +	ccmn	w0, #0, #0, vs
> +	ccmn	w0, #0, #0, vc
> +	ccmn	w0, #0, #0, hi
> +	ccmn	w0, #0, #0, ls
> +	ccmn	w0, #0, #0, ge
> +	ccmn	w0, #0, #0, lt
> +	ccmn	w0, #0, #0, gt
> +	ccmn	w0, #0, #0, le
> +	ccmn	w0, #0, #0, al
> +	ccmn	w0, #0, #0, nv
> 

Similar to the previous patch, I think we should cover the SVE alternate condition names here as well, though I see you already have 'none' and 'any'.



More information about the Binutils mailing list