From aa41773f876728cdeb84a3f83f6203b651965104 Mon Sep 17 00:00:00 2001 From: Adrian Cirstea <54354938+ShadowsAdi@users.noreply.github.com> Date: Sun, 10 Mar 2024 03:10:19 +0200 Subject: [PATCH] Update MethodParser.java --- src/main/java/lysis/builder/MethodParser.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/java/lysis/builder/MethodParser.java b/src/main/java/lysis/builder/MethodParser.java index 4d329e2..df69445 100644 --- a/src/main/java/lysis/builder/MethodParser.java +++ b/src/main/java/lysis/builder/MethodParser.java @@ -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; @@ -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; @@ -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);