subtraction.py revision 6580:a1c40860fe09
14120Sgblack@eecs.umich.edu# Copyright (c) 2007 The Hewlett-Packard Development Company
24120Sgblack@eecs.umich.edu# All rights reserved.
34120Sgblack@eecs.umich.edu#
44120Sgblack@eecs.umich.edu# Redistribution and use of this software in source and binary forms,
57087Snate@binkert.org# with or without modification, are permitted provided that the
67087Snate@binkert.org# following conditions are met:
77087Snate@binkert.org#
87087Snate@binkert.org# The software must be used only for Non-Commercial Use which means any
97087Snate@binkert.org# use which is NOT directed to receiving any direct monetary
107087Snate@binkert.org# compensation for, or commercial advantage from such use.  Illustrative
117087Snate@binkert.org# examples of non-commercial use are academic research, personal study,
127087Snate@binkert.org# teaching, education and corporate research & development.
134120Sgblack@eecs.umich.edu# Illustrative examples of commercial use are distributing products for
147087Snate@binkert.org# commercial advantage and providing services using the software for
157087Snate@binkert.org# commercial advantage.
167087Snate@binkert.org#
177087Snate@binkert.org# If you wish to use this software or functionality therein that may be
187087Snate@binkert.org# covered by patents for commercial use, please contact:
197087Snate@binkert.org#     Director of Intellectual Property Licensing
207087Snate@binkert.org#     Office of Strategy and Technology
217087Snate@binkert.org#     Hewlett-Packard Company
224120Sgblack@eecs.umich.edu#     1501 Page Mill Road
237087Snate@binkert.org#     Palo Alto, California  94304
244120Sgblack@eecs.umich.edu#
254120Sgblack@eecs.umich.edu# Redistributions of source code must retain the above copyright notice,
264120Sgblack@eecs.umich.edu# this list of conditions and the following disclaimer.  Redistributions
274120Sgblack@eecs.umich.edu# in binary form must reproduce the above copyright notice, this list of
284120Sgblack@eecs.umich.edu# conditions and the following disclaimer in the documentation and/or
294120Sgblack@eecs.umich.edu# other materials provided with the distribution.  Neither the name of
304120Sgblack@eecs.umich.edu# the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
314120Sgblack@eecs.umich.edu# contributors may be used to endorse or promote products derived from
324120Sgblack@eecs.umich.edu# this software without specific prior written permission.  No right of
334120Sgblack@eecs.umich.edu# sublicense is granted herewith.  Derivatives of the software and
344120Sgblack@eecs.umich.edu# output created using the software may be prepared, but only for
354120Sgblack@eecs.umich.edu# Non-Commercial Uses.  Derivatives of the software may be shared with
364120Sgblack@eecs.umich.edu# others provided: (i) the others agree to abide by the list of
374120Sgblack@eecs.umich.edu# conditions herein which includes the Non-Commercial Use restrictions;
384120Sgblack@eecs.umich.edu# and (ii) such Derivatives of the software include the above copyright
394120Sgblack@eecs.umich.edu# notice to acknowledge the contribution from this software where
404120Sgblack@eecs.umich.edu# applicable, this list of conditions and the disclaimer below.
414120Sgblack@eecs.umich.edu#
424120Sgblack@eecs.umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
434166Sgblack@eecs.umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
444166Sgblack@eecs.umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
458229Snate@binkert.org# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4612460Sgabeblack@google.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4712044Sgabeblack@google.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4811854Sbrandon.potter@amd.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
494166Sgblack@eecs.umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
504120Sgblack@eecs.umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
515956Sgblack@eecs.umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
525956Sgblack@eecs.umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
534120Sgblack@eecs.umich.edu#
544120Sgblack@eecs.umich.edu# Authors: Gabe Black
557073Sgblack@eecs.umich.edu
567073Sgblack@eecs.umich.edumicrocode = '''
577073Sgblack@eecs.umich.edudef macroop PSUBB_MMX_MMX {
587073Sgblack@eecs.umich.edu    msubi mmx, mmx, mmxm, size=1, ext=0
594166Sgblack@eecs.umich.edu};
6011851Sbrandon.potter@amd.com
614166Sgblack@eecs.umich.edudef macroop PSUBB_MMX_M {
624166Sgblack@eecs.umich.edu    ldfp ufp1, seg, sib, disp, dataSize=8
6312431Sgabeblack@google.com    msubi mmx, mmx, ufp1, size=1, ext=0
6412431Sgabeblack@google.com};
6512431Sgabeblack@google.com
6612431Sgabeblack@google.comdef macroop PSUBB_MMX_P {
6712431Sgabeblack@google.com    rdip t7
6812431Sgabeblack@google.com    ldfp ufp1, seg, riprel, disp, dataSize=8
6912431Sgabeblack@google.com    msubi mmx, mmx, ufp1, size=1, ext=0
705962Sgblack@eecs.umich.edu};
715962Sgblack@eecs.umich.edu
725962Sgblack@eecs.umich.edudef macroop PSUBW_MMX_MMX {
735956Sgblack@eecs.umich.edu    msubi mmx, mmx, mmxm, size=2, ext=0
745956Sgblack@eecs.umich.edu};
754166Sgblack@eecs.umich.edu
7611851Sbrandon.potter@amd.comdef macroop PSUBW_MMX_M {
7711851Sbrandon.potter@amd.com    ldfp ufp1, seg, sib, disp, dataSize=8
785956Sgblack@eecs.umich.edu    msubi mmx, mmx, ufp1, size=2, ext=0
795956Sgblack@eecs.umich.edu};
805973Sgblack@eecs.umich.edu
8111884Sbrandon.potter@amd.comdef macroop PSUBW_MMX_P {
824166Sgblack@eecs.umich.edu    rdip t7
834166Sgblack@eecs.umich.edu    ldfp ufp1, seg, riprel, disp, dataSize=8
845962Sgblack@eecs.umich.edu    msubi mmx, mmx, ufp1, size=2, ext=0
855962Sgblack@eecs.umich.edu};
8611320Ssteve.reinhardt@amd.com
875962Sgblack@eecs.umich.edudef macroop PSUBD_MMX_MMX {
885962Sgblack@eecs.umich.edu    msubi mmx, mmx, mmxm, size=4, ext=0
895962Sgblack@eecs.umich.edu};
9012074Sspwilson2@wisc.edu
915958Sgblack@eecs.umich.edudef macroop PSUBD_MMX_M {
9212074Sspwilson2@wisc.edu    ldfp ufp1, seg, sib, disp, dataSize=8
9312074Sspwilson2@wisc.edu    msubi mmx, mmx, ufp1, size=4, ext=0
9411886Sbrandon.potter@amd.com};
9512141Sspwilson2@wisc.edu
9611886Sbrandon.potter@amd.comdef macroop PSUBD_MMX_P {
9711886Sbrandon.potter@amd.com    rdip t7
9811886Sbrandon.potter@amd.com    ldfp ufp1, seg, riprel, disp, dataSize=8
9911886Sbrandon.potter@amd.com    msubi mmx, mmx, ufp1, size=4, ext=0
10011886Sbrandon.potter@amd.com};
10111886Sbrandon.potter@amd.com
10211886Sbrandon.potter@amd.comdef macroop PSUBQ_MMX_MMX {
10311886Sbrandon.potter@amd.com    msubi mmx, mmx, mmxm, size=8, ext=0
10411886Sbrandon.potter@amd.com};
10511886Sbrandon.potter@amd.com
10611886Sbrandon.potter@amd.comdef macroop PSUBQ_MMX_M {
10711886Sbrandon.potter@amd.com    ldfp ufp1, seg, sib, disp, dataSize=8
10811886Sbrandon.potter@amd.com    msubi mmx, mmx, ufp1, size=8, ext=0
1095956Sgblack@eecs.umich.edu};
1104166Sgblack@eecs.umich.edu
11111851Sbrandon.potter@amd.comdef macroop PSUBQ_MMX_P {
1125956Sgblack@eecs.umich.edu    rdip t7
1135956Sgblack@eecs.umich.edu    ldfp ufp1, seg, riprel, disp, dataSize=8
11411851Sbrandon.potter@amd.com    msubi mmx, mmx, ufp1, size=8, ext=0
11511851Sbrandon.potter@amd.com};
1164166Sgblack@eecs.umich.edu
1176709Svince@csl.cornell.edudef macroop PSUBSB_MMX_MMX {
1186709Svince@csl.cornell.edu    msubi mmx, mmx, mmxm, size=1, ext=4
1196709Svince@csl.cornell.edu};
1206709Svince@csl.cornell.edu
1216709Svince@csl.cornell.edudef macroop PSUBSB_MMX_M {
1226709Svince@csl.cornell.edu    ldfp ufp1, seg, sib, disp, dataSize=8
1236709Svince@csl.cornell.edu    msubi mmx, mmx, ufp1, size=1, ext=4
12411886Sbrandon.potter@amd.com};
12511886Sbrandon.potter@amd.com
12611886Sbrandon.potter@amd.comdef macroop PSUBSB_MMX_P {
12711886Sbrandon.potter@amd.com    rdip t7
12811886Sbrandon.potter@amd.com    ldfp ufp1, seg, riprel, disp, dataSize=8
12911886Sbrandon.potter@amd.com    msubi mmx, mmx, ufp1, size=1, ext=4
13011886Sbrandon.potter@amd.com};
13111886Sbrandon.potter@amd.com
13211886Sbrandon.potter@amd.comdef macroop PSUBSW_MMX_MMX {
13311886Sbrandon.potter@amd.com    msubi mmx, mmx, mmxm, size=2, ext=4
13411886Sbrandon.potter@amd.com};
13511886Sbrandon.potter@amd.com
13611886Sbrandon.potter@amd.comdef macroop PSUBSW_MMX_M {
13711886Sbrandon.potter@amd.com    ldfp ufp1, seg, sib, disp, dataSize=8
1386709Svince@csl.cornell.edu    msubi mmx, mmx, ufp1, size=2, ext=4
1396709Svince@csl.cornell.edu};
1406709Svince@csl.cornell.edu
1415956Sgblack@eecs.umich.edudef macroop PSUBSW_MMX_P {
14211884Sbrandon.potter@amd.com    rdip t7
14312074Sspwilson2@wisc.edu    ldfp ufp1, seg, riprel, disp, dataSize=8
1445958Sgblack@eecs.umich.edu    msubi mmx, mmx, ufp1, size=2, ext=4
14512074Sspwilson2@wisc.edu};
1469552Sandreas.hansson@arm.com
14711851Sbrandon.potter@amd.comdef macroop PSUBUSB_MMX_MMX {
14812074Sspwilson2@wisc.edu    msubi mmx, mmx, mmxm, size=1, ext=2
14912074Sspwilson2@wisc.edu};
15011886Sbrandon.potter@amd.com
15112141Sspwilson2@wisc.edudef macroop PSUBUSB_MMX_M {
1525956Sgblack@eecs.umich.edu    ldfp ufp1, seg, sib, disp, dataSize=8
1535956Sgblack@eecs.umich.edu    msubi mmx, mmx, ufp1, size=1, ext=2
15411851Sbrandon.potter@amd.com};
1555956Sgblack@eecs.umich.edu
1565956Sgblack@eecs.umich.edudef macroop PSUBUSB_MMX_P {
15711851Sbrandon.potter@amd.com    rdip t7
15811851Sbrandon.potter@amd.com    ldfp ufp1, seg, riprel, disp, dataSize=8
1595956Sgblack@eecs.umich.edu    msubi mmx, mmx, ufp1, size=1, ext=2
1605973Sgblack@eecs.umich.edu};
1615973Sgblack@eecs.umich.edu
1625973Sgblack@eecs.umich.edudef macroop PSUBUSW_MMX_MMX {
1635973Sgblack@eecs.umich.edu    msubi mmx, mmx, mmxm, size=2, ext=2
1645973Sgblack@eecs.umich.edu};
1655973Sgblack@eecs.umich.edu
1665973Sgblack@eecs.umich.edudef macroop PSUBUSW_MMX_M {
16711886Sbrandon.potter@amd.com    ldfp ufp1, seg, sib, disp, dataSize=8
16811886Sbrandon.potter@amd.com    msubi mmx, mmx, ufp1, size=2, ext=2
16911886Sbrandon.potter@amd.com};
17011886Sbrandon.potter@amd.com
17111886Sbrandon.potter@amd.comdef macroop PSUBUSW_MMX_P {
17211886Sbrandon.potter@amd.com    rdip t7
17311886Sbrandon.potter@amd.com    ldfp ufp1, seg, riprel, disp, dataSize=8
17411886Sbrandon.potter@amd.com    msubi mmx, mmx, ufp1, size=2, ext=2
17511886Sbrandon.potter@amd.com};
17611886Sbrandon.potter@amd.com'''
17711886Sbrandon.potter@amd.com