unknown.isa revision 12234:78ece221f9f5
14120SN/A// -*- mode:c++ -*-
24120SN/A
34120SN/A// Copyright (c) 2003-2005 The Regents of The University of Michigan
44120SN/A// All rights reserved.
57087Snate@binkert.org//
67087Snate@binkert.org// Redistribution and use in source and binary forms, with or without
77087Snate@binkert.org// modification, are permitted provided that the following conditions are
87087Snate@binkert.org// met: redistributions of source code must retain the above copyright
97087Snate@binkert.org// notice, this list of conditions and the following disclaimer;
107087Snate@binkert.org// redistributions in binary form must reproduce the above copyright
117087Snate@binkert.org// notice, this list of conditions and the following disclaimer in the
127087Snate@binkert.org// documentation and/or other materials provided with the distribution;
134120SN/A// neither the name of the copyright holders nor the names of its
147087Snate@binkert.org// contributors may be used to endorse or promote products derived from
157087Snate@binkert.org// this software without specific prior written permission.
167087Snate@binkert.org//
177087Snate@binkert.org// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
187087Snate@binkert.org// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
197087Snate@binkert.org// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
207087Snate@binkert.org// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
217087Snate@binkert.org// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
224120SN/A// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
237087Snate@binkert.org// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
244120SN/A// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
254120SN/A// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
264120SN/A// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
274120SN/A// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
284120SN/A//
294120SN/A// Authors: Steve Reinhardt
304120SN/A
314120SN/A////////////////////////////////////////////////////////////////////
324120SN/A//
334120SN/A// Unknown instructions
344120SN/A//
354120SN/A
364120SN/Aoutput decoder {{
374120SN/A    std::string
384120SN/A    Unknown::generateDisassembly(Addr pc, const SymbolTable *symtab) const
394120SN/A    {
406329Sgblack@eecs.umich.edu        return csprintf("%-10s (inst 0x%x, opcode 0x%x)",
416329Sgblack@eecs.umich.edu                        "unknown", machInst, OPCODE);
426216SN/A    }
438961Sgblack@eecs.umich.edu}};
447629Sgblack@eecs.umich.edu
457629Sgblack@eecs.umich.eduoutput exec {{
466315SN/A    Fault
474137SN/A    Unknown::execute(ExecContext *xc, Trace::InstRecord *traceData) const
484120SN/A    {
494120SN/A        panic("attempt to execute unknown instruction "
506329Sgblack@eecs.umich.edu              "(inst 0x%08x, opcode 0x%x)", machInst, OPCODE);
516329Sgblack@eecs.umich.edu        return std::make_shared<UnimplementedOpcodeFault>();
526329Sgblack@eecs.umich.edu    }
536329Sgblack@eecs.umich.edu}};
546313SN/A
556329Sgblack@eecs.umich.edudef format Unknown() {{
566329Sgblack@eecs.umich.edu    decode_block = 'return new Unknown(machInst);\n'
576329Sgblack@eecs.umich.edu}};
586329Sgblack@eecs.umich.edu
596319SN/A