From: Joel Sing Date: Wed, 22 Jan 2020 16:33:54 +0000 (+1100) Subject: cmd/internal/obj/riscv: add missing instructions to the ternary expansion list X-Git-Tag: go1.14rc1~82 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=fa610c776e4bc659211b65a2dfbc74051ef99159;p=gostls13.git cmd/internal/obj/riscv: add missing instructions to the ternary expansion list Updates #27532 Change-Id: I5beb7941c204755948350b181c713b046bc4f1f1 Reviewed-on: https://go-review.googlesource.com/c/go/+/215841 Reviewed-by: Cherry Zhang Run-TryBot: Cherry Zhang TryBot-Result: Gobot Gobot --- diff --git a/src/cmd/internal/obj/riscv/obj.go b/src/cmd/internal/obj/riscv/obj.go index 53cd860e56..520158119e 100644 --- a/src/cmd/internal/obj/riscv/obj.go +++ b/src/cmd/internal/obj/riscv/obj.go @@ -91,7 +91,9 @@ func progedit(ctxt *obj.Link, p *obj.Prog, newprog obj.ProgAlloc) { if p.Reg == 0 { switch p.As { case AADDI, ASLTI, ASLTIU, AANDI, AORI, AXORI, ASLLI, ASRLI, ASRAI, - AADD, AAND, AOR, AXOR, ASLL, ASRL, ASUB, ASRA: + AADD, AAND, AOR, AXOR, ASLL, ASRL, ASUB, ASRA, + AMUL, AMULH, AMULHU, AMULHSU, AMULW, ADIV, ADIVU, ADIVW, ADIVUW, + AREM, AREMU, AREMW, AREMUW: p.Reg = p.To.Reg } }