From 6211fe5d2ee00dae9cd72d9cccdc900241a8f9a2 Mon Sep 17 00:00:00 2001 From: Korey Sewell Date: Tue, 12 May 2009 15:01:15 -0400 Subject: inorder-float: Fix storage of FP results inorder was incorrectly storing FP values and confusing the integer/fp storage view of floating point operations. A big issue was knowing trying to infer when were doing single or double precision access because this lets you know the size of value to store (32-64 bits). This isnt exactly straightforward since alpha uses all 64-bit regs while mips/sparc uses a dual-reg view. by getting this value from the actual floating point register file, the model can figure out what it needs to store --- src/cpu/inorder/inorder_dyn_inst.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cpu/inorder/inorder_dyn_inst.hh') diff --git a/src/cpu/inorder/inorder_dyn_inst.hh b/src/cpu/inorder/inorder_dyn_inst.hh index 1f9c360df..490992638 100644 --- a/src/cpu/inorder/inorder_dyn_inst.hh +++ b/src/cpu/inorder/inorder_dyn_inst.hh @@ -243,9 +243,10 @@ class InOrderDynInst : public FastAlloc, public RefCounted ResultType type; InstValue val; Tick tick; + int width; InstResult() - : type(None), tick(0) + : type(None), tick(0), width(0) {} }; @@ -856,8 +857,7 @@ class InOrderDynInst : public FastAlloc, public RefCounted /** Depending on type, return Float or Double */ double readFloatResult(int idx) { - //assert(instResult[idx].type != Integer && instResult[idx].type != None); - //@todo: TypeCast FLOAT onto DOUBLE instead of separate value + //Should this function have a parameter for what width of return?x return (instResult[idx].type == Float) ? (float) instResult[idx].val.dbl : instResult[idx].val.dbl; } -- cgit v1.2.3