summaryrefslogtreecommitdiff
path: root/src/cuda-sim/ptx_sim.h
diff options
context:
space:
mode:
authorAhmed El-Shafiey <[email protected]>2013-03-14 09:00:45 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:50:05 -0700
commitc417111eb9d113f3b1ae2a4612b6f573417c7f95 (patch)
tree3d73369e0feb1116d02012850ae0696aa0c55b84 /src/cuda-sim/ptx_sim.h
parent6a97c310878edf8cfe419c4da092e8365882f1a9 (diff)
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]
Diffstat (limited to 'src/cuda-sim/ptx_sim.h')
-rw-r--r--src/cuda-sim/ptx_sim.h30
1 files changed, 30 insertions, 0 deletions
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;}