mirror of
https://github.com/golang/go
synced 2024-11-19 06:54:39 -07:00
liblink: shorter encoding for zeroing register
Encode MOV $0, %ax as XOR %eax, %eax instead of XOR %rax, %rax. If an operand register does not need REX.w bit (i.e. not one of R8-R15), it is encoded in 2 bytes instead of 3 bytes. LGTM=rsc R=golang-codereviews, gobot, rsc CC=golang-codereviews https://golang.org/cl/115580044
This commit is contained in:
parent
0da4b2dbc2
commit
24db881689
@ -3066,6 +3066,7 @@ found:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Zclr:
|
case Zclr:
|
||||||
|
ctxt->rexflag &= ~Pw;
|
||||||
*ctxt->andptr++ = op;
|
*ctxt->andptr++ = op;
|
||||||
asmand(ctxt, &p->to, &p->to);
|
asmand(ctxt, &p->to, &p->to);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user