mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
More efficient overlay check in PcodeEmit
This commit is contained in:
parent
bf4a17b67d
commit
40c54939c6
1 changed files with 13 additions and 14 deletions
|
@ -63,7 +63,6 @@ public abstract class PcodeEmit {
|
|||
private long uniquemask;
|
||||
private long uniqueoffset;
|
||||
private AddressSpace overlayspace = null;
|
||||
private AddressSpace overlayedspace = null;
|
||||
|
||||
/**
|
||||
* Pcode emitter constructor for empty or unimiplemented instructions
|
||||
|
@ -89,8 +88,8 @@ public abstract class PcodeEmit {
|
|||
AddressSpace myspace = startAddress.getAddressSpace();
|
||||
if (myspace.isOverlaySpace()) {
|
||||
overlayspace = myspace;
|
||||
overlayedspace = ((OverlayAddressSpace) myspace).getOverlayedSpace();
|
||||
startAddress = overlayedspace.getAddress(startAddress.getOffset());
|
||||
startAddress = ((OverlayAddressSpace) myspace).getOverlayedSpace().getAddress(
|
||||
startAddress.getOffset());
|
||||
}
|
||||
this.fallOffset = fallOffset;
|
||||
this.uniqueFactory = uniqueFactory;
|
||||
|
@ -730,6 +729,7 @@ public abstract class PcodeEmit {
|
|||
}
|
||||
|
||||
void checkOverlays(int opcode, VarnodeData[] in, int isize, VarnodeData out) {
|
||||
if (overlayspace != null) {
|
||||
if (uniqueFactory == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -741,7 +741,6 @@ public abstract class PcodeEmit {
|
|||
in[0].offset = space.getBaseSpaceID();
|
||||
}
|
||||
}
|
||||
if (overlayspace != null) {
|
||||
for (int i = 0; i < isize; ++i) {
|
||||
VarnodeData v = in[0];
|
||||
if (v.space.equals(overlayspace)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue