Tarantool development patches archive
 help / color / mirror / Atom feed
From: Kirill Yukhin <kyukhin@tarantool.org>
To: Igor Munkin <imun@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] jit: fix cdatanum addressing for GC64 mode on x86
Date: Thu, 15 Oct 2020 11:41:55 +0300	[thread overview]
Message-ID: <20201015084155.vllfcrzbmvsnqm5l@tarantool.org> (raw)
In-Reply-To: <ddae38988c08d7ca8586c17f891a80af1dd804b1.1602683107.git.imun@tarantool.org>

Hello,

On 14 окт 16:53, Igor Munkin wrote:
> This patch fixes the regression introduced in scope of
> 5f6775ae0e141422193ad9b492806834064027ca ('core: introduce various
> platform metrics'). As a result of the patch <cdatanum> displacement is
> misencoded when GC64 mode is enabled.
> 
> In X86 long mode 32-bit displacement is encoded either via SIB byte or
> is addressed relatively to RIP register value. The first approach is
> used in JIT for 32-bit addresses (i.e. when GC64 mode is disabled), but
> doesn't work for 64-bit ones. As a result all addresses to GG_State
> contents to be "hardcoded" on the trace are encoded relatively to
> RID_DISPATCH register (i.e. callee-safe R14 register) containing global
> dispatch table. For this purpose this register is not used by the JIT
> register allocator in GC64 build and not spoiled throughout LuaJIT VM
> cycle (and therefore trace execution).
> 
> NB: Since R14 is the additional GRP, the <add> instruction ought to be
> REX-prefixed.
> 
> Follows up tarantool/tarantool#5187
> 
> Reported-by: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
> Signed-off-by: Igor Munkin <imun@tarantool.org>

I've checked your patch into 1.10, 2.4, 2.5 and master.

--
Regards, Kirill Yukhin

      parent reply	other threads:[~2020-10-15  8:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14 13:53 Igor Munkin
2020-10-14 18:18 ` Sergey Ostanevich
2020-10-14 18:31   ` Igor Munkin
2020-10-14 20:11     ` Sergey Ostanevich
2020-10-14 20:13       ` Igor Munkin
2020-10-14 19:04 ` Sergey Kaplun
2020-10-14 19:22   ` Igor Munkin
2020-10-15  8:41 ` Kirill Yukhin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201015084155.vllfcrzbmvsnqm5l@tarantool.org \
    --to=kyukhin@tarantool.org \
    --cc=imun@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] jit: fix cdatanum addressing for GC64 mode on x86' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox