From c96f03a2507dd8445ee3abe2f81df919c4cc5e58 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 2 Jun 2010 12:58:06 -0500 Subject: ARM: Implement base classes for the saturation instructions. --- src/arch/arm/isa/templates/misc.isa | 51 +++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'src/arch/arm/isa/templates/misc.isa') diff --git a/src/arch/arm/isa/templates/misc.isa b/src/arch/arm/isa/templates/misc.isa index 566d0a8dd..82e9aeab7 100644 --- a/src/arch/arm/isa/templates/misc.isa +++ b/src/arch/arm/isa/templates/misc.isa @@ -119,3 +119,54 @@ def template RevOpConstructor {{ %(constructor)s; } }}; + +def template SatOpDeclare {{ +class %(class_name)s : public %(base_class)s +{ + protected: + public: + // Constructor + %(class_name)s(ExtMachInst machInst, + IntRegIndex _dest, uint32_t _satImm, IntRegIndex _op1); + %(BasicExecDeclare)s +}; +}}; + +def template SatOpConstructor {{ + inline %(class_name)s::%(class_name)s(ExtMachInst machInst, + IntRegIndex _dest, + uint32_t _satImm, + IntRegIndex _op1) + : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, + _dest, _satImm, _op1) + { + %(constructor)s; + } +}}; + +def template SatShiftOpDeclare {{ +class %(class_name)s : public %(base_class)s +{ + protected: + public: + // Constructor + %(class_name)s(ExtMachInst machInst, + IntRegIndex _dest, uint32_t _satImm, IntRegIndex _op1, + int32_t _shiftAmt, ArmShiftType _shiftType); + %(BasicExecDeclare)s +}; +}}; + +def template SatShiftOpConstructor {{ + inline %(class_name)s::%(class_name)s(ExtMachInst machInst, + IntRegIndex _dest, + uint32_t _satImm, + IntRegIndex _op1, + int32_t _shiftAmt, + ArmShiftType _shiftType) + : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, + _dest, _satImm, _op1, _shiftAmt, _shiftType) + { + %(constructor)s; + } +}}; -- cgit v1.2.3