mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-14 23:04:57 +00:00
Only removing intermediates that contain lo/hi operator.
This commit is contained in:
parent
ed2d992333
commit
20cce60f40
@ -43,13 +43,14 @@ public class Pass1FixLValuesLoHi extends Pass1Base {
|
||||
StatementLValue statementLValue = (StatementLValue) statement;
|
||||
LvalueIntermediate intermediate = (LvalueIntermediate) statementLValue.getlValue();
|
||||
StatementAssignment intermediateAssignment = getProgram().getGraph().getAssignment(intermediate.getVariable());
|
||||
intermediates.add(intermediate.getVariable());
|
||||
if(Operators.LOWBYTE.equals(intermediateAssignment.getOperator()) && intermediateAssignment.getrValue1() == null) {
|
||||
// Found assignment to an intermediate low byte lValue <x = ...
|
||||
fixLoHiLValue(programScope, statementsIt, statementLValue, intermediate, intermediateAssignment, Operators.SET_LOWBYTE);
|
||||
intermediates.add(intermediate.getVariable());
|
||||
} else if(Operators.HIBYTE.equals(intermediateAssignment.getOperator()) && intermediateAssignment.getrValue1() == null) {
|
||||
// Found assignment to an intermediate low byte lValue >x = ...
|
||||
fixLoHiLValue(programScope, statementsIt, statementLValue, intermediate, intermediateAssignment, Operators.SET_HIBYTE);
|
||||
intermediates.add(intermediate.getVariable());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user