unpack_and_interleave.py revision 6545:9c68aea7b1e6
17405SAli.Saidi@ARM.com# Copyright (c) 2007 The Hewlett-Packard Development Company
212667Schuan.zhu@arm.com# All rights reserved.
37405SAli.Saidi@ARM.com#
47405SAli.Saidi@ARM.com# Redistribution and use of this software in source and binary forms,
57405SAli.Saidi@ARM.com# with or without modification, are permitted provided that the
67405SAli.Saidi@ARM.com# following conditions are met:
77405SAli.Saidi@ARM.com#
87405SAli.Saidi@ARM.com# The software must be used only for Non-Commercial Use which means any
97405SAli.Saidi@ARM.com# use which is NOT directed to receiving any direct monetary
107405SAli.Saidi@ARM.com# compensation for, or commercial advantage from such use.  Illustrative
117405SAli.Saidi@ARM.com# examples of non-commercial use are academic research, personal study,
127405SAli.Saidi@ARM.com# teaching, education and corporate research & development.
137405SAli.Saidi@ARM.com# Illustrative examples of commercial use are distributing products for
147405SAli.Saidi@ARM.com# commercial advantage and providing services using the software for
157405SAli.Saidi@ARM.com# commercial advantage.
167405SAli.Saidi@ARM.com#
177405SAli.Saidi@ARM.com# If you wish to use this software or functionality therein that may be
187405SAli.Saidi@ARM.com# covered by patents for commercial use, please contact:
197405SAli.Saidi@ARM.com#     Director of Intellectual Property Licensing
207405SAli.Saidi@ARM.com#     Office of Strategy and Technology
217405SAli.Saidi@ARM.com#     Hewlett-Packard Company
227405SAli.Saidi@ARM.com#     1501 Page Mill Road
237405SAli.Saidi@ARM.com#     Palo Alto, California  94304
247405SAli.Saidi@ARM.com#
257405SAli.Saidi@ARM.com# Redistributions of source code must retain the above copyright notice,
267405SAli.Saidi@ARM.com# this list of conditions and the following disclaimer.  Redistributions
277405SAli.Saidi@ARM.com# in binary form must reproduce the above copyright notice, this list of
287405SAli.Saidi@ARM.com# conditions and the following disclaimer in the documentation and/or
297405SAli.Saidi@ARM.com# other materials provided with the distribution.  Neither the name of
307405SAli.Saidi@ARM.com# the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
317405SAli.Saidi@ARM.com# contributors may be used to endorse or promote products derived from
327405SAli.Saidi@ARM.com# this software without specific prior written permission.  No right of
337405SAli.Saidi@ARM.com# sublicense is granted herewith.  Derivatives of the software and
347405SAli.Saidi@ARM.com# output created using the software may be prepared, but only for
357405SAli.Saidi@ARM.com# Non-Commercial Uses.  Derivatives of the software may be shared with
367405SAli.Saidi@ARM.com# others provided: (i) the others agree to abide by the list of
377405SAli.Saidi@ARM.com# conditions herein which includes the Non-Commercial Use restrictions;
387405SAli.Saidi@ARM.com# and (ii) such Derivatives of the software include the above copyright
397405SAli.Saidi@ARM.com# notice to acknowledge the contribution from this software where
407405SAli.Saidi@ARM.com# applicable, this list of conditions and the disclaimer below.
417405SAli.Saidi@ARM.com#
4210461SAndreas.Sandberg@ARM.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
439050Schander.sudanthi@arm.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4412406Sgabeblack@google.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4512605Sgiacomo.travaglini@arm.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4611793Sbrandon.potter@amd.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
478887Sgeoffrey.blake@arm.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
488232Snate@binkert.org# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
498232Snate@binkert.org# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
5010844Sandreas.sandberg@arm.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
519384SAndreas.Sandberg@arm.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
527678Sgblack@eecs.umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
538059SAli.Saidi@ARM.com#
548284SAli.Saidi@ARM.com# Authors: Gabe Black
557405SAli.Saidi@ARM.com
567405SAli.Saidi@ARM.commicrocode = '''
577405SAli.Saidi@ARM.comdef macroop PUNPCKLBW_MMX_MMX {
587405SAli.Saidi@ARM.com    unpack mmx, mmx, mmxm, ext=0, size=1
599384SAndreas.Sandberg@arm.com};
6010461SAndreas.Sandberg@ARM.com
6110461SAndreas.Sandberg@ARM.comdef macroop PUNPCKLBW_MMX_M {
6211165SRekai.GonzalezAlberquilla@arm.com    ldfp ufp1, seg, sib, disp, dataSize=8
6312109SRekai.GonzalezAlberquilla@arm.com    unpack mmx, mmx, ufp1, ext=0, size=1
6412714Sgiacomo.travaglini@arm.com};
6512714Sgiacomo.travaglini@arm.com
669384SAndreas.Sandberg@arm.comdef macroop PUNPCKLBW_MMX_P {
6711770SCurtis.Dunham@arm.com    rdip t7
6810037SARM gem5 Developers    ldfp ufp1, seg, riprel, disp, dataSize=8
6910461SAndreas.Sandberg@ARM.com    unpack mmx, mmx, ufp1, ext=0, size=1
7010461SAndreas.Sandberg@ARM.com};
7110461SAndreas.Sandberg@ARM.com
7210461SAndreas.Sandberg@ARM.comdef macroop PUNPCKLWD_MMX_MMX {
7310461SAndreas.Sandberg@ARM.com    unpack mmx, mmx, mmxm, ext=0, size=2
7410461SAndreas.Sandberg@ARM.com};
7510609Sandreas.sandberg@arm.com
7610609Sandreas.sandberg@arm.comdef macroop PUNPCKLWD_MMX_M {
7710609Sandreas.sandberg@arm.com    ldfp ufp1, seg, sib, disp, dataSize=8
7810037SARM gem5 Developers    unpack mmx, mmx, ufp1, ext=0, size=2
7910037SARM gem5 Developers};
8010037SARM gem5 Developers
8110037SARM gem5 Developersdef macroop PUNPCKLWD_MMX_P {
8211771SCurtis.Dunham@arm.com    rdip t7
8310037SARM gem5 Developers    ldfp ufp1, seg, riprel, disp, dataSize=8
8410037SARM gem5 Developers    unpack mmx, mmx, ufp1, ext=0, size=2
8513173Sgiacomo.travaglini@arm.com};
8610037SARM gem5 Developers
8710037SARM gem5 Developersdef macroop PUNPCKLDQ_MMX_MMX {
8813114Sgiacomo.travaglini@arm.com    unpack mmx, mmx, mmxm, ext=0, size=4
8910037SARM gem5 Developers};
9011771SCurtis.Dunham@arm.com
9110037SARM gem5 Developersdef macroop PUNPCKLDQ_MMX_M {
9213499Sgiacomo.travaglini@arm.com    ldfp ufp1, seg, sib, disp, dataSize=8
9310037SARM gem5 Developers    unpack mmx, mmx, ufp1, ext=0, size=4
9413114Sgiacomo.travaglini@arm.com};
9510037SARM gem5 Developers
9610037SARM gem5 Developersdef macroop PUNPCKLDQ_MMX_P {
9712477SCurtis.Dunham@arm.com    rdip t7
9810037SARM gem5 Developers    ldfp ufp1, seg, riprel, disp, dataSize=8
9910037SARM gem5 Developers    unpack mmx, mmx, ufp1, ext=0, size=4
1009384SAndreas.Sandberg@arm.com};
1019384SAndreas.Sandberg@arm.com
1029384SAndreas.Sandberg@arm.comdef macroop PUNPCKHBW_MMX_MMX {
10312479SCurtis.Dunham@arm.com    unpack mmx, mmx, mmxm, ext=1, size=1
10412479SCurtis.Dunham@arm.com};
1059384SAndreas.Sandberg@arm.com
1069384SAndreas.Sandberg@arm.comdef macroop PUNPCKHBW_MMX_M {
1079384SAndreas.Sandberg@arm.com    ldfp ufp1, seg, sib, disp, dataSize=8
1089384SAndreas.Sandberg@arm.com    unpack mmx, mmx, ufp1, ext=1, size=1
1099384SAndreas.Sandberg@arm.com};
1109384SAndreas.Sandberg@arm.com
1117427Sgblack@eecs.umich.edudef macroop PUNPCKHBW_MMX_P {
1127427Sgblack@eecs.umich.edu    rdip t7
1137427Sgblack@eecs.umich.edu    ldfp ufp1, seg, riprel, disp, dataSize=8
1149385SAndreas.Sandberg@arm.com    unpack mmx, mmx, ufp1, ext=1, size=1
1159385SAndreas.Sandberg@arm.com};
1167427Sgblack@eecs.umich.edu
1177427Sgblack@eecs.umich.edudef macroop PUNPCKHWD_MMX_MMX {
11810037SARM gem5 Developers    unpack mmx, mmx, mmxm, ext=1, size=2
11913114Sgiacomo.travaglini@arm.com};
12010037SARM gem5 Developers
12113114Sgiacomo.travaglini@arm.comdef macroop PUNPCKHWD_MMX_M {
12213114Sgiacomo.travaglini@arm.com    ldfp ufp1, seg, sib, disp, dataSize=8
12313114Sgiacomo.travaglini@arm.com    unpack mmx, mmx, ufp1, ext=1, size=2
12413114Sgiacomo.travaglini@arm.com};
12513114Sgiacomo.travaglini@arm.com
12612690Sgiacomo.travaglini@arm.comdef macroop PUNPCKHWD_MMX_P {
12710037SARM gem5 Developers    rdip t7
1287427Sgblack@eecs.umich.edu    ldfp ufp1, seg, riprel, disp, dataSize=8
1297427Sgblack@eecs.umich.edu    unpack mmx, mmx, ufp1, ext=1, size=2
13010037SARM gem5 Developers};
1317427Sgblack@eecs.umich.edu
1327427Sgblack@eecs.umich.edudef macroop PUNPCKHDQ_MMX_MMX {
1337427Sgblack@eecs.umich.edu    unpack mmx, mmx, mmxm, ext=1, size=4
1347427Sgblack@eecs.umich.edu};
1357427Sgblack@eecs.umich.edu
1367427Sgblack@eecs.umich.edudef macroop PUNPCKHDQ_MMX_M {
1377427Sgblack@eecs.umich.edu    ldfp ufp1, seg, sib, disp, dataSize=8
1387427Sgblack@eecs.umich.edu    unpack mmx, mmx, ufp1, ext=1, size=4
1397427Sgblack@eecs.umich.edu};
1407427Sgblack@eecs.umich.edu
1417427Sgblack@eecs.umich.edudef macroop PUNPCKHDQ_MMX_P {
1427427Sgblack@eecs.umich.edu    rdip t7
1437427Sgblack@eecs.umich.edu    ldfp ufp1, seg, riprel, disp, dataSize=8
1447427Sgblack@eecs.umich.edu    unpack mmx, mmx, ufp1, ext=1, size=4
1457427Sgblack@eecs.umich.edu};
1467427Sgblack@eecs.umich.edu'''
1477427Sgblack@eecs.umich.edu