Skip to content

Commit

Permalink
riscv(emit): drop emit_loadk20
Browse files Browse the repository at this point in the history
k20 \subset k32. Why not LUI+ADDI(XORI)?

This is a WIP, archive only.
  • Loading branch information
infiWang committed Jun 6, 2023
1 parent 12c8650 commit 4152cef
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/lj_emit_riscv.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,6 @@ static void emit_loadk12(ASMState *as, Reg rd, int32_t i)
emit_di(as, RISCVI_ADDI, rd, i);
}

static void emit_loadk20(ASMState *as, Reg rd, int32_t i)
{
emit_dsshamt(as, RISCVI_SRAIW, rd, rd, 12);
emit_du(as, RISCVI_LUI, rd, i);
}

static void emit_loadk32(ASMState *as, Reg rd, int32_t i)
{
if (checki12(i)) {
Expand Down

0 comments on commit 4152cef

Please sign in to comment.