From 4a3f11149d791284a012af71067f6b2199aa165c Mon Sep 17 00:00:00 2001 From: Curtis Dunham Date: Tue, 29 Apr 2014 16:05:02 -0500 Subject: arm: use condition code registers for ARM ISA Analogous to ee049bf (for x86). Requires a bump of the checkpoint version and corresponding upgrader code to move the condition code register values to the new register file. --- src/cpu/o3/O3CPU.py | 2 +- src/cpu/simple_thread.hh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/cpu') diff --git a/src/cpu/o3/O3CPU.py b/src/cpu/o3/O3CPU.py index 4d215328e..1b25b2e7b 100644 --- a/src/cpu/o3/O3CPU.py +++ b/src/cpu/o3/O3CPU.py @@ -116,7 +116,7 @@ class DerivO3CPU(BaseCPU): "registers") # most ISAs don't use condition-code regs, so default is 0 _defaultNumPhysCCRegs = 0 - if buildEnv['TARGET_ISA'] == 'x86': + if buildEnv['TARGET_ISA'] in ('arm','x86'): # For x86, each CC reg is used to hold only a subset of the # flags, so we need 4-5 times the number of CC regs as # physical integer regs to be sure we don't run out. In diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh index c5fae4e8e..710a5af78 100644 --- a/src/cpu/simple_thread.hh +++ b/src/cpu/simple_thread.hh @@ -273,6 +273,7 @@ class SimpleThread : public ThreadState { #ifdef ISA_HAS_CC_REGS int flatIndex = isa->flattenCCIndex(reg_idx); + assert(0 <= flatIndex); assert(flatIndex < TheISA::NumCCRegs); uint64_t regVal(readCCRegFlat(flatIndex)); DPRINTF(CCRegs, "Reading CC reg %d (%d) as %#x.\n", -- cgit v1.2.3