Commit 4074e4e5 authored by isharipo's avatar isharipo Committed by Ilya Tocar

cmd/asm: add amd64 CLFLUSH instruction

This is the last instruction I found missing in SSE2 set.

It does not reuse 'yprefetch' ytabs due to differences in
operands SRC/DST roles:
- PREFETCHx: ModRM:r/m(r) -> FROM
- CLFLUSH:   ModRM:r/m(w) -> TO

unaryDst map is extended accordingly.

Change-Id: I89e34ebb81cc0ee5f9ebbb1301bad417f7ee437f
Reviewed-on: https://go-review.googlesource.com/56833
Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarIlya Tocar <ilya.tocar@intel.com>
Reviewed-by: default avatarRuss Cox <rsc@golang.org>
parent 26dadbe3
...@@ -771,8 +771,8 @@ TEXT asmtest(SB),DUPOK|NOSPLIT,$0 ...@@ -771,8 +771,8 @@ TEXT asmtest(SB),DUPOK|NOSPLIT,$0
//TODO: CLAC // 0f01ca //TODO: CLAC // 0f01ca
CLC // f8 CLC // f8
CLD // fc CLD // fc
//TODO: CLFLUSH (BX) // 0fae3b CLFLUSH (BX) // 0fae3b
//TODO: CLFLUSH (R11) // 410fae3b CLFLUSH (R11) // 410fae3b
//TODO: CLFLUSHOPT (BX) // 660fae3b //TODO: CLFLUSHOPT (BX) // 660fae3b
//TODO: CLFLUSHOPT (R11) // 66410fae3b //TODO: CLFLUSHOPT (R11) // 66410fae3b
CLI // fa CLI // fa
......
...@@ -76,6 +76,7 @@ const ( ...@@ -76,6 +76,7 @@ const (
ABYTE ABYTE
ACLC ACLC
ACLD ACLD
ACLFLUSH
ACLI ACLI
ACLTS ACLTS
ACMC ACMC
......
...@@ -38,6 +38,7 @@ var Anames = []string{ ...@@ -38,6 +38,7 @@ var Anames = []string{
"BYTE", "BYTE",
"CLC", "CLC",
"CLD", "CLD",
"CLFLUSH",
"CLI", "CLI",
"CLTS", "CLTS",
"CMC", "CMC",
......
...@@ -551,6 +551,10 @@ var ypopl = []ytab{ ...@@ -551,6 +551,10 @@ var ypopl = []ytab{
{Ynone, Ynone, Ym, Zo_m, 2}, {Ynone, Ynone, Ym, Zo_m, 2},
} }
var yclflush = []ytab{
{Ynone, Ynone, Ym, Zo_m, 2},
}
var ybswap = []ytab{ var ybswap = []ytab{
{Ynone, Ynone, Yrl, Z_rp, 2}, {Ynone, Ynone, Yrl, Z_rp, 2},
} }
...@@ -994,6 +998,7 @@ var optab = ...@@ -994,6 +998,7 @@ var optab =
{ACDQ, ynone, Px, [23]uint8{0x99}}, {ACDQ, ynone, Px, [23]uint8{0x99}},
{ACLC, ynone, Px, [23]uint8{0xf8}}, {ACLC, ynone, Px, [23]uint8{0xf8}},
{ACLD, ynone, Px, [23]uint8{0xfc}}, {ACLD, ynone, Px, [23]uint8{0xfc}},
{ACLFLUSH, yclflush, Pm, [23]uint8{0xae, 07}},
{ACLI, ynone, Px, [23]uint8{0xfa}}, {ACLI, ynone, Px, [23]uint8{0xfa}},
{ACLTS, ynone, Pm, [23]uint8{0x06}}, {ACLTS, ynone, Pm, [23]uint8{0x06}},
{ACMC, ynone, Px, [23]uint8{0xf5}}, {ACMC, ynone, Px, [23]uint8{0xf5}},
......
...@@ -1183,6 +1183,7 @@ func stacksplit(ctxt *obj.Link, cursym *obj.LSym, p *obj.Prog, newprog obj.ProgA ...@@ -1183,6 +1183,7 @@ func stacksplit(ctxt *obj.Link, cursym *obj.LSym, p *obj.Prog, newprog obj.ProgA
var unaryDst = map[obj.As]bool{ var unaryDst = map[obj.As]bool{
ABSWAPL: true, ABSWAPL: true,
ABSWAPQ: true, ABSWAPQ: true,
ACLFLUSH: true,
ACMPXCHG8B: true, ACMPXCHG8B: true,
ADECB: true, ADECB: true,
ADECL: true, ADECL: true,
......
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