summaryrefslogtreecommitdiff
path: root/chapter21/src/main/java/com
diff options
context:
space:
mode:
authorCliff Click <cliffc@acm.org>2025-05-08 14:44:38 -0700
committerCliff Click <cliffc@acm.org>2025-05-08 14:44:38 -0700
commit30c60eeea76687bcf267937e50cc0cc944f420c1 (patch)
tree1e786ac2b006c85063c26603639903bc121b3732 /chapter21/src/main/java/com
parentf1c1c070f0491cba8b18f3169e72e9a1df8f1a2a (diff)
downloadSimple-30c60eeea76687bcf267937e50cc0cc944f420c1.tar.gz
Simple-30c60eeea76687bcf267937e50cc0cc944f420c1.zip
Missed updates from ch21 forward ported to ch22
Diffstat (limited to 'chapter21/src/main/java/com')
-rw-r--r--chapter21/src/main/java/com/seaofnodes/simple/codegen/RegAlloc.java2
-rw-r--r--chapter21/src/main/java/com/seaofnodes/simple/node/cpus/riscv/CallRISC.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/chapter21/src/main/java/com/seaofnodes/simple/codegen/RegAlloc.java b/chapter21/src/main/java/com/seaofnodes/simple/codegen/RegAlloc.java
index 3a99c097..bd4cbf35 100644
--- a/chapter21/src/main/java/com/seaofnodes/simple/codegen/RegAlloc.java
+++ b/chapter21/src/main/java/com/seaofnodes/simple/codegen/RegAlloc.java
@@ -288,7 +288,7 @@ public class RegAlloc {
// all registers anyways.
if( rclass._len <= 1 || ncalls > 1 ) return false;
- // Split by classh
+ // Split by class
Ary<Node> ns = new Ary<>(Node.class);
for( RegMask rmask : rclass ) {
ns.addAll(def._outputs);
diff --git a/chapter21/src/main/java/com/seaofnodes/simple/node/cpus/riscv/CallRISC.java b/chapter21/src/main/java/com/seaofnodes/simple/node/cpus/riscv/CallRISC.java
index ae9cdcd9..7a0f3313 100644
--- a/chapter21/src/main/java/com/seaofnodes/simple/node/cpus/riscv/CallRISC.java
+++ b/chapter21/src/main/java/com/seaofnodes/simple/node/cpus/riscv/CallRISC.java
@@ -21,7 +21,7 @@ public class CallRISC extends CallNode implements MachNode, RIPRelSize {
@Override public RegMask regmap(int i) {
return riscv.callInMask(_tfp,i,fun()._maxArgSlot);
}
- @Override public RegMask outregmap() { return null; }
+ @Override public RegMask outregmap() { return riscv.RPC_MASK; }
@Override public String name() { return _name; }
@Override public TypeFunPtr tfp() { return _tfp; }