Hi, Sergey!

thanks for the patch!

In general LGTM, I would suggest fixing the description in commit message.

See below.

Sergey

On 7/24/25 12:03, Sergey Kaplun wrote:
From: Mike Pall <mike>

(cherry picked from commit 69138082a3166105faa8cbb25fadb1e4298686c0)

This patch refactors the emitting of immediates for the arm64
architecture. The main changes are the following:
* Use `emit_getgl()`, `emit_setgl()` instead of `emit_lso()`, where it
  is possible, since it makes the code cleaner.
* The `RID_GL` is allocated for `g` at the start of the trace emitting.
  Also, this register is considered as a candidate to be used as a base
  for the N-step offset in `emit_kdelta()`.
* The address of `tmptv` is not rematerialized to the register from the
  constant not. It is calculated via the adding the corresponding
  offset to `RID_GL`.
it is not clear for me what for hunks with `emit_dm` are needed.

<snipped>