GP-0: Fix tests since GP-5980

This commit is contained in:
Dan
2025-12-18 14:11:46 +00:00
parent 0a94a47efb
commit 2a4c35ce96

View File

@@ -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