MCPcopy Index your code
hub / github.com/encounter/objdiff / instruction_hover

Method instruction_hover

objdiff-core/src/arch/ppc/mod.rs:411–437  ·  view source on GitHub ↗
(&self, _obj: &Object, resolved: ResolvedInstructionRef)

Source from the content-addressed store, hash-verified

409 }
410
411 fn instruction_hover(&self, _obj: &Object, resolved: ResolvedInstructionRef) -> Vec<HoverItem> {
412 let Ok(ins) = self.parse_ins_ref(resolved) else {
413 return Vec::new();
414 };
415 let orig = ins.basic().to_string();
416 let simplified = ins.simplified().to_string();
417 let show_orig = orig != simplified;
418 let rlwinm_decoded = rlwinmdec::decode(&orig);
419 let mut out = Vec::with_capacity(2);
420 if show_orig {
421 out.push(HoverItem::Text {
422 label: "Original".into(),
423 value: orig,
424 color: HoverItemColor::Normal,
425 });
426 }
427 if let Some(decoded) = rlwinm_decoded {
428 for line in decoded.lines() {
429 out.push(HoverItem::Text {
430 label: Default::default(),
431 value: line.to_string(),
432 color: HoverItemColor::Special,
433 });
434 }
435 }
436 out
437 }
438
439 fn instruction_context(
440 &self,

Callers 1

instruction_hoverFunction · 0.45

Calls 3

basicMethod · 0.80
pushMethod · 0.80
parse_ins_refMethod · 0.45

Tested by

no test coverage detected