Skip to content

Commit

Permalink
Don't xor previous times
Browse files Browse the repository at this point in the history
  • Loading branch information
kriszyp committed Sep 2, 2023
1 parent 672ba8d commit 8633f54
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,10 @@ next_inst: start = instruction++;
previous_time = *(uint64_t*) last_data.mv_data;
fprintf(stderr, "previous time %llx \n", previous_time);
}
uint64_t timestamp = (first_word & 1) ? (first_word & 2) ? previous_time : last_time_double() : next_time_double();
fprintf(stderr, "setting timestamp %llx\n", timestamp ^ (first_word & 0xf8));
*(uint64_t*)value.mv_data = timestamp ^ (first_word & 0xf8);
uint64_t timestamp = (first_word & 2) ? previous_time :
(((first_word & 1) ? last_time_double() : next_time_double()) ^ (first_word & 0xf8));
fprintf(stderr, "setting timestamp %llx\n", timestamp);
*(uint64_t*)value.mv_data = timestamp;
fprintf(stderr, "set time %llx \n", timestamp);
}
}
Expand Down

0 comments on commit 8633f54

Please sign in to comment.