diff options
Diffstat (limited to 'chapter21/src/main/java/com')
| -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 |
