diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2010-06-02 12:58:03 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2010-06-02 12:58:03 -0500 |
commit | 3430b34cffd2d87c2aa8174547871604cc6d71b2 (patch) | |
tree | 8eb5fe35df883df3cf77ef5794eaebf5c618d0fd /src/arch | |
parent | c7d2f43641b11320c447e31e078e74de1e58121d (diff) | |
download | gem5-3430b34cffd2d87c2aa8174547871604cc6d71b2.tar.xz |
ARM: Add base classes for multiply instructions.
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/arm/insts/mult.hh | 79 | ||||
-rw-r--r-- | src/arch/arm/isa/includes.isa | 13 | ||||
-rw-r--r-- | src/arch/arm/isa_traits.hh | 12 |
3 files changed, 104 insertions, 0 deletions
diff --git a/src/arch/arm/insts/mult.hh b/src/arch/arm/insts/mult.hh new file mode 100644 index 000000000..9548766b1 --- /dev/null +++ b/src/arch/arm/insts/mult.hh @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2010 ARM Limited + * All rights reserved + * + * The license below extends only to copyright in the software and shall + * not be construed as granting a license to any other intellectual + * property including but not limited to intellectual property relating + * to a hardware implementation of the functionality of the software + * licensed hereunder. You may use the software subject to the license + * terms below provided that you ensure that this notice is replicated + * unmodified and in its entirety in all distributions of the software, + * modified or unmodified, in source code or in binary form. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer; + * redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution; + * neither the name of the copyright holders nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Authors: Gabe Black + */ +#ifndef __ARCH_ARM_INSTS_MULT_HH__ +#define __ARCH_ARM_INSTS_MULT_HH__ + +#include "arch/arm/insts/static_inst.hh" +#include "base/trace.hh" + +namespace ArmISA +{ + +/** + * Base class for multipy instructions using three registers. + */ +class Mult3 : public PredOp +{ + protected: + IntRegIndex reg0, reg1, reg2; + + Mult3(const char *mnem, ExtMachInst _machInst, OpClass __opClass, + IntRegIndex _reg0, IntRegIndex _reg1, IntRegIndex _reg2) : + PredOp(mnem, _machInst, __opClass), + reg0(_reg0), reg1(_reg1), reg2(_reg2) + {} +}; + +/** + * Base class for multipy instructions using four registers. + */ +class Mult4 : public Mult3 +{ + protected: + IntRegIndex reg3; + + Mult4(const char *mnem, ExtMachInst _machInst, OpClass __opClass, + IntRegIndex _reg0, IntRegIndex _reg1, + IntRegIndex _reg2, IntRegIndex _reg3) : + Mult3(mnem, _machInst, __opClass, _reg0, _reg1, _reg2), reg3(_reg3) + {} +}; +} + +#endif //__ARCH_ARM_INSTS_MULT_HH__ diff --git a/src/arch/arm/isa/includes.isa b/src/arch/arm/isa/includes.isa index 28b9e704a..4db7279d2 100644 --- a/src/arch/arm/isa/includes.isa +++ b/src/arch/arm/isa/includes.isa @@ -1,5 +1,17 @@ // -*- mode:c++ -*- +// Copyright (c) 2010 ARM Limited +// All rights reserved +// +// The license below extends only to copyright in the software and shall +// not be construed as granting a license to any other intellectual +// property including but not limited to intellectual property relating +// to a hardware implementation of the functionality of the software +// licensed hereunder. You may use the software subject to the license +// terms below provided that you ensure that this notice is replicated +// unmodified and in its entirety in all distributions of the software, +// modified or unmodified, in source code or in binary form. +// // Copyright (c) 2007-2008 The Florida State University // All rights reserved. // @@ -41,6 +53,7 @@ output header {{ #include "arch/arm/insts/branch.hh" #include "arch/arm/insts/macromem.hh" #include "arch/arm/insts/mem.hh" +#include "arch/arm/insts/mult.hh" #include "arch/arm/insts/pred_inst.hh" #include "arch/arm/insts/static_inst.hh" #include "arch/arm/isa_traits.hh" diff --git a/src/arch/arm/isa_traits.hh b/src/arch/arm/isa_traits.hh index 59eaeaa5c..00c4c2932 100644 --- a/src/arch/arm/isa_traits.hh +++ b/src/arch/arm/isa_traits.hh @@ -1,4 +1,16 @@ /* + * Copyright (c) 2010 ARM Limited + * All rights reserved + * + * The license below extends only to copyright in the software and shall + * not be construed as granting a license to any other intellectual + * property including but not limited to intellectual property relating + * to a hardware implementation of the functionality of the software + * licensed hereunder. You may use the software subject to the license + * terms below provided that you ensure that this notice is replicated + * unmodified and in its entirety in all distributions of the software, + * modified or unmodified, in source code or in binary form. + * * Copyright (c) 2003-2005 The Regents of The University of Michigan * Copyright (c) 2007-2008 The Florida State University * All rights reserved. |