-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jalr-01.S fails with illegal operands on latest binutils 2.42 #444
Comments
The test is responsible for generating this inside an LA macro wrapper, so
in the next version of arch_test it will just skip generating code if the
REG argument is X0.
This particular case is should be a perfectly legitimate way of expressing
a JR with JALR, and in fact JALR is converted by the assembler into a JR,
so I'd file this as a issue with binutils.
This test would ensure that the link is not store into any gpr.
…On Thu, Mar 14, 2024 at 3:05 AM piotro888 ***@***.***> wrote:
jalr-01.S fails to assemble with latest binutils (>=2.42) with the
following error:
riscv-arch-test/riscv-test-suite/rv32i_m/I/src/jalr-01.S:72: Error:
illegal operands 'la x0,5b'
It happens due to TEST_JALR_OP macro expanding to load address
instruction into x0 rd in
inst_7:
// rs1==x31, rd==x0, imm_val == 32,
// opcode: jalr; op1:x31; dest:x0; immval:0x20; align:0
TEST_JALR_OP(x15, x0, x31, 0x20, x10, 28,0)
I found that braking change was introduced in commit bminor/binutils-gdb@
27b3396
<bminor/binutils-gdb@27b3396>
on binutils including rejecting x0 as a valid operand for la.
Case with rd==x0 is present in RV32E, RV32I and RV64I
I'm not sure if this problem should be reported to binutils or maybe the
test case changed here (the LA(rd,5b) inside the macro doesn't seem to be
too useful, maybe could be replaced under .if rd==x0 or always)
—
Reply to this email directly, view it on GitHub
<#444>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHPXVJQD5LDHQ3AKZP4PUX3YYFY6NAVCNFSM6AAAAABEVY2HDGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE4DKOJUGQ4TQNQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Test fixed with #446 to workaround binutils issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jalr-01.S
fails to assemble with latest binutils (>=2.42) with the following error:riscv-arch-test/riscv-test-suite/rv32i_m/I/src/jalr-01.S:72: Error: illegal operands 'la x0,5b'
It happens due to
TEST_JALR_OP
macro expanding to load address instruction intox0
rd inI found that braking change was introduced in commit bminor/binutils-gdb@27b3396 on binutils including rejecting
x0
as a valid operand forla
.Case with rd==x0 is present in RV32E, RV32I and RV64I
I'm not sure if this problem should be reported to binutils or maybe the test case changed here (the
LA(rd,5b)
inside the macro doesn't seem to be too useful, maybe could be replaced under.if rd==x0
or always)The text was updated successfully, but these errors were encountered: