From 2c293823aa7cb6d2cac4c0ff35e2023ff132a8f2 Mon Sep 17 00:00:00 2001 From: Yasuko Eckert Date: Tue, 15 Oct 2013 14:22:44 -0400 Subject: cpu: add a condition-code register class Add a third register class for condition codes, in parallel with the integer and FP classes. No ISAs use the CC class at this point though. --- src/cpu/ozone/cpu_impl.hh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/cpu/ozone') diff --git a/src/cpu/ozone/cpu_impl.hh b/src/cpu/ozone/cpu_impl.hh index fcab901cf..b4b49a55b 100644 --- a/src/cpu/ozone/cpu_impl.hh +++ b/src/cpu/ozone/cpu_impl.hh @@ -1,5 +1,6 @@ /* * Copyright (c) 2006 The Regents of The University of Michigan + * Copyright (c) 2013 Advanced Micro Devices, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -768,6 +769,13 @@ OzoneCPU::OzoneTC::readFloatRegBits(int reg_idx) return thread->renameTable[idx]->readIntResult(); } +template +CCReg +OzoneCPU::OzoneTC::readCCReg(int reg_idx) +{ + return thread->renameTable[reg_idx]->readCCResult(); +} + template void OzoneCPU::OzoneTC::setIntReg(int reg_idx, uint64_t val) @@ -799,6 +807,17 @@ OzoneCPU::OzoneTC::setFloatRegBits(int reg_idx, FloatRegBits val) panic("Unimplemented!"); } +template +void +OzoneCPU::OzoneTC::setCCReg(int reg_idx, CCReg val) +{ + thread->renameTable[reg_idx]->setCCResult(val); + + if (!thread->noSquashFromTC) { + cpu->squashFromTC(); + } +} + template void OzoneCPU::OzoneTC::setPC(Addr val) -- cgit v1.2.3