Bug 111964 - 13.2.1: potential GIMPLE bug in inline assempler
Summary: 13.2.1: potential GIMPLE bug in inline assempler
Status: RESOLVED DUPLICATE of bug 46820
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: inline-asm, lto
Depends on:
Blocks:
 
Reported: 2023-10-24 17:45 UTC by Tomasz Kłoczko
Modified: 2023-10-24 21:32 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Kłoczko 2023-10-24 17:45:46 UTC
According to node developers it is bug in GIMPLE and inline assembler causing that node build with enabled LTO fails with missing PushAllRegistersAndIterateStack symbol.

More details about how to build nodejs 21.0.0 to reproduce this issue is on https://github.com/nodejs/node/issues/50347
Comment 1 Andrew Pinski 2023-10-24 18:00:46 UTC
There are some known issues with top-level inline-asm and lto.

It would be better if folks moved away from toplevel inline-asm really.
Comment 2 Tomasz Kłoczko 2023-10-24 18:09:24 UTC
(In reply to Andrew Pinski from comment #1)
> There are some known issues with top-level inline-asm and lto.
> 
> It would be better if folks moved away from toplevel inline-asm really.

May I ask to drop some comment about that with some instruction what needs to be done instead under https://github.com/nodejs/node/issues/50347 ?
Comment 3 Andrew Pinski 2023-10-24 21:32:36 UTC
Dup of bug 46820 (and others).

Again the big issue is top-level inline-asm is just broken for LTO really. Things like PushAllRegistersAndIterateStack in this case should be put into a .s file.

I see they did that for deps/v8/src/heap/base/asm/arm64/push_registers_masm.S already too.

*** This bug has been marked as a duplicate of bug 46820 ***
Comment 4 Andrew Pinski 2023-10-24 21:32:58 UTC
And:
v8/src/heap/base/asm/ia32/push_registers_masm.asm