compiler-explorer / compiler-explorer

Run compilers interactively from your web browser and interact with the assembly

Home Page:https://godbolt.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG]: Not all identifiers are demangled

narpfel opened this issue · comments

Describe the bug

Some identifiers are not demangled, for example

        jmp     qword ptr [rip + _ZN4core3fmt3num3imp54_$LT$impl$u20$core..fmt..Display$u20$for$u20$usize$GT$3fmt17h7bbbd896a38dcccaE@GOTPCREL]
        mov     edx, OFFSET FLAT:_ZN1a1gEi

Steps to reproduce

Write some code that (for example) is compiled to a rip-relative jump: https://godbolt.org/z/5zWGxhxKq

Expected behavior

The identifiers should be demangled.

I believe these regexes are too restrictive?

readonly jumpDef = /(j\w+|b|bl|blx)\s+([$_a-z][\w$@]*)/i;

readonly movUnderscoreDef = /mov.*\s(_[\w$.@]*)/i;

Reproduction link

https://godbolt.org/z/5zWGxhxKq

Screenshots

Not applicable

Operating System

No response

Browser version

No response

Confirmed

Oddly locally _ZN1a1gEi demangles fine with g++ 11 but not with g++ 12