mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-19 18:20:22 +02:00
Use jit_word_t for register-sized values instead of intmax_t
This commit is contained in:
parent
bab1f40b5e
commit
e9d1567f7f
156 changed files with 322 additions and 323 deletions
|
@ -1,20 +1,20 @@
|
|||
#include "test.h"
|
||||
|
||||
static const intmax_t overflowed = 0xcabba9e5;
|
||||
static const jit_word_t overflowed = 0xcabba9e5;
|
||||
|
||||
static void
|
||||
run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size)
|
||||
{
|
||||
jit_begin(j, arena_base, arena_size);
|
||||
jit_load_args_2(j, jit_operand_gpr (JIT_OPERAND_ABI_INTMAX, JIT_R0),
|
||||
jit_operand_gpr (JIT_OPERAND_ABI_INTMAX, JIT_R1));
|
||||
jit_load_args_2(j, jit_operand_gpr (JIT_OPERAND_ABI_WORD, JIT_R0),
|
||||
jit_operand_gpr (JIT_OPERAND_ABI_WORD, JIT_R1));
|
||||
|
||||
jit_reloc_t r = jit_bxsubr_u(j, JIT_R0, JIT_R1);
|
||||
jit_movi(j, JIT_R0, overflowed);
|
||||
jit_patch_here(j, r);
|
||||
jit_retr(j, JIT_R0);
|
||||
|
||||
intmax_t (*f)(intmax_t, intmax_t) = jit_end(j, NULL);
|
||||
jit_word_t (*f)(jit_word_t, jit_word_t) = jit_end(j, NULL);
|
||||
|
||||
ASSERT(f(0, 0) == 0);
|
||||
ASSERT(f(1, 1) == 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue