[LLVMdev] [LLVM] Forward temp label references on ARM in LDR with .ltorg in inline assembly are broken in trunk
Rafael EspĂndola
rafael.espindola at gmail.com
Fri Feb 21 08:09:04 PST 2014
> The mangling you see is the assembler generating a private label. It
> includes the unprintable character 0x2 so that it cannot conflict with any
> user crated label.
>
>> I'll file a bug on this after I track down my bugzilla password but I
>> wanted to ask here first because I'm willing to fix it if someone can
>> point me in the right direction.
>
> It looks like this is behavior is not particular to just .ltorg, but shows
> up when printing the private labels.
>
> $ cat tt.s
> .syntax unified
> foo:
> b 1f
> 1:
> add r0, r0, r0
> $ llvm-mc < tt.s
> .text
> foo:
> b ".L11"
> ".L11":
> add r0, r0, r0
> $ llvm-mc < tt.s | hexdump -C
> 00000000 09 2e 74 65 78 74 0a 0a 0a 66 6f 6f 3a 0a 09 62
> |..text...foo:..b|
> 00000010 09 22 2e 4c 31 02 31 22 0a 22 2e 4c 31 02 31 22
> |.".L1.1".".L1.1"|
> 00000020 3a 0a 09 61 64 64 09 72 30 2c 20 72 30 2c 20 72 |:..add.r0, r0,
> r|
> 00000030 30 0a |0.|
> 00000032
>
> I'm not sure if this is a bug or the intended behavior for printing these
> labels.
I am pretty sure this is a bug. It was found by the recent change to
parse assembly, but it is an independent bug.
Would you mind reporting it with your simple "b 1f" example in llvm.org/bugs?
Thanks,
Rafael
More information about the llvm-dev
mailing list