operands.isa revision 13800:cffc4c0fc94e
16145SN/A// -*- mode:c++ -*- 28683SN/A 38683SN/A// Copyright (c) 2009 The University of Edinburgh 46145SN/A// All rights reserved. 56145SN/A// 66145SN/A// Redistribution and use in source and binary forms, with or without 76145SN/A// modification, are permitted provided that the following conditions are 86145SN/A// met: redistributions of source code must retain the above copyright 96145SN/A// notice, this list of conditions and the following disclaimer; 106145SN/A// redistributions in binary form must reproduce the above copyright 116145SN/A// notice, this list of conditions and the following disclaimer in the 126145SN/A// documentation and/or other materials provided with the distribution; 136145SN/A// neither the name of the copyright holders nor the names of its 146145SN/A// contributors may be used to endorse or promote products derived from 156145SN/A// this software without specific prior written permission. 166145SN/A// 176145SN/A// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 186145SN/A// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 196145SN/A// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 206145SN/A// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 216145SN/A// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 226145SN/A// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 236145SN/A// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 246145SN/A// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 256145SN/A// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 266145SN/A// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 276145SN/A// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 286145SN/A// 296145SN/A// Authors: Timothy M. Jones 306145SN/A 317054SN/Adef operand_types {{ 327054SN/A 'sb' : 'int8_t', 336145SN/A 'ub' : 'uint8_t', 346145SN/A 'sh' : 'int16_t', 357054SN/A 'uh' : 'uint16_t', 367054SN/A 'sw' : 'int32_t', 376145SN/A 'uw' : 'uint32_t', 387456SN/A 'sd' : 'int64_t', 397002SN/A 'ud' : 'uint64_t', 408683SN/A 'sf' : 'float', 4110302Snilay@cs.wisc.edu 'df' : 'double' 428165SN/A}}; 438683SN/A 448683SN/Adef operands {{ 458683SN/A # General Purpose Integer Reg Operands 466145SN/A 'Ra': ('IntReg', 'uw', 'RA', 'IsInteger', 1), 476890SN/A 'Rb': ('IntReg', 'uw', 'RB', 'IsInteger', 2), 486145SN/A 'Rs': ('IntReg', 'uw', 'RS', 'IsInteger', 3), 498683SN/A 'Rt': ('IntReg', 'uw', 'RT', 'IsInteger', 4), 508683SN/A 518683SN/A # General Purpose Floating Point Reg Operands 528683SN/A 'Fa': ('FloatReg', 'df', 'FRA', 'IsFloating', 1), 538683SN/A 'Fb': ('FloatReg', 'df', 'FRB', 'IsFloating', 2), 548683SN/A 'Fc': ('FloatReg', 'df', 'FRC', 'IsFloating', 3), 558683SN/A 'Fs': ('FloatReg', 'df', 'FRS', 'IsFloating', 4), 568683SN/A 'Ft': ('FloatReg', 'df', 'FRT', 'IsFloating', 5), 578683SN/A 5810302Snilay@cs.wisc.edu # Memory Operand 5911025Snilay@cs.wisc.edu 'Mem': ('Mem', 'uw', None, ('IsMemRef', 'IsLoad', 'IsStore'), 8), 6011025Snilay@cs.wisc.edu 618683SN/A # Program counter and next 628683SN/A 'PC': ('PCState', 'uw', 'pc', (None, None, 'IsControl'), 9), 638683SN/A 'NPC': ('PCState', 'uw', 'npc', (None, None, 'IsControl'), 9), 648683SN/A 658683SN/A # Control registers 668683SN/A 'CR': ('IntReg', 'uw', 'INTREG_CR', 'IsInteger', 9), 677054SN/A 'LR': ('IntReg', 'uw', 'INTREG_LR', 'IsInteger', 9), 687054SN/A 'CTR': ('IntReg', 'uw', 'INTREG_CTR', 'IsInteger', 9), 697054SN/A 'XER': ('IntReg', 'uw', 'INTREG_XER', 'IsInteger', 9), 708683SN/A 718683SN/A # Setting as IntReg so things are stored as an integer, not double 726145SN/A 'FPSCR': ('IntReg', 'uw', 'INTREG_FPSCR', 'IsFloating', 9), 738683SN/A 748683SN/A # Registers for linked loads and stores 7510163SN/A 'Rsv': ('IntReg', 'uw', 'INTREG_RSV', 'IsInteger', 9), 7610163SN/A 'RsvLen': ('IntReg', 'uw', 'INTREG_RSV_LEN', 'IsInteger', 9), 7711025Snilay@cs.wisc.edu 'RsvAddr': ('IntReg', 'uw', 'INTREG_RSV_ADDR', 'IsInteger', 9), 7811025Snilay@cs.wisc.edu 798683SN/A # Hack for non-full-system syscall emulation 8011061Snilay@cs.wisc.edu 'R0': ('IntReg', 'uw', '0', None, 1), 818683SN/A}}; 828683SN/A