Commit 1906d93b authored by David Chase's avatar David Chase

cmd/compile: On PPC, nilcheck load should be MOVBZ

There's no load-signed-byte on PPC, so MOVB
causes the assembler to macro-expand in a
useless sign extension.

Fixes #17211.

Change-Id: Ibcd73aea4c94ba6df0a998b0091e45508113be2a
Reviewed-on: https://go-review.googlesource.com/29762
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarMichael Munday <munday@ca.ibm.com>
Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
parent 375092bd
...@@ -813,7 +813,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) { ...@@ -813,7 +813,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
case ssa.OpPPC64LoweredNilCheck: case ssa.OpPPC64LoweredNilCheck:
// Issue a load which will fault if arg is nil. // Issue a load which will fault if arg is nil.
p := gc.Prog(ppc64.AMOVB) p := gc.Prog(ppc64.AMOVBZ)
p.From.Type = obj.TYPE_MEM p.From.Type = obj.TYPE_MEM
p.From.Reg = v.Args[0].Reg() p.From.Reg = v.Args[0].Reg()
gc.AddAux(&p.From, v) gc.AddAux(&p.From, v)
......
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