shuffle.py revision 7087:fb8d5786ff30
1955SN/A# Copyright (c) 2007 The Hewlett-Packard Development Company 2955SN/A# All rights reserved. 39812Sandreas.hansson@arm.com# 49812Sandreas.hansson@arm.com# The license below extends only to copyright in the software and shall 59812Sandreas.hansson@arm.com# not be construed as granting a license to any other intellectual 69812Sandreas.hansson@arm.com# property including but not limited to intellectual property relating 79812Sandreas.hansson@arm.com# to a hardware implementation of the functionality of the software 89812Sandreas.hansson@arm.com# licensed hereunder. You may use the software subject to the license 99812Sandreas.hansson@arm.com# terms below provided that you ensure that this notice is replicated 109812Sandreas.hansson@arm.com# unmodified and in its entirety in all distributions of the software, 119812Sandreas.hansson@arm.com# modified or unmodified, in source code or in binary form. 129812Sandreas.hansson@arm.com# 139812Sandreas.hansson@arm.com# Redistribution and use in source and binary forms, with or without 149812Sandreas.hansson@arm.com# modification, are permitted provided that the following conditions are 157816Ssteve.reinhardt@amd.com# met: redistributions of source code must retain the above copyright 165871Snate@binkert.org# notice, this list of conditions and the following disclaimer; 171762SN/A# redistributions in binary form must reproduce the above copyright 18955SN/A# notice, this list of conditions and the following disclaimer in the 19955SN/A# documentation and/or other materials provided with the distribution; 20955SN/A# neither the name of the copyright holders nor the names of its 21955SN/A# contributors may be used to endorse or promote products derived from 22955SN/A# this software without specific prior written permission. 23955SN/A# 24955SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 25955SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 26955SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 27955SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 28955SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 29955SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 30955SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 31955SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 32955SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33955SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 34955SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35955SN/A# 36955SN/A# Authors: Gabe Black 37955SN/A 38955SN/Amicrocode = ''' 39955SN/Adef macroop SHUFPS_XMM_XMM_I { 40955SN/A shuffle ufp1, xmml, xmmh, size=4, ext="IMMEDIATE" 41955SN/A shuffle xmmh, xmmlm, xmmhm, size=4, ext="IMMEDIATE >> 4" 422665Ssaidi@eecs.umich.edu movfp xmml, ufp1, dataSize=8 432665Ssaidi@eecs.umich.edu}; 445863Snate@binkert.org 45955SN/Adef macroop SHUFPS_XMM_M_I { 46955SN/A ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 47955SN/A ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 48955SN/A shuffle xmml, xmml, xmmh, size=4, ext="IMMEDIATE" 49955SN/A shuffle xmmh, ufp1, ufp2, size=4, ext="IMMEDIATE >> 4" 508878Ssteve.reinhardt@amd.com}; 512632Sstever@eecs.umich.edu 528878Ssteve.reinhardt@amd.comdef macroop SHUFPS_XMM_P_I { 532632Sstever@eecs.umich.edu rdip t7 54955SN/A ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 558878Ssteve.reinhardt@amd.com ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 562632Sstever@eecs.umich.edu shuffle xmml, xmml, xmmh, size=4, ext="IMMEDIATE" 572761Sstever@eecs.umich.edu shuffle xmmh, ufp1, ufp2, size=4, ext="IMMEDIATE >> 4" 582632Sstever@eecs.umich.edu}; 592632Sstever@eecs.umich.edu 602632Sstever@eecs.umich.edudef macroop SHUFPD_XMM_XMM_I { 612761Sstever@eecs.umich.edu shuffle ufp1, xmml, xmmh, size=8, ext="IMMEDIATE" 622761Sstever@eecs.umich.edu shuffle xmmh, xmmlm, xmmhm, size=8, ext="IMMEDIATE >> 1" 632761Sstever@eecs.umich.edu movfp xmml, ufp1, dataSize=8 648878Ssteve.reinhardt@amd.com}; 658878Ssteve.reinhardt@amd.com 662761Sstever@eecs.umich.edudef macroop SHUFPD_XMM_M_I { 672761Sstever@eecs.umich.edu ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 682761Sstever@eecs.umich.edu ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 692761Sstever@eecs.umich.edu shuffle xmml, xmml, xmmh, size=8, ext="IMMEDIATE" 702761Sstever@eecs.umich.edu shuffle xmmh, ufp1, ufp2, size=8, ext="IMMEDIATE >> 1" 718878Ssteve.reinhardt@amd.com}; 728878Ssteve.reinhardt@amd.com 732632Sstever@eecs.umich.edudef macroop SHUFPD_XMM_P_I { 742632Sstever@eecs.umich.edu rdip t7 758878Ssteve.reinhardt@amd.com ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 768878Ssteve.reinhardt@amd.com ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 772632Sstever@eecs.umich.edu shuffle xmml, xmml, xmmh, size=8, ext="IMMEDIATE" 78955SN/A shuffle xmmh, ufp1, ufp2, size=8, ext="IMMEDIATE >> 1" 79955SN/A}; 80955SN/A''' 815863Snate@binkert.org