unknown.hh revision 12290
112290Sgabeblack@google.com/* 212290Sgabeblack@google.com * Copyright (c) 2006 The Regents of The University of Michigan 312290Sgabeblack@google.com * All rights reserved. 412290Sgabeblack@google.com * 512290Sgabeblack@google.com * Redistribution and use in source and binary forms, with or without 612290Sgabeblack@google.com * modification, are permitted provided that the following conditions are 712290Sgabeblack@google.com * met: redistributions of source code must retain the above copyright 812290Sgabeblack@google.com * notice, this list of conditions and the following disclaimer; 912290Sgabeblack@google.com * redistributions in binary form must reproduce the above copyright 1012290Sgabeblack@google.com * notice, this list of conditions and the following disclaimer in the 1112290Sgabeblack@google.com * documentation and/or other materials provided with the distribution; 1212290Sgabeblack@google.com * neither the name of the copyright holders nor the names of its 1312290Sgabeblack@google.com * contributors may be used to endorse or promote products derived from 1412290Sgabeblack@google.com * this software without specific prior written permission. 1512290Sgabeblack@google.com * 1612290Sgabeblack@google.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1712290Sgabeblack@google.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1812290Sgabeblack@google.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1912290Sgabeblack@google.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2012290Sgabeblack@google.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2112290Sgabeblack@google.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2212290Sgabeblack@google.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2312290Sgabeblack@google.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2412290Sgabeblack@google.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2512290Sgabeblack@google.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2612290Sgabeblack@google.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2712290Sgabeblack@google.com * 2812290Sgabeblack@google.com * Authors: Gabe Black 2912290Sgabeblack@google.com * Steve Reinhardt 3012290Sgabeblack@google.com */ 3112290Sgabeblack@google.com 3212290Sgabeblack@google.com#ifndef __ARCH_SPARC_INSTS_UNKNOWN_HH__ 3312290Sgabeblack@google.com#define __ARCH_SPARC_INSTS_UNKNOWN_HH__ 3412290Sgabeblack@google.com 3512290Sgabeblack@google.com#include "arch/sparc/insts/static_inst.hh" 3612290Sgabeblack@google.com 3712290Sgabeblack@google.comnamespace SparcISA 3812290Sgabeblack@google.com{ 3912290Sgabeblack@google.com 4012290Sgabeblack@google.com/** 4112290Sgabeblack@google.com * Class for Unknown/Illegal instructions 4212290Sgabeblack@google.com */ 4312290Sgabeblack@google.comclass Unknown : public SparcStaticInst 4412290Sgabeblack@google.com{ 4512290Sgabeblack@google.com public: 4612290Sgabeblack@google.com 4712290Sgabeblack@google.com // Constructor 4812290Sgabeblack@google.com Unknown(ExtMachInst _machInst) : 4912290Sgabeblack@google.com SparcStaticInst("unknown", _machInst, No_OpClass) 5012290Sgabeblack@google.com {} 5112290Sgabeblack@google.com 5212290Sgabeblack@google.com Fault 5312290Sgabeblack@google.com execute(ExecContext *, Trace::InstRecord *) const override 5412290Sgabeblack@google.com { 5512290Sgabeblack@google.com return std::make_shared<IllegalInstruction>(); 5612290Sgabeblack@google.com } 5712290Sgabeblack@google.com 5812290Sgabeblack@google.com std::string 5912290Sgabeblack@google.com generateDisassembly(Addr pc, const SymbolTable *symtab) const override 6012290Sgabeblack@google.com { 6112290Sgabeblack@google.com return "Unknown instruction"; 6212290Sgabeblack@google.com } 6312290Sgabeblack@google.com 6412290Sgabeblack@google.com}; 6512290Sgabeblack@google.com 6612290Sgabeblack@google.com} 6712290Sgabeblack@google.com 6812290Sgabeblack@google.com#endif // __ARCH_SPARC_INSTS_UNKNOWN_HH__ 69