multiplication.py revision 6559:e4f60f716103
12689Sktlim@umich.edu# Copyright (c) 2007 The Hewlett-Packard Development Company
22689Sktlim@umich.edu# All rights reserved.
32689Sktlim@umich.edu#
42689Sktlim@umich.edu# Redistribution and use of this software in source and binary forms,
52689Sktlim@umich.edu# with or without modification, are permitted provided that the
62689Sktlim@umich.edu# following conditions are met:
72689Sktlim@umich.edu#
82689Sktlim@umich.edu# The software must be used only for Non-Commercial Use which means any
92689Sktlim@umich.edu# use which is NOT directed to receiving any direct monetary
102689Sktlim@umich.edu# compensation for, or commercial advantage from such use.  Illustrative
112689Sktlim@umich.edu# examples of non-commercial use are academic research, personal study,
122689Sktlim@umich.edu# teaching, education and corporate research & development.
132689Sktlim@umich.edu# Illustrative examples of commercial use are distributing products for
142689Sktlim@umich.edu# commercial advantage and providing services using the software for
152689Sktlim@umich.edu# commercial advantage.
162689Sktlim@umich.edu#
172689Sktlim@umich.edu# If you wish to use this software or functionality therein that may be
182689Sktlim@umich.edu# covered by patents for commercial use, please contact:
192689Sktlim@umich.edu#     Director of Intellectual Property Licensing
202689Sktlim@umich.edu#     Office of Strategy and Technology
212689Sktlim@umich.edu#     Hewlett-Packard Company
222689Sktlim@umich.edu#     1501 Page Mill Road
232689Sktlim@umich.edu#     Palo Alto, California  94304
242689Sktlim@umich.edu#
252689Sktlim@umich.edu# Redistributions of source code must retain the above copyright notice,
262689Sktlim@umich.edu# this list of conditions and the following disclaimer.  Redistributions
272689Sktlim@umich.edu# in binary form must reproduce the above copyright notice, this list of
282689Sktlim@umich.edu# conditions and the following disclaimer in the documentation and/or
292689Sktlim@umich.edu# other materials provided with the distribution.  Neither the name of
302689Sktlim@umich.edu# the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
312689Sktlim@umich.edu# contributors may be used to endorse or promote products derived from
322689Sktlim@umich.edu# this software without specific prior written permission.  No right of
332689Sktlim@umich.edu# sublicense is granted herewith.  Derivatives of the software and
342521SN/A# output created using the software may be prepared, but only for
353960Sgblack@eecs.umich.edu# Non-Commercial Uses.  Derivatives of the software may be shared with
364194Ssaidi@eecs.umich.edu# others provided: (i) the others agree to abide by the list of
371070SN/A# conditions herein which includes the Non-Commercial Use restrictions;
381070SN/A# and (ii) such Derivatives of the software include the above copyright
392521SN/A# notice to acknowledge the contribution from this software where
402680Sktlim@umich.edu# applicable, this list of conditions and the disclaimer below.
412521SN/A#
422522SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
432037SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4456SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
455512SMichael.Adler@intel.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
462378SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
472521SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
482378SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
494762Snate@binkert.org# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
504762Snate@binkert.org# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
512378SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
522SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
532SN/A#
542107SN/A# Authors: Gabe Black
552SN/A
562SN/Amicrocode = '''
572SN/Adef macroop PFMUL_MMX_MMX {
582SN/A    mmulf mmx, mmx, mmxm, size=4, ext=0
592SN/A};
601070SN/A
615714Shsul@eecs.umich.edudef macroop PFMUL_MMX_M {
622378SN/A    ldfp ufp1, seg, sib, disp, dataSize=8
632521SN/A    mmulf mmx, mmx, ufp1, size=4, ext=0
642640Sstever@eecs.umich.edu};
652640Sstever@eecs.umich.edu
662378SN/Adef macroop PFMUL_MMX_P {
672378SN/A    rdip t7
684997Sgblack@eecs.umich.edu    ldfp ufp1, seg, riprel, disp, dataSize=8
692378SN/A    mmulf mmx, mmx, ufp1, size=4, ext=0
702902Ssaidi@eecs.umich.edu};
712SN/A'''
721070SN/A