unknown.isa revision 12234:78ece221f9f5
18706Sandreas.hansson@arm.com// -*- mode:c++ -*-
27586SAli.Saidi@arm.com
37586SAli.Saidi@arm.com// Copyright (c) 2003-2005 The Regents of The University of Michigan
47586SAli.Saidi@arm.com// All rights reserved.
57586SAli.Saidi@arm.com//
67586SAli.Saidi@arm.com// Redistribution and use in source and binary forms, with or without
77586SAli.Saidi@arm.com// modification, are permitted provided that the following conditions are
87586SAli.Saidi@arm.com// met: redistributions of source code must retain the above copyright
97586SAli.Saidi@arm.com// notice, this list of conditions and the following disclaimer;
107586SAli.Saidi@arm.com// redistributions in binary form must reproduce the above copyright
117586SAli.Saidi@arm.com// notice, this list of conditions and the following disclaimer in the
127586SAli.Saidi@arm.com// documentation and/or other materials provided with the distribution;
137905SBrad.Beckmann@amd.com// neither the name of the copyright holders nor the names of its
145323Sgblack@eecs.umich.edu// contributors may be used to endorse or promote products derived from
152934Sktlim@umich.edu// this software without specific prior written permission.
162934Sktlim@umich.edu//
172934Sktlim@umich.edu// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
182934Sktlim@umich.edu// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
192934Sktlim@umich.edu// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
202934Sktlim@umich.edu// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
212934Sktlim@umich.edu// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
222934Sktlim@umich.edu// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
232934Sktlim@umich.edu// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
242934Sktlim@umich.edu// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
252934Sktlim@umich.edu// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
262934Sktlim@umich.edu// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
272934Sktlim@umich.edu// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
282934Sktlim@umich.edu//
292934Sktlim@umich.edu// Authors: Steve Reinhardt
302934Sktlim@umich.edu
312934Sktlim@umich.edu////////////////////////////////////////////////////////////////////
322934Sktlim@umich.edu//
332934Sktlim@umich.edu// Unknown instructions
342934Sktlim@umich.edu//
352934Sktlim@umich.edu
362934Sktlim@umich.eduoutput decoder {{
372934Sktlim@umich.edu    std::string
382934Sktlim@umich.edu    Unknown::generateDisassembly(Addr pc, const SymbolTable *symtab) const
392934Sktlim@umich.edu    {
402934Sktlim@umich.edu        return csprintf("%-10s (inst 0x%x, opcode 0x%x)",
412934Sktlim@umich.edu                        "unknown", machInst, OPCODE);
422934Sktlim@umich.edu    }
432995Ssaidi@eecs.umich.edu}};
4410046Snilay@cs.wisc.edu
452934Sktlim@umich.eduoutput exec {{
462934Sktlim@umich.edu    Fault
472934Sktlim@umich.edu    Unknown::execute(ExecContext *xc, Trace::InstRecord *traceData) const
482934Sktlim@umich.edu    {
492934Sktlim@umich.edu        panic("attempt to execute unknown instruction "
502934Sktlim@umich.edu              "(inst 0x%08x, opcode 0x%x)", machInst, OPCODE);
512934Sktlim@umich.edu        return std::make_shared<UnimplementedOpcodeFault>();
522934Sktlim@umich.edu    }
5310405Sandreas.hansson@arm.com}};
546122SSteve.Reinhardt@amd.com
556122SSteve.Reinhardt@amd.comdef format Unknown() {{
566122SSteve.Reinhardt@amd.com    decode_block = 'return new Unknown(machInst);\n'
576122SSteve.Reinhardt@amd.com}};
5810588Sgabeblack@google.com
5910118Snilay@cs.wisc.edu