operands.isa revision 5254:c555f8b07345
1955SN/A// -*- mode:c++ -*- 2955SN/A 37816Ssteve.reinhardt@amd.com// Copyright (c) 2007 MIPS Technologies, Inc. 45871Snate@binkert.org// All rights reserved. 51762SN/A// 6955SN/A// Redistribution and use in source and binary forms, with or without 7955SN/A// modification, are permitted provided that the following conditions are 8955SN/A// met: redistributions of source code must retain the above copyright 9955SN/A// notice, this list of conditions and the following disclaimer; 10955SN/A// redistributions in binary form must reproduce the above copyright 11955SN/A// notice, this list of conditions and the following disclaimer in the 12955SN/A// documentation and/or other materials provided with the distribution; 13955SN/A// neither the name of the copyright holders nor the names of its 14955SN/A// contributors may be used to endorse or promote products derived from 15955SN/A// this software without specific prior written permission. 16955SN/A// 17955SN/A// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18955SN/A// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19955SN/A// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20955SN/A// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21955SN/A// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22955SN/A// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23955SN/A// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24955SN/A// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25955SN/A// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26955SN/A// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27955SN/A// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28955SN/A// 29955SN/A// Authors: Korey Sewell 302665Ssaidi@eecs.umich.edu// Jaidev Patwardhan 312665Ssaidi@eecs.umich.edu 325863Snate@binkert.orgdef operand_types {{ 33955SN/A 'sb' : ('signed int', 8), 34955SN/A 'ub' : ('unsigned int', 8), 35955SN/A 'sh' : ('signed int', 16), 36955SN/A 'uh' : ('unsigned int', 16), 37955SN/A 'sw' : ('signed int', 32), 382632Sstever@eecs.umich.edu 'uw' : ('unsigned int', 32), 392632Sstever@eecs.umich.edu 'sd' : ('signed int', 64), 402632Sstever@eecs.umich.edu 'ud' : ('unsigned int', 64), 412632Sstever@eecs.umich.edu 'sf' : ('float', 32), 42955SN/A 'df' : ('float', 64), 432632Sstever@eecs.umich.edu}}; 442632Sstever@eecs.umich.edu 452761Sstever@eecs.umich.edudef operands {{ 462632Sstever@eecs.umich.edu #General Purpose Integer Reg Operands 472632Sstever@eecs.umich.edu 'Rd': ('IntReg', 'uw', 'RD', 'IsInteger', 1), 482632Sstever@eecs.umich.edu 'Rs': ('IntReg', 'uw', 'RS', 'IsInteger', 2), 492761Sstever@eecs.umich.edu 'Rt': ('IntReg', 'uw', 'RT', 'IsInteger', 3), 502761Sstever@eecs.umich.edu 512761Sstever@eecs.umich.edu #Immediate Value operand 522632Sstever@eecs.umich.edu 'IntImm': ('IntReg', 'uw', 'INTIMM', 'IsInteger', 3), 532632Sstever@eecs.umich.edu 542761Sstever@eecs.umich.edu #Operands used for Link or Syscall Insts 552761Sstever@eecs.umich.edu 'R31': ('IntReg', 'uw','31','IsInteger', 4), 562761Sstever@eecs.umich.edu 'R2': ('IntReg', 'uw','2', 'IsInteger', 5), 572761Sstever@eecs.umich.edu 582761Sstever@eecs.umich.edu #Special Integer Reg operands 592632Sstever@eecs.umich.edu 'LO0': ('IntReg', 'uw','MipsISA::LO', 'IsInteger', 6), 602632Sstever@eecs.umich.edu 'HI0': ('IntReg', 'uw','MipsISA::HI', 'IsInteger', 7), 612632Sstever@eecs.umich.edu 622632Sstever@eecs.umich.edu #Bitfield-dependent HI/LO Register Access 632632Sstever@eecs.umich.edu 'LO_RD_SEL': ('IntReg','uw','MipsISA::DSPLo0 + ACDST*3', None, 6), 642632Sstever@eecs.umich.edu 'HI_RD_SEL': ('IntReg','uw','MipsISA::DSPHi0 + ACDST*3', None, 7), 652632Sstever@eecs.umich.edu 'LO_RS_SEL': ('IntReg','uw','MipsISA::DSPLo0 + ACSRC*3', None, 6), 66955SN/A 'HI_RS_SEL': ('IntReg','uw','MipsISA::DSPHi0 + ACSRC*3', None, 7), 67955SN/A 68955SN/A #DSP Special Purpose Integer Operands 695863Snate@binkert.org 'DSPControl': ('IntReg', 'uw', 'MipsISA::DSPControl', None, 8), 705863Snate@binkert.org 'DSPLo0': ('IntReg', 'uw', 'MipsISA::LO', None, 1), 715863Snate@binkert.org 'DSPHi0': ('IntReg', 'uw', 'MipsISA::HI', None, 1), 725863Snate@binkert.org 'DSPACX0': ('IntReg', 'uw', 'MipsISA::DSPACX0', None, 1), 735863Snate@binkert.org 'DSPLo1': ('IntReg', 'uw', 'MipsISA::DSPLo1', None, 1), 745863Snate@binkert.org 'DSPHi1': ('IntReg', 'uw', 'MipsISA::DSPHi1', None, 1), 755863Snate@binkert.org 'DSPACX1': ('IntReg', 'uw', 'MipsISA::DSPACX1', None, 1), 765863Snate@binkert.org 'DSPLo2': ('IntReg', 'uw', 'MipsISA::DSPLo2', None, 1), 775863Snate@binkert.org 'DSPHi2': ('IntReg', 'uw', 'MipsISA::DSPHi2', None, 1), 785863Snate@binkert.org 'DSPACX2': ('IntReg', 'uw', 'MipsISA::DSPACX2', None, 1), 795863Snate@binkert.org 'DSPLo3': ('IntReg', 'uw', 'MipsISA::DSPLo3', None, 1), 805863Snate@binkert.org 'DSPHi3': ('IntReg', 'uw', 'MipsISA::DSPHi3', None, 1), 815863Snate@binkert.org 'DSPACX3': ('IntReg', 'uw', 'MipsISA::DSPACX3', None, 1), 825863Snate@binkert.org 835863Snate@binkert.org #Floating Point Reg Operands 845863Snate@binkert.org 'Fd': ('FloatReg', 'sf', 'FD', 'IsFloating', 1), 855863Snate@binkert.org 'Fs': ('FloatReg', 'sf', 'FS', 'IsFloating', 2), 865863Snate@binkert.org 'Ft': ('FloatReg', 'sf', 'FT', 'IsFloating', 3), 875863Snate@binkert.org 'Fr': ('FloatReg', 'sf', 'FR', 'IsFloating', 3), 885863Snate@binkert.org 895863Snate@binkert.org #Special Purpose Floating Point Control Reg Operands 905863Snate@binkert.org 'FIR': ('FloatReg', 'uw', 'MipsISA::FIR', 'IsFloating', 1), 915863Snate@binkert.org 'FCCR': ('FloatReg', 'uw', 'MipsISA::FCCR', 'IsFloating', 2), 925863Snate@binkert.org 'FEXR': ('FloatReg', 'uw', 'MipsISA::FEXR', 'IsFloating', 3), 935863Snate@binkert.org 'FENR': ('FloatReg', 'uw', 'MipsISA::FENR', 'IsFloating', 3), 945863Snate@binkert.org 'FCSR': ('FloatReg', 'uw', 'MipsISA::FCSR', 'IsFloating', 3), 955863Snate@binkert.org 965863Snate@binkert.org #Operands For Paired Singles FP Operations 975863Snate@binkert.org 'Fd1': ('FloatReg', 'sf', 'FD', 'IsFloating', 4), 985863Snate@binkert.org 'Fd2': ('FloatReg', 'sf', 'FD+1', 'IsFloating', 4), 995863Snate@binkert.org 'Fs1': ('FloatReg', 'sf', 'FS', 'IsFloating', 5), 1006654Snate@binkert.org 'Fs2': ('FloatReg', 'sf', 'FS+1', 'IsFloating', 5), 101955SN/A 'Ft1': ('FloatReg', 'sf', 'FT', 'IsFloating', 6), 1025396Ssaidi@eecs.umich.edu 'Ft2': ('FloatReg', 'sf', 'FT+1', 'IsFloating', 6), 1035863Snate@binkert.org 'Fr1': ('FloatReg', 'sf', 'FR', 'IsFloating', 7), 1045863Snate@binkert.org 'Fr2': ('FloatReg', 'sf', 'FR+1', 'IsFloating', 7), 1054202Sbinkertn@umich.edu 1065863Snate@binkert.org #Status Control Reg 1075863Snate@binkert.org 'Status': ('ControlReg', 'uw', 'MipsISA::Status', None, 1), 1085863Snate@binkert.org 1095863Snate@binkert.org #LL Flag 110955SN/A 'LLFlag': ('ControlReg', 'uw', 'MipsISA::LLFlag', None, 1), 1116654Snate@binkert.org 1125273Sstever@gmail.com # Index Register 1135871Snate@binkert.org 'Index':('ControlReg','uw','MipsISA::Index',None,1), 1145273Sstever@gmail.com 1156655Snate@binkert.org 1166655Snate@binkert.org #Special cases for when a Control Register Access is dependent on 1176655Snate@binkert.org #a combination of bitfield indices (handles MTCO & MFCO) 1186655Snate@binkert.org # Fixed to allow CP0 Register Offset 1196655Snate@binkert.org 'CP0_RD_SEL': ('IControlReg', 'uw', '(RD << 3 | SEL) + Ctrl_Base_DepTag', None, 1), 1206655Snate@binkert.org 1215871Snate@binkert.org #MT Control Regs 1226654Snate@binkert.org 'MVPConf0': ('ControlReg', 'uw', 'MipsISA::MVPConf0', None, 1), 1235396Ssaidi@eecs.umich.edu 'MVPControl': ('ControlReg', 'uw', 'MipsISA::MVPControl', None, 1), 1248120Sgblack@eecs.umich.edu 'TCBind': ('ControlReg', 'uw', 'MipsISA::TCBind', None, 1), 1258120Sgblack@eecs.umich.edu 'TCStatus': ('ControlReg', 'uw', 'MipsISA::TCStatus', None, 1), 1268120Sgblack@eecs.umich.edu 'TCRestart': ('ControlReg', 'uw', 'MipsISA::TCRestart', None, 1), 1278120Sgblack@eecs.umich.edu 'VPEConf0': ('ControlReg', 'uw', 'MipsISA::VPEConf0', None, 1), 1288120Sgblack@eecs.umich.edu 'VPEControl': ('ControlReg', 'uw', 'MipsISA::VPEControl', None, 1), 1298120Sgblack@eecs.umich.edu 'YQMask': ('ControlReg', 'uw', 'MipsISA::YQMask', None, 1), 1308120Sgblack@eecs.umich.edu 1318120Sgblack@eecs.umich.edu #CP0 Control Regs 1328120Sgblack@eecs.umich.edu 'EntryHi': ('ControlReg','uw', 'MipsISA::EntryHi',None,1), 1338120Sgblack@eecs.umich.edu 'EntryLo0': ('ControlReg','uw', 'MipsISA::EntryLo0',None,1), 1348120Sgblack@eecs.umich.edu 'EntryLo1': ('ControlReg','uw', 'MipsISA::EntryLo1',None,1), 1358120Sgblack@eecs.umich.edu 'PageMask': ('ControlReg','uw', 'MipsISA::PageMask',None,1), 1368120Sgblack@eecs.umich.edu 'Random': ('ControlReg','uw', 'MipsISA::CP0_Random',None,1), 1378120Sgblack@eecs.umich.edu 'ErrorEPC': ('ControlReg','uw', 'MipsISA::ErrorEPC',None,1), 1388120Sgblack@eecs.umich.edu 'EPC': ('ControlReg','uw', 'MipsISA::EPC',None,1), 1398120Sgblack@eecs.umich.edu 'DEPC': ('ControlReg','uw', 'MipsISA::DEPC',None,1), 1408120Sgblack@eecs.umich.edu 'SRSCtl': ('ControlReg','uw', 'MipsISA::SRSCtl',None,1), 1418120Sgblack@eecs.umich.edu 'Config': ('ControlReg','uw', 'MipsISA::Config',None,1), 1428120Sgblack@eecs.umich.edu 'Config3': ('ControlReg','uw', 'MipsISA::Config3',None,1), 1438120Sgblack@eecs.umich.edu 'Config1': ('ControlReg','uw', 'MipsISA::Config1',None,1), 1448120Sgblack@eecs.umich.edu 'Config2': ('ControlReg','uw', 'MipsISA::Config2',None,1), 1458120Sgblack@eecs.umich.edu 'PageGrain': ('ControlReg','uw', 'MipsISA::PageGrain',None,1), 1468120Sgblack@eecs.umich.edu 1478120Sgblack@eecs.umich.edu 1488120Sgblack@eecs.umich.edu # named bitfields of Control Regs 1498120Sgblack@eecs.umich.edu 'Status_IE': ('ControlBitfield', 'uw', 'MipsISA::Status', None, 1), 1508120Sgblack@eecs.umich.edu 'Status_ERL': ('ControlBitfield', 'uw', 'MipsISA::Status', None, 1), 1518120Sgblack@eecs.umich.edu 'Status_EXL': ('ControlBitfield', 'uw', 'MipsISA::Status', None, 1), 1528120Sgblack@eecs.umich.edu 'Status_BEV': ('ControlBitfield', 'uw', 'MipsISA::Status', None, 1), 1538120Sgblack@eecs.umich.edu 'Status_CU3': ('ControlBitfield', 'uw', 'MipsISA::Status', None, 1), 1548120Sgblack@eecs.umich.edu 'Status_CU2': ('ControlBitfield', 'uw', 'MipsISA::Status', None, 1), 1558120Sgblack@eecs.umich.edu 'Status_CU1': ('ControlBitfield', 'uw', 'MipsISA::Status', None, 1), 1568120Sgblack@eecs.umich.edu 'Status_CU0': ('ControlBitfield', 'uw', 'MipsISA::Status', None, 1), 1578120Sgblack@eecs.umich.edu 'SRSCtl_HSS': ('ControlBitfield', 'uw', 'MipsISA::SRSCtl', None, 4), 1588120Sgblack@eecs.umich.edu 'SRSCtl_PSS': ('ControlBitfield', 'uw', 'MipsISA::SRSCtl', None, 4), 1598120Sgblack@eecs.umich.edu 'SRSCtl_CSS': ('ControlBitfield', 'uw', 'MipsISA::SRSCtl', None, 4), 1607816Ssteve.reinhardt@amd.com 'Config_AR': ('ControlBitfield', 'uw', 'MipsISA::Config', None, 3), 1617816Ssteve.reinhardt@amd.com 'Config_MT': ('ControlBitfield', 'uw', 'MipsISA::Config', None, 1), 1627816Ssteve.reinhardt@amd.com 'Config1_CA': ('ControlBitfield', 'uw', 'MipsISA::Config1', None, 1), 1637816Ssteve.reinhardt@amd.com 'Config3_SP': ('ControlBitfield', 'uw', 'MipsISA::Config3', None, 1), 1647816Ssteve.reinhardt@amd.com 'PageGrain_ESP': ('ControlBitfield', 'uw', 'MipsISA::PageGrain', None, 1), 1657816Ssteve.reinhardt@amd.com 'Cause_EXCCODE': ('ControlBitfield', 'uw', 'MipsISA::Cause', None, 4), 1667816Ssteve.reinhardt@amd.com 'Cause_TI': ('ControlBitfield', 'uw', 'MipsISA::Cause', None, 4), 1677816Ssteve.reinhardt@amd.com 'IntCtl_IPTI': ('ControlBitfield', 'uw', 'MipsISA::IntCtl', None, 4), 1687816Ssteve.reinhardt@amd.com 'EntryHi_ASID': ('ControlBitfield', 'uw', 'MipsISA::EntryHi', None, 1), 1695871Snate@binkert.org 'EntryLo0_PFN': ('ControlBitfield', 'uw', 'MipsISA::EntryLo0', None, 1), 1705871Snate@binkert.org 'EntryLo0_C': ('ControlBitfield', 'uw', 'MipsISA::EntryLo0', None, 3), 1716121Snate@binkert.org 'EntryLo0_D': ('ControlBitfield', 'uw', 'MipsISA::EntryLo0', None, 1), 1725871Snate@binkert.org 'EntryLo0_V': ('ControlBitfield', 'uw', 'MipsISA::EntryLo0', None, 1), 1735871Snate@binkert.org 'EntryLo0_G': ('ControlBitfield', 'uw', 'MipsISA::EntryLo0', None, 1), 1746003Snate@binkert.org 'EntryLo1_PFN': ('ControlBitfield', 'uw', 'MipsISA::EntryLo1', None, 1), 1756655Snate@binkert.org 'EntryLo1_C': ('ControlBitfield', 'uw', 'MipsISA::EntryLo1', None, 3), 176955SN/A 'EntryLo1_D': ('ControlBitfield', 'uw', 'MipsISA::EntryLo1', None, 1), 1775871Snate@binkert.org 'EntryLo1_V': ('ControlBitfield', 'uw', 'MipsISA::EntryLo1', None, 1), 1785871Snate@binkert.org 'EntryLo1_G': ('ControlBitfield', 'uw', 'MipsISA::EntryLo1', None, 1), 1795871Snate@binkert.org 1805871Snate@binkert.org # named bitfields of Debug Regs 181955SN/A 'Debug_DM': ('ControlBitfield', 'uw', 'MipsISA::Debug', None, 1), 1826121Snate@binkert.org 'Debug_IEXI': ('ControlBitfield', 'uw', 'MipsISA::Debug', None, 1), 1836121Snate@binkert.org 1846121Snate@binkert.org #Memory Operand 1851533SN/A 'Mem': ('Mem', 'uw', None, ('IsMemRef', 'IsLoad', 'IsStore'), 4), 1866655Snate@binkert.org 1876655Snate@binkert.org #Program Counter Operands 1886655Snate@binkert.org 'NPC': ('NPC', 'uw', None, 'IsControl', 4), 1896655Snate@binkert.org 'NNPC':('NNPC', 'uw', None, 'IsControl', 4) 1905871Snate@binkert.org}}; 1915871Snate@binkert.org