From 449c23ebc32eb45f8a6360c472bfbf5db6cd132f Mon Sep 17 00:00:00 2001 From: Kimplul Date: Tue, 1 Apr 2025 20:39:42 +0300 Subject: aarch64 linux seems to work --- src/compile/compile.c | 412 +++++++++++++++++++++++++------------------------- 1 file changed, 206 insertions(+), 206 deletions(-) (limited to 'src/compile/compile.c') diff --git a/src/compile/compile.c b/src/compile/compile.c index aba44a0..b90ee54 100644 --- a/src/compile/compile.c +++ b/src/compile/compile.c @@ -566,7 +566,7 @@ static void compile_absr_d(struct ejit_func *f, jit_state_t *j, { jit_fpr_t r0 = getfpr(f, i.r0, 0); jit_fpr_t r1 = getloc_d(f, j, i.r1, 1); - jit_absr_f(j, r0, r1); + jit_absr_d(j, r0, r1); putloc_d(f, j, i.r0, r0); } @@ -1890,19 +1890,19 @@ static void compile_trampoline(struct ejit_func *f, jit_state_t *j) foreach_vec(ii, f->insns) { struct ejit_insn i = *insns_at(&f->insns, ii); switch (i.op) { - case PARAM: { + case EJIT_OP_PARAM: { jit_operand_t p = jit_operand_mem(jit_abi_from(i.r1), JIT_R1, arg_offset(i)); operands_append(&args, p); break; } - case PARAM_F: { + case EJIT_OP_PARAM_F: { jit_operand_t p = jit_operand_mem(jit_abi_from(i.r1), JIT_R1, arg_offset(i)); operands_append(&args, p); break; } - case START: { + case EJIT_OP_START: { /* callr should be smart enough to avoid JIT_R0 if some * other register wants to write to it */ jit_reloc_t r = jit_mov_addr(j, JIT_R0); @@ -1961,186 +1961,186 @@ static size_t compile_fn_body(struct ejit_func *f, jit_state_t *j, void *arena, struct ejit_insn i = *insns_at(&f->insns, ii); switch (i.op) { - case MOVR: compile_movr(f, j, i); break; - case MOVR_F: compile_movr_f(f, j, i); break; - case MOVR_D: compile_movr_d(f, j, i); break; - - case MOVI: compile_movi(f, j, i); break; - case MOVI_F: compile_movi_f(f, j, i); break; - case MOVI_D: compile_movi_d(f, j, i); break; - - case ADDR: compile_addr(f, j, i); break; - case ADDI: compile_addi(f, j, i); break; - case ADDR_F: compile_addr_f(f, j, i); break; - case ADDR_D: compile_addr_d(f, j, i); break; - - case SUBR: compile_subr(f, j, i); break; - case SUBI: compile_subi(f, j, i); break; - case SUBR_F: compile_subr_f(f, j, i); break; - case SUBR_D: compile_subr_d(f, j, i); break; - - case MULR: compile_mulr(f, j, i); break; - case MULR_F: compile_mulr_f(f, j, i); break; - case MULR_D: compile_mulr_d(f, j, i); break; - - case ANDI: compile_andi(f, j, i); break; - case ANDR: compile_andr(f, j, i); break; - - case ORI: compile_ori(f, j, i); break; - case ORR: compile_orr(f, j, i); break; - - case XORI: compile_xori(f, j, i); break; - case XORR: compile_xorr(f, j, i); break; - - case DIVR: compile_divr(f, j, i); break; - case DIVR_U: compile_divr_u(f, j, i); break; - case DIVR_F: compile_divr_f(f, j, i); break; - case DIVR_D: compile_divr_d(f, j, i); break; - - case REMR: compile_remr(f, j, i); break; - case REMR_U: compile_remr_u(f, j, i); break; - - case ABSR_F: compile_absr_f(f, j, i); break; - case ABSR_D: compile_absr_d(f, j, i); break; - - case LSHI: compile_lshi(f, j, i); break; - case LSHR: compile_lshr(f, j, i); break; - case RSHI: compile_rshi(f, j, i); break; - case RSHI_U: compile_rshi_u(f, j, i); break; - case RSHR: compile_rshr(f, j, i); break; - case RSHR_U: compile_rshr_u(f, j, i); break; - - case STI8: compile_sti8(f, j, i); break; - case STI16: compile_sti16(f, j, i); break; - case STI32: compile_sti32(f, j, i); break; - case STI64: compile_sti64(f, j, i); break; - case STIF: compile_stif(f, j, i); break; - case STID: compile_stid(f, j, i); break; - - case STXI8: compile_stxi8(f, j, i); break; - case STXI16: compile_stxi16(f, j, i); break; - case STXI32: compile_stxi32(f, j, i); break; - case STXI64: compile_stxi64(f, j, i); break; - case STXIF: compile_stxif(f, j, i); break; - case STXID: compile_stxid(f, j, i); break; - - case STXR8: compile_stxr8(f, j, i); break; - case STXR16: compile_stxr16(f, j, i); break; - case STXR32: compile_stxr32(f, j, i); break; - case STXR64: compile_stxr64(f, j, i); break; - case STXRF: compile_stxrf(f, j, i); break; - case STXRD: compile_stxrd(f, j, i); break; - - case LDI8: compile_ldi8(f, j, i); break; - case LDI16: compile_ldi16(f, j, i); break; - case LDI32: compile_ldi32(f, j, i); break; - case LDI64: compile_ldi64(f, j, i); break; - case LDIU8: compile_ldiu8(f, j, i); break; - case LDIU16: compile_ldiu16(f, j, i); break; - case LDIU32: compile_ldiu32(f, j, i); break; - case LDIU64: compile_ldiu64(f, j, i); break; - case LDIF: compile_ldif(f, j, i); break; - case LDID: compile_ldid(f, j, i); break; - - case LDXI8: compile_ldxi8(f, j, i); break; - case LDXI16: compile_ldxi16(f, j, i); break; - case LDXI32: compile_ldxi32(f, j, i); break; - case LDXI64: compile_ldxi64(f, j, i); break; - case LDXIU8: compile_ldxiu8(f, j, i); break; - case LDXIU16: compile_ldxiu16(f, j, i); break; - case LDXIU32: compile_ldxiu32(f, j, i); break; - case LDXIU64: compile_ldxiu64(f, j, i); break; - case LDXIF: compile_ldxif(f, j, i); break; - case LDXID: compile_ldxid(f, j, i); break; - - case LDXR8: compile_ldxr8(f, j, i); break; - case LDXR16: compile_ldxr16(f, j, i); break; - case LDXR32: compile_ldxr32(f, j, i); break; - case LDXR64: compile_ldxr64(f, j, i); break; - case LDXRU8: compile_ldxru8(f, j, i); break; - case LDXRU16: compile_ldxru16(f, j, i); break; - case LDXRU32: compile_ldxru32(f, j, i); break; - case LDXRU64: compile_ldxru64(f, j, i); break; - case LDXRF: compile_ldxrf(f, j, i); break; - case LDXRD: compile_ldxrd(f, j, i); break; - - case COMR: compile_comr(f, j, i); break; - - case NEGR: compile_negr(f, j, i); break; - case NEGR_F: compile_negr_f(f, j, i); break; - case NEGR_D: compile_negr_d(f, j, i); break; - - case EXTR8: compile_extr8(f, j, i); break; - case EXTR16: compile_extr16(f, j, i); break; - case EXTR32: compile_extr32(f, j, i); break; - case EXTRU8: compile_extru8(f, j, i); break; - case EXTRU16: compile_extru16(f, j, i); break; - case EXTRU32: compile_extru32(f, j, i); break; - case EXTRF: compile_extrf(f, j, i); break; - case EXTRD: compile_extrd(f, j, i); break; - - case TRUNCR_D_32: compile_truncr_d_32(f, j, i); break; - case TRUNCR_D_64: compile_truncr_d_64(f, j, i); break; - case TRUNCR_F_32: compile_truncr_f_32(f, j, i); break; - case TRUNCR_F_64: compile_truncr_f_64(f, j, i); break; - - case EQR: compile_eqr(f, j, i); break; - case EQR_F: compile_eqr_f(f, j, i); break; - case EQR_D: compile_eqr_d(f, j, i); break; - - case NER: compile_ner(f, j, i); break; - case NER_F: compile_ner_f(f, j, i); break; - case NER_D: compile_ner_d(f, j, i); break; - - case GER: compile_ger(f, j, i); break; - case GER_U: compile_ger_u(f, j, i); break; - case GER_F: compile_ger_f(f, j, i); break; - case GER_D: compile_ger_d(f, j, i); break; - - case GTR: compile_gtr(f, j, i); break; - case GTR_U: compile_gtr_u(f, j, i); break; - case GTR_F: compile_gtr_f(f, j, i); break; - case GTR_D: compile_gtr_d(f, j, i); break; - - case BMCI: compile_bmci(f, j, i, &relocs); break; - case BMCR: compile_bmcr(f, j, i, &relocs); break; - - case BMSI: compile_bmsi(f, j, i, &relocs); break; - case BMSR: compile_bmsr(f, j, i, &relocs); break; - - case BEQR: compile_beqr(f, j, i, &relocs); break; - case BEQI: compile_beqi(f, j, i, &relocs); break; - case BEQR_F: compile_beqr_f(f, j, i, &relocs); break; - case BEQR_D: compile_beqr_d(f, j, i, &relocs); break; - - case BNER: compile_bner(f, j, i, &relocs); break; - case BNEI: compile_bnei(f, j, i, &relocs); break; - case BNER_F: compile_bner_f(f, j, i, &relocs); break; - case BNER_D: compile_bner_d(f, j, i, &relocs); break; - - case BGER: compile_bger(f, j, i, &relocs); break; - case BGER_U: compile_bger_u(f, j, i, &relocs); break; - case BGEI: compile_bgei(f, j, i, &relocs); break; - case BGEI_U: compile_bgei_u(f, j, i, &relocs); break; - case BGER_F: compile_bger_f(f, j, i, &relocs); break; - case BGER_D: compile_bger_d(f, j, i, &relocs); break; - - case BGTR: compile_bgtr(f, j, i, &relocs); break; - case BGTR_U: compile_bgtr_u(f, j, i, &relocs); break; - case BGTI: compile_bgti(f, j, i, &relocs); break; - case BGTI_U: compile_bgti_u(f, j, i, &relocs); break; - case BGTR_F: compile_bgtr_f(f, j, i, &relocs); break; - case BGTR_D: compile_bgtr_d(f, j, i, &relocs); break; - - case BLEI: compile_blei(f, j, i, &relocs); break; - case BLEI_U: compile_blei_u(f, j, i, &relocs); break; - - case BLTI: compile_blti(f, j, i, &relocs); break; - case BLTI_U: compile_blti_u(f, j, i, &relocs); break; - - case JMP: compile_jmp(f, j, i, &relocs); break; - - case ARG_I: { + case EJIT_OP_MOVR: compile_movr(f, j, i); break; + case EJIT_OP_MOVR_F: compile_movr_f(f, j, i); break; + case EJIT_OP_MOVR_D: compile_movr_d(f, j, i); break; + + case EJIT_OP_MOVI: compile_movi(f, j, i); break; + case EJIT_OP_MOVI_F: compile_movi_f(f, j, i); break; + case EJIT_OP_MOVI_D: compile_movi_d(f, j, i); break; + + case EJIT_OP_ADDR: compile_addr(f, j, i); break; + case EJIT_OP_ADDI: compile_addi(f, j, i); break; + case EJIT_OP_ADDR_F: compile_addr_f(f, j, i); break; + case EJIT_OP_ADDR_D: compile_addr_d(f, j, i); break; + + case EJIT_OP_SUBR: compile_subr(f, j, i); break; + case EJIT_OP_SUBI: compile_subi(f, j, i); break; + case EJIT_OP_SUBR_F: compile_subr_f(f, j, i); break; + case EJIT_OP_SUBR_D: compile_subr_d(f, j, i); break; + + case EJIT_OP_MULR: compile_mulr(f, j, i); break; + case EJIT_OP_MULR_F: compile_mulr_f(f, j, i); break; + case EJIT_OP_MULR_D: compile_mulr_d(f, j, i); break; + + case EJIT_OP_ANDI: compile_andi(f, j, i); break; + case EJIT_OP_ANDR: compile_andr(f, j, i); break; + + case EJIT_OP_ORI: compile_ori(f, j, i); break; + case EJIT_OP_ORR: compile_orr(f, j, i); break; + + case EJIT_OP_XORI: compile_xori(f, j, i); break; + case EJIT_OP_XORR: compile_xorr(f, j, i); break; + + case EJIT_OP_DIVR: compile_divr(f, j, i); break; + case EJIT_OP_DIVR_U: compile_divr_u(f, j, i); break; + case EJIT_OP_DIVR_F: compile_divr_f(f, j, i); break; + case EJIT_OP_DIVR_D: compile_divr_d(f, j, i); break; + + case EJIT_OP_REMR: compile_remr(f, j, i); break; + case EJIT_OP_REMR_U: compile_remr_u(f, j, i); break; + + case EJIT_OP_ABSR_F: compile_absr_f(f, j, i); break; + case EJIT_OP_ABSR_D: compile_absr_d(f, j, i); break; + + case EJIT_OP_LSHI: compile_lshi(f, j, i); break; + case EJIT_OP_LSHR: compile_lshr(f, j, i); break; + case EJIT_OP_RSHI: compile_rshi(f, j, i); break; + case EJIT_OP_RSHI_U: compile_rshi_u(f, j, i); break; + case EJIT_OP_RSHR: compile_rshr(f, j, i); break; + case EJIT_OP_RSHR_U: compile_rshr_u(f, j, i); break; + + case EJIT_OP_STI8: compile_sti8(f, j, i); break; + case EJIT_OP_STI16: compile_sti16(f, j, i); break; + case EJIT_OP_STI32: compile_sti32(f, j, i); break; + case EJIT_OP_STI64: compile_sti64(f, j, i); break; + case EJIT_OP_STIF: compile_stif(f, j, i); break; + case EJIT_OP_STID: compile_stid(f, j, i); break; + + case EJIT_OP_STXI8: compile_stxi8(f, j, i); break; + case EJIT_OP_STXI16: compile_stxi16(f, j, i); break; + case EJIT_OP_STXI32: compile_stxi32(f, j, i); break; + case EJIT_OP_STXI64: compile_stxi64(f, j, i); break; + case EJIT_OP_STXIF: compile_stxif(f, j, i); break; + case EJIT_OP_STXID: compile_stxid(f, j, i); break; + + case EJIT_OP_STXR8: compile_stxr8(f, j, i); break; + case EJIT_OP_STXR16: compile_stxr16(f, j, i); break; + case EJIT_OP_STXR32: compile_stxr32(f, j, i); break; + case EJIT_OP_STXR64: compile_stxr64(f, j, i); break; + case EJIT_OP_STXRF: compile_stxrf(f, j, i); break; + case EJIT_OP_STXRD: compile_stxrd(f, j, i); break; + + case EJIT_OP_LDI8: compile_ldi8(f, j, i); break; + case EJIT_OP_LDI16: compile_ldi16(f, j, i); break; + case EJIT_OP_LDI32: compile_ldi32(f, j, i); break; + case EJIT_OP_LDI64: compile_ldi64(f, j, i); break; + case EJIT_OP_LDIU8: compile_ldiu8(f, j, i); break; + case EJIT_OP_LDIU16: compile_ldiu16(f, j, i); break; + case EJIT_OP_LDIU32: compile_ldiu32(f, j, i); break; + case EJIT_OP_LDIU64: compile_ldiu64(f, j, i); break; + case EJIT_OP_LDIF: compile_ldif(f, j, i); break; + case EJIT_OP_LDID: compile_ldid(f, j, i); break; + + case EJIT_OP_LDXI8: compile_ldxi8(f, j, i); break; + case EJIT_OP_LDXI16: compile_ldxi16(f, j, i); break; + case EJIT_OP_LDXI32: compile_ldxi32(f, j, i); break; + case EJIT_OP_LDXI64: compile_ldxi64(f, j, i); break; + case EJIT_OP_LDXIU8: compile_ldxiu8(f, j, i); break; + case EJIT_OP_LDXIU16: compile_ldxiu16(f, j, i); break; + case EJIT_OP_LDXIU32: compile_ldxiu32(f, j, i); break; + case EJIT_OP_LDXIU64: compile_ldxiu64(f, j, i); break; + case EJIT_OP_LDXIF: compile_ldxif(f, j, i); break; + case EJIT_OP_LDXID: compile_ldxid(f, j, i); break; + + case EJIT_OP_LDXR8: compile_ldxr8(f, j, i); break; + case EJIT_OP_LDXR16: compile_ldxr16(f, j, i); break; + case EJIT_OP_LDXR32: compile_ldxr32(f, j, i); break; + case EJIT_OP_LDXR64: compile_ldxr64(f, j, i); break; + case EJIT_OP_LDXRU8: compile_ldxru8(f, j, i); break; + case EJIT_OP_LDXRU16: compile_ldxru16(f, j, i); break; + case EJIT_OP_LDXRU32: compile_ldxru32(f, j, i); break; + case EJIT_OP_LDXRU64: compile_ldxru64(f, j, i); break; + case EJIT_OP_LDXRF: compile_ldxrf(f, j, i); break; + case EJIT_OP_LDXRD: compile_ldxrd(f, j, i); break; + + case EJIT_OP_COMR: compile_comr(f, j, i); break; + + case EJIT_OP_NEGR: compile_negr(f, j, i); break; + case EJIT_OP_NEGR_F: compile_negr_f(f, j, i); break; + case EJIT_OP_NEGR_D: compile_negr_d(f, j, i); break; + + case EJIT_OP_EXTR8: compile_extr8(f, j, i); break; + case EJIT_OP_EXTR16: compile_extr16(f, j, i); break; + case EJIT_OP_EXTR32: compile_extr32(f, j, i); break; + case EJIT_OP_EXTRU8: compile_extru8(f, j, i); break; + case EJIT_OP_EXTRU16: compile_extru16(f, j, i); break; + case EJIT_OP_EXTRU32: compile_extru32(f, j, i); break; + case EJIT_OP_EXTRF: compile_extrf(f, j, i); break; + case EJIT_OP_EXTRD: compile_extrd(f, j, i); break; + + case EJIT_OP_TRUNCR_D_32: compile_truncr_d_32(f, j, i); break; + case EJIT_OP_TRUNCR_D_64: compile_truncr_d_64(f, j, i); break; + case EJIT_OP_TRUNCR_F_32: compile_truncr_f_32(f, j, i); break; + case EJIT_OP_TRUNCR_F_64: compile_truncr_f_64(f, j, i); break; + + case EJIT_OP_EQR: compile_eqr(f, j, i); break; + case EJIT_OP_EQR_F: compile_eqr_f(f, j, i); break; + case EJIT_OP_EQR_D: compile_eqr_d(f, j, i); break; + + case EJIT_OP_NER: compile_ner(f, j, i); break; + case EJIT_OP_NER_F: compile_ner_f(f, j, i); break; + case EJIT_OP_NER_D: compile_ner_d(f, j, i); break; + + case EJIT_OP_GER: compile_ger(f, j, i); break; + case EJIT_OP_GER_U: compile_ger_u(f, j, i); break; + case EJIT_OP_GER_F: compile_ger_f(f, j, i); break; + case EJIT_OP_GER_D: compile_ger_d(f, j, i); break; + + case EJIT_OP_GTR: compile_gtr(f, j, i); break; + case EJIT_OP_GTR_U: compile_gtr_u(f, j, i); break; + case EJIT_OP_GTR_F: compile_gtr_f(f, j, i); break; + case EJIT_OP_GTR_D: compile_gtr_d(f, j, i); break; + + case EJIT_OP_BMCI: compile_bmci(f, j, i, &relocs); break; + case EJIT_OP_BMCR: compile_bmcr(f, j, i, &relocs); break; + + case EJIT_OP_BMSI: compile_bmsi(f, j, i, &relocs); break; + case EJIT_OP_BMSR: compile_bmsr(f, j, i, &relocs); break; + + case EJIT_OP_BEQR: compile_beqr(f, j, i, &relocs); break; + case EJIT_OP_BEQI: compile_beqi(f, j, i, &relocs); break; + case EJIT_OP_BEQR_F: compile_beqr_f(f, j, i, &relocs); break; + case EJIT_OP_BEQR_D: compile_beqr_d(f, j, i, &relocs); break; + + case EJIT_OP_BNER: compile_bner(f, j, i, &relocs); break; + case EJIT_OP_BNEI: compile_bnei(f, j, i, &relocs); break; + case EJIT_OP_BNER_F: compile_bner_f(f, j, i, &relocs); break; + case EJIT_OP_BNER_D: compile_bner_d(f, j, i, &relocs); break; + + case EJIT_OP_BGER: compile_bger(f, j, i, &relocs); break; + case EJIT_OP_BGER_U: compile_bger_u(f, j, i, &relocs); break; + case EJIT_OP_BGEI: compile_bgei(f, j, i, &relocs); break; + case EJIT_OP_BGEI_U: compile_bgei_u(f, j, i, &relocs); break; + case EJIT_OP_BGER_F: compile_bger_f(f, j, i, &relocs); break; + case EJIT_OP_BGER_D: compile_bger_d(f, j, i, &relocs); break; + + case EJIT_OP_BGTR: compile_bgtr(f, j, i, &relocs); break; + case EJIT_OP_BGTR_U: compile_bgtr_u(f, j, i, &relocs); break; + case EJIT_OP_BGTI: compile_bgti(f, j, i, &relocs); break; + case EJIT_OP_BGTI_U: compile_bgti_u(f, j, i, &relocs); break; + case EJIT_OP_BGTR_F: compile_bgtr_f(f, j, i, &relocs); break; + case EJIT_OP_BGTR_D: compile_bgtr_d(f, j, i, &relocs); break; + + case EJIT_OP_BLEI: compile_blei(f, j, i, &relocs); break; + case EJIT_OP_BLEI_U: compile_blei_u(f, j, i, &relocs); break; + + case EJIT_OP_BLTI: compile_blti(f, j, i, &relocs); break; + case EJIT_OP_BLTI_U: compile_blti_u(f, j, i, &relocs); break; + + case EJIT_OP_JMP: compile_jmp(f, j, i, &relocs); break; + + case EJIT_OP_ARG_I: { jit_operand_t type = jit_operand_imm(JIT_OPERAND_ABI_WORD, i.r1); jit_operand_t arg = jit_operand_imm(jit_abi_from(i.r1), i.o); operands_append(&src, type); @@ -2159,13 +2159,13 @@ static size_t compile_fn_body(struct ejit_func *f, jit_state_t *j, void *arena, break; } - case ARG_FI: { + case EJIT_OP_ARG_FI: { assert(false && "immediate floats (currently?) not supported"); abort(); break; } - case ARG: { + case EJIT_OP_ARG: { size_t r2 = gpr_stats_at(&f->gpr, i.r2)->rno; jit_operand_t type = jit_operand_imm(JIT_OPERAND_ABI_WORD, i.r1); @@ -2198,7 +2198,7 @@ static size_t compile_fn_body(struct ejit_func *f, jit_state_t *j, void *arena, break; } - case ARG_F: { + case EJIT_OP_ARG_F: { size_t f2 = fpr_stats_at(&f->fpr, i.r2)->fno; jit_operand_t type = jit_operand_imm(JIT_OPERAND_ABI_WORD, i.r1); @@ -2232,7 +2232,7 @@ static size_t compile_fn_body(struct ejit_func *f, jit_state_t *j, void *arena, break; } - case ESCAPEI_L: + case EJIT_OP_ESCAPEI_L: #if __WORDSIZE == 64 /* fallthrough */ #else @@ -2240,9 +2240,9 @@ static size_t compile_fn_body(struct ejit_func *f, jit_state_t *j, void *arena, break; #endif - case ESCAPEI_D: - case ESCAPEI_F: - case ESCAPEI_I: { + case EJIT_OP_ESCAPEI_D: + case EJIT_OP_ESCAPEI_F: + case EJIT_OP_ESCAPEI_I: { save_caller_save_regs(f, j); jit_operand_t args[2] = { @@ -2261,7 +2261,7 @@ static size_t compile_fn_body(struct ejit_func *f, jit_state_t *j, void *arena, break; } - case CALLI_L: + case EJIT_OP_CALLI_L: #if __WORDSIZE == 64 call = checked_run_l; goto calli; #else @@ -2269,9 +2269,9 @@ static size_t compile_fn_body(struct ejit_func *f, jit_state_t *j, void *arena, break; #endif - case CALLI_F: { call = checked_run_f; goto calli; } - case CALLI_D: { call = checked_run_d; goto calli; } - case CALLI_I: { call = checked_run_i; goto calli; + case EJIT_OP_CALLI_F: { call = checked_run_f; goto calli; } + case EJIT_OP_CALLI_D: { call = checked_run_d; goto calli; } + case EJIT_OP_CALLI_I: { call = checked_run_i; goto calli; calli: save_caller_save_regs(f, j); @@ -2303,11 +2303,11 @@ calli: break; } - case RETVAL: compile_retval(f, j, i); break; - case RETVAL_F: compile_retval_f(f, j, i); break; - case RETVAL_D: compile_retval_d(f, j, i); break; + case EJIT_OP_RETVAL: compile_retval(f, j, i); break; + case EJIT_OP_RETVAL_F: compile_retval_f(f, j, i); break; + case EJIT_OP_RETVAL_D: compile_retval_d(f, j, i); break; - case RETR: { + case EJIT_OP_RETR: { jit_gpr_t r = getloc(f, j, i.r1, 0); /* R0 won't get overwritten by jit_leave_jit_abi */ jit_movr(j, JIT_R0, r); @@ -2317,7 +2317,7 @@ calli: break; } - case RETR_F: { + case EJIT_OP_RETR_F: { jit_fpr_t r = getloc_f(f, j, i.r1, 0); jit_movr_f(j, JIT_F0, r); jit_shrink_stack(j, stack); @@ -2326,7 +2326,7 @@ calli: break; } - case RETR_D: { + case EJIT_OP_RETR_D: { jit_fpr_t r = getloc_d(f, j, i.r1, 0); jit_movr_d(j, JIT_F0, r); jit_shrink_stack(j, stack); @@ -2335,14 +2335,14 @@ calli: break; } - case RETI: { + case EJIT_OP_RETI: { jit_shrink_stack(j, stack); jit_leave_jit_abi(j, gprs, fprs, frame); jit_reti(j, i.o); break; } - case END: { + case EJIT_OP_END: { /* 'void' return */ jit_shrink_stack(j, stack); jit_leave_jit_abi(j, gprs, fprs, frame); @@ -2350,7 +2350,7 @@ calli: break; } - case PARAM_F: { + case EJIT_OP_PARAM_F: { size_t f2 = fpr_stats_at(&f->fpr, i.r2)->fno; jit_operand_t to; @@ -2369,7 +2369,7 @@ calli: break; } - case PARAM: { + case EJIT_OP_PARAM: { size_t r2 = gpr_stats_at(&f->gpr, i.r2)->rno; jit_operand_t to; @@ -2388,7 +2388,7 @@ calli: break; } - case START: { + case EJIT_OP_START: { /* parameters should be done by now */ jit_load_args(j, operands_len(&dst), dst.buf); /* reuse for arguments */ -- cgit v1.2.3