operands.isa revision 14108
16019Shines@cs.fsu.edu// -*- mode:c++ -*-
214028Sgiacomo.gabrielli@arm.com// Copyright (c) 2010-2014, 2016-2018 ARM Limited
37091Sgblack@eecs.umich.edu// All rights reserved
47091Sgblack@eecs.umich.edu//
57091Sgblack@eecs.umich.edu// The license below extends only to copyright in the software and shall
67091Sgblack@eecs.umich.edu// not be construed as granting a license to any other intellectual
77091Sgblack@eecs.umich.edu// property including but not limited to intellectual property relating
87091Sgblack@eecs.umich.edu// to a hardware implementation of the functionality of the software
97091Sgblack@eecs.umich.edu// licensed hereunder.  You may use the software subject to the license
107091Sgblack@eecs.umich.edu// terms below provided that you ensure that this notice is replicated
117091Sgblack@eecs.umich.edu// unmodified and in its entirety in all distributions of the software,
127091Sgblack@eecs.umich.edu// modified or unmodified, in source code or in binary form.
137091Sgblack@eecs.umich.edu//
146019Shines@cs.fsu.edu// Copyright (c) 2007-2008 The Florida State University
156019Shines@cs.fsu.edu// All rights reserved.
166019Shines@cs.fsu.edu//
176019Shines@cs.fsu.edu// Redistribution and use in source and binary forms, with or without
186019Shines@cs.fsu.edu// modification, are permitted provided that the following conditions are
196019Shines@cs.fsu.edu// met: redistributions of source code must retain the above copyright
206019Shines@cs.fsu.edu// notice, this list of conditions and the following disclaimer;
216019Shines@cs.fsu.edu// redistributions in binary form must reproduce the above copyright
226019Shines@cs.fsu.edu// notice, this list of conditions and the following disclaimer in the
236019Shines@cs.fsu.edu// documentation and/or other materials provided with the distribution;
246019Shines@cs.fsu.edu// neither the name of the copyright holders nor the names of its
256019Shines@cs.fsu.edu// contributors may be used to endorse or promote products derived from
266019Shines@cs.fsu.edu// this software without specific prior written permission.
276019Shines@cs.fsu.edu//
286019Shines@cs.fsu.edu// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
296019Shines@cs.fsu.edu// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
306019Shines@cs.fsu.edu// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
316019Shines@cs.fsu.edu// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
326019Shines@cs.fsu.edu// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
336019Shines@cs.fsu.edu// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
346019Shines@cs.fsu.edu// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
356019Shines@cs.fsu.edu// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
366019Shines@cs.fsu.edu// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
376019Shines@cs.fsu.edu// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
386019Shines@cs.fsu.edu// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
396019Shines@cs.fsu.edu//
406019Shines@cs.fsu.edu// Authors: Stephen Hines
416019Shines@cs.fsu.edu
426019Shines@cs.fsu.edudef operand_types {{
438449Sgblack@eecs.umich.edu    'sb' : 'int8_t',
448449Sgblack@eecs.umich.edu    'ub' : 'uint8_t',
458449Sgblack@eecs.umich.edu    'sh' : 'int16_t',
468449Sgblack@eecs.umich.edu    'uh' : 'uint16_t',
478449Sgblack@eecs.umich.edu    'sw' : 'int32_t',
488449Sgblack@eecs.umich.edu    'uw' : 'uint32_t',
4913759Sgiacomo.gabrielli@arm.com    'sd' : 'int64_t',
508449Sgblack@eecs.umich.edu    'ud' : 'uint64_t',
5114108Sjavier.setoain@arm.com    'sq' : '__int128_t',
5214108Sjavier.setoain@arm.com    'uq' : '__uint128_t',
5312386Sgabeblack@google.com    'tud' : 'std::array<uint64_t, 2>',
548449Sgblack@eecs.umich.edu    'sf' : 'float',
5512110SRekai.GonzalezAlberquilla@arm.com    'df' : 'double',
5613915Sgabeblack@google.com    'vc' : 'ArmISA::VecRegContainer',
5712110SRekai.GonzalezAlberquilla@arm.com    # For operations that are implemented as a template
5812110SRekai.GonzalezAlberquilla@arm.com    'x' : 'TPElem',
5913759Sgiacomo.gabrielli@arm.com    'xs' : 'TPSElem',
6013759Sgiacomo.gabrielli@arm.com    'xd' : 'TPDElem',
6113915Sgabeblack@google.com    'pc' : 'ArmISA::VecPredRegContainer',
6213759Sgiacomo.gabrielli@arm.com    'pb' : 'uint8_t'
636019Shines@cs.fsu.edu}};
646019Shines@cs.fsu.edu
656312Sgblack@eecs.umich.edulet {{
666312Sgblack@eecs.umich.edu    maybePCRead = '''
677720Sgblack@eecs.umich.edu        ((%(reg_idx)s == PCReg) ? readPC(xc) : xc->%(func)s(this, %(op_idx)s))
686312Sgblack@eecs.umich.edu    '''
697186Sgblack@eecs.umich.edu    maybeAlignedPCRead = '''
707720Sgblack@eecs.umich.edu        ((%(reg_idx)s == PCReg) ? (roundDown(readPC(xc), 4)) :
717186Sgblack@eecs.umich.edu         xc->%(func)s(this, %(op_idx)s))
727186Sgblack@eecs.umich.edu    '''
736312Sgblack@eecs.umich.edu    maybePCWrite = '''
747093Sgblack@eecs.umich.edu        ((%(reg_idx)s == PCReg) ? setNextPC(xc, %(final_val)s) :
756312Sgblack@eecs.umich.edu         xc->%(func)s(this, %(op_idx)s, %(final_val)s))
766312Sgblack@eecs.umich.edu    '''
777148Sgblack@eecs.umich.edu    maybeIWPCWrite = '''
787148Sgblack@eecs.umich.edu        ((%(reg_idx)s == PCReg) ? setIWNextPC(xc, %(final_val)s) :
797148Sgblack@eecs.umich.edu         xc->%(func)s(this, %(op_idx)s, %(final_val)s))
807148Sgblack@eecs.umich.edu    '''
817184Sgblack@eecs.umich.edu    maybeAIWPCWrite = '''
827184Sgblack@eecs.umich.edu        if (%(reg_idx)s == PCReg) {
837289Sgblack@eecs.umich.edu            bool thumb = THUMB;
847289Sgblack@eecs.umich.edu            if (thumb) {
857289Sgblack@eecs.umich.edu                setNextPC(xc, %(final_val)s);
867289Sgblack@eecs.umich.edu            } else {
877184Sgblack@eecs.umich.edu                setIWNextPC(xc, %(final_val)s);
887184Sgblack@eecs.umich.edu            }
897184Sgblack@eecs.umich.edu        } else {
907184Sgblack@eecs.umich.edu            xc->%(func)s(this, %(op_idx)s, %(final_val)s);
917184Sgblack@eecs.umich.edu        }
927184Sgblack@eecs.umich.edu    '''
9310037SARM gem5 Developers    aarch64Read = '''
9410037SARM gem5 Developers        ((xc->%(func)s(this, %(op_idx)s)) & mask(intWidth))
9510037SARM gem5 Developers    '''
9610037SARM gem5 Developers    aarch64Write = '''
9710037SARM gem5 Developers        xc->%(func)s(this, %(op_idx)s, (%(final_val)s) & mask(intWidth))
9810037SARM gem5 Developers    '''
9910037SARM gem5 Developers    aarchX64Read = '''
10010037SARM gem5 Developers        ((xc->%(func)s(this, %(op_idx)s)) & mask(aarch64 ? 64 : 32))
10110037SARM gem5 Developers    '''
10210037SARM gem5 Developers    aarchX64Write = '''
10310037SARM gem5 Developers        xc->%(func)s(this, %(op_idx)s, (%(final_val)s) & mask(aarch64 ? 64 : 32))
10410037SARM gem5 Developers    '''
10510037SARM gem5 Developers    aarchW64Read = '''
10610037SARM gem5 Developers        ((xc->%(func)s(this, %(op_idx)s)) & mask(32))
10710037SARM gem5 Developers    '''
10810037SARM gem5 Developers    aarchW64Write = '''
10910037SARM gem5 Developers        xc->%(func)s(this, %(op_idx)s, (%(final_val)s) & mask(32))
11010037SARM gem5 Developers    '''
11110037SARM gem5 Developers    cntrlNsBankedWrite = '''
11212499Sgiacomo.travaglini@arm.com        xc->setMiscReg(snsBankedIndex(dest, xc->tcBase()), %(final_val)s)
11310037SARM gem5 Developers    '''
11410037SARM gem5 Developers
11510037SARM gem5 Developers    cntrlNsBankedRead = '''
11612499Sgiacomo.travaglini@arm.com        xc->readMiscReg(snsBankedIndex(op1, xc->tcBase()))
11710037SARM gem5 Developers    '''
1187797Sgblack@eecs.umich.edu
1197797Sgblack@eecs.umich.edu    #PCState operands need to have a sorting index (the number at the end)
1207797Sgblack@eecs.umich.edu    #less than all the integer registers which might update the PC. That way
1217797Sgblack@eecs.umich.edu    #if the flag bits of the pc state are updated and a branch happens through
1227797Sgblack@eecs.umich.edu    #R15, the updates are layered properly and the R15 update isn't lost.
1237797Sgblack@eecs.umich.edu    srtNormal = 5
1247797Sgblack@eecs.umich.edu    srtCpsr = 4
1257797Sgblack@eecs.umich.edu    srtBase = 3
1267797Sgblack@eecs.umich.edu    srtPC = 2
1277797Sgblack@eecs.umich.edu    srtMode = 1
1287797Sgblack@eecs.umich.edu    srtEPC = 0
1297797Sgblack@eecs.umich.edu
13012110SRekai.GonzalezAlberquilla@arm.com    def vectorElem(idx, elem):
13112110SRekai.GonzalezAlberquilla@arm.com        return ('VecElem', 'sf', (idx, elem), 'IsVectorElem', srtNormal)
13212110SRekai.GonzalezAlberquilla@arm.com
13312110SRekai.GonzalezAlberquilla@arm.com    def vectorReg(idx, elems = None):
13412110SRekai.GonzalezAlberquilla@arm.com        return ('VecReg', 'vc', (idx, elems) , 'IsVector', srtNormal)
13512110SRekai.GonzalezAlberquilla@arm.com
13612110SRekai.GonzalezAlberquilla@arm.com    def vectorRegElem(elem, ext = 'sf', zeroing = False):
13712110SRekai.GonzalezAlberquilla@arm.com        return (elem, ext, zeroing)
13812110SRekai.GonzalezAlberquilla@arm.com
13913759Sgiacomo.gabrielli@arm.com    def vecPredReg(idx):
14013759Sgiacomo.gabrielli@arm.com        return ('VecPredReg', 'pc', idx, None, srtNormal)
14113759Sgiacomo.gabrielli@arm.com
1427797Sgblack@eecs.umich.edu    def intReg(idx):
1437797Sgblack@eecs.umich.edu        return ('IntReg', 'uw', idx, 'IsInteger', srtNormal,
1447797Sgblack@eecs.umich.edu                maybePCRead, maybePCWrite)
1457797Sgblack@eecs.umich.edu
14610037SARM gem5 Developers    def intReg64(idx):
14710037SARM gem5 Developers        return ('IntReg', 'ud', idx, 'IsInteger', srtNormal,
14810037SARM gem5 Developers                aarch64Read, aarch64Write)
14910037SARM gem5 Developers
15010037SARM gem5 Developers    def intRegX64(idx, id = srtNormal):
15110037SARM gem5 Developers        return ('IntReg', 'ud', idx, 'IsInteger', id,
15210037SARM gem5 Developers                aarchX64Read, aarchX64Write)
15310037SARM gem5 Developers
15410037SARM gem5 Developers    def intRegW64(idx, id = srtNormal):
15510037SARM gem5 Developers        return ('IntReg', 'ud', idx, 'IsInteger', id,
15610037SARM gem5 Developers                aarchW64Read, aarchW64Write)
15710037SARM gem5 Developers
1587797Sgblack@eecs.umich.edu    def intRegNPC(idx):
1597797Sgblack@eecs.umich.edu        return ('IntReg', 'uw', idx, 'IsInteger', srtNormal)
1607797Sgblack@eecs.umich.edu
1617797Sgblack@eecs.umich.edu    def intRegAPC(idx, id = srtNormal):
1627797Sgblack@eecs.umich.edu        return ('IntReg', 'uw', idx, 'IsInteger', id,
1637797Sgblack@eecs.umich.edu                maybeAlignedPCRead, maybePCWrite)
1647797Sgblack@eecs.umich.edu
1657797Sgblack@eecs.umich.edu    def intRegIWPC(idx):
1667797Sgblack@eecs.umich.edu        return ('IntReg', 'uw', idx, 'IsInteger', srtNormal,
1677797Sgblack@eecs.umich.edu                maybePCRead, maybeIWPCWrite)
1687797Sgblack@eecs.umich.edu
1697797Sgblack@eecs.umich.edu    def intRegAIWPC(idx):
1707797Sgblack@eecs.umich.edu        return ('IntReg', 'uw', idx, 'IsInteger', srtNormal,
1717797Sgblack@eecs.umich.edu                maybePCRead, maybeAIWPCWrite)
1727797Sgblack@eecs.umich.edu
17310338SCurtis.Dunham@arm.com    def ccReg(idx):
17410338SCurtis.Dunham@arm.com        return ('CCReg', 'uw', idx, None, srtNormal)
1757797Sgblack@eecs.umich.edu
1767797Sgblack@eecs.umich.edu    def cntrlReg(idx, id = srtNormal, type = 'uw'):
1779251Snathanael.premillieu@irisa.fr        return ('ControlReg', type, idx, None, id)
1787797Sgblack@eecs.umich.edu
17910037SARM gem5 Developers    def cntrlNsBankedReg(idx, id = srtNormal, type = 'uw'):
18010037SARM gem5 Developers        return ('ControlReg', type, idx, (None, None, 'IsControl'), id, cntrlNsBankedRead, cntrlNsBankedWrite)
18110037SARM gem5 Developers
18210037SARM gem5 Developers    def cntrlNsBankedReg64(idx, id = srtNormal, type = 'ud'):
18310037SARM gem5 Developers        return ('ControlReg', type, idx, (None, None, 'IsControl'), id, cntrlNsBankedRead, cntrlNsBankedWrite)
18410037SARM gem5 Developers
1857797Sgblack@eecs.umich.edu    def cntrlRegNC(idx, id = srtNormal, type = 'uw'):
1867797Sgblack@eecs.umich.edu        return ('ControlReg', type, idx, None, id)
1877797Sgblack@eecs.umich.edu
1887797Sgblack@eecs.umich.edu    def pcStateReg(idx, id):
18910037SARM gem5 Developers        return ('PCState', 'ud', idx, (None, None, 'IsControl'), id)
1906312Sgblack@eecs.umich.edu}};
1916312Sgblack@eecs.umich.edu
1926019Shines@cs.fsu.edudef operands {{
1937119Sgblack@eecs.umich.edu    #Abstracted integer reg operands
1947797Sgblack@eecs.umich.edu    'Dest': intReg('dest'),
19510037SARM gem5 Developers    'Dest64': intReg64('dest'),
19610037SARM gem5 Developers    'XDest': intRegX64('dest'),
19710037SARM gem5 Developers    'WDest': intRegW64('dest'),
1987797Sgblack@eecs.umich.edu    'IWDest': intRegIWPC('dest'),
1997797Sgblack@eecs.umich.edu    'AIWDest': intRegAIWPC('dest'),
2007797Sgblack@eecs.umich.edu    'Dest2': intReg('dest2'),
20110037SARM gem5 Developers    'XDest2': intRegX64('dest2'),
20212134Sgedare@rtems.org    'IWDest2': intRegIWPC('dest2'),
2037797Sgblack@eecs.umich.edu    'Result': intReg('result'),
20410037SARM gem5 Developers    'XResult': intRegX64('result'),
20510037SARM gem5 Developers    'XBase': intRegX64('base', id = srtBase),
2067797Sgblack@eecs.umich.edu    'Base': intRegAPC('base', id = srtBase),
20710037SARM gem5 Developers    'XOffset': intRegX64('offset'),
2087797Sgblack@eecs.umich.edu    'Index': intReg('index'),
2097797Sgblack@eecs.umich.edu    'Shift': intReg('shift'),
2107797Sgblack@eecs.umich.edu    'Op1': intReg('op1'),
2117797Sgblack@eecs.umich.edu    'Op2': intReg('op2'),
2127797Sgblack@eecs.umich.edu    'Op3': intReg('op3'),
21310037SARM gem5 Developers    'Op164': intReg64('op1'),
21410037SARM gem5 Developers    'Op264': intReg64('op2'),
21510037SARM gem5 Developers    'Op364': intReg64('op3'),
21610037SARM gem5 Developers    'XOp1': intRegX64('op1'),
21710037SARM gem5 Developers    'XOp2': intRegX64('op2'),
21810037SARM gem5 Developers    'XOp3': intRegX64('op3'),
21910037SARM gem5 Developers    'WOp1': intRegW64('op1'),
22010037SARM gem5 Developers    'WOp2': intRegW64('op2'),
22110037SARM gem5 Developers    'WOp3': intRegW64('op3'),
2227797Sgblack@eecs.umich.edu    'Reg0': intReg('reg0'),
2237797Sgblack@eecs.umich.edu    'Reg1': intReg('reg1'),
2247797Sgblack@eecs.umich.edu    'Reg2': intReg('reg2'),
2257797Sgblack@eecs.umich.edu    'Reg3': intReg('reg3'),
2266019Shines@cs.fsu.edu
2277797Sgblack@eecs.umich.edu    #Fixed index integer reg operands
2287797Sgblack@eecs.umich.edu    'SpMode': intRegNPC('intRegInMode((OperatingMode)regMode, INTREG_SP)'),
22910037SARM gem5 Developers    'DecodedBankedIntReg': intRegNPC('decodeMrsMsrBankedIntRegIndex(byteMask, r)'),
2307797Sgblack@eecs.umich.edu    'LR': intRegNPC('INTREG_LR'),
23110037SARM gem5 Developers    'XLR': intRegX64('INTREG_X30'),
2327797Sgblack@eecs.umich.edu    'R7': intRegNPC('7'),
2338204SAli.Saidi@ARM.com    # First four arguments are passed in registers
2347797Sgblack@eecs.umich.edu    'R0': intRegNPC('0'),
2358204SAli.Saidi@ARM.com    'R1': intRegNPC('1'),
2368204SAli.Saidi@ARM.com    'R2': intRegNPC('2'),
2378204SAli.Saidi@ARM.com    'R3': intRegNPC('3'),
23810037SARM gem5 Developers    'X0': intRegX64('0'),
23910037SARM gem5 Developers    'X1': intRegX64('1'),
24010037SARM gem5 Developers    'X2': intRegX64('2'),
24110037SARM gem5 Developers    'X3': intRegX64('3'),
2427797Sgblack@eecs.umich.edu
24310338SCurtis.Dunham@arm.com    # Condition code registers
24410338SCurtis.Dunham@arm.com    'CondCodesNZ': ccReg('CCREG_NZ'),
24510338SCurtis.Dunham@arm.com    'CondCodesC': ccReg('CCREG_C'),
24610338SCurtis.Dunham@arm.com    'CondCodesV': ccReg('CCREG_V'),
24710338SCurtis.Dunham@arm.com    'CondCodesGE': ccReg('CCREG_GE'),
24810338SCurtis.Dunham@arm.com    'OptCondCodesNZ': ccReg(
24910338SCurtis.Dunham@arm.com            '''((condCode == COND_AL || condCode == COND_UC ||
25010338SCurtis.Dunham@arm.com                 condCode == COND_CC || condCode == COND_CS ||
25110338SCurtis.Dunham@arm.com                 condCode == COND_VS || condCode == COND_VC) ?
25210338SCurtis.Dunham@arm.com                CCREG_ZERO : CCREG_NZ)'''),
25310338SCurtis.Dunham@arm.com    'OptCondCodesC': ccReg(
25410338SCurtis.Dunham@arm.com             '''((condCode == COND_HI || condCode == COND_LS ||
2558303SAli.Saidi@ARM.com                condCode == COND_CS || condCode == COND_CC) ?
25610338SCurtis.Dunham@arm.com               CCREG_C : CCREG_ZERO)'''),
25710338SCurtis.Dunham@arm.com    'OptShiftRmCondCodesC': ccReg(
25810338SCurtis.Dunham@arm.com            '''((condCode == COND_HI || condCode == COND_LS ||
25910338SCurtis.Dunham@arm.com                 condCode == COND_CS || condCode == COND_CC ||
26010338SCurtis.Dunham@arm.com                 shiftType == ROR) ?
26110338SCurtis.Dunham@arm.com                CCREG_C : CCREG_ZERO)'''),
26210338SCurtis.Dunham@arm.com    'OptCondCodesV': ccReg(
26310338SCurtis.Dunham@arm.com            '''((condCode == COND_VS || condCode == COND_VC ||
26410338SCurtis.Dunham@arm.com                 condCode == COND_GE || condCode == COND_LT ||
26510338SCurtis.Dunham@arm.com                 condCode == COND_GT || condCode == COND_LE) ?
26610338SCurtis.Dunham@arm.com                CCREG_V : CCREG_ZERO)'''),
26710338SCurtis.Dunham@arm.com    'FpCondCodes': ccReg('CCREG_FP'),
2687797Sgblack@eecs.umich.edu
2697797Sgblack@eecs.umich.edu    #Abstracted floating point reg operands
27013603Sgiacomo.travaglini@arm.com    'FpDest': vectorElem('dest / 4', 'dest % 4'),
27113815Sgiacomo.travaglini@arm.com    'FpDestP0': vectorElem('(dest + 0) / 4', '(dest + 0) % 4'),
27213815Sgiacomo.travaglini@arm.com    'FpDestP1': vectorElem('(dest + 1) / 4', '(dest + 1) % 4'),
27313815Sgiacomo.travaglini@arm.com    'FpDestP2': vectorElem('(dest + 2) / 4', '(dest + 2) % 4'),
27413815Sgiacomo.travaglini@arm.com    'FpDestP3': vectorElem('(dest + 3) / 4', '(dest + 3) % 4'),
27513815Sgiacomo.travaglini@arm.com    'FpDestP4': vectorElem('(dest + 4) / 4', '(dest + 4) % 4'),
27613815Sgiacomo.travaglini@arm.com    'FpDestP5': vectorElem('(dest + 5) / 4', '(dest + 5) % 4'),
27713815Sgiacomo.travaglini@arm.com    'FpDestP6': vectorElem('(dest + 6) / 4', '(dest + 6) % 4'),
27813815Sgiacomo.travaglini@arm.com    'FpDestP7': vectorElem('(dest + 7) / 4', '(dest + 7) % 4'),
2797797Sgblack@eecs.umich.edu
28013603Sgiacomo.travaglini@arm.com    'FpDestS0P0': vectorElem(
28113603Sgiacomo.travaglini@arm.com        '(dest + step * 0 + 0) / 4', '(dest + step * 0 + 0) % 4'),
28213603Sgiacomo.travaglini@arm.com    'FpDestS0P1': vectorElem(
28313603Sgiacomo.travaglini@arm.com        '(dest + step * 0 + 1) / 4', '(dest + step * 0 + 1) % 4'),
28413603Sgiacomo.travaglini@arm.com    'FpDestS1P0': vectorElem(
28513603Sgiacomo.travaglini@arm.com        '(dest + step * 1 + 0) / 4', '(dest + step * 1 + 0) % 4'),
28613603Sgiacomo.travaglini@arm.com    'FpDestS1P1': vectorElem(
28713603Sgiacomo.travaglini@arm.com        '(dest + step * 1 + 1) / 4', '(dest + step * 1 + 1) % 4'),
28813603Sgiacomo.travaglini@arm.com    'FpDestS2P0': vectorElem(
28913603Sgiacomo.travaglini@arm.com        '(dest + step * 2 + 0) / 4', '(dest + step * 2 + 0) % 4'),
29013603Sgiacomo.travaglini@arm.com    'FpDestS2P1': vectorElem(
29113603Sgiacomo.travaglini@arm.com        '(dest + step * 2 + 1) / 4', '(dest + step * 2 + 1) % 4'),
29213603Sgiacomo.travaglini@arm.com    'FpDestS3P0': vectorElem(
29313603Sgiacomo.travaglini@arm.com        '(dest + step * 3 + 0) / 4', '(dest + step * 3 + 0) % 4'),
29413603Sgiacomo.travaglini@arm.com    'FpDestS3P1': vectorElem(
29513603Sgiacomo.travaglini@arm.com        '(dest + step * 3 + 1) / 4', '(dest + step * 3 + 1) % 4'),
2967797Sgblack@eecs.umich.edu
29713603Sgiacomo.travaglini@arm.com    'FpDest2': vectorElem('dest2 / 4', 'dest2 % 4'),
29813815Sgiacomo.travaglini@arm.com    'FpDest2P0': vectorElem('(dest2 + 0) / 4', '(dest2 + 0) % 4'),
29913815Sgiacomo.travaglini@arm.com    'FpDest2P1': vectorElem('(dest2 + 1) / 4', '(dest2 + 1) % 4'),
30013815Sgiacomo.travaglini@arm.com    'FpDest2P2': vectorElem('(dest2 + 2) / 4', '(dest2 + 2) % 4'),
30113815Sgiacomo.travaglini@arm.com    'FpDest2P3': vectorElem('(dest2 + 3) / 4', '(dest2 + 3) % 4'),
3027797Sgblack@eecs.umich.edu
30313603Sgiacomo.travaglini@arm.com    'FpOp1': vectorElem('op1 / 4', 'op1 % 4'),
30413815Sgiacomo.travaglini@arm.com    'FpOp1P0': vectorElem('(op1 + 0) / 4', '(op1 + 0) % 4'),
30513815Sgiacomo.travaglini@arm.com    'FpOp1P1': vectorElem('(op1 + 1) / 4', '(op1 + 1) % 4'),
30613815Sgiacomo.travaglini@arm.com    'FpOp1P2': vectorElem('(op1 + 2) / 4', '(op1 + 2) % 4'),
30713815Sgiacomo.travaglini@arm.com    'FpOp1P3': vectorElem('(op1 + 3) / 4', '(op1 + 3) % 4'),
30813815Sgiacomo.travaglini@arm.com    'FpOp1P4': vectorElem('(op1 + 4) / 4', '(op1 + 4) % 4'),
30913815Sgiacomo.travaglini@arm.com    'FpOp1P5': vectorElem('(op1 + 5) / 4', '(op1 + 5) % 4'),
31013815Sgiacomo.travaglini@arm.com    'FpOp1P6': vectorElem('(op1 + 6) / 4', '(op1 + 6) % 4'),
31113815Sgiacomo.travaglini@arm.com    'FpOp1P7': vectorElem('(op1 + 7) / 4', '(op1 + 7) % 4'),
31213603Sgiacomo.travaglini@arm.com
31313603Sgiacomo.travaglini@arm.com    'FpOp1S0P0': vectorElem(
31413603Sgiacomo.travaglini@arm.com        '(op1 + step * 0 + 0) / 4', '(op1 + step * 0 + 0) % 4'),
31513603Sgiacomo.travaglini@arm.com    'FpOp1S0P1': vectorElem(
31613603Sgiacomo.travaglini@arm.com        '(op1 + step * 0 + 1) / 4', '(op1 + step * 0 + 1) % 4'),
31713603Sgiacomo.travaglini@arm.com    'FpOp1S1P0': vectorElem(
31813603Sgiacomo.travaglini@arm.com        '(op1 + step * 1 + 0) / 4', '(op1 + step * 1 + 0) % 4'),
31913603Sgiacomo.travaglini@arm.com    'FpOp1S1P1': vectorElem(
32013603Sgiacomo.travaglini@arm.com        '(op1 + step * 1 + 1) / 4', '(op1 + step * 1 + 1) % 4'),
32113603Sgiacomo.travaglini@arm.com    'FpOp1S2P0': vectorElem(
32213603Sgiacomo.travaglini@arm.com        '(op1 + step * 2 + 0) / 4', '(op1 + step * 2 + 0) % 4'),
32313603Sgiacomo.travaglini@arm.com    'FpOp1S2P1': vectorElem(
32413603Sgiacomo.travaglini@arm.com        '(op1 + step * 2 + 1) / 4', '(op1 + step * 2 + 1) % 4'),
32513603Sgiacomo.travaglini@arm.com    'FpOp1S3P0': vectorElem(
32613603Sgiacomo.travaglini@arm.com        '(op1 + step * 3 + 0) / 4', '(op1 + step * 3 + 0) % 4'),
32713603Sgiacomo.travaglini@arm.com    'FpOp1S3P1': vectorElem(
32813603Sgiacomo.travaglini@arm.com        '(op1 + step * 3 + 1) / 4', '(op1 + step * 3 + 1) % 4'),
32913603Sgiacomo.travaglini@arm.com
33013603Sgiacomo.travaglini@arm.com    'FpOp2': vectorElem('op2 / 4', 'op2 % 4'),
33113815Sgiacomo.travaglini@arm.com    'FpOp2P0': vectorElem('(op2 + 0) / 4', '(op2 + 0) % 4'),
33213815Sgiacomo.travaglini@arm.com    'FpOp2P1': vectorElem('(op2 + 1) / 4', '(op2 + 1) % 4'),
33313815Sgiacomo.travaglini@arm.com    'FpOp2P2': vectorElem('(op2 + 2) / 4', '(op2 + 2) % 4'),
33413815Sgiacomo.travaglini@arm.com    'FpOp2P3': vectorElem('(op2 + 3) / 4', '(op2 + 3) % 4'),
3357797Sgblack@eecs.umich.edu
33610037SARM gem5 Developers    # Create AArch64 unpacked view of the FP registers
33712110SRekai.GonzalezAlberquilla@arm.com    # Name   ::= 'AA64Vec' OpSpec [LaneSpec]
33812110SRekai.GonzalezAlberquilla@arm.com    # OpSpec ::= IOSpec [Index] [Plus]
33912110SRekai.GonzalezAlberquilla@arm.com    # IOSpec ::= 'S' | 'D'
34012110SRekai.GonzalezAlberquilla@arm.com    # Index  ::= '0' | ... | '9'
34112110SRekai.GonzalezAlberquilla@arm.com    # Plus  ::= [PlusAmount] ['l']
34212110SRekai.GonzalezAlberquilla@arm.com    # PlusAmount ::= 'p' [PlusAmount]
34312110SRekai.GonzalezAlberquilla@arm.com    # LaneSpec ::= 'L' Index
34412110SRekai.GonzalezAlberquilla@arm.com    #
34512110SRekai.GonzalezAlberquilla@arm.com    # All the constituents are hierarchically defined as part of the Vector
34612110SRekai.GonzalezAlberquilla@arm.com    # Register they belong to
34710037SARM gem5 Developers
34812110SRekai.GonzalezAlberquilla@arm.com    'AA64FpOp1':       vectorReg('op1',
34912110SRekai.GonzalezAlberquilla@arm.com    {
35012110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P0': vectorRegElem('0'),
35112110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P1': vectorRegElem('1'),
35212110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P2': vectorRegElem('2'),
35312110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P3': vectorRegElem('3'),
35412110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1S':  vectorRegElem('0', 'sf', zeroing = True),
35512110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1D':  vectorRegElem('0', 'df', zeroing = True),
35612110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1Q':  vectorRegElem('0', 'tud', zeroing = True)
35712110SRekai.GonzalezAlberquilla@arm.com    }),
35810037SARM gem5 Developers
35912110SRekai.GonzalezAlberquilla@arm.com    'AA64FpOp2':       vectorReg('op2',
36012110SRekai.GonzalezAlberquilla@arm.com    {
36112110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp2P0': vectorRegElem('0'),
36212110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp2P1': vectorRegElem('1'),
36312110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp2P2': vectorRegElem('2'),
36412110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp2P3': vectorRegElem('3'),
36512110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp2S':  vectorRegElem('0', 'sf', zeroing = True),
36612110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp2D':  vectorRegElem('0', 'df', zeroing = True),
36712110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp2Q':  vectorRegElem('0', 'tud', zeroing = True)
36812110SRekai.GonzalezAlberquilla@arm.com    }),
36910037SARM gem5 Developers
37012110SRekai.GonzalezAlberquilla@arm.com    'AA64FpOp3':       vectorReg('op3',
37112110SRekai.GonzalezAlberquilla@arm.com    {
37212110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp3P0': vectorRegElem('0'),
37312110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp3P1': vectorRegElem('1'),
37412110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp3P2': vectorRegElem('2'),
37512110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp3P3': vectorRegElem('3'),
37612110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp3S':  vectorRegElem('0', 'sf', zeroing = True),
37712110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp3D':  vectorRegElem('0', 'df', zeroing = True),
37812110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp3Q':  vectorRegElem('0', 'tud', zeroing = True)
37912110SRekai.GonzalezAlberquilla@arm.com    }),
38010037SARM gem5 Developers
38112110SRekai.GonzalezAlberquilla@arm.com    'AA64FpDest':       vectorReg('dest',
38212110SRekai.GonzalezAlberquilla@arm.com    {
38312110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestP0': vectorRegElem('0'),
38412110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestP1': vectorRegElem('1'),
38512110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestP2': vectorRegElem('2'),
38612110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestP3': vectorRegElem('3'),
38712110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestS':  vectorRegElem('0', 'sf', zeroing = True),
38812110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestD':  vectorRegElem('0', 'df', zeroing = True),
38912110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestQ':  vectorRegElem('0', 'tud', zeroing = True)
39012110SRekai.GonzalezAlberquilla@arm.com    }),
39110037SARM gem5 Developers
39212110SRekai.GonzalezAlberquilla@arm.com    'AA64FpDest2':       vectorReg('dest2',
39312110SRekai.GonzalezAlberquilla@arm.com    {
39412110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDest2P0': vectorRegElem('0'),
39512110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDest2P1': vectorRegElem('1'),
39612110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDest2P2': vectorRegElem('2'),
39712110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDest2P3': vectorRegElem('3'),
39812110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDest2S':  vectorRegElem('0', 'sf', zeroing = True),
39912110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDest2D':  vectorRegElem('0', 'df', zeroing = True),
40012110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDest2Q':  vectorRegElem('0', 'tud', zeroing = True)
40112110SRekai.GonzalezAlberquilla@arm.com    }),
40210037SARM gem5 Developers
40312110SRekai.GonzalezAlberquilla@arm.com    'AA64FpOp1V0':       vectorReg('op1',
40412110SRekai.GonzalezAlberquilla@arm.com    {
40512110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P0V0': vectorRegElem('0'),
40612110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P1V0': vectorRegElem('1'),
40712110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P2V0': vectorRegElem('2'),
40812110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P3V0': vectorRegElem('3'),
40912110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1SV0':  vectorRegElem('0', 'sf', zeroing = True),
41012110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1DV0':  vectorRegElem('0', 'df', zeroing = True),
41112110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1QV0':  vectorRegElem('0', 'tud', zeroing = True)
41212110SRekai.GonzalezAlberquilla@arm.com    }),
41310037SARM gem5 Developers
41412110SRekai.GonzalezAlberquilla@arm.com    'AA64FpOp1V1':       vectorReg('op1+1',
41512110SRekai.GonzalezAlberquilla@arm.com    {
41612110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P0V1': vectorRegElem('0'),
41712110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P1V1': vectorRegElem('1'),
41812110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P2V1': vectorRegElem('2'),
41912110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P3V1': vectorRegElem('3'),
42012110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1SV1':  vectorRegElem('0', 'sf', zeroing = True),
42112110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1DV1':  vectorRegElem('0', 'df', zeroing = True),
42212110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1QV1':  vectorRegElem('0', 'tud', zeroing = True)
42312110SRekai.GonzalezAlberquilla@arm.com    }),
42410037SARM gem5 Developers
42512110SRekai.GonzalezAlberquilla@arm.com    'AA64FpOp1V2':       vectorReg('op1+2',
42612110SRekai.GonzalezAlberquilla@arm.com    {
42712110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P0V2': vectorRegElem('0'),
42812110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P1V2': vectorRegElem('1'),
42912110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P2V2': vectorRegElem('2'),
43012110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P3V2': vectorRegElem('3'),
43112110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1SV2':  vectorRegElem('0', 'sf', zeroing = True),
43212110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1DV2':  vectorRegElem('0', 'df', zeroing = True),
43312110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1QV2':  vectorRegElem('0', 'tud', zeroing = True)
43412110SRekai.GonzalezAlberquilla@arm.com    }),
43510037SARM gem5 Developers
43612110SRekai.GonzalezAlberquilla@arm.com    'AA64FpOp1V3':       vectorReg('op1+3',
43712110SRekai.GonzalezAlberquilla@arm.com    {
43812110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P0V3': vectorRegElem('0'),
43912110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P1V3': vectorRegElem('1'),
44012110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P2V3': vectorRegElem('2'),
44112110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P3V3': vectorRegElem('3'),
44212110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1SV3':  vectorRegElem('0', 'sf', zeroing = True),
44312110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1DV3':  vectorRegElem('0', 'df', zeroing = True),
44412110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1QV3':  vectorRegElem('0', 'tud', zeroing = True)
44512110SRekai.GonzalezAlberquilla@arm.com    }),
44610037SARM gem5 Developers
44712110SRekai.GonzalezAlberquilla@arm.com    'AA64FpOp1V0S':       vectorReg('(op1+0)%32',
44812110SRekai.GonzalezAlberquilla@arm.com    {
44912110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P0V0S': vectorRegElem('0'),
45012110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P1V0S': vectorRegElem('1'),
45112110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P2V0S': vectorRegElem('2'),
45212110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P3V0S': vectorRegElem('3'),
45312110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1SV0S':  vectorRegElem('0', 'sf', zeroing = True),
45412110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1DV0S':  vectorRegElem('0', 'df', zeroing = True),
45512110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1QV0S':  vectorRegElem('0', 'tud', zeroing = True)
45612110SRekai.GonzalezAlberquilla@arm.com    }),
45710037SARM gem5 Developers
45812110SRekai.GonzalezAlberquilla@arm.com    'AA64FpOp1V1S':       vectorReg('(op1+1)%32',
45912110SRekai.GonzalezAlberquilla@arm.com    {
46012110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P0V1S': vectorRegElem('0'),
46112110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P1V1S': vectorRegElem('1'),
46212110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P2V1S': vectorRegElem('2'),
46312110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P3V1S': vectorRegElem('3'),
46412110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1SV1S':  vectorRegElem('0', 'sf', zeroing = True),
46512110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1DV1S':  vectorRegElem('0', 'df', zeroing = True),
46612110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1QV1S':  vectorRegElem('0', 'tud', zeroing = True)
46712110SRekai.GonzalezAlberquilla@arm.com    }),
46810037SARM gem5 Developers
46912110SRekai.GonzalezAlberquilla@arm.com    'AA64FpOp1V2S':       vectorReg('(op1+2)%32',
47012110SRekai.GonzalezAlberquilla@arm.com    {
47112110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P0V2S': vectorRegElem('0'),
47212110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P1V2S': vectorRegElem('1'),
47312110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P2V2S': vectorRegElem('2'),
47412110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P3V2S': vectorRegElem('3'),
47512110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1SV2S':  vectorRegElem('0', 'sf', zeroing = True),
47612110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1DV2S':  vectorRegElem('0', 'df', zeroing = True),
47712110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1QV2S':  vectorRegElem('0', 'tud', zeroing = True)
47812110SRekai.GonzalezAlberquilla@arm.com    }),
47912110SRekai.GonzalezAlberquilla@arm.com
48012110SRekai.GonzalezAlberquilla@arm.com    'AA64FpOp1V3S':       vectorReg('(op1+3)%32',
48112110SRekai.GonzalezAlberquilla@arm.com    {
48212110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P0V3S': vectorRegElem('0'),
48312110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P1V3S': vectorRegElem('1'),
48412110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P2V3S': vectorRegElem('2'),
48512110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1P3V3S': vectorRegElem('3'),
48612110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1SV3S':  vectorRegElem('0', 'sf', zeroing = True),
48712110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1DV3S':  vectorRegElem('0', 'df', zeroing = True),
48812110SRekai.GonzalezAlberquilla@arm.com        'AA64FpOp1QV3S':  vectorRegElem('0', 'tud', zeroing = True)
48912110SRekai.GonzalezAlberquilla@arm.com    }),
49012110SRekai.GonzalezAlberquilla@arm.com
49112110SRekai.GonzalezAlberquilla@arm.com    'AA64FpDestV0':       vectorReg('(dest+0)',
49212110SRekai.GonzalezAlberquilla@arm.com    {
49312110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestP0V0': vectorRegElem('0'),
49412110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestP1V0': vectorRegElem('1'),
49512110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestP2V0': vectorRegElem('2'),
49612110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestP3V0': vectorRegElem('3'),
49712110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestSV0':  vectorRegElem('0', 'sf', zeroing = True),
49812110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestDV0':  vectorRegElem('0', 'df', zeroing = True),
49912110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestQV0':  vectorRegElem('0', 'tud', zeroing = True)
50012110SRekai.GonzalezAlberquilla@arm.com    }),
50112110SRekai.GonzalezAlberquilla@arm.com
50212110SRekai.GonzalezAlberquilla@arm.com    'AA64FpDestV1':       vectorReg('(dest+1)',
50312110SRekai.GonzalezAlberquilla@arm.com    {
50412110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestP0V1': vectorRegElem('0'),
50512110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestP1V1': vectorRegElem('1'),
50612110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestP2V1': vectorRegElem('2'),
50712110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestP3V1': vectorRegElem('3'),
50812110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestSV1':  vectorRegElem('0', 'sf', zeroing = True),
50912110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestDV1':  vectorRegElem('0', 'df', zeroing = True),
51012110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestQV1':  vectorRegElem('0', 'tud', zeroing = True)
51112110SRekai.GonzalezAlberquilla@arm.com    }),
51212110SRekai.GonzalezAlberquilla@arm.com
51312110SRekai.GonzalezAlberquilla@arm.com    'AA64FpDestV0L':       vectorReg('(dest+0)%32',
51412110SRekai.GonzalezAlberquilla@arm.com    {
51512110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestP0V0L': vectorRegElem('0'),
51612110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestP1V0L': vectorRegElem('1'),
51712110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestP2V0L': vectorRegElem('2'),
51812110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestP3V0L': vectorRegElem('3'),
51912110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestSV0L':  vectorRegElem('0', 'sf', zeroing = True),
52012110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestDV0L':  vectorRegElem('0', 'df', zeroing = True),
52112110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestQV0L':  vectorRegElem('0', 'tud', zeroing = True)
52212110SRekai.GonzalezAlberquilla@arm.com    }),
52312110SRekai.GonzalezAlberquilla@arm.com
52412110SRekai.GonzalezAlberquilla@arm.com    'AA64FpDestV1L':       vectorReg('(dest+1)%32',
52512110SRekai.GonzalezAlberquilla@arm.com    {
52612110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestP0V1L': vectorRegElem('0'),
52712110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestP1V1L': vectorRegElem('1'),
52812110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestP2V1L': vectorRegElem('2'),
52912110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestP3V1L': vectorRegElem('3'),
53012110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestSV1L':  vectorRegElem('0', 'sf', zeroing = True),
53112110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestDV1L':  vectorRegElem('0', 'df', zeroing = True),
53212110SRekai.GonzalezAlberquilla@arm.com        'AA64FpDestQV1L':  vectorRegElem('0', 'tud', zeroing = True)
53312110SRekai.GonzalezAlberquilla@arm.com    }),
53410037SARM gem5 Developers
53514106Sjavier.setoain@arm.com    # Temporary registers for SVE interleaving
53614106Sjavier.setoain@arm.com    'AA64IntrlvReg0': vectorReg('INTRLVREG0',
53714106Sjavier.setoain@arm.com    {
53814106Sjavier.setoain@arm.com        'AA64IntrlvReg0P0': vectorRegElem('0'),
53914106Sjavier.setoain@arm.com        'AA64IntrlvReg0P1': vectorRegElem('1'),
54014106Sjavier.setoain@arm.com        'AA64IntrlvReg0P2': vectorRegElem('2'),
54114106Sjavier.setoain@arm.com        'AA64IntrlvReg0P3': vectorRegElem('3'),
54214106Sjavier.setoain@arm.com        'AA64IntrlvReg0S':  vectorRegElem('0', 'sf', zeroing = True),
54314106Sjavier.setoain@arm.com        'AA64IntrlvReg0D':  vectorRegElem('0', 'df', zeroing = True),
54414106Sjavier.setoain@arm.com        'AA64IntrlvReg0Q':  vectorRegElem('0', 'tud', zeroing = True)
54514106Sjavier.setoain@arm.com    }),
54614106Sjavier.setoain@arm.com
54714106Sjavier.setoain@arm.com    'AA64IntrlvReg1': vectorReg('INTRLVREG1',
54814106Sjavier.setoain@arm.com    {
54914106Sjavier.setoain@arm.com        'AA64IntrlvReg1P0': vectorRegElem('0'),
55014106Sjavier.setoain@arm.com        'AA64IntrlvReg1P1': vectorRegElem('1'),
55114106Sjavier.setoain@arm.com        'AA64IntrlvReg1P2': vectorRegElem('2'),
55214106Sjavier.setoain@arm.com        'AA64IntrlvReg1P3': vectorRegElem('3'),
55314106Sjavier.setoain@arm.com        'AA64IntrlvReg1S':  vectorRegElem('0', 'sf', zeroing = True),
55414106Sjavier.setoain@arm.com        'AA64IntrlvReg1D':  vectorRegElem('0', 'df', zeroing = True),
55514106Sjavier.setoain@arm.com        'AA64IntrlvReg1Q':  vectorRegElem('0', 'tud', zeroing = True)
55614106Sjavier.setoain@arm.com    }),
55714106Sjavier.setoain@arm.com
55814106Sjavier.setoain@arm.com    'AA64IntrlvReg2': vectorReg('INTRLVREG2',
55914106Sjavier.setoain@arm.com    {
56014106Sjavier.setoain@arm.com        'AA64IntrlvReg2P0': vectorRegElem('0'),
56114106Sjavier.setoain@arm.com        'AA64IntrlvReg2P1': vectorRegElem('1'),
56214106Sjavier.setoain@arm.com        'AA64IntrlvReg2P2': vectorRegElem('2'),
56314106Sjavier.setoain@arm.com        'AA64IntrlvReg2P3': vectorRegElem('3'),
56414106Sjavier.setoain@arm.com        'AA64IntrlvReg2S':  vectorRegElem('0', 'sf', zeroing = True),
56514106Sjavier.setoain@arm.com        'AA64IntrlvReg2D':  vectorRegElem('0', 'df', zeroing = True),
56614106Sjavier.setoain@arm.com        'AA64IntrlvReg2Q':  vectorRegElem('0', 'tud', zeroing = True)
56714106Sjavier.setoain@arm.com    }),
56814106Sjavier.setoain@arm.com
56914106Sjavier.setoain@arm.com    'AA64IntrlvReg3': vectorReg('INTRLVREG3',
57014106Sjavier.setoain@arm.com    {
57114106Sjavier.setoain@arm.com        'AA64IntrlvReg3P0': vectorRegElem('0'),
57214106Sjavier.setoain@arm.com        'AA64IntrlvReg3P1': vectorRegElem('1'),
57314106Sjavier.setoain@arm.com        'AA64IntrlvReg3P2': vectorRegElem('2'),
57414106Sjavier.setoain@arm.com        'AA64IntrlvReg3P3': vectorRegElem('3'),
57514106Sjavier.setoain@arm.com        'AA64IntrlvReg3S':  vectorRegElem('0', 'sf', zeroing = True),
57614106Sjavier.setoain@arm.com        'AA64IntrlvReg3D':  vectorRegElem('0', 'df', zeroing = True),
57714106Sjavier.setoain@arm.com        'AA64IntrlvReg3Q':  vectorRegElem('0', 'tud', zeroing = True)
57814106Sjavier.setoain@arm.com    }),
57914106Sjavier.setoain@arm.com
58013759Sgiacomo.gabrielli@arm.com    'AA64FpDestMerge':       vectorReg('dest',
58113759Sgiacomo.gabrielli@arm.com    {
58213759Sgiacomo.gabrielli@arm.com        'AA64FpDestMergeP0': vectorRegElem('0'),
58313759Sgiacomo.gabrielli@arm.com        'AA64FpDestMergeP1': vectorRegElem('1'),
58413759Sgiacomo.gabrielli@arm.com        'AA64FpDestMergeP2': vectorRegElem('2'),
58513759Sgiacomo.gabrielli@arm.com        'AA64FpDestMergeP3': vectorRegElem('3'),
58613759Sgiacomo.gabrielli@arm.com        'AA64FpDestMergeS':  vectorRegElem('0', 'sf', zeroing = True),
58713759Sgiacomo.gabrielli@arm.com        'AA64FpDestMergeD':  vectorRegElem('0', 'df', zeroing = True),
58813759Sgiacomo.gabrielli@arm.com        'AA64FpDestMergeQ':  vectorRegElem('0', 'tud', zeroing = True)
58913759Sgiacomo.gabrielli@arm.com    }),
59013759Sgiacomo.gabrielli@arm.com
59114028Sgiacomo.gabrielli@arm.com    'AA64FpBase': vectorReg('base',
59214028Sgiacomo.gabrielli@arm.com    {
59314028Sgiacomo.gabrielli@arm.com        'AA64FpBaseP0': vectorRegElem('0'),
59414028Sgiacomo.gabrielli@arm.com        'AA64FpBaseP1': vectorRegElem('1'),
59514028Sgiacomo.gabrielli@arm.com        'AA64FpBaseP2': vectorRegElem('2'),
59614028Sgiacomo.gabrielli@arm.com        'AA64FpBaseP3': vectorRegElem('3'),
59714028Sgiacomo.gabrielli@arm.com        'AA64FpBaseS':  vectorRegElem('0', 'sf', zeroing = True),
59814028Sgiacomo.gabrielli@arm.com        'AA64FpBaseD':  vectorRegElem('0', 'df', zeroing = True),
59914028Sgiacomo.gabrielli@arm.com        'AA64FpBaseQ':  vectorRegElem('0', 'tud', zeroing = True)
60014028Sgiacomo.gabrielli@arm.com    }),
60114028Sgiacomo.gabrielli@arm.com
60214028Sgiacomo.gabrielli@arm.com    'AA64FpOffset': vectorReg('offset',
60314028Sgiacomo.gabrielli@arm.com    {
60414028Sgiacomo.gabrielli@arm.com        'AA64FpOffsetP0': vectorRegElem('0'),
60514028Sgiacomo.gabrielli@arm.com        'AA64FpOffsetP1': vectorRegElem('1'),
60614028Sgiacomo.gabrielli@arm.com        'AA64FpOffsetP2': vectorRegElem('2'),
60714028Sgiacomo.gabrielli@arm.com        'AA64FpOffsetP3': vectorRegElem('3'),
60814028Sgiacomo.gabrielli@arm.com        'AA64FpOffsetS':  vectorRegElem('0', 'sf', zeroing = True),
60914028Sgiacomo.gabrielli@arm.com        'AA64FpOffsetD':  vectorRegElem('0', 'df', zeroing = True),
61014028Sgiacomo.gabrielli@arm.com        'AA64FpOffsetQ':  vectorRegElem('0', 'tud', zeroing = True)
61114028Sgiacomo.gabrielli@arm.com    }),
61214028Sgiacomo.gabrielli@arm.com
61314028Sgiacomo.gabrielli@arm.com    'AA64FpUreg0': vectorReg('VECREG_UREG0',
61414028Sgiacomo.gabrielli@arm.com    {
61514028Sgiacomo.gabrielli@arm.com        'AA64FpUreg0P0': vectorRegElem('0'),
61614028Sgiacomo.gabrielli@arm.com        'AA64FpUreg0P1': vectorRegElem('1'),
61714028Sgiacomo.gabrielli@arm.com        'AA64FpUreg0P2': vectorRegElem('2'),
61814028Sgiacomo.gabrielli@arm.com        'AA64FpUreg0P3': vectorRegElem('3'),
61914028Sgiacomo.gabrielli@arm.com        'AA64FpUreg0S':  vectorRegElem('0', 'sf', zeroing = True),
62014028Sgiacomo.gabrielli@arm.com        'AA64FpUreg0D':  vectorRegElem('0', 'df', zeroing = True),
62114028Sgiacomo.gabrielli@arm.com        'AA64FpUreg0Q':  vectorRegElem('0', 'tud', zeroing = True)
62214028Sgiacomo.gabrielli@arm.com    }),
62314028Sgiacomo.gabrielli@arm.com
62413759Sgiacomo.gabrielli@arm.com    # Predicate register operands
62513759Sgiacomo.gabrielli@arm.com    'GpOp': vecPredReg('gp'),
62613759Sgiacomo.gabrielli@arm.com    'POp1': vecPredReg('op1'),
62713759Sgiacomo.gabrielli@arm.com    'POp2': vecPredReg('op2'),
62813759Sgiacomo.gabrielli@arm.com    'PDest': vecPredReg('dest'),
62913759Sgiacomo.gabrielli@arm.com    'PDestMerge': vecPredReg('dest'),
63013759Sgiacomo.gabrielli@arm.com    'Ffr': vecPredReg('PREDREG_FFR'),
63114091Sgabor.dozsa@arm.com    'FfrAux': vecPredReg('PREDREG_FFR'),
63214091Sgabor.dozsa@arm.com    'PUreg0': vecPredReg('PREDREG_UREG0'),
63313759Sgiacomo.gabrielli@arm.com
6347797Sgblack@eecs.umich.edu    #Abstracted control reg operands
6357797Sgblack@eecs.umich.edu    'MiscDest': cntrlReg('dest'),
6367797Sgblack@eecs.umich.edu    'MiscOp1': cntrlReg('op1'),
63710037SARM gem5 Developers    'MiscNsBankedDest': cntrlNsBankedReg('dest'),
63810037SARM gem5 Developers    'MiscNsBankedOp1': cntrlNsBankedReg('op1'),
63910037SARM gem5 Developers    'MiscNsBankedDest64': cntrlNsBankedReg64('dest'),
64010037SARM gem5 Developers    'MiscNsBankedOp164': cntrlNsBankedReg64('op1'),
6417797Sgblack@eecs.umich.edu
6427797Sgblack@eecs.umich.edu    #Fixed index control regs
6437797Sgblack@eecs.umich.edu    'Cpsr': cntrlReg('MISCREG_CPSR', srtCpsr),
6448302SAli.Saidi@ARM.com    'CpsrQ': cntrlReg('MISCREG_CPSR_Q', srtCpsr),
6457797Sgblack@eecs.umich.edu    'Spsr': cntrlRegNC('MISCREG_SPSR'),
6467797Sgblack@eecs.umich.edu    'Fpsr': cntrlRegNC('MISCREG_FPSR'),
6477797Sgblack@eecs.umich.edu    'Fpsid': cntrlRegNC('MISCREG_FPSID'),
6487797Sgblack@eecs.umich.edu    'Fpscr': cntrlRegNC('MISCREG_FPSCR'),
6497797Sgblack@eecs.umich.edu    'FpscrQc': cntrlRegNC('MISCREG_FPSCR_QC'),
6507797Sgblack@eecs.umich.edu    'FpscrExc': cntrlRegNC('MISCREG_FPSCR_EXC'),
6517797Sgblack@eecs.umich.edu    'Cpacr': cntrlReg('MISCREG_CPACR'),
65210037SARM gem5 Developers    'Cpacr64': cntrlReg('MISCREG_CPACR_EL1'),
6537797Sgblack@eecs.umich.edu    'Fpexc': cntrlRegNC('MISCREG_FPEXC'),
65410037SARM gem5 Developers    'Nsacr': cntrlReg('MISCREG_NSACR'),
65510037SARM gem5 Developers    'ElrHyp': cntrlRegNC('MISCREG_ELR_HYP'),
65610037SARM gem5 Developers    'Hcr': cntrlReg('MISCREG_HCR'),
65710037SARM gem5 Developers    'Hcr64': cntrlReg('MISCREG_HCR_EL2'),
65810037SARM gem5 Developers    'Hdcr': cntrlReg('MISCREG_HDCR'),
65910037SARM gem5 Developers    'Hcptr': cntrlReg('MISCREG_HCPTR'),
66010037SARM gem5 Developers    'CptrEl264': cntrlReg('MISCREG_CPTR_EL2'),
66110037SARM gem5 Developers    'CptrEl364': cntrlReg('MISCREG_CPTR_EL3'),
66210037SARM gem5 Developers    'Hstr': cntrlReg('MISCREG_HSTR'),
66310037SARM gem5 Developers    'Scr': cntrlReg('MISCREG_SCR'),
66410037SARM gem5 Developers    'Scr64': cntrlReg('MISCREG_SCR_EL3'),
6657797Sgblack@eecs.umich.edu    'Sctlr': cntrlRegNC('MISCREG_SCTLR'),
6667797Sgblack@eecs.umich.edu    'SevMailbox': cntrlRegNC('MISCREG_SEV_MAILBOX'),
6678209SAli.Saidi@ARM.com    'LLSCLock': cntrlRegNC('MISCREG_LOCKFLAG'),
66810037SARM gem5 Developers    'Dczid' : cntrlRegNC('MISCREG_DCZID_EL0'),
6696019Shines@cs.fsu.edu
6706308Sgblack@eecs.umich.edu    #Register fields for microops
6718139SMatt.Horsnell@arm.com    'URa' : intReg('ura'),
67210037SARM gem5 Developers    'XURa' : intRegX64('ura'),
67310037SARM gem5 Developers    'WURa' : intRegW64('ura'),
6747797Sgblack@eecs.umich.edu    'IWRa' : intRegIWPC('ura'),
67513603Sgiacomo.travaglini@arm.com    'Fa' : vectorElem('ura / 4', 'ura % 4'),
6768139SMatt.Horsnell@arm.com    'URb' : intReg('urb'),
67710037SARM gem5 Developers    'XURb' : intRegX64('urb'),
6788139SMatt.Horsnell@arm.com    'URc' : intReg('urc'),
67910037SARM gem5 Developers    'XURc' : intRegX64('urc'),
6806308Sgblack@eecs.umich.edu
6816019Shines@cs.fsu.edu    #Memory Operand
6827797Sgblack@eecs.umich.edu    'Mem': ('Mem', 'uw', None, ('IsMemRef', 'IsLoad', 'IsStore'), srtNormal),
6836019Shines@cs.fsu.edu
6847797Sgblack@eecs.umich.edu    #PCState fields
68510037SARM gem5 Developers    'RawPC': pcStateReg('pc', srtPC),
6867797Sgblack@eecs.umich.edu    'PC': pcStateReg('instPC', srtPC),
6877797Sgblack@eecs.umich.edu    'NPC': pcStateReg('instNPC', srtPC),
6887797Sgblack@eecs.umich.edu    'pNPC': pcStateReg('instNPC', srtEPC),
6897797Sgblack@eecs.umich.edu    'IWNPC': pcStateReg('instIWNPC', srtPC),
6907797Sgblack@eecs.umich.edu    'Thumb': pcStateReg('thumb', srtPC),
6917797Sgblack@eecs.umich.edu    'NextThumb': pcStateReg('nextThumb', srtMode),
6927797Sgblack@eecs.umich.edu    'NextJazelle': pcStateReg('nextJazelle', srtMode),
6938205SAli.Saidi@ARM.com    'NextItState': pcStateReg('nextItstate', srtMode),
6948205SAli.Saidi@ARM.com    'Itstate': pcStateReg('itstate', srtMode),
69511514Sandreas.sandberg@arm.com    'NextAArch64': pcStateReg('nextAArch64', srtMode),
6967797Sgblack@eecs.umich.edu
6977797Sgblack@eecs.umich.edu    #Register operands depending on a field in the instruction encoding. These
6987797Sgblack@eecs.umich.edu    #should be avoided since they may not be portable across different
6997797Sgblack@eecs.umich.edu    #encodings of the same instruction.
7007797Sgblack@eecs.umich.edu    'Rd': intReg('RD'),
7017797Sgblack@eecs.umich.edu    'Rm': intReg('RM'),
7027797Sgblack@eecs.umich.edu    'Rs': intReg('RS'),
7037797Sgblack@eecs.umich.edu    'Rn': intReg('RN'),
7047797Sgblack@eecs.umich.edu    'Rt': intReg('RT')
7056019Shines@cs.fsu.edu}};
706