* ========== Copyright Header Begin ==========================================
* OpenSPARC T2 Processor File: SS_Registers.h
* Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
* The above named program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License version 2 as published by the Free Software Foundation.
* The above named program is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
* You should have received a copy of the GNU General Public
* License along with this work; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
* ========== Copyright Header End ============================================
#ifndef __SS_Registers_h__
#define __SS_Registers_h__
VALUE_OUT_OF_RANGE
// set tl, gl, cwp can return this
// %g[0,..,7], %o[0,..,7], %l[0,..,7], %i[0,..,7]
G1
, G2
, G3
, G4
, G5
, G6
, G7
,
O0
, O1
, O2
, O3
, O4
, O5
, O6
, O7
,
L0
, L1
, L2
, L3
, L4
, L5
, L6
, L7
,
I0
, I1
, I2
, I3
, I4
, I5
, I6
, I7
,
D2
, D4
, D6
, D8
, D10
, D12
, D14
,
D16
, D18
, D20
, D22
, D24
, D26
, D28
, D30
,
D32
, D34
, D36
, D38
, D40
, D42
, D44
, D46
,
D48
, D50
, D52
, D54
, D56
, D58
, D60
, D62
,
ASR1
, ASR2
, ASR3
, ASR4
, ASR5
, ASR6
, ASR7
,
ASR8
, ASR9
, ASR10
, ASR11
, ASR12
, ASR13
, ASR14
, ASR15
,
ASR16
, ASR17
, ASR18
, ASR19
, ASR20
, ASR21
, ASR22
, ASR23
,
ASR24
, ASR25
, ASR26
, ASR27
, ASR28
, ASR29
, ASR30
, ASR31
,
PR1
, PR2
, PR3
, PR4
, PR5
, PR6
, PR7
,
PR8
, PR9
, PR10
, PR11
, PR12
, PR13
, PR14
, PR15
,
PR16
, PR17
, PR18
, PR19
, PR20
, PR21
, PR22
, PR23
,
PR24
, PR25
, PR26
, PR27
, PR28
, PR29
, PR30
, PR31
,
HPR1
, HPR2
, HPR3
, HPR4
, HPR5
, HPR6
, HPR7
,
HPR8
, HPR9
, HPR10
, HPR11
, HPR12
, HPR13
, HPR14
, HPR15
,
HPR16
, HPR17
, HPR18
, HPR19
, HPR20
, HPR21
, HPR22
, HPR23
,
HPR24
, HPR25
, HPR26
, HPR27
, HPR28
, HPR29
, HPR30
, HPR31
,
// %sim[0,..,31] - simulator state (npc, fsr, ...)
SIM1
, SIM2
, SIM3
, SIM4
, SIM5
, SIM6
, SIM7
,
SIM8
, SIM9
, SIM10
, SIM11
, SIM12
, SIM13
, SIM14
, SIM15
,
SIM16
, SIM17
, SIM18
, SIM19
, SIM20
, SIM21
, SIM22
, SIM23
,
SIM24
, SIM25
, SIM26
, SIM27
, SIM28
, SIM29
, SIM30
, SIM31
,
F1
, F2
, F3
, F4
, F5
, F6
, F7
,
F8
, F9
, F10
, F11
, F12
, F13
, F14
, F15
,
F16
, F17
, F18
, F19
, F20
, F21
, F22
, F23
,
F24
, F25
, F26
, F27
, F28
, F29
, F30
, F31
,
F32
, F33
, F34
, F35
, F36
, F37
, F38
, F39
,
F40
, F41
, F42
, F43
, F44
, F45
, F46
, F47
,
F48
, F49
, F50
, F51
, F52
, F53
, F54
, F55
,
F56
, F57
, F58
, F59
, F60
, F61
, F62
, F63
,
// REG_ is the prefix for the product specific registers that we
// want to enumerate and that don't fall in the above given ranges
// or ASR, PR, HRP, SIM. The enumeration starts at a nice offset
// from ALIAS_END to leave us room to grow.
REG_OFS
= ALIAS_END
+ 1024,
IRF_SIZE
= IRF_END
- IRF_OFS
,
DRF_SIZE
= DRF_END
- DRF_OFS
,
ASR_SIZE
= ASR_END
- ASR_OFS
,
PR_SIZE
= PR_END
- PR_OFS
,
HPR_SIZE
= HPR_END
- HPR_OFS
,
FRF_SIZE
= FRF_END
- FRF_OFS
,
SIM_SIZE
= SIM_END
- SIM_OFS
friend Index
operator+( Index i
, int j
) { return Index(int(i
)+j
); }
static bool is_irf( Index i
) { return (IRF_OFS
<= i
) && (i
< IRF_END
); }
static bool is_drf( Index i
) { return (DRF_OFS
<= i
) && (i
< DRF_END
); }
static bool is_asr( Index i
) { return (ASR_OFS
<= i
) && (i
< ASR_END
); }
static bool is_pr( Index i
) { return ( PR_OFS
<= i
) && (i
< PR_END
); }
static bool is_hpr( Index i
) { return (HPR_OFS
<= i
) && (i
< HPR_END
); }
static bool is_sim( Index i
) { return (SIM_OFS
<= i
) && (i
< SIM_END
); }
static bool is_frf( Index i
) { return (FRF_OFS
<= i
) && (i
< FRF_END
); }
static const char* irf_name
[IRF_SIZE
];
static const char* drf_name
[DRF_SIZE
];
static const char* asr_name
[ASR_SIZE
];
static const char* pr_name
[ PR_SIZE
];
static const char* hpr_name
[HPR_SIZE
];
static const char* sim_name
[SIM_SIZE
];
static const char* frf_name
[FRF_SIZE
];
static const char* get_name( Index
);