Skip to content

Commit

Permalink
Update MethodParser.java
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowsAdi committed Mar 10, 2024
1 parent f842953 commit aa41773
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/main/java/lysis/builder/MethodParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
import lysis.instructions.LZeroGlobal;
import lysis.instructions.LZeroLocal;
import lysis.instructions.SwitchCase;
import lysis.instructions.LAlign;
import lysis.lstructure.Function;
import lysis.lstructure.LBlock;
import lysis.lstructure.LGraph;
Expand Down Expand Up @@ -227,6 +228,13 @@ private LInstruction readInstruction(SPOpcode op) throws Exception {
case idxaddr_b:
return new LIndexAddress(readInt32());

case align_pri:
case align_alt:
{
Register reg = (op == SPOpcode.addr_pri) ? Register.Pri : Register.Alt;
return new LAlign(reg);
}

case move_pri:
case move_alt: {
Register reg = (op == SPOpcode.move_pri) ? Register.Pri : Register.Alt;
Expand Down Expand Up @@ -684,13 +692,6 @@ private LInstruction readInstruction(SPOpcode op) throws Exception {
pc_ += num - 8; // skip dbgname
return new LDebugBreak();
}

case align_pri:
case align_alt:
{
Register reg = (op == SPOpcode.addr_pri) ? Register.Pri : Register.Alt;
return new LStackAddress(trackStack(readInt32()), reg);
}

default:
throw new Exception("Unrecognized opcode: " + op);
Expand Down

0 comments on commit aa41773

Please sign in to comment.