]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Remove 4 tests of the pextrw instruction.
authorFlorian Krohm <florian@eich-krohm.de>
Fri, 4 Oct 2013 11:29:26 +0000 (11:29 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Fri, 4 Oct 2013 11:29:26 +0000 (11:29 +0000)
commit9170b1642b02353ec2a4fc2f481a166524c7c029
tree0847da7e6713972f7072ccdd8b15cf29d7401add
parent0dabd6dfd3e20f9de42f95e13b5c10f31ed609cd
Remove 4 tests of the pextrw instruction.
Those tests were rejected by clang and according to the
analysis below by Tom Hughes do not add anything new.

Analysis:

I'm not 100% sure that clang is right though - the Intel manual
clearly describes that argument as "reg" rather than "r32" which
is why I will have included the 64 bit version in the test. It also says:

  "The upper bits of r32 or r64 is zeroed."

and:

  "If the destination operand is a general-purpose register, the
   default operand size is 64-bits in 64-bit mode."

which basically means that REX.W is implied for this op and there is
no way to encode a 32 bit version when running in 64 bit mode.

So in principle you could encode it as:

  44 0f c5 ce 00          pextrw $0x0,%mm6,%r9d

or:

  4c 0f c5 ce 00          pextrw $0x0,%mm6,%r9

but in fact gcc assembles both versions to the first form.

Equally you could argue that as REX.W is implied both versions
should disassemble as %r9.

So I think clang is being overly picky, and if it was only going to
accept one version I would argue it should be %r9 not %r9d!

In practical terms dropping the second set of tests doesn't lose us anything though.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13614
none/tests/amd64/insn_sse.def