multiplication.py revision 6799
111507SCurtis.Dunham@arm.com# Copyright (c) 2007 The Hewlett-Packard Development Company
211507SCurtis.Dunham@arm.com# All rights reserved.
311860Sandreas.hansson@arm.com#
411860Sandreas.hansson@arm.com# Redistribution and use of this software in source and binary forms,
511860Sandreas.hansson@arm.com# with or without modification, are permitted provided that the
611507SCurtis.Dunham@arm.com# following conditions are met:
711860Sandreas.hansson@arm.com#
811860Sandreas.hansson@arm.com# The software must be used only for Non-Commercial Use which means any
911860Sandreas.hansson@arm.com# use which is NOT directed to receiving any direct monetary
1011860Sandreas.hansson@arm.com# compensation for, or commercial advantage from such use.  Illustrative
1111860Sandreas.hansson@arm.com# examples of non-commercial use are academic research, personal study,
1211507SCurtis.Dunham@arm.com# teaching, education and corporate research & development.
1311507SCurtis.Dunham@arm.com# Illustrative examples of commercial use are distributing products for
1411507SCurtis.Dunham@arm.com# commercial advantage and providing services using the software for
1511507SCurtis.Dunham@arm.com# commercial advantage.
1611860Sandreas.hansson@arm.com#
1711860Sandreas.hansson@arm.com# If you wish to use this software or functionality therein that may be
1811606Sandreas.sandberg@arm.com# covered by patents for commercial use, please contact:
1911860Sandreas.hansson@arm.com#     Director of Intellectual Property Licensing
2011860Sandreas.hansson@arm.com#     Office of Strategy and Technology
2111860Sandreas.hansson@arm.com#     Hewlett-Packard Company
2211507SCurtis.Dunham@arm.com#     1501 Page Mill Road
2311507SCurtis.Dunham@arm.com#     Palo Alto, California  94304
2411860Sandreas.hansson@arm.com#
2511606Sandreas.sandberg@arm.com# Redistributions of source code must retain the above copyright notice,
2611860Sandreas.hansson@arm.com# this list of conditions and the following disclaimer.  Redistributions
2711507SCurtis.Dunham@arm.com# in binary form must reproduce the above copyright notice, this list of
2811507SCurtis.Dunham@arm.com# conditions and the following disclaimer in the documentation and/or
2911860Sandreas.hansson@arm.com# other materials provided with the distribution.  Neither the name of
3011860Sandreas.hansson@arm.com# the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
3111860Sandreas.hansson@arm.com# contributors may be used to endorse or promote products derived from
3211860Sandreas.hansson@arm.com# this software without specific prior written permission.  No right of
3311860Sandreas.hansson@arm.com# sublicense is granted herewith.  Derivatives of the software and
3411860Sandreas.hansson@arm.com# output created using the software may be prepared, but only for
3511860Sandreas.hansson@arm.com# Non-Commercial Uses.  Derivatives of the software may be shared with
3611860Sandreas.hansson@arm.com# others provided: (i) the others agree to abide by the list of
3711860Sandreas.hansson@arm.com# conditions herein which includes the Non-Commercial Use restrictions;
3811860Sandreas.hansson@arm.com# and (ii) such Derivatives of the software include the above copyright
3911860Sandreas.hansson@arm.com# notice to acknowledge the contribution from this software where
4011860Sandreas.hansson@arm.com# applicable, this list of conditions and the disclaimer below.
4111507SCurtis.Dunham@arm.com#
4211860Sandreas.hansson@arm.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4311507SCurtis.Dunham@arm.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4411860Sandreas.hansson@arm.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4511860Sandreas.hansson@arm.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4611860Sandreas.hansson@arm.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4711860Sandreas.hansson@arm.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4811507SCurtis.Dunham@arm.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4911860Sandreas.hansson@arm.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
5011507SCurtis.Dunham@arm.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5111507SCurtis.Dunham@arm.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5211860Sandreas.hansson@arm.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5311860Sandreas.hansson@arm.com#
5411860Sandreas.hansson@arm.com# Authors: Gabe Black
5511860Sandreas.hansson@arm.com
5611860Sandreas.hansson@arm.commicrocode = '''
5711860Sandreas.hansson@arm.comdef macroop MULSS_XMM_XMM {
5811860Sandreas.hansson@arm.com    mmulf xmml, xmml, xmmlm, size=4, ext=Scalar
5911680SCurtis.Dunham@arm.com};
6011860Sandreas.hansson@arm.com
6111860Sandreas.hansson@arm.comdef macroop MULSS_XMM_M {
6211860Sandreas.hansson@arm.com    ldfp ufp1, seg, sib, disp, dataSize=8
6311860Sandreas.hansson@arm.com    mmulf xmml, xmml, ufp1, size=4, ext=Scalar
6411860Sandreas.hansson@arm.com};
6511860Sandreas.hansson@arm.com
6611860Sandreas.hansson@arm.comdef macroop MULSS_XMM_P {
6711860Sandreas.hansson@arm.com    rdip t7
6811507SCurtis.Dunham@arm.com    ldfp ufp1, seg, riprel, disp, dataSize=8
6911680SCurtis.Dunham@arm.com    mmulf xmml, xmml, ufp1, size=4, ext=Scalar
7011860Sandreas.hansson@arm.com};
7111507SCurtis.Dunham@arm.com
7211860Sandreas.hansson@arm.comdef macroop MULSD_XMM_XMM {
7311606Sandreas.sandberg@arm.com    mmulf xmml, xmml, xmmlm, size=8, ext=Scalar
7411860Sandreas.hansson@arm.com};
7511680SCurtis.Dunham@arm.com
7611860Sandreas.hansson@arm.comdef macroop MULSD_XMM_M {
7711860Sandreas.hansson@arm.com    ldfp ufp1, seg, sib, disp, dataSize=8
7811507SCurtis.Dunham@arm.com    mmulf xmml, xmml, ufp1, size=8, ext=Scalar
7911507SCurtis.Dunham@arm.com};
8011860Sandreas.hansson@arm.com
8111860Sandreas.hansson@arm.comdef macroop MULSD_XMM_P {
8211860Sandreas.hansson@arm.com    rdip t7
8311860Sandreas.hansson@arm.com    ldfp ufp1, seg, riprel, disp, dataSize=8
8411507SCurtis.Dunham@arm.com    mmulf xmml, xmml, ufp1, size=8, ext=Scalar
8511507SCurtis.Dunham@arm.com};
8611860Sandreas.hansson@arm.com
8711507SCurtis.Dunham@arm.comdef macroop MULPS_XMM_XMM {
8811507SCurtis.Dunham@arm.com    mmulf xmml, xmml, xmmlm, size=4, ext=0
8911507SCurtis.Dunham@arm.com    mmulf xmmh, xmmh, xmmhm, size=4, ext=0
9011507SCurtis.Dunham@arm.com};
9111507SCurtis.Dunham@arm.com
9211507SCurtis.Dunham@arm.comdef macroop MULPS_XMM_M {
9311860Sandreas.hansson@arm.com    ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
9411507SCurtis.Dunham@arm.com    ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
9511507SCurtis.Dunham@arm.com    mmulf xmml, xmml, ufp1, size=4, ext=0
9611507SCurtis.Dunham@arm.com    mmulf xmmh, xmmh, ufp2, size=4, ext=0
9711507SCurtis.Dunham@arm.com};
9811507SCurtis.Dunham@arm.com
9911507SCurtis.Dunham@arm.comdef macroop MULPS_XMM_P {
10011507SCurtis.Dunham@arm.com    rdip t7
10111860Sandreas.hansson@arm.com    ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
10211860Sandreas.hansson@arm.com    ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
10311860Sandreas.hansson@arm.com    mmulf xmml, xmml, ufp1, size=4, ext=0
10411507SCurtis.Dunham@arm.com    mmulf xmmh, xmmh, ufp2, size=4, ext=0
10511507SCurtis.Dunham@arm.com};
10611507SCurtis.Dunham@arm.com
10711507SCurtis.Dunham@arm.comdef macroop MULPD_XMM_XMM {
10811507SCurtis.Dunham@arm.com    mmulf xmml, xmml, xmmlm, size=8, ext=0
10911507SCurtis.Dunham@arm.com    mmulf xmmh, xmmh, xmmhm, size=8, ext=0
11011507SCurtis.Dunham@arm.com};
11111507SCurtis.Dunham@arm.com
11211507SCurtis.Dunham@arm.comdef macroop MULPD_XMM_M {
11311507SCurtis.Dunham@arm.com    ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
11411507SCurtis.Dunham@arm.com    ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
11511507SCurtis.Dunham@arm.com    mmulf xmml, xmml, ufp1, size=8, ext=0
11611507SCurtis.Dunham@arm.com    mmulf xmmh, xmmh, ufp2, size=8, ext=0
11711507SCurtis.Dunham@arm.com};
11811507SCurtis.Dunham@arm.com
11911507SCurtis.Dunham@arm.comdef macroop MULPD_XMM_P {
12011507SCurtis.Dunham@arm.com    rdip t7
12111507SCurtis.Dunham@arm.com    ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
12211507SCurtis.Dunham@arm.com    ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
12311507SCurtis.Dunham@arm.com    mmulf xmml, xmml, ufp1, size=8, ext=0
12411507SCurtis.Dunham@arm.com    mmulf xmmh, xmmh, ufp2, size=8, ext=0
12511507SCurtis.Dunham@arm.com};
12611507SCurtis.Dunham@arm.com'''
12711507SCurtis.Dunham@arm.com