JITs: Fix comment about ARM64 stack growth direction [ci skip]

This commit is contained in:
Alan Wu 2026-01-19 15:17:11 -05:00
parent 859920dfd2
commit 6f890976e0
2 changed files with 6 additions and 8 deletions

View File

@ -878,14 +878,13 @@ impl Assembler
}
}
/// Emit a push instruction for the given operand by adding to the stack
/// pointer and then storing the given value.
/// Push a value to the stack by subtracting from the stack pointer then storing,
/// leaving an 8-byte gap for alignment.
fn emit_push(cb: &mut CodeBlock, opnd: A64Opnd) {
str_pre(cb, opnd, A64Opnd::new_mem(64, C_SP_REG, -C_SP_STEP));
}
/// Emit a pop instruction into the given operand by loading the value
/// and then subtracting from the stack pointer.
/// Pop a value from the stack by loading `[sp]` then adding to the stack pointer.
fn emit_pop(cb: &mut CodeBlock, opnd: A64Opnd) {
ldr_post(cb, opnd, A64Opnd::new_mem(64, C_SP_REG, C_SP_STEP));
}

View File

@ -1086,14 +1086,13 @@ impl Assembler {
gc_offsets.push(ptr_offset);
}
/// Emit a push instruction for the given operand by adding to the stack
/// pointer and then storing the given value.
/// Push a value to the stack by subtracting from the stack pointer then storing,
/// leaving an 8-byte gap for alignment.
fn emit_push(cb: &mut CodeBlock, opnd: A64Opnd) {
str_pre(cb, opnd, A64Opnd::new_mem(64, C_SP_REG, -C_SP_STEP));
}
/// Emit a pop instruction into the given operand by loading the value
/// and then subtracting from the stack pointer.
/// Pop a value from the stack by loading `[sp]` then adding to the stack pointer.
fn emit_pop(cb: &mut CodeBlock, opnd: A64Opnd) {
ldr_post(cb, opnd, A64Opnd::new_mem(64, C_SP_REG, C_SP_STEP));
}