diff options
author | Min Kyu Jeong <minkyu.jeong@arm.com> | 2010-08-25 19:10:43 -0500 |
---|---|---|
committer | Min Kyu Jeong <minkyu.jeong@arm.com> | 2010-08-25 19:10:43 -0500 |
commit | e1168e72ca8ae370a1989220a202347980c6a4d2 (patch) | |
tree | 2d8b3766e7ad5261d13aa7d1a0becbf6aee2f7eb /src/arch/arm/registers.hh | |
parent | edca5f7da6bad677dfc1ea69fff904554181cc17 (diff) | |
download | gem5-e1168e72ca8ae370a1989220a202347980c6a4d2.tar.xz |
ARM: Fixed register flattening logic (FP_Base_DepTag was set too low)
When decoding a srs instruction, invalid mode encoding returns invalid instruction.
This can happen when garbage instructions are fetched from mispredicted path
Diffstat (limited to 'src/arch/arm/registers.hh')
-rw-r--r-- | src/arch/arm/registers.hh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/arch/arm/registers.hh b/src/arch/arm/registers.hh index 444e979fb..a568e4a9c 100644 --- a/src/arch/arm/registers.hh +++ b/src/arch/arm/registers.hh @@ -1,4 +1,16 @@ /* + * Copyright (c) 2010 ARM Limited + * All rights reserved + * + * The license below extends only to copyright in the software and shall + * not be construed as granting a license to any other intellectual + * property including but not limited to intellectual property relating + * to a hardware implementation of the functionality of the software + * licensed hereunder. You may use the software subject to the license + * terms below provided that you ensure that this notice is replicated + * unmodified and in its entirety in all distributions of the software, + * modified or unmodified, in source code or in binary form. + * * Copyright (c) 2007-2008 The Florida State University * All rights reserved. * @@ -59,9 +71,9 @@ const int NumFloatSpecialRegs = 8; const int NumIntRegs = NUM_INTREGS; const int NumFloatRegs = NumFloatArchRegs + NumFloatSpecialRegs; - const int NumMiscRegs = NUM_MISCREGS; +const int TotalNumRegs = NumIntRegs + NumFloatRegs + NumMiscRegs; // semantically meaningful register indices const int ReturnValueReg = 0; @@ -85,6 +97,7 @@ const int SyscallSuccessReg = ReturnValueReg; // These help enumerate all the registers for dependence tracking. const int FP_Base_DepTag = NumIntRegs * (MODE_MAXMODE + 1); const int Ctrl_Base_DepTag = FP_Base_DepTag + NumFloatRegs; +const int Max_DepTag = Ctrl_Base_DepTag + NumMiscRegs; typedef union { IntReg intreg; |