From e1168e72ca8ae370a1989220a202347980c6a4d2 Mon Sep 17 00:00:00 2001 From: Min Kyu Jeong Date: Wed, 25 Aug 2010 19:10:43 -0500 Subject: 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 --- src/arch/arm/registers.hh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/arch/arm/registers.hh') 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; -- cgit v1.2.3