You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When link time optimization is enabled the code fails to build with a lot of assembler errors like:
{standard input}:607403: Error: no match insn: amcas_d $r12,$r15,$r16
{standard input}:611922: Error: no match insn: amcas_db_d $r12,$r13,$r23
{standard input}:612148: Error: no match insn: amcas_db_d $r13,$r25,$r14
{standard input}:612188: Error: no match insn: amcas_db_d $r12,$r25,$r15
{standard input}:614413: Error: no match insn: amcas_d $r12,$r15,$r18
{standard input}:621115: Error: no match insn: amcas_d $r12,$r15,$r18
{standard input}:622330: Error: no match insn: amcas_db_d $r12,$r4,$r13
{standard input}:622673: Error: no match insn: amcas_db_d $r12,$r4,$r13
{standard input}:623031: Error: no match insn: amcas_d $r12,$r15,$r16
{standard input}:627166: Error: no match insn: amcas_d $r12,$r15,$r18
{standard input}:632288: Error: no match insn: amcas_db_d $r12,$r13,$r15
The problem is that the compiler is free to reorder (or even eliminate) top-level asm statements,
hence amcas_d macro (defined in src/hotspot/os_cpu/linux_loongarch/amcas_asm.h) might be missing when processing inline assembly in src/hotspot/os_cpu/linux_loongarch/atomic_linux_loongarch.hpp.
To avoid the problem one can include macros definition from inline assembly, i.e. with .include \"amcas_asm.h\", and set proper assembler flags so the assembler can locate amcas_asm.h file (like -Wa,-I -Wa,src/hotspot/os_cpu/linux_loongarch or similar)
The text was updated successfully, but these errors were encountered:
asheplyakov
changed the title
Compilation fails: Error: no match insn: amcas_db_d $r12,$r25,$r15
Link time optimization breaks build: no match insn: amcas_db_d $r12,$r25,$r15
Feb 7, 2024
vt-alt
pushed a commit
to altlinux/specs
that referenced
this issue
Feb 7, 2024
When link time optimization is enabled the code fails to build with a lot of assembler errors like:
The problem is that the compiler is free to reorder (or even eliminate) top-level asm statements,
hence
amcas_d
macro (defined insrc/hotspot/os_cpu/linux_loongarch/amcas_asm.h
) might be missing when processing inline assembly insrc/hotspot/os_cpu/linux_loongarch/atomic_linux_loongarch.hpp
.To avoid the problem one can include macros definition from inline assembly, i.e. with
.include \"amcas_asm.h\"
, and set proper assembler flags so the assembler can locateamcas_asm.h
file (like-Wa,-I -Wa,src/hotspot/os_cpu/linux_loongarch
or similar)The text was updated successfully, but these errors were encountered: