diff options
| author | Cliff Click <cliffc@acm.org> | 2025-04-07 14:50:30 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2025-04-07 14:50:30 -0700 |
| commit | b7603e71510b4d0e82681b9639a56cc77bab40d6 (patch) | |
| tree | 7caea8192b7c83d7ff8cff4609321493a005f0ea /chapter21/src/main/java | |
| parent | 840bfd14b3658f49429cbf84fbc39980477d5f6e (diff) | |
| download | Simple-b7603e71510b4d0e82681b9639a56cc77bab40d6.tar.gz Simple-b7603e71510b4d0e82681b9639a56cc77bab40d6.zip | |
Update Encoding.java
Diffstat (limited to 'chapter21/src/main/java')
| -rw-r--r-- | chapter21/src/main/java/com/seaofnodes/simple/codegen/Encoding.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/chapter21/src/main/java/com/seaofnodes/simple/codegen/Encoding.java b/chapter21/src/main/java/com/seaofnodes/simple/codegen/Encoding.java index 679329f7..10d70a4f 100644 --- a/chapter21/src/main/java/com/seaofnodes/simple/codegen/Encoding.java +++ b/chapter21/src/main/java/com/seaofnodes/simple/codegen/Encoding.java @@ -337,11 +337,10 @@ public class Encoding { slide += (newStart+15 & -16)-newStart; } _opStart[bb._nid] += slide; - for( Node n : bb._outputs ) { - if( n instanceof MachNode && !(n instanceof CFGNode) ) { + // Slide down all other (non-CFG) ops in the block + for( Node n : bb._outputs ) + if( n instanceof MachNode && !(n instanceof CFGNode) ) _opStart[n._nid] += slide; - } - } if( bb instanceof RIPRelSize riprel ) { CFGNode target = ((CFGNode)bb.out(0)).uctrlSkipEmpty(); // Delta is from opStart to opStart. X86 at least counts |
