1
0
mirror of https://github.com/golang/go synced 2024-11-12 07:10:22 -07:00

8a/8l: add PCMPEQB and PMOVMSKB to 386.

Used by CL 8056043 for fast string equals.

R=bradfitz
CC=golang-dev
https://golang.org/cl/8102044
This commit is contained in:
Keith Randall 2013-03-29 00:34:03 -07:00
parent 47a54ab2ad
commit 871177df6a
3 changed files with 12 additions and 0 deletions

View File

@ -760,10 +760,12 @@ struct
"ORPS", LTYPE3, AORPS,
"PADDQ", LTYPE3, APADDQ,
"PAND", LTYPE3, APAND,
"PCMPEQB", LTYPE3, APCMPEQB,
"PMAXSW", LTYPE3, APMAXSW,
"PMAXUB", LTYPE3, APMAXUB,
"PMINSW", LTYPE3, APMINSW,
"PMINUB", LTYPE3, APMINUB,
"PMOVMSKB", LTYPE3, APMOVMSKB,
"PSADBW", LTYPE3, APSADBW,
"PSHUFB", LTYPE3, APSHUFB,
"PSUBB", LTYPE3, APSUBB,

View File

@ -534,10 +534,12 @@ enum as
AORPS,
APADDQ,
APAND,
APCMPEQB,
APMAXSW,
APMAXUB,
APMINSW,
APMINUB,
APMOVMSKB,
APSADBW,
APSUBB,
APSUBL,

View File

@ -364,6 +364,12 @@ uchar ysvrs[] =
Ym, Ynone, Zm_o, 2,
0
};
uchar ymskb[] =
{
Yxr, Yrl, Zm_r_xm, 2,
Ymr, Yrl, Zm_r_xm, 1,
0
};
uchar yxm[] =
{
Yxm, Yxr, Zm_r_xm, 1,
@ -950,10 +956,12 @@ Optab optab[] =
{ AORPS, yxm, Pm, 0x56 },
{ APADDQ, yxm, Pe, 0xd4 },
{ APAND, yxm, Pe, 0xdb },
{ APCMPEQB, yxmq, Pe ,0x74 },
{ APMAXSW, yxm, Pe, 0xee },
{ APMAXUB, yxm, Pe, 0xde },
{ APMINSW, yxm, Pe, 0xea },
{ APMINUB, yxm, Pe, 0xda },
{ APMOVMSKB, ymskb, Px, Pe,0xd7,0xd7 },
{ APSADBW, yxm, Pq, 0xf6 },
{ APSUBB, yxm, Pe, 0xf8 },
{ APSUBL, yxm, Pe, 0xfa },