The old nasm printer used $ to preface label names so that reserved words could serve as label names without breaking things, e.g.
default rel
section .text
global $entry
$entry:
mov rax, 42
$rax:
sub rax, 1
cmp rax, 0
jne $rax
ret
But the move to clang/LLVM dropped this feature which means you get:
.intel_syntax noprefix
.text
.global entry
entry:
mov rax, 42
rax:
sub rax, 1
cmp rax, 0
jne rax
ret
and jne rax is not a valid instruction. There is a failing test case in the repo that catches this regression.
(Note that this test won't fail on Macs because the _ prefix that gets inserted saves it from being a malformed instruction.)
The clang assembler let's you use double quotes for label names, so the example could be jne "rax".
The old nasm printer used
$to preface label names so that reserved words could serve as label names without breaking things, e.g.But the move to clang/LLVM dropped this feature which means you get:
and
jne raxis not a valid instruction. There is a failing test case in the repo that catches this regression.(Note that this test won't fail on Macs because the
_prefix that gets inserted saves it from being a malformed instruction.)The clang assembler let's you use double quotes for label names, so the example could be
jne "rax".