__init__.py revision 5081
16657Snate@binkert.org# Copyright (c) 2007 The Hewlett-Packard Development Company
26657Snate@binkert.org# All rights reserved.
36657Snate@binkert.org#
46657Snate@binkert.org# Redistribution and use of this software in source and binary forms,
56657Snate@binkert.org# with or without modification, are permitted provided that the
66657Snate@binkert.org# following conditions are met:
76657Snate@binkert.org#
86657Snate@binkert.org# The software must be used only for Non-Commercial Use which means any
96657Snate@binkert.org# use which is NOT directed to receiving any direct monetary
106657Snate@binkert.org# compensation for, or commercial advantage from such use.  Illustrative
116657Snate@binkert.org# examples of non-commercial use are academic research, personal study,
126657Snate@binkert.org# teaching, education and corporate research & development.
136657Snate@binkert.org# Illustrative examples of commercial use are distributing products for
146657Snate@binkert.org# commercial advantage and providing services using the software for
156657Snate@binkert.org# commercial advantage.
166657Snate@binkert.org#
176657Snate@binkert.org# If you wish to use this software or functionality therein that may be
186657Snate@binkert.org# covered by patents for commercial use, please contact:
196657Snate@binkert.org#     Director of Intellectual Property Licensing
206657Snate@binkert.org#     Office of Strategy and Technology
216657Snate@binkert.org#     Hewlett-Packard Company
226657Snate@binkert.org#     1501 Page Mill Road
236657Snate@binkert.org#     Palo Alto, California  94304
246657Snate@binkert.org#
256657Snate@binkert.org# Redistributions of source code must retain the above copyright notice,
266657Snate@binkert.org# this list of conditions and the following disclaimer.  Redistributions
276657Snate@binkert.org# in binary form must reproduce the above copyright notice, this list of
286999Snate@binkert.org# conditions and the following disclaimer in the documentation and/or
296657Snate@binkert.org# other materials provided with the distribution.  Neither the name of
306657Snate@binkert.org# the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
316657Snate@binkert.org# contributors may be used to endorse or promote products derived from
326657Snate@binkert.org# this software without specific prior written permission.  No right of
338189SLisa.Hsu@amd.com# sublicense is granted herewith.  Derivatives of the software and
346657Snate@binkert.org# output created using the software may be prepared, but only for
356882SBrad.Beckmann@amd.com# Non-Commercial Uses.  Derivatives of the software may be shared with
367055Snate@binkert.org# others provided: (i) the others agree to abide by the list of
376882SBrad.Beckmann@amd.com# conditions herein which includes the Non-Commercial Use restrictions;
386882SBrad.Beckmann@amd.com# and (ii) such Derivatives of the software include the above copyright
398191SLisa.Hsu@amd.com# notice to acknowledge the contribution from this software where
406882SBrad.Beckmann@amd.com# applicable, this list of conditions and the disclaimer below.
416882SBrad.Beckmann@amd.com#
426882SBrad.Beckmann@amd.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
436888SBrad.Beckmann@amd.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
446882SBrad.Beckmann@amd.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
456882SBrad.Beckmann@amd.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
466657Snate@binkert.org# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
476657Snate@binkert.org# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
486657Snate@binkert.org# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
496657Snate@binkert.org# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
506657Snate@binkert.org# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
517839Snilay@cs.wisc.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
526657Snate@binkert.org# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
536882SBrad.Beckmann@amd.com#
546882SBrad.Beckmann@amd.com# Authors: Gabe Black
556882SBrad.Beckmann@amd.com
566882SBrad.Beckmann@amd.comcategories = ["addition",
576882SBrad.Beckmann@amd.com              "horizontal_addition",
586882SBrad.Beckmann@amd.com              "subtraction",
596657Snate@binkert.org              "horizontal_subtraction",
606657Snate@binkert.org              "simultaneous_addition_and_subtraction",
616657Snate@binkert.org              "multiplication",
626657Snate@binkert.org              "division",
636657Snate@binkert.org              "square_root",
646657Snate@binkert.org              "reciprocal_square_root",
656657Snate@binkert.org              "reciprocal_estimation"]
666657Snate@binkert.org
676657Snate@binkert.orgmicrocode = '''
687839Snilay@cs.wisc.edu# SSE instructions
697839Snilay@cs.wisc.edu'''
706657Snate@binkert.orgfor category in categories:
716657Snate@binkert.org    exec "import %s as cat" % category
726657Snate@binkert.org    microcode += cat.microcode
736657Snate@binkert.org