Skip to content

Commit

Permalink
YJIT: Float arithmetics are actually leaf
Browse files Browse the repository at this point in the history
with these guards in YJIT.

The previous commit was to fix "conflict" between two PRs, but I
actually wanted to use it here, which is why I filed the other one.
  • Loading branch information
k0kubun committed Jan 31, 2024
1 parent 2220c4c commit 21031f0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions yjit/src/codegen.rs
Expand Up @@ -5022,7 +5022,7 @@ fn jit_rb_float_plus(
}

// Save the PC and SP because the callee may allocate Float on heap
jit_prepare_non_leaf_call(jit, asm);
jit_prepare_call_with_gc(jit, asm);

asm_comment!(asm, "Float#+");
let obj = asm.stack_opnd(0);
Expand Down Expand Up @@ -5066,7 +5066,7 @@ fn jit_rb_float_minus(
}

// Save the PC and SP because the callee may allocate Float on heap
jit_prepare_non_leaf_call(jit, asm);
jit_prepare_call_with_gc(jit, asm);

asm_comment!(asm, "Float#-");
let obj = asm.stack_opnd(0);
Expand Down Expand Up @@ -5110,7 +5110,7 @@ fn jit_rb_float_mul(
}

// Save the PC and SP because the callee may allocate Float on heap
jit_prepare_non_leaf_call(jit, asm);
jit_prepare_call_with_gc(jit, asm);

asm_comment!(asm, "Float#*");
let obj = asm.stack_opnd(0);
Expand Down Expand Up @@ -5154,7 +5154,7 @@ fn jit_rb_float_div(
}

// Save the PC and SP because the callee may allocate Float on heap
jit_prepare_non_leaf_call(jit, asm);
jit_prepare_call_with_gc(jit, asm);

asm_comment!(asm, "Float#/");
let obj = asm.stack_opnd(0);
Expand Down

0 comments on commit 21031f0

Please sign in to comment.