From ff93ae3711aaa1a40150324785ed6606e1f3afb2 Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Mon, 5 Oct 2020 08:09:58 -0400 Subject: [PATCH] Small build fixes --- iseq.c | 2 ++ ujit_asm.c | 2 +- ujit_utils.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/iseq.c b/iseq.c index 96f9d8efa4..4ff3a3bc33 100644 --- a/iseq.c +++ b/iseq.c @@ -160,7 +160,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);