Skip to content

Commit ecfcf56

Browse files
committed
call evaluateInstruction only when target=RISCV
1 parent d19be54 commit ecfcf56

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/tools/llvm-objdump/llvm-objdump.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2322,9 +2322,9 @@ disassembleObject(ObjectFile &Obj, const ObjectFile &DbgObj,
23222322
if (Disassembled && DT->InstrAnalysis) {
23232323
llvm::raw_ostream *TargetOS = &FOS;
23242324
uint64_t Target;
2325-
bool PrintTarget = DT->InstrAnalysis->evaluateBranch(Inst, SectionAddr + Index, Size, Target) ||
2326-
DT->InstrAnalysis->evaluateInstruction(Inst, SectionAddr + Index, Size, Target);
2327-
2325+
bool PrintTarget = DT->InstrAnalysis->evaluateBranch(Inst, SectionAddr + Index, Size, Target);
2326+
if (DT->SubtargetInfo->getTargetTriple().isRISCV())
2327+
PrintTarget = DT->InstrAnalysis->evaluateInstruction(Inst, SectionAddr + Index, Size, Target);
23282328
if (!PrintTarget) {
23292329
if (std::optional<uint64_t> MaybeTarget =
23302330
DT->InstrAnalysis->evaluateMemoryOperandAddress(

0 commit comments

Comments
 (0)