1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Stop using a callee-saved register for scratch0 on aarch64 (#6312)

[Bug #18985]

* Callee-save x22 for aarch64

* Just use a caller-saved register

* Update yjit/src/backend/arm64/mod.rs

Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>
Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
This commit is contained in:
Takashi Kokubun 2022-09-01 13:38:38 -07:00 committed by GitHub
parent 419118473e
commit 064944c902
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2022-09-02 05:39:04 +09:00
Merged-By: k0kubun <takashikkbn@gmail.com>

View file

@ -69,7 +69,8 @@ impl From<&Opnd> for A64Opnd {
impl Assembler
{
// A special scratch register for intermediate processing.
const SCRATCH0: A64Opnd = A64Opnd::Reg(X22_REG);
// This register is caller-saved (so we don't have to save it before using it)
const SCRATCH0: A64Opnd = A64Opnd::Reg(X15_REG);
/// Get the list of registers from which we will allocate on this platform
/// These are caller-saved registers