YJIT: Rename get_temp_regs2() back to get_temp_regs() (#12866)

This commit is contained in:
Takashi Kokubun 2025-03-06 07:52:49 -08:00 committed by GitHub
parent e20f1f76f4
commit bb91c303ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
Notes: git 2025-03-06 15:53:09 +00:00
Merged-By: maximecb <maximecb@ruby-lang.org>
2 changed files with 3 additions and 3 deletions

View File

@ -1086,7 +1086,7 @@ impl Assembler
}
/// Get the list of registers that can be used for stack temps.
pub fn get_temp_regs2() -> &'static [Reg] {
pub fn get_temp_regs() -> &'static [Reg] {
let num_regs = get_option!(num_temp_regs);
&TEMP_REGS[0..num_regs]
}
@ -1204,7 +1204,7 @@ impl Assembler
// Convert Opnd::Stack to Opnd::Reg
fn reg_opnd(opnd: &Opnd, reg_idx: usize) -> Opnd {
let regs = Assembler::get_temp_regs2();
let regs = Assembler::get_temp_regs();
if let Opnd::Stack { num_bits, .. } = *opnd {
incr_counter!(temp_reg_opnd);
Opnd::Reg(regs[reg_idx]).with_num_bits(num_bits).unwrap()

View File

@ -3805,7 +3805,7 @@ pub fn gen_branch_stub_hit_trampoline(ocb: &mut OutlinedCb) -> Option<CodePtr> {
/// Return registers to be pushed and popped on branch_stub_hit.
pub fn caller_saved_temp_regs() -> impl Iterator<Item = &'static Reg> + DoubleEndedIterator {
let temp_regs = Assembler::get_temp_regs2().iter();
let temp_regs = Assembler::get_temp_regs().iter();
let len = temp_regs.len();
// The return value gen_leave() leaves in C_RET_REG
// needs to survive the branch_stub_hit() call.