diff options
author | Alan Wu <XrXr@users.noreply.github.com> | 2020-10-05 08:09:58 -0400 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:24 -0400 |
commit | 040cfdb1392beb0a1e45431c1825a71fc7334ae5 (patch) | |
tree | 2dfab2c5e17bd3e2c5e7082a1fbbc398a3e305e4 | |
parent | 7d1546ece5e3678a8b8eb196c81c3f4972c51f0a (diff) |
Small build fixes
-rw-r--r-- | iseq.c | 2 | ||||
-rw-r--r-- | ujit_asm.c | 2 | ||||
-rw-r--r-- | ujit_utils.c | 2 |
3 files changed, 4 insertions, 2 deletions
@@ -162,7 +162,9 @@ static int iseq_extract_values(VALUE *code, size_t pos, iseq_value_itr_t * func, void *data, rb_vm_insns_translator_t * translator) { VALUE insn = translator((void *)code[pos]); +#if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE if (insn >= VM_INSTRUCTION_SIZE) rb_bug("invalid insn. translator=%p addr2insn=%p", (void *)translator, (void*)rb_vm_insn_addr2insn2); +#endif int len = insn_len(insn); int op_no; const char *types = insn_op_types(insn); diff --git a/ujit_asm.c b/ujit_asm.c index e8aee15fab..1ff1c537b7 100644 --- a/ujit_asm.c +++ b/ujit_asm.c @@ -90,7 +90,7 @@ uint8_t* alloc_exec_mem(size_t mem_size) &alloc_exec_mem, mem_size, PROT_READ | PROT_WRITE | PROT_EXEC, - MAP_PRIVATE | MAP_ANON, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0 ); diff --git a/ujit_utils.c b/ujit_utils.c index 5e535685a1..58389fd6b9 100644 --- a/ujit_utils.c +++ b/ujit_utils.c @@ -48,7 +48,7 @@ void print_int(codeblock_t* cb, x86opnd_t opnd) mov(cb, RDI, opnd); // Call the print function - mov(cb, RAX, const_ptr_opnd(&print_int_cfun)); + mov(cb, RAX, const_ptr_opnd((void*)&print_int_cfun)); call(cb, RAX); pop_regs(cb); |