summaryrefslogtreecommitdiff
path: root/src/cuda-sim/ptx_sim.cc
diff options
context:
space:
mode:
authorWilson Fung <[email protected]>2012-06-30 11:15:07 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:47:33 -0700
commitbb96888d31d37760c86fa1aed3bbf203792185e7 (patch)
tree14e54644793e7b46299b5a21d67865c5a194d5fc /src/cuda-sim/ptx_sim.cc
parente763b57bf5e79e73359fe9b8fd346ae52d382834 (diff)
Fixing one of the problems discovered for bug 154 (internal).
- Output of 16-bit integer multiplication (IMUL.U16) writes to the entire 32-bit register if a full register (i.e. not half register such as R1L) is specified as the destination. Before, it was only storing the lower 16-bit of the product into the full register. - Modified function header to declare at least 4 predicates in cuobjdump_to_ptxplus. This will mask out the problem with the predicate registers used before initialized. - Modified register value print out: now unsigned integers display their decimal values as well. [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 13246]
Diffstat (limited to 'src/cuda-sim/ptx_sim.cc')
-rw-r--r--src/cuda-sim/ptx_sim.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cuda-sim/ptx_sim.cc b/src/cuda-sim/ptx_sim.cc
index 59479c8..05f0c6a 100644
--- a/src/cuda-sim/ptx_sim.cc
+++ b/src/cuda-sim/ptx_sim.cc
@@ -293,10 +293,10 @@ static void print_reg( FILE *fp, std::string name, ptx_reg_t value, symbol_table
case S16_TYPE: fprintf(fp,".s16 %d\n", value.s16 ); break;
case S32_TYPE: fprintf(fp,".s32 %d\n", value.s32 ); break;
case S64_TYPE: fprintf(fp,".s64 %Ld\n", value.s64 ); break;
- case U8_TYPE: fprintf(fp,".u8 0x%02x\n", (unsigned) value.u8 ); break;
- case U16_TYPE: fprintf(fp,".u16 0x%04x\n", (unsigned) value.u16 ); break;
- case U32_TYPE: fprintf(fp,".u32 0x%08x\n", (unsigned) value.u32 ); break;
- case U64_TYPE: fprintf(fp,".u64 0x%llx\n", value.u64 ); break;
+ case U8_TYPE: fprintf(fp,".u8 %u [0x%02x]\n", value.u8, (unsigned) value.u8 ); break;
+ case U16_TYPE: fprintf(fp,".u16 %u [0x%04x]\n", value.u16, (unsigned) value.u16 ); break;
+ case U32_TYPE: fprintf(fp,".u32 %u [0x%08x]\n", value.u32, (unsigned) value.u32 ); break;
+ case U64_TYPE: fprintf(fp,".u64 %llu [0x%llx]\n", value.u64, value.u64 ); break;
case F16_TYPE: fprintf(fp,".f16 %f [0x%04x]\n", value.f16, (unsigned) value.u16 ); break;
case F32_TYPE: fprintf(fp,".f32 %.15lf [0x%08x]\n", value.f32, value.u32 ); break;
case F64_TYPE: fprintf(fp,".f64 %.15le [0x%016llx]\n", value.f64, value.u64 ); break;