[前][次][番号順一覧][スレッド一覧]

ruby-changes:71809

From: Aaron <ko1@a...>
Date: Fri, 13 May 2022 04:08:51 +0900 (JST)
Subject: [ruby-changes:71809] f07a0e79a2 (master): YJIT: Fix getting the EP with registers other than RAX (#5882)

https://git.ruby-lang.org/ruby.git/commit/?id=f07a0e79a2

From f07a0e79a225190e3c51d9306af3f8c515e8e41f Mon Sep 17 00:00:00 2001
From: Aaron Patterson <tenderlove@r...>
Date: Thu, 12 May 2022 12:08:35 -0700
Subject: YJIT: Fix getting the EP with registers other than RAX (#5882)

Before this commit we were accidentally clobbering RAX.  Additionally,
since this function had RAX hardcoded then the function may not have
worked with registers other than RAX.

Co-authored-by: John Hawthorn <john@h...>
---
 yjit/src/codegen.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs
index d4aee9528e..60d8551a57 100644
--- a/yjit/src/codegen.rs
+++ b/yjit/src/codegen.rs
@@ -1477,7 +1477,7 @@ fn gen_get_ep(cb: &mut CodeBlock, reg: X86Opnd, level: u32) { https://github.com/ruby/ruby/blob/trunk/yjit/src/codegen.rs#L1477
         // See GET_PREV_EP(ep) macro
         // VALUE *prev_ep = ((VALUE *)((ep)[VM_ENV_DATA_INDEX_SPECVAL] & ~0x03))
         let offs = (SIZEOF_VALUE as i32) * (VM_ENV_DATA_INDEX_SPECVAL as i32);
-        mov(cb, reg, mem_opnd(64, REG0, offs));
+        mov(cb, reg, mem_opnd(64, reg, offs));
         and(cb, reg, imm_opnd(!0x03));
     }
 }
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]