ruby-changes:68651
From: Alan <ko1@a...>
Date: Thu, 21 Oct 2021 08:11:42 +0900 (JST)
Subject: [ruby-changes:68651] 6ca360aa47 (master): MicroJIT: switch to example that passes ec as second argument
https://git.ruby-lang.org/ruby.git/commit/?id=6ca360aa47 From 6ca360aa4762c7eaaa587eed79384052d8453552 Mon Sep 17 00:00:00 2001 From: Alan Wu <XrXr@u...> Date: Mon, 19 Oct 2020 20:31:11 -0400 Subject: MicroJIT: switch to example that passes ec as second argument opt_send_without_block needs it. Ideally we would use this example only when an instruction in the compiled sequence needs `ec`. We can worry about that later. --- ujit_compile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ujit_compile.c b/ujit_compile.c index a55d923a60..2ca17d228f 100644 --- a/ujit_compile.c +++ b/ujit_compile.c @@ -145,8 +145,8 @@ x86opnd_t ctx_stack_opnd(ctx_t* ctx, int32_t idx) https://github.com/ruby/ruby/blob/trunk/ujit_compile.c#L145 static void ujit_gen_entry(codeblock_t* cb) { - for (size_t i = 0; i < sizeof(ujit_pre_call_bytes); ++i) - cb_write_byte(cb, ujit_pre_call_bytes[i]); + for (size_t i = 0; i < sizeof(ujit_pre_call_with_ec_bytes); ++i) + cb_write_byte(cb, ujit_pre_call_with_ec_bytes[i]); } /** @@ -170,8 +170,8 @@ ujit_gen_exit(codeblock_t* cb, ctx_t* ctx, VALUE* exit_pc) https://github.com/ruby/ruby/blob/trunk/ujit_compile.c#L170 mov(cb, mem_opnd(64, RDI, 0), RAX); // Write the post call bytes - for (size_t i = 0; i < sizeof(ujit_post_call_bytes); ++i) - cb_write_byte(cb, ujit_post_call_bytes[i]); + for (size_t i = 0; i < sizeof(ujit_post_call_with_ec_bytes); ++i) + cb_write_byte(cb, ujit_post_call_with_ec_bytes[i]); } /** -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/