master
Avril 4 years ago
parent 82d8fd44c7
commit 645500989a
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -75,17 +75,6 @@ inline __attribute__((always_inline)) void print_exact(const char (&ar)[N])
inline static void u64_to_hex(std::uint64_t num, char* s)
{
hv::lookup_hex_string(num, s);
#if 0
std::uint64_t x = num;
x = ((x & 0xFFFF) << 32) | ((x & 0xFFFF0000) >> 16);
x = ((x & 0x0000FF000000FF00) >> 8) | (x & 0x000000FF000000FF) << 16;
x = ((x & 0x00F000F000F000F0) >> 4) | (x & 0x000F000F000F000F) << 8;
uint64_t mask = ((x + 0x0606060606060606) >> 4) & 0x0101010101010101;
x += 0x27 * mask;
*(uint64_t *)s = x;
#endif
}
namespace hv {
@ -116,7 +105,7 @@ namespace hv {
r_ascii[0] = ' ';
r_ascii[1] = ' ';
char* ascii = r_ascii + 2;
auto memsize = memory.size();
const auto memsize = memory.size();
for(;i<memsize;i++) {
if (i && i % ROW_SZ == 0) { //TODO: Change to i +=16 so we don't have to branch here on every byte. Make sure to not overrun buffer tho

Loading…
Cancel
Save