microasm.isa revision 4533
1360SN/A// -*- mode:c++ -*-
21458SN/A
3360SN/A// Copyright (c) 2007 The Hewlett-Packard Development Company
4360SN/A// All rights reserved.
5360SN/A//
6360SN/A// Redistribution and use of this software in source and binary forms,
7360SN/A// with or without modification, are permitted provided that the
8360SN/A// following conditions are met:
9360SN/A//
10360SN/A// The software must be used only for Non-Commercial Use which means any
11360SN/A// use which is NOT directed to receiving any direct monetary
12360SN/A// compensation for, or commercial advantage from such use.  Illustrative
13360SN/A// examples of non-commercial use are academic research, personal study,
14360SN/A// teaching, education and corporate research & development.
15360SN/A// Illustrative examples of commercial use are distributing products for
16360SN/A// commercial advantage and providing services using the software for
17360SN/A// commercial advantage.
18360SN/A//
19360SN/A// If you wish to use this software or functionality therein that may be
20360SN/A// covered by patents for commercial use, please contact:
21360SN/A//     Director of Intellectual Property Licensing
22360SN/A//     Office of Strategy and Technology
23360SN/A//     Hewlett-Packard Company
24360SN/A//     1501 Page Mill Road
25360SN/A//     Palo Alto, California  94304
26360SN/A//
272665Ssaidi@eecs.umich.edu// Redistributions of source code must retain the above copyright notice,
282665Ssaidi@eecs.umich.edu// this list of conditions and the following disclaimer.  Redistributions
292665Ssaidi@eecs.umich.edu// in binary form must reproduce the above copyright notice, this list of
30360SN/A// conditions and the following disclaimer in the documentation and/or
31360SN/A// other materials provided with the distribution.  Neither the name of
321354SN/A// the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
331354SN/A// contributors may be used to endorse or promote products derived from
34360SN/A// this software without specific prior written permission.  No right of
352764Sstever@eecs.umich.edu// sublicense is granted herewith.  Derivatives of the software and
362764Sstever@eecs.umich.edu// output created using the software may be prepared, but only for
372064SN/A// Non-Commercial Uses.  Derivatives of the software may be shared with
38360SN/A// others provided: (i) the others agree to abide by the list of
39360SN/A// conditions herein which includes the Non-Commercial Use restrictions;
40360SN/A// and (ii) such Derivatives of the software include the above copyright
41360SN/A// notice to acknowledge the contribution from this software where
42360SN/A// applicable, this list of conditions and the disclaimer below.
43360SN/A//
441809SN/A// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
455543Ssaidi@eecs.umich.edu// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
461809SN/A// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
473113Sgblack@eecs.umich.edu// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
488229Snate@binkert.org// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
498229Snate@binkert.org// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
503113Sgblack@eecs.umich.edu// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
517075Snate@binkert.org// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
528229Snate@binkert.org// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
537075Snate@binkert.org// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
54360SN/A// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
552474SN/A//
565543Ssaidi@eecs.umich.edu// Authors: Gabe Black
572462SN/A
581354SN/A//Include the definitions of the micro ops.
596216Snate@binkert.org//These are StaticInst classes which stand on their own and make up an
606658Snate@binkert.org//internal instruction set.
612474SN/A##include "microops/microops.isa"
622680Sktlim@umich.edu
638232Snate@binkert.org//Include code to build macroops.
648229Snate@binkert.org##include "macroop.isa"
652474SN/A
667678Sgblack@eecs.umich.edulet {{
678229Snate@binkert.org    import sys
686640Svince@csl.cornell.edu    sys.path[0:0] = ["src/arch/x86/isa/"]
69360SN/A    from insts import microcode
70360SN/A    print microcode
71360SN/A    from micro_asm import MicroAssembler, Rom_Macroop, Rom
72360SN/A    mainRom = Rom('main ROM')
73360SN/A    assembler = MicroAssembler(X86Macroop, microopClasses, mainRom, Rom_Macroop)
74360SN/A    macroopDict = assembler.assemble(microcode)
75360SN/A}};
76360SN/A