On 30/04/2025 5:05 pm, Jan Beulich wrote:
> On 30.04.2025 18:00, Andrew Cooper wrote:
>> On 30/04/2025 2:13 pm, Jan Beulich wrote:
>>> In a number of cases we use ALTERNATIVE_2 with both replacement insns /
>>> insn sequences being identical. Avoid emitting the same code twice, and
>>> instead alias the necessary helper labels to the existing ones.
>>>
>>> Signed-off-by: Jan Beulich <jbeul...@suse.com>
>> On a random build, the size of .altinstr_replacement drops from 0xe47 to
>> 0xdf8, so not too bad.
>>
>> While the patch is fine, if we're adjusting the assembly ALTERNATIVE_2,
>> we should make the same adjustment to the C version, even if there's
>> nothing to benefit from it immediately.
> Can do, but I expect that to end up more clumsy for, as you say, no real
> gain.

Fine.  Acked-by: Andrew Cooper <andrew.coop...@citrix.com>

>
>> P.S. it would be even nicer if we would put these in mergeable sections,
>> but I haven't figured out way to set the mergable unit size, which needs
>> to be an absolute expression.
> Well, have you missed
> https://lists.xen.org/archives/html/xen-devel/2021-11/msg01009.html then?

Apparently so, yes.

~Andrew

> Yet it might still make sense to use the approach here as well, as there
> are limitations to what can really be merged (by the toolchain).
>
> Jan


Reply via email to