[PATCH 1/3] x86: Add {load}/{store} tests for apx instructions.

Jan Beulich jbeulich@suse.com
Thu Jul 4 11:59:15 GMT 2024


On 04.07.2024 10:52, Cui, Lili wrote:
> --- /dev/null
> +++ b/gas/testsuite/gas/i386/x86-64-pseudos-apx.s
> @@ -0,0 +1,45 @@
> +# Check 64bit APX instructions with pseudo prefixes for encoding
> +
> +.text
> +_start:
> +        #APX REX2
> +        .irp m, mov, adc, add, and, cmp, or, sbb, sub, test, xor, xchg
> +        \m %ecx, %r31d
> +        {load}  \m %ecx, %r31d
> +        {store} \m %ecx, %r31d
> +        {load}  \m (%ecx), %r31d
> +        {store} \m %r31d, (%ecx)
> +        .endr
> +
> +        movaps (%r31),%xmm2
> +        {load} movaps (%r31),%xmm2
> +        {store} movaps %xmm2, (%r31)
> +
> +        #APX EVEX promoted from legacy
> +        .irp m, adc, add, and, or, sbb, sub, xor
> +        {evex}         \m %ecx, %r31d
> +        {evex} {load}  \m %ecx, %r31d
> +        {evex} {store} \m %ecx, %r31d
> +        {evex} {load}  \m (%ecx), %r31d
> +        {evex} {store} \m %r31d, (%ecx)
> +        .endr

While not as close to "promoted" as these, shouldn't CCMPcc be here, too? Or
wait - that's what the 2nd patch is about, I guess.

> +        #APX NDD
> +        .irp m, add, or, adc, sbb, and, sub, xor

Might be nice if, like further up, these then were also sorted alphabetically.
But I won't insist, it's just a little unexpected. IOW - feel free to put in
either way.

Jan


More information about the Binutils mailing list