mirror of
https://github.com/golang/go
synced 2024-11-19 01:54:39 -07:00
cmd/compile: use inc/dec for bytes, too
Change-Id: Ib2890ab1983cbef7c1c1ee5a10204ba3ace19b53 Reviewed-on: https://go-review.googlesource.com/21312 Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
ca72f5f5df
commit
dc5a7682f0
@ -430,9 +430,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
|
||||
// and make a binary a little smaller.
|
||||
case ssa.OpAMD64ADDQconst:
|
||||
asm = x86.AINCQ
|
||||
case ssa.OpAMD64ADDLconst:
|
||||
asm = x86.AINCL
|
||||
case ssa.OpAMD64ADDWconst:
|
||||
case ssa.OpAMD64ADDLconst, ssa.OpAMD64ADDWconst, ssa.OpAMD64ADDBconst:
|
||||
asm = x86.AINCL
|
||||
}
|
||||
p := gc.Prog(asm)
|
||||
@ -444,9 +442,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
|
||||
switch v.Op {
|
||||
case ssa.OpAMD64ADDQconst:
|
||||
asm = x86.ADECQ
|
||||
case ssa.OpAMD64ADDLconst:
|
||||
asm = x86.ADECL
|
||||
case ssa.OpAMD64ADDWconst:
|
||||
case ssa.OpAMD64ADDLconst, ssa.OpAMD64ADDWconst, ssa.OpAMD64ADDBconst:
|
||||
asm = x86.ADECL
|
||||
}
|
||||
p := gc.Prog(asm)
|
||||
|
Loading…
Reference in New Issue
Block a user