unknown.isa revision 2083
111666Stushar@ece.gatech.edu// -*- mode:c++ -*-
211666Stushar@ece.gatech.edu
311666Stushar@ece.gatech.edu// Copyright (c) 2003-2005 The Regents of The University of Michigan
411666Stushar@ece.gatech.edu// All rights reserved.
511666Stushar@ece.gatech.edu//
611666Stushar@ece.gatech.edu// Redistribution and use in source and binary forms, with or without
711666Stushar@ece.gatech.edu// modification, are permitted provided that the following conditions are
811666Stushar@ece.gatech.edu// met: redistributions of source code must retain the above copyright
911666Stushar@ece.gatech.edu// notice, this list of conditions and the following disclaimer;
1011666Stushar@ece.gatech.edu// redistributions in binary form must reproduce the above copyright
1111666Stushar@ece.gatech.edu// notice, this list of conditions and the following disclaimer in the
1211666Stushar@ece.gatech.edu// documentation and/or other materials provided with the distribution;
1311666Stushar@ece.gatech.edu// neither the name of the copyright holders nor the names of its
1411666Stushar@ece.gatech.edu// contributors may be used to endorse or promote products derived from
1511666Stushar@ece.gatech.edu// this software without specific prior written permission.
1611666Stushar@ece.gatech.edu//
1711666Stushar@ece.gatech.edu// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1811666Stushar@ece.gatech.edu// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1911666Stushar@ece.gatech.edu// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2011666Stushar@ece.gatech.edu// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2111666Stushar@ece.gatech.edu// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2211666Stushar@ece.gatech.edu// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2311666Stushar@ece.gatech.edu// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2411666Stushar@ece.gatech.edu// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2511666Stushar@ece.gatech.edu// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2611666Stushar@ece.gatech.edu// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2711666Stushar@ece.gatech.edu// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2811666Stushar@ece.gatech.edu
2911666Stushar@ece.gatech.eduoutput decoder {{
3011666Stushar@ece.gatech.edu    std::string
3111666Stushar@ece.gatech.edu    Unknown::generateDisassembly(Addr pc, const SymbolTable *symtab) const
3211666Stushar@ece.gatech.edu    {
3311666Stushar@ece.gatech.edu        return csprintf("%-10s (inst 0x%x, opcode 0x%x)",
3411666Stushar@ece.gatech.edu                        "unknown", machInst, OPCODE);
3511666Stushar@ece.gatech.edu    }
3611666Stushar@ece.gatech.edu}};
3711666Stushar@ece.gatech.edu
3811666Stushar@ece.gatech.eduoutput exec {{
3911666Stushar@ece.gatech.edu    Fault
4011666Stushar@ece.gatech.edu    Unknown::execute(%(CPU_exec_context)s *xc,
4111666Stushar@ece.gatech.edu                     Trace::InstRecord *traceData) const
4211666Stushar@ece.gatech.edu    {
4311666Stushar@ece.gatech.edu        panic("attempt to execute unknown instruction "
4411666Stushar@ece.gatech.edu              "(inst 0x%08x, opcode 0x%x)", machInst, OPCODE);
4511666Stushar@ece.gatech.edu        return Unimplemented_Opcode_Fault;
4611666Stushar@ece.gatech.edu    }
4711666Stushar@ece.gatech.edu}};
4811666Stushar@ece.gatech.edu
4911666Stushar@ece.gatech.edudef format Unknown() {{
5011666Stushar@ece.gatech.edu    decode_block = 'return new Unknown(machInst);\n'
5111666Stushar@ece.gatech.edu}};
5211666Stushar@ece.gatech.edu
5311666Stushar@ece.gatech.edu