summaryrefslogtreecommitdiff
path: root/src/abstract_hardware_model.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/abstract_hardware_model.cc')
-rw-r--r--src/abstract_hardware_model.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/abstract_hardware_model.cc b/src/abstract_hardware_model.cc
index fda84e8..ed7347d 100644
--- a/src/abstract_hardware_model.cc
+++ b/src/abstract_hardware_model.cc
@@ -75,7 +75,7 @@ void checkpoint::load_global_mem(class memory_space *temp_mem, char *f1name) {
FILE *fp2 = fopen(f1name, "r");
assert(fp2 != NULL);
char line[128]; /* or other suitable maximum line size */
- unsigned int offset;
+ unsigned int offset = 0;
while (fgets(line, sizeof line, fp2) != NULL) /* read a line */
{
unsigned int index;
@@ -1006,13 +1006,13 @@ void simt_stack::print(FILE *fout) const {
}
for (unsigned j = 0; j < m_warp_size; j++)
fprintf(fout, "%c", (stack_entry.m_active_mask.test(j) ? '1' : '0'));
- fprintf(fout, " pc: 0x%03x", stack_entry.m_pc);
+ fprintf(fout, " pc: 0x%03llx", stack_entry.m_pc);
if (stack_entry.m_recvg_pc == (unsigned)-1) {
fprintf(fout, " rp: ---- tp: %s cd: %2u ",
(stack_entry.m_type == STACK_ENTRY_TYPE_CALL ? "C" : "N"),
stack_entry.m_calldepth);
} else {
- fprintf(fout, " rp: %4u tp: %s cd: %2u ", stack_entry.m_recvg_pc,
+ fprintf(fout, " rp: %4llu tp: %s cd: %2u ", stack_entry.m_recvg_pc,
(stack_entry.m_type == STACK_ENTRY_TYPE_CALL ? "C" : "N"),
stack_entry.m_calldepth);
}
@@ -1032,7 +1032,7 @@ void simt_stack::print_checkpoint(FILE *fout) const {
for (unsigned j = 0; j < m_warp_size; j++)
fprintf(fout, "%c ", (stack_entry.m_active_mask.test(j) ? '1' : '0'));
- fprintf(fout, "%d %d %d %lld %d ", stack_entry.m_pc,
+ fprintf(fout, "%llu %d %llu %lld %d ", stack_entry.m_pc,
stack_entry.m_calldepth, stack_entry.m_recvg_pc,
stack_entry.m_branch_div_cycle, stack_entry.m_type);
fprintf(fout, "%d %d\n", m_warp_id, m_warp_size);