includes.isa revision 5026:46dd8d55f6c9
19288Sandreas.hansson@arm.com// Copyright (c) 2007 The Regents of The University of Michigan
29288Sandreas.hansson@arm.com// All rights reserved.
39288Sandreas.hansson@arm.com//
49288Sandreas.hansson@arm.com// Redistribution and use in source and binary forms, with or without
59288Sandreas.hansson@arm.com// modification, are permitted provided that the following conditions are
69288Sandreas.hansson@arm.com// met: redistributions of source code must retain the above copyright
79288Sandreas.hansson@arm.com// notice, this list of conditions and the following disclaimer;
89288Sandreas.hansson@arm.com// redistributions in binary form must reproduce the above copyright
99288Sandreas.hansson@arm.com// notice, this list of conditions and the following disclaimer in the
109288Sandreas.hansson@arm.com// documentation and/or other materials provided with the distribution;
119288Sandreas.hansson@arm.com// neither the name of the copyright holders nor the names of its
129288Sandreas.hansson@arm.com// contributors may be used to endorse or promote products derived from
134444Ssaidi@eecs.umich.edu// this software without specific prior written permission.
143395Shsul@eecs.umich.edu//
153395Shsul@eecs.umich.edu// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
163395Shsul@eecs.umich.edu// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
173395Shsul@eecs.umich.edu// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
183395Shsul@eecs.umich.edu// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
193395Shsul@eecs.umich.edu// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
203395Shsul@eecs.umich.edu// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
213395Shsul@eecs.umich.edu// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
223395Shsul@eecs.umich.edu// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
233395Shsul@eecs.umich.edu// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
243395Shsul@eecs.umich.edu// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
253395Shsul@eecs.umich.edu// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
263395Shsul@eecs.umich.edu//
273395Shsul@eecs.umich.edu// Authors: Gabe Black
283395Shsul@eecs.umich.edu
293395Shsul@eecs.umich.edu// Copyright (c) 2007 The Hewlett-Packard Development Company
303395Shsul@eecs.umich.edu// All rights reserved.
313395Shsul@eecs.umich.edu//
323395Shsul@eecs.umich.edu// Redistribution and use of this software in source and binary forms,
333395Shsul@eecs.umich.edu// with or without modification, are permitted provided that the
343395Shsul@eecs.umich.edu// following conditions are met:
353395Shsul@eecs.umich.edu//
363395Shsul@eecs.umich.edu// The software must be used only for Non-Commercial Use which means any
373395Shsul@eecs.umich.edu// use which is NOT directed to receiving any direct monetary
383395Shsul@eecs.umich.edu// compensation for, or commercial advantage from such use.  Illustrative
393395Shsul@eecs.umich.edu// examples of non-commercial use are academic research, personal study,
403395Shsul@eecs.umich.edu// teaching, education and corporate research & development.
413395Shsul@eecs.umich.edu// Illustrative examples of commercial use are distributing products for
423395Shsul@eecs.umich.edu// commercial advantage and providing services using the software for
439310Sandreas.hansson@arm.com// commercial advantage.
449310Sandreas.hansson@arm.com//
459310Sandreas.hansson@arm.com// If you wish to use this software or functionality therein that may be
469310Sandreas.hansson@arm.com// covered by patents for commercial use, please contact:
479310Sandreas.hansson@arm.com//     Director of Intellectual Property Licensing
489310Sandreas.hansson@arm.com//     Office of Strategy and Technology
4911053Sandreas.hansson@arm.com//     Hewlett-Packard Company
503395Shsul@eecs.umich.edu//     1501 Page Mill Road
519288Sandreas.hansson@arm.com//     Palo Alto, California  94304
529288Sandreas.hansson@arm.com//
539310Sandreas.hansson@arm.com// Redistributions of source code must retain the above copyright notice,
548631Schander.sudanthi@arm.com// this list of conditions and the following disclaimer.  Redistributions
553395Shsul@eecs.umich.edu// in binary form must reproduce the above copyright notice, this list of
5610884Sandreas.hansson@arm.com// conditions and the following disclaimer in the documentation and/or
5710884Sandreas.hansson@arm.com// other materials provided with the distribution.  Neither the name of
5811199Sandreas.hansson@arm.com// the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
5911199Sandreas.hansson@arm.com// contributors may be used to endorse or promote products derived from
6010884Sandreas.hansson@arm.com// this software without specific prior written permission.  No right of
6110884Sandreas.hansson@arm.com// sublicense is granted herewith.  Derivatives of the software and
6210884Sandreas.hansson@arm.com// output created using the software may be prepared, but only for
6310884Sandreas.hansson@arm.com// Non-Commercial Uses.  Derivatives of the software may be shared with
6411053Sandreas.hansson@arm.com// others provided: (i) the others agree to abide by the list of
653668Srdreslin@umich.edu// conditions herein which includes the Non-Commercial Use restrictions;
669288Sandreas.hansson@arm.com// and (ii) such Derivatives of the software include the above copyright
679288Sandreas.hansson@arm.com// notice to acknowledge the contribution from this software where
689321Sandreas.hansson@arm.com// applicable, this list of conditions and the disclaimer below.
699321Sandreas.hansson@arm.com//
709310Sandreas.hansson@arm.com// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
719310Sandreas.hansson@arm.com// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
7211053Sandreas.hansson@arm.com// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
739310Sandreas.hansson@arm.com// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
749310Sandreas.hansson@arm.com// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
759310Sandreas.hansson@arm.com// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
763668Srdreslin@umich.edu// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
779310Sandreas.hansson@arm.com// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
783668Srdreslin@umich.edu// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
793668Srdreslin@umich.edu// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
8011053Sandreas.hansson@arm.com// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
817868Sgblack@eecs.umich.edu//
829288Sandreas.hansson@arm.com// Authors: Gabe Black
839288Sandreas.hansson@arm.com
847868Sgblack@eecs.umich.edu////////////////////////////////////////////////////////////////////
857868Sgblack@eecs.umich.edu//
867868Sgblack@eecs.umich.edu// Output include file directives. Also import the python modules we
8711331Sandreas.hansson@arm.com// need for all the x86 custom decoder stuff
8810884Sandreas.hansson@arm.com//
8910884Sandreas.hansson@arm.com
9010884Sandreas.hansson@arm.comlet {{
9110884Sandreas.hansson@arm.com    import copy
9210884Sandreas.hansson@arm.com}};
9311199Sandreas.hansson@arm.com
9411199Sandreas.hansson@arm.comoutput header {{
95#include <cstring>
96#include <sstream>
97#include <iostream>
98
99#include "arch/x86/emulenv.hh"
100#include "arch/x86/insts/microldstop.hh"
101#include "arch/x86/insts/microregop.hh"
102#include "arch/x86/insts/static_inst.hh"
103#include "arch/x86/isa_traits.hh"
104#include "arch/x86/regfile.hh"
105#include "arch/x86/types.hh"
106#include "base/misc.hh"
107#include "cpu/static_inst.hh"
108#include "mem/packet.hh"
109#include "sim/faults.hh"
110}};
111
112output decoder {{
113#include "arch/x86/faults.hh"
114#include "arch/x86/floatregs.hh"
115#include "arch/x86/miscregs.hh"
116#include "arch/x86/segmentregs.hh"
117#include "base/cprintf.hh"
118#include "base/loader/symtab.hh"
119#include "cpu/thread_context.hh"  // for Jump::branchTarget()
120#include "mem/packet.hh"
121
122#if defined(linux) || defined(__APPLE__)
123#include <fenv.h>
124#endif
125#include <algorithm>
126
127using namespace X86ISA;
128}};
129
130output exec {{
131#if defined(linux) || defined(__APPLE__)
132#include <fenv.h>
133#endif
134
135#if defined(__sun) || defined (__OpenBSD__)
136#include <ieeefp.h>
137#endif
138
139#if FULL_SYSTEM
140#include "sim/pseudo_inst.hh"
141#endif
142
143#include <limits>
144
145#include <cmath>
146#include "base/bigint.hh"
147#include "cpu/base.hh"
148#include "cpu/exetrace.hh"
149#include "sim/sim_exit.hh"
150#include "mem/packet.hh"
151#include "mem/packet_access.hh"
152
153using namespace X86ISA;
154using namespace std;
155}};
156
157