From 8633f545c1c873b56e6cb55f639200aa5862c6ce Mon Sep 17 00:00:00 2001 From: Kris Zyp Date: Fri, 1 Sep 2023 18:08:45 -0600 Subject: [PATCH] Don't xor previous times --- src/writer.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/writer.cpp b/src/writer.cpp index bd6917bad..07c986e0e 100644 --- a/src/writer.cpp +++ b/src/writer.cpp @@ -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); } }