Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions runtime/trampolines-x86_64.m
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@

// TODO: temp ignore to minimize diff
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wsign-conversion"

#if defined(__x86_64__)

#include <stdint.h>
Expand Down Expand Up @@ -126,13 +121,13 @@
unsigned long register_size = 48; // 48 == 6 registers * 8 bytes
if ((unsigned long)it->byte_count >= register_size) {
read_register = false;
} else if (register_size - it->byte_count < total_size) {
} else if (register_size - (unsigned long)it->byte_count < total_size) {
read_register = false;
LOGZ (" total size (%i) is less that available register size (%i)", (int) total_size, register_size - it->byte_count);
}

if (read_register) {
if (it->byte_count / 8 != (it->byte_count + size - 1) / 8) {
if (it->byte_count / 8 != ((unsigned long) it->byte_count + size - 1) / 8) {
// align to next register if the one we're currently reading
// doesn't contain the entire value we need.
it->byte_count += 8 - it->byte_count % 8;
Expand Down Expand Up @@ -497,6 +492,4 @@
dump_state (state);
}

#endif /* __x86_64__ */

#pragma clang diagnostic pop
#endif /* __x86_64__ */