operands.isa revision 4661:44458219add1
19793Sakash.bagdia@arm.com// -*- mode:c++ -*- 27586SAli.Saidi@arm.com 37586SAli.Saidi@arm.com// Copyright (c) 2006 The Regents of The University of Michigan 47586SAli.Saidi@arm.com// All rights reserved. 57586SAli.Saidi@arm.com// 67586SAli.Saidi@arm.com// Redistribution and use in source and binary forms, with or without 77586SAli.Saidi@arm.com// modification, are permitted provided that the following conditions are 87586SAli.Saidi@arm.com// met: redistributions of source code must retain the above copyright 97586SAli.Saidi@arm.com// notice, this list of conditions and the following disclaimer; 107586SAli.Saidi@arm.com// redistributions in binary form must reproduce the above copyright 117586SAli.Saidi@arm.com// notice, this list of conditions and the following disclaimer in the 127586SAli.Saidi@arm.com// documentation and/or other materials provided with the distribution; 133970Sgblack@eecs.umich.edu// neither the name of the copyright holders nor the names of its 143005Sstever@eecs.umich.edu// contributors may be used to endorse or promote products derived from 153005Sstever@eecs.umich.edu// this software without specific prior written permission. 163005Sstever@eecs.umich.edu// 173005Sstever@eecs.umich.edu// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 183005Sstever@eecs.umich.edu// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 193005Sstever@eecs.umich.edu// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 203005Sstever@eecs.umich.edu// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 213005Sstever@eecs.umich.edu// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 223005Sstever@eecs.umich.edu// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 233005Sstever@eecs.umich.edu// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 243005Sstever@eecs.umich.edu// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 253005Sstever@eecs.umich.edu// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 263005Sstever@eecs.umich.edu// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 273005Sstever@eecs.umich.edu// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 283005Sstever@eecs.umich.edu// 293005Sstever@eecs.umich.edu// Authors: Korey Sewell 303005Sstever@eecs.umich.edu 313005Sstever@eecs.umich.edudef operand_types {{ 323005Sstever@eecs.umich.edu 'sb' : ('signed int', 8), 333005Sstever@eecs.umich.edu 'ub' : ('unsigned int', 8), 343005Sstever@eecs.umich.edu 'sh' : ('signed int', 16), 353005Sstever@eecs.umich.edu 'uh' : ('unsigned int', 16), 363005Sstever@eecs.umich.edu 'sw' : ('signed int', 32), 373005Sstever@eecs.umich.edu 'uw' : ('unsigned int', 32), 383005Sstever@eecs.umich.edu 'sd' : ('signed int', 64), 393005Sstever@eecs.umich.edu 'ud' : ('unsigned int', 64), 403005Sstever@eecs.umich.edu 'sf' : ('float', 32), 416654Snate@binkert.org 'df' : ('float', 64), 426654Snate@binkert.org 'qf' : ('float', 128) 432889SN/A}}; 442710SN/A 456654Snate@binkert.orgdef operands {{ 466654Snate@binkert.org #General Purpose Integer Reg Operands 476654Snate@binkert.org 'Rd': ('IntReg', 'uw', 'RD', 'IsInteger', 1), 485457Ssaidi@eecs.umich.edu 'Rs': ('IntReg', 'uw', 'RS', 'IsInteger', 2), 496654Snate@binkert.org 'Rt': ('IntReg', 'uw', 'RT', 'IsInteger', 3), 506654Snate@binkert.org 512934SN/A #Immediate Value operand 522549SN/A 'IntImm': ('IntReg', 'uw', 'INTIMM', 'IsInteger', 3), 532995SN/A 543395Shsul@eecs.umich.edu #Operands used for Link or Syscall Insts 556981SLisa.Hsu@amd.com 'R31': ('IntReg', 'uw','31','IsInteger', 4), 563448Shsul@eecs.umich.edu 'R2': ('IntReg', 'uw','2', 'IsInteger', 5), 578920Snilay@cs.wisc.edu 583444Sktlim@umich.edu #Special Integer Reg operands 592889SN/A 'LO0': ('IntReg', 'uw','MipsISA::LO', 'IsInteger', 6), 608920Snilay@cs.wisc.edu 'HI0': ('IntReg', 'uw','MipsISA::HI', 'IsInteger', 7), 618920Snilay@cs.wisc.edu 623322Shsul@eecs.umich.edu #Bitfield-dependent HI/LO Register Access 632710SN/A 'LO_RD_SEL': ('IntReg','uw','MipsISA::DSPLo0 + ACDST*3', None, 6), 642710SN/A 'HI_RD_SEL': ('IntReg','uw','MipsISA::DSPHi0 + ACDST*3', None, 7), 652710SN/A 'LO_RS_SEL': ('IntReg','uw','MipsISA::DSPLo0 + ACSRC*3', None, 6), 662710SN/A 'HI_RS_SEL': ('IntReg','uw','MipsISA::DSPHi0 + ACSRC*3', None, 7), 672710SN/A 682710SN/A #DSP Special Purpose Integer Operands 693322Shsul@eecs.umich.edu 'DSPControl': ('IntReg', 'uw', 'MipsISA::DSPControl', None, 8), 703304Sstever@eecs.umich.edu 'DSPLo0': ('IntReg', 'uw', 'MipsISA::LO', None, 1), 713322Shsul@eecs.umich.edu 'DSPHi0': ('IntReg', 'uw', 'MipsISA::HI', None, 1), 723322Shsul@eecs.umich.edu 'DSPACX0': ('IntReg', 'uw', 'MipsISA::DSPACX0', None, 1), 733304Sstever@eecs.umich.edu 'DSPLo1': ('IntReg', 'uw', 'MipsISA::DSPLo1', None, 1), 749653SAndreas.Sandberg@ARM.com 'DSPHi1': ('IntReg', 'uw', 'MipsISA::DSPHi1', None, 1), 759653SAndreas.Sandberg@ARM.com 'DSPACX1': ('IntReg', 'uw', 'MipsISA::DSPACX1', None, 1), 769653SAndreas.Sandberg@ARM.com 'DSPLo2': ('IntReg', 'uw', 'MipsISA::DSPLo2', None, 1), 779653SAndreas.Sandberg@ARM.com 'DSPHi2': ('IntReg', 'uw', 'MipsISA::DSPHi2', None, 1), 789653SAndreas.Sandberg@ARM.com 'DSPACX2': ('IntReg', 'uw', 'MipsISA::DSPACX2', None, 1), 799653SAndreas.Sandberg@ARM.com 'DSPLo3': ('IntReg', 'uw', 'MipsISA::DSPLo3', None, 1), 809653SAndreas.Sandberg@ARM.com 'DSPHi3': ('IntReg', 'uw', 'MipsISA::DSPHi3', None, 1), 813481Shsul@eecs.umich.edu 'DSPACX3': ('IntReg', 'uw', 'MipsISA::DSPACX3', None, 1), 823481Shsul@eecs.umich.edu 832566SN/A #Floating Point Reg Operands 849665Sandreas.hansson@arm.com 'Fd': ('FloatReg', 'sf', 'FD', 'IsFloating', 1), 859665Sandreas.hansson@arm.com 'Fs': ('FloatReg', 'sf', 'FS', 'IsFloating', 2), 869665Sandreas.hansson@arm.com 'Ft': ('FloatReg', 'sf', 'FT', 'IsFloating', 3), 879665Sandreas.hansson@arm.com 'Fr': ('FloatReg', 'sf', 'FR', 'IsFloating', 3), 889665Sandreas.hansson@arm.com 892995SN/A #Special Purpose Floating Point Control Reg Operands 903304Sstever@eecs.umich.edu 'FIR': ('FloatReg', 'uw', 'MipsISA::FIR', 'IsFloating', 1), 913304Sstever@eecs.umich.edu 'FCCR': ('FloatReg', 'uw', 'MipsISA::FCCR', 'IsFloating', 2), 923304Sstever@eecs.umich.edu 'FEXR': ('FloatReg', 'uw', 'MipsISA::FEXR', 'IsFloating', 3), 932995SN/A 'FENR': ('FloatReg', 'uw', 'MipsISA::FENR', 'IsFloating', 3), 942995SN/A 'FCSR': ('FloatReg', 'uw', 'MipsISA::FCSR', 'IsFloating', 3), 952995SN/A 962917SN/A #Operands For Paired Singles FP Operations 972995SN/A 'Fd1': ('FloatReg', 'sf', 'FD', 'IsFloating', 4), 988956Sjayneel@cs.wisc.edu 'Fd2': ('FloatReg', 'sf', 'FD+1', 'IsFloating', 4), 992995SN/A 'Fs1': ('FloatReg', 'sf', 'FS', 'IsFloating', 5), 1008956Sjayneel@cs.wisc.edu 'Fs2': ('FloatReg', 'sf', 'FS+1', 'IsFloating', 5), 1013304Sstever@eecs.umich.edu 'Ft1': ('FloatReg', 'sf', 'FT', 'IsFloating', 6), 1026135Sgblack@eecs.umich.edu 'Ft2': ('FloatReg', 'sf', 'FT+1', 'IsFloating', 6), 1036135Sgblack@eecs.umich.edu 'Fr1': ('FloatReg', 'sf', 'FR', 'IsFloating', 7), 1046654Snate@binkert.org 'Fr2': ('FloatReg', 'sf', 'FR+1', 'IsFloating', 7), 1059826Sandreas.hansson@arm.com 1066654Snate@binkert.org #Status Control Reg 1079826Sandreas.hansson@arm.com 'Status': ('ControlReg', 'uw', 'MipsISA::Status', None, 1), 1086654Snate@binkert.org 1099826Sandreas.hansson@arm.com #Special cases for when a Control Register Access is dependent on 1106654Snate@binkert.org #a combination of bitfield indices (handles MTCO & MFCO) 1119826Sandreas.hansson@arm.com 'CP0_RD_SEL': ('ControlReg', 'uw', 'RD << 3 | SEL', None, 1), 1127586SAli.Saidi@arm.com 1139826Sandreas.hansson@arm.com #MT Control Regs 1149826Sandreas.hansson@arm.com 'MVPConf0': ('ControlReg', 'uw', 'MipsISA::MVPConf0', None, 1), 1159665Sandreas.hansson@arm.com 'MVPControl': ('ControlReg', 'uw', 'MipsISA::MVPControl', None, 1), 1163819Shsul@eecs.umich.edu 'TCBind': ('ControlReg', 'uw', 'MipsISA::TCBind', None, 1), 1179059Snilay@cs.wisc.edu 'TCStatus': ('ControlReg', 'uw', 'MipsISA::TCStatus', None, 1), 1183819Shsul@eecs.umich.edu 'TCRestart': ('ControlReg', 'uw', 'MipsISA::TCRestart', None, 1), 1199827Sakash.bagdia@arm.com 'VPEConf0': ('ControlReg', 'uw', 'MipsISA::VPEConf0', None, 1), 1209827Sakash.bagdia@arm.com 'VPEControl': ('ControlReg', 'uw', 'MipsISA::VPEControl', None, 1), 1219827Sakash.bagdia@arm.com 'YQMask': ('ControlReg', 'uw', 'MipsISA::YQMask', None, 1), 1229793Sakash.bagdia@arm.com 1239827Sakash.bagdia@arm.com # named bitfields of Control Regs 1249827Sakash.bagdia@arm.com 'Status_IE': ('ControlBitfield', 'uw', 'MipsISA::Status', None, 1), 1259827Sakash.bagdia@arm.com 'Status_ERL': ('ControlBitfield', 'uw', 'MipsISA::Status', None, 1), 1269827Sakash.bagdia@arm.com 'Status_EXL': ('ControlBitfield', 'uw', 'MipsISA::Status', None, 1), 1279827Sakash.bagdia@arm.com 'Status_CU3': ('ControlBitfield', 'uw', 'MipsISA::Status', None, 1), 1289793Sakash.bagdia@arm.com 'Status_CU2': ('ControlBitfield', 'uw', 'MipsISA::Status', None, 1), 1299793Sakash.bagdia@arm.com 'Status_CU1': ('ControlBitfield', 'uw', 'MipsISA::Status', None, 1), 1309827Sakash.bagdia@arm.com 'Status_CU0': ('ControlBitfield', 'uw', 'MipsISA::Status', None, 1), 1319827Sakash.bagdia@arm.com 'SRSCtl_HSS': ('ControlBitfield', 'uw', 'MipsISA::SRSCtl', None, 4), 1329827Sakash.bagdia@arm.com 'SRSCtl_PSS': ('ControlBitfield', 'uw', 'MipsISA::SRSCtl', None, 4), 1339790Sakash.bagdia@arm.com 'SRSCtl_CSS': ('ControlBitfield', 'uw', 'MipsISA::SRSCtl', None, 4), 1343873Sbinkertn@umich.edu 'Config_AR': ('ControlBitfield', 'uw', 'MipsISA::Config', None, 3), 1353873Sbinkertn@umich.edu 1363873Sbinkertn@umich.edu # named bitfields of Debug Regs 1373873Sbinkertn@umich.edu 'Debug_DM': ('ControlBitfield', 'uw', 'MipsISA::Debug', None, 1), 1383873Sbinkertn@umich.edu 'Debug_IEXI': ('ControlBitfield', 'uw', 'MipsISA::Debug', None, 1), 1393873Sbinkertn@umich.edu 1408659SAli.Saidi@ARM.com #Memory Operand 1418659SAli.Saidi@ARM.com 'Mem': ('Mem', 'uw', None, ('IsMemRef', 'IsLoad', 'IsStore'), 4), 1429793Sakash.bagdia@arm.com 1439793Sakash.bagdia@arm.com #Program Counter Operands 1449793Sakash.bagdia@arm.com 'NPC': ('NPC', 'uw', None, 'IsControl', 4), 1453668Srdreslin@umich.edu 'NNPC':('NNPC', 'uw', None, 'IsControl', 4) 1469653SAndreas.Sandberg@ARM.com}}; 1479653SAndreas.Sandberg@ARM.com