From ec01d8f74bf60c0fe52335bf8bcf475e3653822d Mon Sep 17 00:00:00 2001 From: Leon Klingele Date: Sun, 3 Mar 2019 16:42:08 +0000 Subject: [PATCH] cmd/internal/obj/mips: use r instead of p.Reg in call to OP_IRR Change-Id: Id77764ed2d693e632e2a7b4e4638c17e0caf2276 GitHub-Last-Rev: 9ebe28252086ddcd530905eb9cf50b4a66413291 GitHub-Pull-Request: golang/go#30003 Reviewed-on: https://go-review.googlesource.com/c/160427 Reviewed-by: Cherry Zhang Run-TryBot: Cherry Zhang TryBot-Result: Gobot Gobot --- src/cmd/internal/obj/mips/asm0.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/internal/obj/mips/asm0.go b/src/cmd/internal/obj/mips/asm0.go index e4004be98d7..458e071e476 100644 --- a/src/cmd/internal/obj/mips/asm0.go +++ b/src/cmd/internal/obj/mips/asm0.go @@ -1275,7 +1275,7 @@ func (c *ctxt0) asmout(p *obj.Prog, o *Optab, out []uint32) { r = REGZERO } /* only use 10 bits of trap code */ - o1 = OP_IRR(c.opirr(p.As), (uint32(v)&0x3FF)<<6, uint32(p.Reg), uint32(p.To.Reg)) + o1 = OP_IRR(c.opirr(p.As), (uint32(v)&0x3FF)<<6, uint32(r), uint32(p.To.Reg)) case 16: /* sll $c,[r1],r2 */ v := c.regoff(&p.From)