From e1526e4e8bdb8729c4a04856529acd6b7c95f901 Mon Sep 17 00:00:00 2001 From: Nalen98 Date: Fri, 16 Dec 2022 00:02:25 +0300 Subject: [PATCH] Fix overlapping related register values --- src/main/java/ghidraemu/RegisterProvider.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/main/java/ghidraemu/RegisterProvider.java b/src/main/java/ghidraemu/RegisterProvider.java index 38c8201..ffafc96 100644 --- a/src/main/java/ghidraemu/RegisterProvider.java +++ b/src/main/java/ghidraemu/RegisterProvider.java @@ -70,15 +70,18 @@ public boolean isCellEditable(int row, int column) { }; regList = new ArrayList <> (); programRegisters = program.getProgramContext().getRegisters(); - + String processorName = program.getLanguage().getProcessor().toString(); + Boolean isV850 = processorName.equalsIgnoreCase("V850"); for (Register reg: programRegisters) { if (!reg.isHidden()) { - if (reg.isProgramCounter()) { - PC = reg.getName(); - regList.add(0, reg.getName()); - continue; - } - regList.add(reg.getName()); + if (isV850 || (!isV850 && reg.isBaseRegister())) { + if (reg.isProgramCounter()) { + PC = reg.getName(); + regList.add(0, reg.getName()); + continue; + } + regList.add(reg.getName()); + } } } regsVals = new ArrayList ();