Skip to content

Commit d73c362

Browse files
committed
GT-3511 revised fix for branch to self with invalid delay slot
1 parent 92a1c0d commit d73c362

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/disassemble/Disassembler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,12 +1150,12 @@ protected Address processInstruction(PseudoInstruction inst, MemBuffer blockMemB
11501150
throws InsufficientBytesException, UnknownInstructionException,
11511151
AddressOverflowException, NestedDelaySlotException {
11521152

1153+
List<PseudoInstruction> delaySlotList = parseDelaySlots(inst, blockMemBuffer, block);
1154+
11531155
if (followFlow) {
11541156
processInstructionFlows(inst, block);
11551157
}
11561158

1157-
List<PseudoInstruction> delaySlotList = parseDelaySlots(inst, blockMemBuffer, block);
1158-
11591159
block.addInstruction(inst);
11601160

11611161
if (delaySlotList != null) {

Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/disassemble/DisassemblerQueue.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,6 @@ else if (!currentBranchQueue.isEmpty()) {
174174
branchFlow = currentBranchQueue.first();
175175
currentBranchQueue.remove(branchFlow);
176176
}
177-
if (processedBranchFlows.contains(branchFlow)) {
178-
continue;
179-
}
180177
processedBranchFlows.add(branchFlow);
181178

182179
Address blockAddr = branchFlow.getDestinationAddress();

0 commit comments

Comments
 (0)