Skip to content

Commit 046b06a

Browse files
committed
refactor: cmd/internal/obj/riscv: Zawrs assembly (#62)
1 parent db1758c commit 046b06a

File tree

1 file changed

+1
-6
lines changed
  • src/cmd/internal/obj/riscv

1 file changed

+1
-6
lines changed

src/cmd/internal/obj/riscv/obj.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3615,12 +3615,7 @@ func instructionsForProg(p *obj.Prog) []*instruction {
36153615
ins.rd, ins.rs1, ins.rs2 = uint32(p.RegTo2), uint32(p.To.Reg), uint32(p.From.Reg)
36163616

36173617
case AWRSNTO, AWRSSTO:
3618-
ins.rd, ins.rs1 = REG_ZERO, REG_ZERO
3619-
if ins.as == AWRSNTO {
3620-
ins.imm = 0x0d
3621-
} else {
3622-
ins.imm = 0x1d
3623-
}
3618+
ins.rd, ins.rs1, ins.imm = REG_ZERO, REG_ZERO, encode(p.As).csr
36243619

36253620
case AECALL, AEBREAK:
36263621
insEnc := encode(p.As)

0 commit comments

Comments
 (0)