1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Small build fixes

This commit is contained in:
Alan Wu 2020-10-05 08:09:58 -04:00
parent 46126fe433
commit ff93ae3711
3 changed files with 4 additions and 2 deletions

2
iseq.c
View file

@ -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);

View file

@ -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
);

View file

@ -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);