extract_and_insert.py revision 7087
12810SN/A# Copyright (c) 2007 The Hewlett-Packard Development Company
210693SMarco.Balboni@ARM.com# All rights reserved.
38856Sandreas.hansson@arm.com#
48856Sandreas.hansson@arm.com# The license below extends only to copyright in the software and shall
58856Sandreas.hansson@arm.com# not be construed as granting a license to any other intellectual
68856Sandreas.hansson@arm.com# property including but not limited to intellectual property relating
78856Sandreas.hansson@arm.com# to a hardware implementation of the functionality of the software
88856Sandreas.hansson@arm.com# licensed hereunder.  You may use the software subject to the license
98856Sandreas.hansson@arm.com# terms below provided that you ensure that this notice is replicated
108856Sandreas.hansson@arm.com# unmodified and in its entirety in all distributions of the software,
118856Sandreas.hansson@arm.com# modified or unmodified, in source code or in binary form.
128856Sandreas.hansson@arm.com#
138856Sandreas.hansson@arm.com# Redistribution and use in source and binary forms, with or without
142810SN/A# modification, are permitted provided that the following conditions are
152810SN/A# met: redistributions of source code must retain the above copyright
162810SN/A# notice, this list of conditions and the following disclaimer;
172810SN/A# redistributions in binary form must reproduce the above copyright
182810SN/A# notice, this list of conditions and the following disclaimer in the
192810SN/A# documentation and/or other materials provided with the distribution;
202810SN/A# neither the name of the copyright holders nor the names of its
212810SN/A# contributors may be used to endorse or promote products derived from
222810SN/A# this software without specific prior written permission.
232810SN/A#
242810SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
252810SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
262810SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
272810SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
282810SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
292810SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
302810SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
312810SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
322810SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
332810SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
342810SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
352810SN/A#
362810SN/A# Authors: Gabe Black
372810SN/A
382810SN/Amicrocode = '''
392810SN/Adef macroop PEXTRW_R_MMX_I {
402810SN/A    mov2int reg, mmxm, "IMMEDIATE & mask(2)", size=2, ext=0
414458SN/A};
424458SN/A
432810SN/Adef macroop PINSRW_MMX_R_I {
442810SN/A    mov2fp mmx, regm, "IMMEDIATE & mask(2)", size=2, ext=0
452810SN/A};
462810SN/A
472810SN/Adef macroop PINSRW_MMX_M_I {
482810SN/A    ld t1, seg, sib, disp, dataSize=2
492810SN/A    mov2fp mmx, t1, "IMMEDIATE & mask(2)", size=2, ext=0
5011051Sandreas.hansson@arm.com};
5111051Sandreas.hansson@arm.com
522810SN/Adef macroop PINSRW_MMX_P_I {
537676Snate@binkert.org    rdip t7
547676Snate@binkert.org    ld t1, seg, riprel, disp, dataSize=2
557676Snate@binkert.org    mov2fp mmx, t1, "IMMEDIATE & mask(2)", size=2, ext=0
562810SN/A};
572810SN/A'''
582825SN/A