unpack_and_interleave.py revision 6545:9c68aea7b1e6
1955SN/A# Copyright (c) 2007 The Hewlett-Packard Development Company
2955SN/A# All rights reserved.
310841Sandreas.sandberg@arm.com#
49812Sandreas.hansson@arm.com# Redistribution and use of this software in source and binary forms,
59812Sandreas.hansson@arm.com# with or without modification, are permitted provided that the
69812Sandreas.hansson@arm.com# following conditions are met:
79812Sandreas.hansson@arm.com#
89812Sandreas.hansson@arm.com# The software must be used only for Non-Commercial Use which means any
99812Sandreas.hansson@arm.com# use which is NOT directed to receiving any direct monetary
109812Sandreas.hansson@arm.com# compensation for, or commercial advantage from such use.  Illustrative
119812Sandreas.hansson@arm.com# examples of non-commercial use are academic research, personal study,
129812Sandreas.hansson@arm.com# teaching, education and corporate research & development.
139812Sandreas.hansson@arm.com# Illustrative examples of commercial use are distributing products for
149812Sandreas.hansson@arm.com# commercial advantage and providing services using the software for
157816Ssteve.reinhardt@amd.com# commercial advantage.
165871Snate@binkert.org#
171762SN/A# If you wish to use this software or functionality therein that may be
18955SN/A# covered by patents for commercial use, please contact:
19955SN/A#     Director of Intellectual Property Licensing
20955SN/A#     Office of Strategy and Technology
21955SN/A#     Hewlett-Packard Company
22955SN/A#     1501 Page Mill Road
23955SN/A#     Palo Alto, California  94304
24955SN/A#
25955SN/A# Redistributions of source code must retain the above copyright notice,
26955SN/A# this list of conditions and the following disclaimer.  Redistributions
27955SN/A# in binary form must reproduce the above copyright notice, this list of
28955SN/A# conditions and the following disclaimer in the documentation and/or
29955SN/A# other materials provided with the distribution.  Neither the name of
30955SN/A# the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
31955SN/A# contributors may be used to endorse or promote products derived from
32955SN/A# this software without specific prior written permission.  No right of
33955SN/A# sublicense is granted herewith.  Derivatives of the software and
34955SN/A# output created using the software may be prepared, but only for
35955SN/A# Non-Commercial Uses.  Derivatives of the software may be shared with
36955SN/A# others provided: (i) the others agree to abide by the list of
37955SN/A# conditions herein which includes the Non-Commercial Use restrictions;
38955SN/A# and (ii) such Derivatives of the software include the above copyright
39955SN/A# notice to acknowledge the contribution from this software where
40955SN/A# applicable, this list of conditions and the disclaimer below.
41955SN/A#
422665Ssaidi@eecs.umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
432665Ssaidi@eecs.umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
445863Snate@binkert.org# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
45955SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
46955SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
47955SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
48955SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
49955SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
508878Ssteve.reinhardt@amd.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
512632Sstever@eecs.umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
528878Ssteve.reinhardt@amd.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
532632Sstever@eecs.umich.edu#
54955SN/A# Authors: Gabe Black
558878Ssteve.reinhardt@amd.com
562632Sstever@eecs.umich.edumicrocode = '''
572761Sstever@eecs.umich.edudef macroop UNPCKLPS_XMM_XMM {
582632Sstever@eecs.umich.edu    unpack xmmh, xmml, xmmlm, ext=1, size=4
592632Sstever@eecs.umich.edu    unpack xmml, xmml, xmmlm, ext=0, size=4
602632Sstever@eecs.umich.edu};
612761Sstever@eecs.umich.edu
622761Sstever@eecs.umich.edudef macroop UNPCKLPS_XMM_M {
632761Sstever@eecs.umich.edu    ldfp ufp1, seg, sib, disp, dataSize=8
648878Ssteve.reinhardt@amd.com    unpack xmmh, xmml, ufp1, ext=1, size=4
658878Ssteve.reinhardt@amd.com    unpack xmml, xmml, ufp1, ext=0, size=4
662761Sstever@eecs.umich.edu};
672761Sstever@eecs.umich.edu
682761Sstever@eecs.umich.edudef macroop UNPCKLPS_XMM_P {
692761Sstever@eecs.umich.edu    rdip t7
702761Sstever@eecs.umich.edu    ldfp ufp1, seg, riprel, disp, dataSize=8
718878Ssteve.reinhardt@amd.com    unpack xmmh, xmml, ufp1, ext=1, size=4
728878Ssteve.reinhardt@amd.com    unpack xmml, xmml, ufp1, ext=0, size=4
732632Sstever@eecs.umich.edu};
742632Sstever@eecs.umich.edu
758878Ssteve.reinhardt@amd.comdef macroop UNPCKLPD_XMM_XMM {
768878Ssteve.reinhardt@amd.com    movfp xmmh, xmmlm
772632Sstever@eecs.umich.edu};
78955SN/A
79955SN/Adef macroop UNPCKLPD_XMM_M {
80955SN/A    ldfp xmmh, seg, sib, disp, dataSize=8
815863Snate@binkert.org};
825863Snate@binkert.org
835863Snate@binkert.orgdef macroop UNPCKLPD_XMM_P {
845863Snate@binkert.org    rdip t7
855863Snate@binkert.org    ldfp xmmh, seg, riprel, disp, dataSize=8
865863Snate@binkert.org};
875863Snate@binkert.org
885863Snate@binkert.orgdef macroop UNPCKHPS_XMM_XMM {
895863Snate@binkert.org    unpack xmml, xmmh, xmmhm, ext=0, size=4
905863Snate@binkert.org    unpack xmmh, xmmh, xmmhm, ext=1, size=4
915863Snate@binkert.org};
928878Ssteve.reinhardt@amd.com
935863Snate@binkert.orgdef macroop UNPCKHPS_XMM_M {
945863Snate@binkert.org    lea t1, seg, sib, disp, dataSize=asz
955863Snate@binkert.org    ldfp ufp1, seg, [1, t0, t1], 8, dataSize=8
969812Sandreas.hansson@arm.com    unpack xmml, xmmh, ufp1, ext=0, size=4
979812Sandreas.hansson@arm.com    unpack xmmh, xmmh, ufp1, ext=1, size=4
985863Snate@binkert.org};
999812Sandreas.hansson@arm.com
1005863Snate@binkert.orgdef macroop UNPCKHPS_XMM_P {
1015863Snate@binkert.org    rdip t7
1025863Snate@binkert.org    lea t1, seg, riprel, disp, dataSize=asz
1039812Sandreas.hansson@arm.com    ldfp ufp1, seg, [1, t0, t1], 8, dataSize=8
1049812Sandreas.hansson@arm.com    unpack xmml, xmmh, ufp1, ext=0, size=4
1055863Snate@binkert.org    unpack xmmh, xmmh, ufp1, ext=1, size=4
1065863Snate@binkert.org};
1078878Ssteve.reinhardt@amd.com
1085863Snate@binkert.orgdef macroop UNPCKHPD_XMM_XMM {
1095863Snate@binkert.org    movfp xmml, xmmh
1105863Snate@binkert.org    movfp xmmh, xmmhm
1116654Snate@binkert.org};
11210196SCurtis.Dunham@arm.com
113955SN/Adef macroop UNPCKHPD_XMM_M {
1145396Ssaidi@eecs.umich.edu    lea t1, seg, sib, disp, dataSize=asz
1155863Snate@binkert.org    ldfp ufp1, seg, [1, t0, t1], 8, dataSize=8
1165863Snate@binkert.org    movfp xmml, xmmh
1174202Sbinkertn@umich.edu    movfp xmmh, ufp1
1185863Snate@binkert.org};
1195863Snate@binkert.org
1205863Snate@binkert.orgdef macroop UNPCKHPD_XMM_P {
1215863Snate@binkert.org    rdip t7
122955SN/A    lea t1, seg, riprel, disp, dataSize=asz
1236654Snate@binkert.org    ldfp ufp1, seg, [1, t0, t1], 8, dataSize=8
1245273Sstever@gmail.com    movfp xmml, xmmh
1255871Snate@binkert.org    movfp xmmh, ufp1
1265273Sstever@gmail.com};
1276655Snate@binkert.org'''
1288878Ssteve.reinhardt@amd.com