Skip to content

Commit

Permalink
Post-merge fixes and SSA regen.
Browse files Browse the repository at this point in the history
  • Loading branch information
4a6f656c committed Oct 15, 2019
1 parent 21b7a24 commit 5e78c0d
Show file tree
Hide file tree
Showing 7 changed files with 320 additions and 587 deletions.
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/riscv64/ssa.go
Expand Up @@ -497,7 +497,7 @@ func ssaGenBlock(s *gc.SSAGenState, b, next *ssa.Block) {
s.Br(obj.AJMP, b.Succs[0].Block())
}
}
p.Reg = b.Control.Reg()
p.Reg = b.Controls[0].Reg()
p.From.Type = obj.TYPE_REG
p.From.Reg = riscv.REG_ZERO

Expand Down
4 changes: 2 additions & 2 deletions src/cmd/compile/internal/ssa/gen/RISCV64Ops.go
Expand Up @@ -20,7 +20,7 @@ func init() {
addreg := func(r int, name string) regMask {
mask := regMask(1) << uint(len(regNamesRISCV64))
if name == "" {
name = riscv.RegNames[int16(r)]
name = riscv.RegName(r)
}
regNamesRISCV64 = append(regNamesRISCV64, name)
regNamed[name] = mask
Expand Down Expand Up @@ -286,7 +286,7 @@ func init() {
}

RISCV64blocks := []blockData{
{name: "BNE"}, // Control != 0 (take a register)
{name: "BNE", controls: 1}, // Control != 0 (take a register)
}

archs = append(archs, arch{
Expand Down
591 changes: 283 additions & 308 deletions src/cmd/compile/internal/ssa/opGen.go

Large diffs are not rendered by default.

0 comments on commit 5e78c0d

Please sign in to comment.