mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-01-07 21:24:00 -05:00
GP-0: Fix tests since GP-5980
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user