1
0
mirror of https://github.com/golang/go synced 2024-10-05 16:41:21 -06:00

[dev.ssa] cmd/compile: make REPSTOSQ clobber flags

It does a XOR internally and clobbers flags.

Change-Id: Id6ef9219c4e6c3a2b5fc79c8d52bcfa30c148617
Reviewed-on: https://go-review.googlesource.com/14165
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Todd Neal 2015-09-01 17:56:37 -05:00
parent 2511cf03b9
commit 4219aba5db
2 changed files with 3 additions and 3 deletions

View File

@ -380,8 +380,8 @@ func init() {
{name: "MOVQstoreidx8", reg: gpstoreidx, asm: "MOVQ"}, // store 8 bytes in arg2 to arg0+8*arg1+auxint+aux. arg3=mem
{name: "MOVXzero", reg: gpstoreconst}, // store auxint 0 bytes into arg0 using a series of MOV instructions. arg1=mem.
// TODO: implement this when register clobbering works
{name: "REPSTOSQ", reg: regInfo{[]regMask{buildReg("DI"), buildReg("CX")}, buildReg("DI AX CX"), nil}}, // store arg1 8-byte words containing zero into arg0 using STOSQ. arg2=mem.
{name: "REPSTOSQ", reg: regInfo{[]regMask{buildReg("DI"), buildReg("CX")}, buildReg("DI AX CX FLAGS"), nil}}, // store arg1 8-byte words containing zero into arg0 using STOSQ. arg2=mem.
//TODO: set register clobber to everything?
{name: "CALLstatic", reg: regInfo{clobbers: callerSave}}, // call static function aux.(*gc.Sym). arg0=mem, auxint=argsize, returns mem

View File

@ -3024,7 +3024,7 @@ var opcodeTable = [...]opInfo{
{0, 128}, // .DI
{1, 2}, // .CX
},
clobbers: 131, // .AX .CX .DI
clobbers: 8589934723, // .AX .CX .DI .FLAGS
},
},
{