ruby-changes:68598
From: Alan <ko1@a...>
Date: Thu, 21 Oct 2021 08:10:22 +0900 (JST)
Subject: [ruby-changes:68598] e9ecf80d20 (master): Respect redefinition in MicroJIT's opt_minus
https://git.ruby-lang.org/ruby.git/commit/?id=e9ecf80d20 From e9ecf80d209ee32c2606b625ad73d48f4103ee51 Mon Sep 17 00:00:00 2001 From: Alan Wu <XrXr@u...> Date: Mon, 5 Oct 2020 11:19:11 -0400 Subject: Respect redefinition in MicroJIT's opt_minus --- ujit_asm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ujit_asm.h b/ujit_asm.h index 265c4f894f..72743ac1fb 100644 --- a/ujit_asm.h +++ b/ujit_asm.h @@ -227,10 +227,10 @@ x86opnd_t const_ptr_opnd(void* ptr); https://github.com/ruby/ruby/blob/trunk/ujit_asm.h#L227 // Struct member operand with an array index #define member_opnd_idx(base_reg, struct_type, member_name, idx) mem_opnd( \ - 8 * sizeof(((struct_type*)0)->member_name), \ + 8 * sizeof(((struct_type*)0)->member_name[0]), \ base_reg, \ (offsetof(struct_type, member_name) + \ - sizeof(((struct_type*)0)->member_name) * idx) \ + sizeof(((struct_type*)0)->member_name[0]) * idx) \ ) // Code block methods -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/