# HG changeset patch # User Timothy M. Jones <tjon...@inf.ed.ac.uk> # Date 1255616994 -3600 # Node ID 3ea509cf8f00ef6f3804093516340d425de5eaa4 # Parent bf65b018b853cc5f66e1a46e4eb0a78781d6aa4c Fix loads to floating point registers.
This makes sure that the exact contents of memory is put into the floating point registers (actually, this affects all loads, but it's fp loads that need fixing). This avoids errors when the floating point value that is loaded actually corresponds to a special value (e.g. NaN). diff --git a/src/arch/powerpc/isa/formats/mem.isa b/src/arch/powerpc/isa/formats/mem.isa --- a/src/arch/powerpc/isa/formats/mem.isa +++ b/src/arch/powerpc/isa/formats/mem.isa @@ -125,13 +125,15 @@ { Addr EA; Fault fault = NoFault; + uint%(mem_acc_size)d_t val; %(op_decl)s; %(op_rd)s; EA = xc->getEA(); - Mem = pkt->get<typeof(Mem)>(); + val = pkt->get<uint%(mem_acc_size)d_t>(); + *((uint%(mem_acc_size)d_t*)&Mem) = val; if (fault == NoFault) { %(memacc_code)s; -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. _______________________________________________ m5-dev mailing list m5-dev@m5sim.org http://m5sim.org/mailman/listinfo/m5-dev