square_root.py revision 6518:1ad4a7774b3c
12567SN/A# Copyright (c) 2007 The Hewlett-Packard Development Company
27585SAli.Saidi@arm.com# All rights reserved.
37585SAli.Saidi@arm.com#
47585SAli.Saidi@arm.com# Redistribution and use of this software in source and binary forms,
57585SAli.Saidi@arm.com# with or without modification, are permitted provided that the
67585SAli.Saidi@arm.com# following conditions are met:
77585SAli.Saidi@arm.com#
87585SAli.Saidi@arm.com# The software must be used only for Non-Commercial Use which means any
97585SAli.Saidi@arm.com# use which is NOT directed to receiving any direct monetary
107585SAli.Saidi@arm.com# compensation for, or commercial advantage from such use.  Illustrative
117585SAli.Saidi@arm.com# examples of non-commercial use are academic research, personal study,
127585SAli.Saidi@arm.com# teaching, education and corporate research & development.
137585SAli.Saidi@arm.com# Illustrative examples of commercial use are distributing products for
142567SN/A# commercial advantage and providing services using the software for
152567SN/A# commercial advantage.
162567SN/A#
172567SN/A# If you wish to use this software or functionality therein that may be
182567SN/A# covered by patents for commercial use, please contact:
192567SN/A#     Director of Intellectual Property Licensing
202567SN/A#     Office of Strategy and Technology
212567SN/A#     Hewlett-Packard Company
222567SN/A#     1501 Page Mill Road
232567SN/A#     Palo Alto, California  94304
242567SN/A#
252567SN/A# Redistributions of source code must retain the above copyright notice,
262567SN/A# this list of conditions and the following disclaimer.  Redistributions
272567SN/A# in binary form must reproduce the above copyright notice, this list of
282567SN/A# conditions and the following disclaimer in the documentation and/or
292567SN/A# other materials provided with the distribution.  Neither the name of
302567SN/A# the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
312567SN/A# contributors may be used to endorse or promote products derived from
322567SN/A# this software without specific prior written permission.  No right of
332567SN/A# sublicense is granted herewith.  Derivatives of the software and
342567SN/A# output created using the software may be prepared, but only for
352567SN/A# Non-Commercial Uses.  Derivatives of the software may be shared with
362567SN/A# others provided: (i) the others agree to abide by the list of
372567SN/A# conditions herein which includes the Non-Commercial Use restrictions;
382567SN/A# and (ii) such Derivatives of the software include the above copyright
392665SN/A# notice to acknowledge the contribution from this software where
402665SN/A# applicable, this list of conditions and the disclaimer below.
412567SN/A#
422567SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
438229Snate@binkert.org# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
448229Snate@binkert.org# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
456757SAli.Saidi@ARM.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
468286SAli.Saidi@ARM.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
478286SAli.Saidi@ARM.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
488286SAli.Saidi@ARM.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
498286SAli.Saidi@ARM.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
508706Sandreas.hansson@arm.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
512567SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
527650SAli.Saidi@ARM.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
537650SAli.Saidi@ARM.com#
542567SN/A# Authors: Gabe Black
556757SAli.Saidi@ARM.com
568286SAli.Saidi@ARM.commicrocode = '''
572567SN/A# SQRTPS
587650SAli.Saidi@ARM.com# SQRTPD
598706Sandreas.hansson@arm.com# SQRTSS
608706Sandreas.hansson@arm.com
618706Sandreas.hansson@arm.comdef macroop SQRTSD_XMM_XMM {
628706Sandreas.hansson@arm.com    sqrtfp xmml, xmml, xmmlm
638706Sandreas.hansson@arm.com};
648706Sandreas.hansson@arm.com
658706Sandreas.hansson@arm.comdef macroop SQRTSD_XMM_M {
668706Sandreas.hansson@arm.com    ldfp ufp1, seg, sib, disp
678706Sandreas.hansson@arm.com    sqrtfp xmml, xmml, ufp1
688706Sandreas.hansson@arm.com};
698706Sandreas.hansson@arm.com
708706Sandreas.hansson@arm.comdef macroop SQRTSD_XMM_P {
712567SN/A    rdip t7
728286SAli.Saidi@ARM.com    ldfp ufp1, seg, riprel, disp
738286SAli.Saidi@ARM.com    sqrtfp xmml, xmml, ufp1
748286SAli.Saidi@ARM.com};
758286SAli.Saidi@ARM.com'''
768286SAli.Saidi@ARM.com