Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Evgeniy Temirgaleev <e.temirgaleev@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit] ARM64: Don't fuse sign extensions into logical operands.
Date: Wed, 18 Nov 2026 14:39:05 +0300	[thread overview]
Message-ID: <av2OWRvlKsB5uZtF@root> (raw)
In-Reply-To: <4b6aa5c0-f807-48bd-9c03-5686b7a196c2@tarantool.org>

Evgeniy,

On 18.11.26, Evgeniy Temirgaleev wrote:
> Hi, Sergey!
> 

<snipped>

> >>> [1]: https://cybersandeep.gitbook.io/arm64basicguide/chapter-3-basic-arm64-instructions#id-3.2.2-logical-instructions
> >> The article contains only basic form of arithmetic and logical (and
> >> other) instructions. It omits their complex forms with optional second
> >> operand shift and/or extension and is not illustrative for this patch.
> > 
> > Yes, I've failed to find the definition of the logical instructions at
> > the non-blocked resources :(. At least it has the definition of logical
> > instruction...
> > Do you think it is better to remove the link to avoid the confusion?
> > 
> I found a working link [1]. You can use it with the document reference 
> data: "Arm® Instruction Set. Version 1.0. Reference Guide" (version 25 
> October 2018), "Chapter D2. A64 General Instructions".
> 
> [1] 
> https://www.heenes.de/ro/material/arm/arm_instruction_set_reference_guide.pdf

Thanks!
Added to the commit message:

| ARM64: Don't fuse sign extensions into logical operands.
|
| Thanks to Peter Cawley.
|
| (cherry picked from commit 90742d91c27d185b70d1b4a6343fb6b7c26002db)
|
| Logical instructions (`orr`, etc.) have no sign extension form (unlike
| `ADD Xd, Xn, Wm, SXTW #k`), see Arm Instruction Set [1], Chapter D2: A64
| General Instructions. This makes the fusing sign extension into them
| meaningless and leads to the incorrect result in the JIT-compiled code.
|
| This patch prevents the fusing of sign extension (`sxtw`) into logical
| instructions.
|
| [1]: https://www.heenes.de/ro/material/arm/arm_instruction_set_reference_guide.pdf
|
| Sergey Kaplun:
| * added the description and the test for the problem
|
| Part of tarantool/tarantool#13442

Branch is force-pushed.

> 
> >>
> >>>
> >>> Sergey Kaplun:
> >>> * added the description and the test for the problem
> >>>
> >>> Part of tarantool/tarantool#13442
> >>> ---
> > 
> > <snipped>
> > 
> >> --
> >> Best regards,
> >> Evgeniy Temirgaleev
> >>
> > 
> 
> -- 
> --
> Best regards,
> Evgeniy Temirgaleev
> 

-- 
Best regards,
Sergey Kaplun

      reply	other threads:[~2026-11-18 11:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16 12:05 Sergey Kaplun via Tarantool-patches
2026-11-17 13:25 ` Evgeniy Temirgaleev via Tarantool-patches
2026-11-18  8:31   ` Sergey Kaplun via Tarantool-patches
2026-11-18  9:42     ` Evgeniy Temirgaleev via Tarantool-patches
2026-11-18 11:39       ` Sergey Kaplun via Tarantool-patches [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=av2OWRvlKsB5uZtF@root \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=e.temirgaleev@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit] ARM64: Don'\''t fuse sign extensions into logical operands.' \
    /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