Commit a2da2108 authored by Damien Lespiau's avatar Damien Lespiau Committed by Brad Fitzpatrick

cmd/internal/obj/x86: fix ANDPS encoding

ANDPS, like all others PS (Packed Single precision floats) instructions,
need Ym: they don't use the 0x66 prefix.

From the manual:

    NP 0F 54 /r        ANDPS xmm1, xmm2/m128

NP meaning, quoting the manual:

  NP - Indicates the use of 66/F2/F3 prefixes (beyond those already part
  of the instructions opcode) are not allowed with the instruction.

And indeed, the same instruction prefixed by 0x66 is ANDPD.

Updates #14069

Change-Id: If312a6f1e77113ab8c0febe66bdb1b4171e41e0a
Reviewed-on: https://go-review.googlesource.com/42090Reviewed-by: default avatarKeith Randall <khr@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent d1b544c7
......@@ -412,14 +412,14 @@ TEXT asmtest(SB),DUPOK|NOSPLIT,$0
ANDPD (R11), X11 // 66450f541b
ANDPD X2, X11 // 66440f54da
ANDPD X11, X11 // 66450f54db
//TODO: ANDPS (BX), X2 // 0f5413
//TODO: ANDPS (R11), X2 // 410f5413
//TODO: ANDPS X2, X2 // 0f54d2
//TODO: ANDPS X11, X2 // 410f54d3
//TODO: ANDPS (BX), X11 // 440f541b
//TODO: ANDPS (R11), X11 // 450f541b
//TODO: ANDPS X2, X11 // 440f54da
//TODO: ANDPS X11, X11 // 450f54db
ANDPS (BX), X2 // 0f5413
ANDPS (R11), X2 // 410f5413
ANDPS X2, X2 // 0f54d2
ANDPS X11, X2 // 410f54d3
ANDPS (BX), X11 // 440f541b
ANDPS (R11), X11 // 450f541b
ANDPS X2, X11 // 440f54da
ANDPS X11, X11 // 450f54db
BEXTRL R9, (BX), DX // c4e230f713
BEXTRL R9, (R11), DX // c4c230f713
BEXTRL R9, DX, DX // c4e230f7d2
......
......@@ -963,7 +963,7 @@ var optab =
{AANDNPD, yxm, Pq, [23]uint8{0x55}},
{AANDNPS, yxm, Pm, [23]uint8{0x55}},
{AANDPD, yxm, Pq, [23]uint8{0x54}},
{AANDPS, yxm, Pq, [23]uint8{0x54}},
{AANDPS, yxm, Pm, [23]uint8{0x54}},
{AANDQ, yaddl, Pw, [23]uint8{0x83, 04, 0x25, 0x81, 04, 0x21, 0x23}},
{AANDW, yaddl, Pe, [23]uint8{0x83, 04, 0x25, 0x81, 04, 0x21, 0x23}},
{AARPL, yrl_ml, P32, [23]uint8{0x63}},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment