14276Sgblack@eecs.umich.edu// -*- mode:c++ -*-
24276Sgblack@eecs.umich.edu
34276Sgblack@eecs.umich.edu// Copyright (c) 2007 The Hewlett-Packard Development Company
44276Sgblack@eecs.umich.edu// All rights reserved.
54276Sgblack@eecs.umich.edu//
67087Snate@binkert.org// The license below extends only to copyright in the software and shall
77087Snate@binkert.org// not be construed as granting a license to any other intellectual
87087Snate@binkert.org// property including but not limited to intellectual property relating
97087Snate@binkert.org// to a hardware implementation of the functionality of the software
107087Snate@binkert.org// licensed hereunder.  You may use the software subject to the license
117087Snate@binkert.org// terms below provided that you ensure that this notice is replicated
127087Snate@binkert.org// unmodified and in its entirety in all distributions of the software,
137087Snate@binkert.org// modified or unmodified, in source code or in binary form.
144276Sgblack@eecs.umich.edu//
157087Snate@binkert.org// Redistribution and use in source and binary forms, with or without
167087Snate@binkert.org// modification, are permitted provided that the following conditions are
177087Snate@binkert.org// met: redistributions of source code must retain the above copyright
187087Snate@binkert.org// notice, this list of conditions and the following disclaimer;
197087Snate@binkert.org// redistributions in binary form must reproduce the above copyright
207087Snate@binkert.org// notice, this list of conditions and the following disclaimer in the
217087Snate@binkert.org// documentation and/or other materials provided with the distribution;
227087Snate@binkert.org// neither the name of the copyright holders nor the names of its
234276Sgblack@eecs.umich.edu// contributors may be used to endorse or promote products derived from
247087Snate@binkert.org// this software without specific prior written permission.
254276Sgblack@eecs.umich.edu//
264276Sgblack@eecs.umich.edu// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
274276Sgblack@eecs.umich.edu// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
284276Sgblack@eecs.umich.edu// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
294276Sgblack@eecs.umich.edu// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
304276Sgblack@eecs.umich.edu// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
314276Sgblack@eecs.umich.edu// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
324276Sgblack@eecs.umich.edu// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
334276Sgblack@eecs.umich.edu// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
344276Sgblack@eecs.umich.edu// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
354276Sgblack@eecs.umich.edu// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
364276Sgblack@eecs.umich.edu// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
374276Sgblack@eecs.umich.edu//
384276Sgblack@eecs.umich.edu// Authors: Gabe Black
394276Sgblack@eecs.umich.edu
404276Sgblack@eecs.umich.edu////////////////////////////////////////////////////////////////////
414276Sgblack@eecs.umich.edu//
424276Sgblack@eecs.umich.edu// "Format" which really indicates an internal error. This is a more
434276Sgblack@eecs.umich.edu// significant problem for x86 than for other ISAs because of it's complex
444276Sgblack@eecs.umich.edu// ExtMachInst type.
454276Sgblack@eecs.umich.edu//
464276Sgblack@eecs.umich.edu
474276Sgblack@eecs.umich.edudef template ErrorDecode {{
484276Sgblack@eecs.umich.edu    {
494704Sgblack@eecs.umich.edu        panic("X86 decoder internal error: '%s' %s",
504276Sgblack@eecs.umich.edu                %(message)s, machInst);
514276Sgblack@eecs.umich.edu    }
524276Sgblack@eecs.umich.edu}};
534276Sgblack@eecs.umich.edu
544276Sgblack@eecs.umich.edudef format M5InternalError(error_message) {{
554276Sgblack@eecs.umich.edu    iop = InstObjParams(name, 'M5InternalError')
564276Sgblack@eecs.umich.edu    iop.message = error_message
574276Sgblack@eecs.umich.edu    decode_block = ErrorDecode.subst(iop)
584276Sgblack@eecs.umich.edu}};
594276Sgblack@eecs.umich.edu
60