From 2a4c35ce96d4732b8fe4c9e12fd789c37b6d7632 Mon Sep 17 00:00:00 2001 From: Dan <46821332+nsadeveloper789@users.noreply.github.com> Date: Thu, 18 Dec 2025 14:11:46 +0000 Subject: [PATCH] GP-0: Fix tests since GP-5980 --- .../pcode/emu/jit/analysis/JitAllocationModelTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/pcode/emu/jit/analysis/JitAllocationModelTest.java b/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/pcode/emu/jit/analysis/JitAllocationModelTest.java index 6149c02f16..1b8bf9a571 100644 --- a/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/pcode/emu/jit/analysis/JitAllocationModelTest.java +++ b/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/pcode/emu/jit/analysis/JitAllocationModelTest.java @@ -22,6 +22,7 @@ import java.util.List; import java.util.stream.Stream; import org.junit.Test; +import org.objectweb.asm.ClassWriter; import generic.Unique; import ghidra.app.plugin.processors.sleigh.SleighLanguage; @@ -29,6 +30,7 @@ import ghidra.app.plugin.processors.sleigh.SleighLanguageHelper; import ghidra.pcode.emu.jit.AbstractJitTest; import ghidra.pcode.emu.jit.alloc.AlignedMpIntHandler; import ghidra.pcode.emu.jit.analysis.JitType.DoubleJitType; +import ghidra.pcode.emu.jit.gen.util.Emitter; import ghidra.pcode.emu.jit.var.JitVar; import ghidra.pcode.emu.jit.var.JitVarnodeVar; import ghidra.pcode.exec.*; @@ -66,6 +68,10 @@ public class JitAllocationModelTest extends AbstractJitTest { JitVarnodeVar tempVar = Unique.assertOne(varnodeVars(dfm) .filter(v -> v.varnode().isUnique())); + ClassWriter cw = new ClassWriter(0); + Emitter em = Emitter.start(cw.visitMethod(0, "none", "()V", null, null)); + am.allocate(em.rootScope()); + if (!(am.getHandler(tempVar) instanceof AlignedMpIntHandler handler)) { throw new AssertionFailedError(); } @@ -100,6 +106,10 @@ public class JitAllocationModelTest extends AbstractJitTest { .sorted(Comparator.comparing(JitVar::id)) .toList(); + ClassWriter cw = new ClassWriter(0); + Emitter em = Emitter.start(cw.visitMethod(0, "none", "()V", null, null)); + am.allocate(em.rootScope()); + /** * NOTE: Variables are coalesced by varnode, so all of these will receive the same handler, * and so will all have the same type. There being two float ops will cause the type and