From c417111eb9d113f3b1ae2a4612b6f573417c7f95 Mon Sep 17 00:00:00 2001 From: Ahmed El-Shafiey Date: Thu, 14 Mar 2013 09:00:45 -0800 Subject: fixing some assignment in the "get_operand_value" function where unsigned were assigned to unions! Also, do proper initialization in the constructors of operand_info, therse among places where valgrind complaining from NNC, but still it is not fixed. [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 15503] --- src/cuda-sim/ptx_sim.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src/cuda-sim/ptx_sim.h') diff --git a/src/cuda-sim/ptx_sim.h b/src/cuda-sim/ptx_sim.h index 929ed98..1d30eb6 100644 --- a/src/cuda-sim/ptx_sim.h +++ b/src/cuda-sim/ptx_sim.h @@ -57,11 +57,41 @@ union ptx_reg_t { ptx_reg_t() { bits.ms = 0; bits.ls = 0; + u128.low=0; + u128.lowest=0; + u128.highest=0; + u128.high=0; + s8=0; + s16=0; + s32=0; + s64=0; + u8=0; + u16=0; + u64=0; + f16=0; + f32=0; + f64=0; + pred=0; } ptx_reg_t(unsigned x) { bits.ms = 0; bits.ls = 0; + u128.low=0; + u128.lowest=0; + u128.highest=0; + u128.high=0; + s8=0; + s16=0; + s32=0; + s64=0; + u8=0; + u16=0; + u64=0; + f16=0; + f32=0; + f64=0; + pred=0; u32 = x; } operator unsigned int() { return u32;} -- cgit v1.3