condition.hh revision 12616
16019Shines@cs.fsu.edu/*
26019Shines@cs.fsu.edu * Copyright (c) 2009 The University of Edinburgh
37101Sgblack@eecs.umich.edu * All rights reserved.
47101Sgblack@eecs.umich.edu *
57101Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without
67101Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions are
77101Sgblack@eecs.umich.edu * met: redistributions of source code must retain the above copyright
87101Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer;
97101Sgblack@eecs.umich.edu * redistributions in binary form must reproduce the above copyright
107101Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the
117101Sgblack@eecs.umich.edu * documentation and/or other materials provided with the distribution;
127101Sgblack@eecs.umich.edu * neither the name of the copyright holders nor the names of its
137101Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from
147101Sgblack@eecs.umich.edu * this software without specific prior written permission.
156019Shines@cs.fsu.edu *
166019Shines@cs.fsu.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
176019Shines@cs.fsu.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
186019Shines@cs.fsu.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
196019Shines@cs.fsu.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
206019Shines@cs.fsu.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
216019Shines@cs.fsu.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
226019Shines@cs.fsu.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
236019Shines@cs.fsu.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
246019Shines@cs.fsu.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
256019Shines@cs.fsu.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
266019Shines@cs.fsu.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
276019Shines@cs.fsu.edu *
286019Shines@cs.fsu.edu * Authors: Timothy M. Jones
296019Shines@cs.fsu.edu */
306019Shines@cs.fsu.edu
316019Shines@cs.fsu.edu#ifndef __ARCH_POWER_INSTS_CONDITION_HH__
326019Shines@cs.fsu.edu#define __ARCH_POWER_INSTS_CONDITION_HH__
336019Shines@cs.fsu.edu
346019Shines@cs.fsu.edu#include "arch/power/insts/static_inst.hh"
356019Shines@cs.fsu.edu#include "base/cprintf.hh"
366019Shines@cs.fsu.edu
376019Shines@cs.fsu.edunamespace PowerISA
386019Shines@cs.fsu.edu{
396019Shines@cs.fsu.edu
406019Shines@cs.fsu.edu/**
416019Shines@cs.fsu.edu * Class for condition register logical operations.
426019Shines@cs.fsu.edu */
436019Shines@cs.fsu.educlass CondLogicOp : public PowerStaticInst
446019Shines@cs.fsu.edu{
456019Shines@cs.fsu.edu  protected:
466019Shines@cs.fsu.edu
476019Shines@cs.fsu.edu    uint32_t ba;
486019Shines@cs.fsu.edu    uint32_t bb;
496268Sgblack@eecs.umich.edu    uint32_t bt;
506251Sgblack@eecs.umich.edu
516269Sgblack@eecs.umich.edu    /// Constructor
526269Sgblack@eecs.umich.edu    CondLogicOp(const char *mnem, MachInst _machInst, OpClass __opClass)
536749Sgblack@eecs.umich.edu      : PowerStaticInst(mnem, _machInst, __opClass),
547105Sgblack@eecs.umich.edu        ba(machInst.ba),
556251Sgblack@eecs.umich.edu        bb(machInst.bb),
566251Sgblack@eecs.umich.edu        bt(machInst.bt)
576251Sgblack@eecs.umich.edu    {
587105Sgblack@eecs.umich.edu    }
597105Sgblack@eecs.umich.edu
607105Sgblack@eecs.umich.edu    std::string generateDisassembly(
617105Sgblack@eecs.umich.edu            Addr pc, const SymbolTable *symtab) const override;
626251Sgblack@eecs.umich.edu};
637105Sgblack@eecs.umich.edu
646268Sgblack@eecs.umich.edu/**
656759SAli.Saidi@ARM.com * Class for condition register move operations.
666251Sgblack@eecs.umich.edu */
677105Sgblack@eecs.umich.educlass CondMoveOp : public PowerStaticInst
686251Sgblack@eecs.umich.edu{
696019Shines@cs.fsu.edu  protected:
706267Sgblack@eecs.umich.edu
716267Sgblack@eecs.umich.edu    uint32_t bf;
726267Sgblack@eecs.umich.edu    uint32_t bfa;
737101Sgblack@eecs.umich.edu
747101Sgblack@eecs.umich.edu    /// Constructor
757101Sgblack@eecs.umich.edu    CondMoveOp(const char *mnem, MachInst _machInst, OpClass __opClass)
766019Shines@cs.fsu.edu      : PowerStaticInst(mnem, _machInst, __opClass),
776251Sgblack@eecs.umich.edu        bf(machInst.bf),
786251Sgblack@eecs.umich.edu        bfa(machInst.bfa)
796251Sgblack@eecs.umich.edu    {
806251Sgblack@eecs.umich.edu    }
816251Sgblack@eecs.umich.edu
826251Sgblack@eecs.umich.edu    std::string generateDisassembly(
836251Sgblack@eecs.umich.edu            Addr pc, const SymbolTable *symtab) const override;
846019Shines@cs.fsu.edu};
856251Sgblack@eecs.umich.edu
866019Shines@cs.fsu.edu} // namespace PowerISA
876275Sgblack@eecs.umich.edu
886275Sgblack@eecs.umich.edu#endif //__ARCH_POWER_INSTS_CONDITION_HH__
896275Sgblack@eecs.umich.edu