operands.isa revision 5025:5c264911b7a9
111420Sdavid.guillen@arm.com// Copyright (c) 2007 The Regents of The University of Michigan 211420Sdavid.guillen@arm.com// All rights reserved. 311420Sdavid.guillen@arm.com// 411420Sdavid.guillen@arm.com// Redistribution and use in source and binary forms, with or without 511420Sdavid.guillen@arm.com// modification, are permitted provided that the following conditions are 611420Sdavid.guillen@arm.com// met: redistributions of source code must retain the above copyright 711420Sdavid.guillen@arm.com// notice, this list of conditions and the following disclaimer; 811420Sdavid.guillen@arm.com// redistributions in binary form must reproduce the above copyright 911420Sdavid.guillen@arm.com// notice, this list of conditions and the following disclaimer in the 1011420Sdavid.guillen@arm.com// documentation and/or other materials provided with the distribution; 1111420Sdavid.guillen@arm.com// neither the name of the copyright holders nor the names of its 1211420Sdavid.guillen@arm.com// contributors may be used to endorse or promote products derived from 1311420Sdavid.guillen@arm.com// this software without specific prior written permission. 1411420Sdavid.guillen@arm.com// 1511420Sdavid.guillen@arm.com// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1611420Sdavid.guillen@arm.com// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1711420Sdavid.guillen@arm.com// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1811420Sdavid.guillen@arm.com// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1911420Sdavid.guillen@arm.com// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2011420Sdavid.guillen@arm.com// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2111420Sdavid.guillen@arm.com// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2211420Sdavid.guillen@arm.com// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2311420Sdavid.guillen@arm.com// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2411420Sdavid.guillen@arm.com// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2511420Sdavid.guillen@arm.com// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2611420Sdavid.guillen@arm.com// 2711420Sdavid.guillen@arm.com// Authors: Gabe Black 2811420Sdavid.guillen@arm.com 2911420Sdavid.guillen@arm.com// Copyright (c) 2007 The Hewlett-Packard Development Company 3011420Sdavid.guillen@arm.com// All rights reserved. 3111420Sdavid.guillen@arm.com// 3211420Sdavid.guillen@arm.com// Redistribution and use of this software in source and binary forms, 3311420Sdavid.guillen@arm.com// with or without modification, are permitted provided that the 3411420Sdavid.guillen@arm.com// following conditions are met: 3511420Sdavid.guillen@arm.com// 3611420Sdavid.guillen@arm.com// The software must be used only for Non-Commercial Use which means any 3711420Sdavid.guillen@arm.com// use which is NOT directed to receiving any direct monetary 3811420Sdavid.guillen@arm.com// compensation for, or commercial advantage from such use. Illustrative 3911420Sdavid.guillen@arm.com// examples of non-commercial use are academic research, personal study, 4011420Sdavid.guillen@arm.com// teaching, education and corporate research & development. 4111420Sdavid.guillen@arm.com// Illustrative examples of commercial use are distributing products for 4211420Sdavid.guillen@arm.com// commercial advantage and providing services using the software for 4311420Sdavid.guillen@arm.com// commercial advantage. 4411420Sdavid.guillen@arm.com// 4511420Sdavid.guillen@arm.com// If you wish to use this software or functionality therein that may be 4611420Sdavid.guillen@arm.com// covered by patents for commercial use, please contact: 4711420Sdavid.guillen@arm.com// Director of Intellectual Property Licensing 4811420Sdavid.guillen@arm.com// Office of Strategy and Technology 4911420Sdavid.guillen@arm.com// Hewlett-Packard Company 5011420Sdavid.guillen@arm.com// 1501 Page Mill Road 5111420Sdavid.guillen@arm.com// Palo Alto, California 94304 5211420Sdavid.guillen@arm.com// 5311420Sdavid.guillen@arm.com// Redistributions of source code must retain the above copyright notice, 5411420Sdavid.guillen@arm.com// this list of conditions and the following disclaimer. Redistributions 5511420Sdavid.guillen@arm.com// in binary form must reproduce the above copyright notice, this list of 5611420Sdavid.guillen@arm.com// conditions and the following disclaimer in the documentation and/or 5711420Sdavid.guillen@arm.com// other materials provided with the distribution. Neither the name of 5811420Sdavid.guillen@arm.com// the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its 5911420Sdavid.guillen@arm.com// contributors may be used to endorse or promote products derived from 6011420Sdavid.guillen@arm.com// this software without specific prior written permission. No right of 6111420Sdavid.guillen@arm.com// sublicense is granted herewith. Derivatives of the software and 6211420Sdavid.guillen@arm.com// output created using the software may be prepared, but only for 6311420Sdavid.guillen@arm.com// Non-Commercial Uses. Derivatives of the software may be shared with 6411420Sdavid.guillen@arm.com// others provided: (i) the others agree to abide by the list of 6511420Sdavid.guillen@arm.com// conditions herein which includes the Non-Commercial Use restrictions; 6611420Sdavid.guillen@arm.com// and (ii) such Derivatives of the software include the above copyright 6711420Sdavid.guillen@arm.com// notice to acknowledge the contribution from this software where 6811420Sdavid.guillen@arm.com// applicable, this list of conditions and the disclaimer below. 6911420Sdavid.guillen@arm.com// 7011420Sdavid.guillen@arm.com// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 7111420Sdavid.guillen@arm.com// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 7211420Sdavid.guillen@arm.com// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 7311420Sdavid.guillen@arm.com// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 7411420Sdavid.guillen@arm.com// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 7511523Sdavid.guillen@arm.com// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 7611523Sdavid.guillen@arm.com// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 7711420Sdavid.guillen@arm.com// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 7811420Sdavid.guillen@arm.com// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 7911420Sdavid.guillen@arm.com// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 8011420Sdavid.guillen@arm.com// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8111420Sdavid.guillen@arm.com// 8211420Sdavid.guillen@arm.com// Authors: Gabe Black 8311420Sdavid.guillen@arm.com 8411420Sdavid.guillen@arm.comdef operand_types {{ 8511420Sdavid.guillen@arm.com 'sb' : ('signed int', 8), 8611420Sdavid.guillen@arm.com 'ub' : ('unsigned int', 8), 8711420Sdavid.guillen@arm.com 'sw' : ('signed int', 16), 8811420Sdavid.guillen@arm.com 'uw' : ('unsigned int', 16), 8911420Sdavid.guillen@arm.com 'sdw' : ('signed int', 32), 9011420Sdavid.guillen@arm.com 'udw' : ('unsigned int', 32), 9111420Sdavid.guillen@arm.com 'sqw' : ('signed int', 64), 9211420Sdavid.guillen@arm.com 'uqw' : ('unsigned int', 64), 9311420Sdavid.guillen@arm.com 'sf' : ('float', 32), 9411420Sdavid.guillen@arm.com 'df' : ('float', 64), 9511420Sdavid.guillen@arm.com 'qf' : ('float', 128) 9611420Sdavid.guillen@arm.com}}; 9711420Sdavid.guillen@arm.com 9811420Sdavid.guillen@arm.comdef operands {{ 9911420Sdavid.guillen@arm.com 'SrcReg1': ('IntReg', 'uqw', '(((src1 & 0x1C) == 4 ? foldOBit : 0) | src1)', 'IsInteger', 1), 10011420Sdavid.guillen@arm.com 'SrcReg2': ('IntReg', 'uqw', '(((src2 & 0x1C) == 4 ? foldOBit : 0) | src2)', 'IsInteger', 2), 10111420Sdavid.guillen@arm.com 'Index': ('IntReg', 'uqw', '(((index & 0x1C) == 4 ? foldABit : 0) | index)', 'IsInteger', 3), 10211420Sdavid.guillen@arm.com 'Base': ('IntReg', 'uqw', '(((base & 0x1C) == 4 ? foldABit : 0) | base)', 'IsInteger', 4), 10311420Sdavid.guillen@arm.com 'DestReg': ('IntReg', 'uqw', '(((dest & 0x1C) == 4 ? foldOBit : 0) | dest)', 'IsInteger', 5), 10411420Sdavid.guillen@arm.com 'Data': ('IntReg', 'uqw', '(((data & 0x1C) == 4 ? foldOBit : 0) | data)', 'IsInteger', 6), 10511420Sdavid.guillen@arm.com 'rax': ('IntReg', 'uqw', '(INTREG_RAX)', 'IsInteger', 7), 10611420Sdavid.guillen@arm.com 'RIP': ('NPC', 'uqw', None, (None, None, 'IsControl'), 10), 10711420Sdavid.guillen@arm.com 'uIP': ('UPC', 'uqw', None, (None, None, 'IsControl'), 11), 10811420Sdavid.guillen@arm.com 'nuIP': ('NUPC', 'uqw', None, (None, None, 'IsControl'), 12), 10911420Sdavid.guillen@arm.com 'ccFlagBits': ('IntReg', 'uqw', 'NUM_INTREGS + NumMicroIntRegs', None, 20), 11011420Sdavid.guillen@arm.com 'SegBase': ('ControlReg', 'uqw', 'MISCREG_SEG_BASE(segment)', (None, None, ['IsSerializeAfter','IsSerializing','IsNonSpeculative']), 50), 11111420Sdavid.guillen@arm.com 'Mem': ('Mem', 'uqw', None, ('IsMemRef', 'IsLoad', 'IsStore'), 100) 11211420Sdavid.guillen@arm.com}}; 11311420Sdavid.guillen@arm.com