Merge remote-tracking branch 'origin/GP-3269_UnneededSubpieceCast'

This commit is contained in:
Ryan Kurtz 2023-03-31 06:12:56 -04:00
commit 3bbcc56886
2 changed files with 14 additions and 2 deletions

View File

@ -1899,6 +1899,12 @@ string TypeOpPiece::getOperatorName(const PcodeOp *op) const
return s.str();
}
Datatype *TypeOpPiece::getInputCast(const PcodeOp *op,int4 slot,const CastStrategy *castStrategy) const
{
return (Datatype *)0; // Never need a cast into a PIECE
}
Datatype *TypeOpPiece::getOutputToken(const PcodeOp *op,CastStrategy *castStrategy) const
{
@ -1926,6 +1932,12 @@ string TypeOpSubpiece::getOperatorName(const PcodeOp *op) const
return s.str();
}
Datatype *TypeOpSubpiece::getInputCast(const PcodeOp *op,int4 slot,const CastStrategy *castStrategy) const
{
return (Datatype *)0; // Never need a cast into a SUBPIECE
}
Datatype *TypeOpSubpiece::getOutputToken(const PcodeOp *op,CastStrategy *castStrategy) const
{

View File

@ -733,6 +733,7 @@ public:
class TypeOpPiece : public TypeOpFunc {
public:
TypeOpPiece(TypeFactory *t); ///< Constructor
virtual Datatype *getInputCast(const PcodeOp *op,int4 slot,const CastStrategy *castStrategy) const;
virtual Datatype *getOutputToken(const PcodeOp *op,CastStrategy *castStrategy) const;
virtual string getOperatorName(const PcodeOp *op) const;
virtual void push(PrintLanguage *lng,const PcodeOp *op,const PcodeOp *readOp) const { lng->opPiece(op); }
@ -742,8 +743,7 @@ public:
class TypeOpSubpiece : public TypeOpFunc {
public:
TypeOpSubpiece(TypeFactory *t); ///< Constructor
// virtual Datatype *getOutputLocal(const PcodeOp *op) const;
// virtual Datatype *getInputLocal(const PcodeOp *op,int4 slot) const;
virtual Datatype *getInputCast(const PcodeOp *op,int4 slot,const CastStrategy *castStrategy) const;
virtual Datatype *getOutputToken(const PcodeOp *op,CastStrategy *castStrategy) const;
virtual Datatype *propagateType(Datatype *alttype,PcodeOp *op,Varnode *invn,Varnode *outvn,
int4 inslot,int4 outslot);