diff --git a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/stack/DebuggerStackPanel.java b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/stack/DebuggerStackPanel.java index 85473683ec..8689cb576d 100644 --- a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/stack/DebuggerStackPanel.java +++ b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/stack/DebuggerStackPanel.java @@ -73,6 +73,9 @@ public class DebuggerStackPanel extends AbstractObjectsTableBasedPanelgetIn(0)->getTypeReadFacing(op); Datatype *curtype = op->getIn(0)->getHighTypeReadFacing(op); - return castStrategy->castStandard(reqtype,curtype,false,false); + if (reqtype->getMetatype() != TYPE_PTR) return reqtype; + if (curtype->getMetatype() != TYPE_PTR) return reqtype; + Datatype *reqbase = ((TypePointer *)reqtype)->getPtrTo(); // Go down exactly one level + Datatype *curbase = ((TypePointer *)curtype)->getPtrTo(); + if (reqbase->getAlignSize() == curbase->getAlignSize()) + return (Datatype *)0; + return reqtype; } return TypeOp::getInputCast(op,slot,castStrategy); } @@ -2318,7 +2324,24 @@ Datatype *TypeOpPtrsub::getInputCast(const PcodeOp *op,int4 slot,const CastStrat // not the (possibly different) type of the HIGH Datatype *reqtype = op->getIn(0)->getTypeReadFacing(op); Datatype *curtype = op->getIn(0)->getHighTypeReadFacing(op); - return castStrategy->castStandard(reqtype,curtype,false,false); + if (curtype == reqtype) + return (Datatype *)0; + if (reqtype->getMetatype() != TYPE_PTR) return reqtype; + if (curtype->getMetatype() != TYPE_PTR) return reqtype; + Datatype *reqbase = ((TypePointer *)reqtype)->getPtrTo(); // Go down exactly one level + Datatype *curbase = ((TypePointer *)curtype)->getPtrTo(); + if (curbase->getMetatype() == TYPE_ARRAY && reqbase->getMetatype() == TYPE_ARRAY) { + curbase = ((TypeArray *)curbase)->getBase(); + reqbase = ((TypeArray *)reqbase)->getBase(); + } + while(reqbase->getTypedef() != (Datatype *)0) + reqbase = reqbase->getTypedef(); + while(curbase->getTypedef() != (Datatype *)0) + curbase = curbase->getTypedef(); + + if (curbase == reqbase) + return (Datatype *)0; + return reqtype; } return TypeOp::getInputCast(op,slot,castStrategy); } diff --git a/Ghidra/Processors/AARCH64/data/languages/AARCH64neon.sinc b/Ghidra/Processors/AARCH64/data/languages/AARCH64neon.sinc index af8ccb222d..4ff3386c3c 100644 --- a/Ghidra/Processors/AARCH64/data/languages/AARCH64neon.sinc +++ b/Ghidra/Processors/AARCH64/data/languages/AARCH64neon.sinc @@ -16042,7 +16042,7 @@ is b_2431=0b01011110 & b_2223=0b00 & b_2121=0 & Rm_VPR128.4S & b_1015=0b000000 & :sha1h Rd_FPR32, Rn_FPR32 is b_2431=0b01011110 & b_2223=0b00 & b_1721=0b10100 & b_1216=0b00000 & b_1011=0b10 & Rn_FPR32 & Rd_FPR32 & Zd { - Rd_FPR32 = Rn_FPR32 << 30:1; + Rd_FPR32 = Rn_FPR32 << 30:1 | (Rn_FPR32 >> 2:1); zext_zs(Zd); # zero upper 28 bytes of Zd }