From 26ba7cc3b233ae2b3c036de2998e0c5e0a4c340d Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 4 Sep 2007 23:40:47 -0700 Subject: [PATCH] X86: Add tracing to the floating point register file. --HG-- extra : convert_revision : f452d9179b929b980cf9e2d1e3de0431c51c5f4a --- src/arch/x86/floatregfile.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/arch/x86/floatregfile.cc b/src/arch/x86/floatregfile.cc index 93f2d4fe1..1c49ea9c6 100644 --- a/src/arch/x86/floatregfile.cc +++ b/src/arch/x86/floatregfile.cc @@ -86,6 +86,7 @@ */ #include "arch/x86/floatregfile.hh" +#include "base/trace.hh" #include "sim/serialize.hh" #include @@ -111,22 +112,28 @@ void FloatRegFile::clear() FloatReg FloatRegFile::readReg(int floatReg, int width) { - return d[floatReg]; + FloatReg reg = d[floatReg]; + DPRINTF(X86, "Reading %f from register %d.\n", reg, floatReg); + return reg; } FloatRegBits FloatRegFile::readRegBits(int floatReg, int width) { - return q[floatReg]; + FloatRegBits reg = q[floatReg]; + DPRINTF(X86, "Reading %#x from register %d.\n", reg, floatReg); + return reg; } Fault FloatRegFile::setReg(int floatReg, const FloatReg &val, int width) { + DPRINTF(X86, "Writing %f to register %d.\n", val, floatReg); d[floatReg] = val; return NoFault; } Fault FloatRegFile::setRegBits(int floatReg, const FloatRegBits &val, int width) { + DPRINTF(X86, "Writing bits %#x to register %d.\n", val, floatReg); q[floatReg] = val; return NoFault; } -- 2.30.2