Skip to content

Commit 0cca165

Browse files
committed
Formatting
1 parent 6955bf3 commit 0cca165

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

objdiff-core/src/arch/ppc/flow_analysis.rs

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,10 @@ fn generate_flow_analysis_result(
546546
// subsequent if statement.
547547
if let (ppc750cl::Opcode::Lfs | ppc750cl::Opcode::Lfd, Some(reloc)) = (ins.op, reloc) {
548548
let content = get_register_content_from_reloc(reloc, obj, ins.op);
549-
if matches!(content, RegisterContent::FloatConstant(_) | RegisterContent::DoubleConstant(_)) {
549+
if matches!(
550+
content,
551+
RegisterContent::FloatConstant(_) | RegisterContent::DoubleConstant(_)
552+
) {
550553
analysis_result.set_argument_value_at_address(
551554
ins_address,
552555
1,
@@ -594,21 +597,23 @@ fn generate_flow_analysis_result(
594597
_ => None,
595598
};
596599
let analysis_value = match content {
597-
Some(RegisterContent::Symbol(s)) => if reloc.is_none() {
598-
// Only symbols if there isn't already a relocation, because
599-
// code other than the data flow analysis will be showing
600-
// the symbol for a relocation on the line it is for. If we
601-
// also showed it as data flow analysis value we would be
602-
// showing redundant information.
603-
obj.symbols.get(s).map(|sym| {
604-
FlowAnalysisValue::Text(clamp_text_length(
605-
sym.demangled_name.as_ref().unwrap_or(&sym.name).clone(),
606-
20,
607-
))
608-
})
609-
} else {
610-
None
611-
},
600+
Some(RegisterContent::Symbol(s)) => {
601+
if reloc.is_none() {
602+
// Only symbols if there isn't already a relocation, because
603+
// code other than the data flow analysis will be showing
604+
// the symbol for a relocation on the line it is for. If we
605+
// also showed it as data flow analysis value we would be
606+
// showing redundant information.
607+
obj.symbols.get(s).map(|sym| {
608+
FlowAnalysisValue::Text(clamp_text_length(
609+
sym.demangled_name.as_ref().unwrap_or(&sym.name).clone(),
610+
20,
611+
))
612+
})
613+
} else {
614+
None
615+
}
616+
}
612617
Some(RegisterContent::InputRegister(reg)) => {
613618
let reg_name = match arg {
614619
Argument::GPR(_) => format!("input_r{reg}"),

0 commit comments

Comments
 (0)