unknown.isa revision 2649
12068SN/A// -*- mode:c++ -*-
22068SN/A
32068SN/A// Copyright (c) 2003-2005 The Regents of The University of Michigan
42068SN/A// All rights reserved.
52068SN/A//
62068SN/A// Redistribution and use in source and binary forms, with or without
72068SN/A// modification, are permitted provided that the following conditions are
82068SN/A// met: redistributions of source code must retain the above copyright
92068SN/A// notice, this list of conditions and the following disclaimer;
102068SN/A// redistributions in binary form must reproduce the above copyright
112068SN/A// notice, this list of conditions and the following disclaimer in the
122068SN/A// documentation and/or other materials provided with the distribution;
132068SN/A// neither the name of the copyright holders nor the names of its
142068SN/A// contributors may be used to endorse or promote products derived from
152068SN/A// this software without specific prior written permission.
162068SN/A//
172068SN/A// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
182068SN/A// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
192068SN/A// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
202068SN/A// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
212068SN/A// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
222068SN/A// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
232068SN/A// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
242068SN/A// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
252068SN/A// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
262068SN/A// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
272068SN/A// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
282068SN/A
292649Ssaidi@eecs.umich.edu////////////////////////////////////////////////////////////////////
302649Ssaidi@eecs.umich.edu//
312649Ssaidi@eecs.umich.edu// Unknown instructions
322649Ssaidi@eecs.umich.edu//
332649Ssaidi@eecs.umich.edu
342068SN/Aoutput decoder {{
352068SN/A    std::string
362068SN/A    Unknown::generateDisassembly(Addr pc, const SymbolTable *symtab) const
372068SN/A    {
382068SN/A        return csprintf("%-10s (inst 0x%x, opcode 0x%x)",
392068SN/A                        "unknown", machInst, OPCODE);
402068SN/A    }
412068SN/A}};
422068SN/A
432068SN/Aoutput exec {{
442132SN/A    Fault
452068SN/A    Unknown::execute(%(CPU_exec_context)s *xc,
462068SN/A                     Trace::InstRecord *traceData) const
472068SN/A    {
482068SN/A        panic("attempt to execute unknown instruction "
492068SN/A              "(inst 0x%08x, opcode 0x%x)", machInst, OPCODE);
502147SN/A        return new UnimplementedOpcodeFault;
512068SN/A    }
522068SN/A}};
532068SN/A
542068SN/Adef format Unknown() {{
552068SN/A    decode_block = 'return new Unknown(machInst);\n'
562068SN/A}};
572068SN/A
58