mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
GP-5240 Simplify late expressions where a SUBPIECE is taken of a PIECE
This commit is contained in:
parent
acf5ac688a
commit
53d8d182e3
15 changed files with 215 additions and 88 deletions
|
@ -353,6 +353,24 @@ public:
|
|||
virtual int4 applyOp(PcodeOp *op,Funcdata &data);
|
||||
};
|
||||
|
||||
/// \brief Simplify join and break apart based on data-types
|
||||
///
|
||||
/// Simplify expressions like:
|
||||
/// - `sub( concat(V,W), 0) => W`
|
||||
/// - `sub( concat(V,W), c) => V`
|
||||
///
|
||||
/// preserving the data-types and removing the SUBPIECE and PIECE operations that are discarded.
|
||||
class RuleDumptyHumpLate : public Rule {
|
||||
public:
|
||||
RuleDumptyHumpLate(const string &g) : Rule( g, 0, "dumptyhumplate") {} ///< Constructor
|
||||
virtual Rule *clone(const ActionGroupList &grouplist) const {
|
||||
if (!grouplist.contains(getGroup())) return (Rule *)0;
|
||||
return new RuleDumptyHumpLate(getGroup());
|
||||
}
|
||||
virtual void getOpList(vector<uint4> &oplist) const;
|
||||
virtual int4 applyOp(PcodeOp *op,Funcdata &data);
|
||||
};
|
||||
|
||||
/// \brief Class for tracing changes of precision in floating point variables
|
||||
///
|
||||
/// It follows the flow of a logical lower precision value stored in higher precision locations
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue