[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/32382] New: as for RISC-V generates gobbledygook with unusual b
From: |
lightningdzeyenr at gmail dot com |
Subject: |
[Bug gas/32382] New: as for RISC-V generates gobbledygook with unusual but valid label formatting |
Date: |
Wed, 20 Nov 2024 14:12:42 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=32382
Bug ID: 32382
Summary: as for RISC-V generates gobbledygook with unusual but
valid label formatting
Product: binutils
Version: 2.43.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gas
Assignee: unassigned at sourceware dot org
Reporter: lightningdzeyenr at gmail dot com
Target Milestone: ---
I have a package that generates RISC-V assembly that it then passes to as to
assemble. When as from gcc 14.2.0 (2.43.1) processes the following RISC-V
assembly
addi t0, zero, 10
addi t1, zero, 10
beq t0, t1, 8
j generated_label1
fadd.s fa0, fa0, fa1
generated_label1:
fsw fa0, 0(a0)
it produces the following result (from objdump -d):
0000000000000000 <generated_label1-0x18>:
0: 00a00293 li t0,10
4: 00a00313 li t1,10
8: 00629463 bne t0,t1,10 <generated_label1-0x8>
c: 0000006f j c <generated_label1-0xc>
10: 0080006f j 18 <generated_label1>
14: 00b57553 fadd.s fa0,fa0,fa1
0000000000000018 <generated_label1>:
18: 00a52027 fsw fa0,0(a0)
When running this binary code, it gets stuck on 0000006f for no good reason,
and the beq is now a bne. This issue does not happen if the labels have
indentation like you usually see in human-written assembly. However,
indentation is not actually required by the RISC-V standard, so that leaves
this assembled result as a bug. On the llvm side, llvm-mc's disassembled output
is exactly the same as this input assembly, so it gets the label right.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gas/32382] New: as for RISC-V generates gobbledygook with unusual but valid label formatting,
lightningdzeyenr at gmail dot com <=