diff --git a/tests/boaddr_u.c b/tests/boaddr_u.c index 4835857b7..b186a90ce 100644 --- a/tests/boaddr_u.c +++ b/tests/boaddr_u.c @@ -24,7 +24,7 @@ run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size) ASSERT(f(0xffffffff, 0xffffffff) == overflowed); ASSERT(f(0x7fffffff, 0) == 0x7fffffff); ASSERT(f(0x7fffffff, 1) == 0x80000000); - ASSERT(f(0x7fffffff, 0x7fffffff) == 0x7fffffff + 0x7fffffff); + ASSERT(f(0x7fffffff, 0x7fffffff) == 0x7fffffffu + 0x7fffffffu); ASSERT(f(0x7fffffff, 0x80000000) == 0xffffffff); ASSERT(f(0x80000000, 0x80000000) == overflowed); #else diff --git a/tests/bxaddr_u.c b/tests/bxaddr_u.c index e30ca2aa9..b20ddd029 100644 --- a/tests/bxaddr_u.c +++ b/tests/bxaddr_u.c @@ -23,7 +23,7 @@ run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size) ASSERT(f(0xffffffff, 0xffffffff) == overflowed); ASSERT(f(0x7fffffff, 0) == 0x7fffffff); ASSERT(f(0x7fffffff, 1) == 0x80000000); - ASSERT(f(0x7fffffff, 0x7fffffff) == 0x7fffffff + 0x7fffffff); + ASSERT(f(0x7fffffff, 0x7fffffff) == 0x7fffffffu + 0x7fffffffu); ASSERT(f(0x7fffffff, 0x80000000) == 0xffffffff); ASSERT(f(0x80000000, 0x80000000) == overflowed); #else diff --git a/tests/ldi_l.c b/tests/ldi_l.c index f18ba202e..1cb5efd38 100644 --- a/tests/ldi_l.c +++ b/tests/ldi_l.c @@ -1,11 +1,11 @@ #include "test.h" -static uint64_t data = 0xffffffffffffffff; - static void run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size) { #if __WORDSIZE > 32 + static uint64_t data = 0xffffffffffffffff; + jit_begin(j, arena_base, arena_size); jit_ldi_l(j, JIT_R0, &data); diff --git a/tests/ldi_ui.c b/tests/ldi_ui.c index 2f7dc5fc1..47fe2784d 100644 --- a/tests/ldi_ui.c +++ b/tests/ldi_ui.c @@ -1,11 +1,11 @@ #include "test.h" -static uint32_t data[] = { 0xffffffff, 0x00000000, 0x42424242 }; - static void run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size) { #if __WORDSIZE > 32 + static uint32_t data[] = { 0xffffffff, 0x00000000, 0x42424242 }; + jit_begin(j, arena_base, arena_size); jit_ldi_ui(j, JIT_R0, data); diff --git a/tests/ldr_l.c b/tests/ldr_l.c index 76b6d7f57..6a3d0fc5a 100644 --- a/tests/ldr_l.c +++ b/tests/ldr_l.c @@ -1,11 +1,11 @@ #include "test.h" -static uint64_t data[] = { 0xffffffffffffffff, 0, 0x4242424212345678 }; - static void run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size) { #if __WORDSIZE > 32 + static uint64_t data[] = { 0xffffffffffffffff, 0, 0x4242424212345678 }; + jit_begin(j, arena_base, arena_size); jit_load_args_1(j, jit_operand_gpr (JIT_OPERAND_ABI_POINTER, JIT_R1)); diff --git a/tests/ldr_ui.c b/tests/ldr_ui.c index 4d29a74c8..85a462c40 100644 --- a/tests/ldr_ui.c +++ b/tests/ldr_ui.c @@ -1,11 +1,11 @@ #include "test.h" -static uint32_t data[] = { 0xffffffff, 0x00000000, 0x42424242 }; - static void run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size) { #if __WORDSIZE > 32 + static uint32_t data[] = { 0xffffffff, 0x00000000, 0x42424242 }; + jit_begin(j, arena_base, arena_size); jit_load_args_1(j, jit_operand_gpr (JIT_OPERAND_ABI_POINTER, JIT_R1)); diff --git a/tests/ldxi_l.c b/tests/ldxi_l.c index a90653cb7..6383166c2 100644 --- a/tests/ldxi_l.c +++ b/tests/ldxi_l.c @@ -1,11 +1,11 @@ #include "test.h" -static uint64_t data[] = { 0xffffffffffffffff, 0, 0x4242424212345678 }; - static void run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size) { #if __WORDSIZE > 32 + static uint64_t data[] = { 0xffffffffffffffff, 0, 0x4242424212345678 }; + jit_begin(j, arena_base, arena_size); jit_load_args_1(j, jit_operand_gpr (JIT_OPERAND_ABI_WORD, JIT_R0)); diff --git a/tests/ldxi_ui.c b/tests/ldxi_ui.c index d6693feec..00a47598c 100644 --- a/tests/ldxi_ui.c +++ b/tests/ldxi_ui.c @@ -1,11 +1,11 @@ #include "test.h" -static uint32_t data[] = { 0xffffffff, 0x00000000, 0x42424242 }; - static void run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size) { #if __WORDSIZE > 32 + static uint32_t data[] = { 0xffffffff, 0x00000000, 0x42424242 }; + jit_begin(j, arena_base, arena_size); jit_load_args_1(j, jit_operand_gpr (JIT_OPERAND_ABI_WORD, JIT_R0)); diff --git a/tests/ldxr_l.c b/tests/ldxr_l.c index 14786aadd..d143ede93 100644 --- a/tests/ldxr_l.c +++ b/tests/ldxr_l.c @@ -1,11 +1,11 @@ #include "test.h" -static uint64_t data[] = { 0xffffffffffffffff, 0, 0x4242424212345678 }; - static void run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size) { #if __WORDSIZE > 32 + static uint64_t data[] = { 0xffffffffffffffff, 0, 0x4242424212345678 }; + jit_begin(j, arena_base, arena_size); jit_load_args_2(j, jit_operand_gpr (JIT_OPERAND_ABI_POINTER, JIT_R0), jit_operand_gpr (JIT_OPERAND_ABI_WORD, JIT_R1)); diff --git a/tests/ldxr_ui.c b/tests/ldxr_ui.c index 773fccda1..0c821ee06 100644 --- a/tests/ldxr_ui.c +++ b/tests/ldxr_ui.c @@ -1,11 +1,11 @@ #include "test.h" -static uint32_t data[] = { 0xffffffff, 0x00000000, 0x42424242 }; - static void run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size) { #if __WORDSIZE > 32 + static uint32_t data[] = { 0xffffffff, 0x00000000, 0x42424242 }; + jit_begin(j, arena_base, arena_size); jit_load_args_2(j, jit_operand_gpr (JIT_OPERAND_ABI_POINTER, JIT_R0), jit_operand_gpr (JIT_OPERAND_ABI_WORD, JIT_R1)); diff --git a/tests/sti_l.c b/tests/sti_l.c index 5bd4ed19f..939a3e8e3 100644 --- a/tests/sti_l.c +++ b/tests/sti_l.c @@ -1,11 +1,11 @@ #include "test.h" -static uint64_t data[] = { 0x1212121212121212, 0, 0x3434343434343434 }; - static void run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size) { #if __WORDSIZE > 32 + static uint64_t data[] = { 0x1212121212121212, 0, 0x3434343434343434 }; + jit_begin(j, arena_base, arena_size); jit_load_args_1(j, jit_operand_gpr (JIT_OPERAND_ABI_INT64, JIT_R1)); diff --git a/tests/str_l.c b/tests/str_l.c index 0b4755c24..ff91a18f1 100644 --- a/tests/str_l.c +++ b/tests/str_l.c @@ -1,11 +1,11 @@ #include "test.h" -static uint64_t data[] = { 0x1212121212121212, 0, 0x3434343434343434 }; - static void run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size) { #if __WORDSIZE > 32 + static uint64_t data[] = { 0x1212121212121212, 0, 0x3434343434343434 }; + jit_begin(j, arena_base, arena_size); jit_load_args_2(j, jit_operand_gpr (JIT_OPERAND_ABI_POINTER, JIT_R0), jit_operand_gpr (JIT_OPERAND_ABI_INT64, JIT_R1)); diff --git a/tests/stxi_l.c b/tests/stxi_l.c index b5f5d8c5b..af62d7de0 100644 --- a/tests/stxi_l.c +++ b/tests/stxi_l.c @@ -1,11 +1,11 @@ #include "test.h" -static uint64_t data[] = { 0x1212121212121212, 0, 0x3434343434343434 }; - static void run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size) { #if __WORDSIZE > 32 + static uint64_t data[] = { 0x1212121212121212, 0, 0x3434343434343434 }; + jit_begin(j, arena_base, arena_size); jit_load_args_2(j, jit_operand_gpr (JIT_OPERAND_ABI_WORD, JIT_R2), jit_operand_gpr (JIT_OPERAND_ABI_INT64, JIT_R1)); diff --git a/tests/stxr_l.c b/tests/stxr_l.c index bc0ab9641..43c08d5d9 100644 --- a/tests/stxr_l.c +++ b/tests/stxr_l.c @@ -1,11 +1,11 @@ #include "test.h" -static uint64_t data[] = { 0x1212121212121212, 0, 0x3434343434343434 }; - static void run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size) { #if __WORDSIZE > 32 + static uint64_t data[] = { 0x1212121212121212, 0, 0x3434343434343434 }; + jit_begin(j, arena_base, arena_size); jit_load_args_3(j, jit_operand_gpr (JIT_OPERAND_ABI_POINTER, JIT_R0), jit_operand_gpr (JIT_OPERAND_ABI_WORD, JIT_R2),