unknown.isa revision 7087:fb8d5786ff30
19397Sandreas.hansson@arm.com// Copyright (c) 2007 The Hewlett-Packard Development Company
29397Sandreas.hansson@arm.com// All rights reserved.
39397Sandreas.hansson@arm.com//
49397Sandreas.hansson@arm.com// The license below extends only to copyright in the software and shall
59397Sandreas.hansson@arm.com// not be construed as granting a license to any other intellectual
69397Sandreas.hansson@arm.com// property including but not limited to intellectual property relating
79397Sandreas.hansson@arm.com// to a hardware implementation of the functionality of the software
89397Sandreas.hansson@arm.com// licensed hereunder.  You may use the software subject to the license
99397Sandreas.hansson@arm.com// terms below provided that you ensure that this notice is replicated
109397Sandreas.hansson@arm.com// unmodified and in its entirety in all distributions of the software,
119397Sandreas.hansson@arm.com// modified or unmodified, in source code or in binary form.
129397Sandreas.hansson@arm.com//
139397Sandreas.hansson@arm.com// Copyright (c) 2007 The Regents of The University of Michigan
149397Sandreas.hansson@arm.com// All rights reserved.
159397Sandreas.hansson@arm.com//
169397Sandreas.hansson@arm.com// Redistribution and use in source and binary forms, with or without
179397Sandreas.hansson@arm.com// modification, are permitted provided that the following conditions are
189397Sandreas.hansson@arm.com// met: redistributions of source code must retain the above copyright
199397Sandreas.hansson@arm.com// notice, this list of conditions and the following disclaimer;
209397Sandreas.hansson@arm.com// redistributions in binary form must reproduce the above copyright
219397Sandreas.hansson@arm.com// notice, this list of conditions and the following disclaimer in the
229397Sandreas.hansson@arm.com// documentation and/or other materials provided with the distribution;
239397Sandreas.hansson@arm.com// neither the name of the copyright holders nor the names of its
249397Sandreas.hansson@arm.com// contributors may be used to endorse or promote products derived from
259397Sandreas.hansson@arm.com// this software without specific prior written permission.
269397Sandreas.hansson@arm.com//
279397Sandreas.hansson@arm.com// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
289397Sandreas.hansson@arm.com// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
299397Sandreas.hansson@arm.com// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
309397Sandreas.hansson@arm.com// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
319397Sandreas.hansson@arm.com// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
329397Sandreas.hansson@arm.com// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
339397Sandreas.hansson@arm.com// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
349397Sandreas.hansson@arm.com// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
359397Sandreas.hansson@arm.com// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
369397Sandreas.hansson@arm.com// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
379397Sandreas.hansson@arm.com// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
389397Sandreas.hansson@arm.com//
399397Sandreas.hansson@arm.com// Authors: Gabe Black
409397Sandreas.hansson@arm.com
419397Sandreas.hansson@arm.com////////////////////////////////////////////////////////////////////
429397Sandreas.hansson@arm.com//
439397Sandreas.hansson@arm.com// Unknown instructions
449398Sandreas.hansson@arm.com//
459397Sandreas.hansson@arm.com
46output header {{
47        /**
48         * Class for Unknown/Illegal instructions
49         */
50        class Unknown : public StaticInst
51        {
52          public:
53
54            // Constructor
55            Unknown(ExtMachInst _machInst) :
56                    StaticInst("unknown", _machInst, No_OpClass)
57            {
58            }
59
60            %(BasicExecDeclare)s
61
62            std::string generateDisassembly(Addr pc,
63                    const SymbolTable *symtab) const;
64
65        };
66}};
67
68output decoder {{
69        std::string Unknown::generateDisassembly(Addr pc,
70                const SymbolTable *symtab) const
71        {
72            return "Unknown instruction";
73        }
74}};
75
76output exec {{
77        Fault Unknown::execute(%(CPU_exec_context)s *xc,
78                Trace::InstRecord *traceData) const
79        {
80            warn("No instructions are implemented for X86!\n");
81            return NoFault;
82        }
83}};
84
85def format Unknown() {{
86        decode_block = 'return new Unknown(machInst);\n'
87}};
88