unknown.isa revision 2632
12632Sstever@eecs.umich.edu// Copyright (c) 2006 The Regents of The University of Michigan 22632Sstever@eecs.umich.edu// All rights reserved. 32632Sstever@eecs.umich.edu// 42632Sstever@eecs.umich.edu// Redistribution and use in source and binary forms, with or without 52632Sstever@eecs.umich.edu// modification, are permitted provided that the following conditions are 62632Sstever@eecs.umich.edu// met: redistributions of source code must retain the above copyright 72632Sstever@eecs.umich.edu// notice, this list of conditions and the following disclaimer; 82632Sstever@eecs.umich.edu// redistributions in binary form must reproduce the above copyright 92632Sstever@eecs.umich.edu// notice, this list of conditions and the following disclaimer in the 102632Sstever@eecs.umich.edu// documentation and/or other materials provided with the distribution; 112632Sstever@eecs.umich.edu// neither the name of the copyright holders nor the names of its 122632Sstever@eecs.umich.edu// contributors may be used to endorse or promote products derived from 132632Sstever@eecs.umich.edu// this software without specific prior written permission. 142632Sstever@eecs.umich.edu// 152632Sstever@eecs.umich.edu// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 162632Sstever@eecs.umich.edu// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 172632Sstever@eecs.umich.edu// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 182632Sstever@eecs.umich.edu// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 192632Sstever@eecs.umich.edu// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 202632Sstever@eecs.umich.edu// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 212632Sstever@eecs.umich.edu// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 222632Sstever@eecs.umich.edu// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 232632Sstever@eecs.umich.edu// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 242632Sstever@eecs.umich.edu// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 252632Sstever@eecs.umich.edu// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 262632Sstever@eecs.umich.edu// 272632Sstever@eecs.umich.edu// Authors: Gabe Black 282632Sstever@eecs.umich.edu// Steve Reinhardt 292632Sstever@eecs.umich.edu 302469SN/A//////////////////////////////////////////////////////////////////// 312469SN/A// 322469SN/A// Unknown instructions 332469SN/A// 342469SN/A 352469SN/Aoutput header {{ 362469SN/A /** 372469SN/A * Class for Unknown/Illegal instructions 382469SN/A */ 392469SN/A class Unknown : public SparcStaticInst 402469SN/A { 412469SN/A public: 422469SN/A 432469SN/A // Constructor 442469SN/A Unknown(ExtMachInst _machInst) : 452469SN/A SparcStaticInst("unknown", _machInst, No_OpClass) 462469SN/A { 472469SN/A } 482469SN/A 492469SN/A %(BasicExecDeclare)s 502469SN/A 512469SN/A std::string generateDisassembly(Addr pc, 522469SN/A const SymbolTable *symtab) const; 532469SN/A 542469SN/A }; 552469SN/A}}; 562469SN/A 572469SN/Aoutput decoder {{ 582469SN/A std::string Unknown::generateDisassembly(Addr pc, 592469SN/A const SymbolTable *symtab) const 602469SN/A { 612516SN/A return "Unknown instruction"; 622469SN/A } 632469SN/A}}; 642469SN/A 652469SN/Aoutput exec {{ 662469SN/A Fault Unknown::execute(%(CPU_exec_context)s *xc, 672469SN/A Trace::InstRecord *traceData) const 682469SN/A { 692469SN/A return new IllegalInstruction; 702469SN/A } 712469SN/A}}; 722469SN/A 732469SN/Adef format Unknown() {{ 742469SN/A decode_block = 'return new Unknown(machInst);\n' 752469SN/A}}; 76