Skip to content
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

[RISC-V] Assertion when using li with a symbol difference #64623

Open
arichardson opened this issue Aug 11, 2023 · 4 comments
Open

[RISC-V] Assertion when using li with a symbol difference #64623

arichardson opened this issue Aug 11, 2023 · 4 comments

Comments

@arichardson
Copy link
Member

Assertion FixupKind != RISCV::fixup_riscv_invalid && "Unhandled expression!"'`

li t1, .Ltrap_vector_end - .Ltrap_vector

.global trap_vector
trap_vector:
.Ltrap_vector:
nop
nop
.global trap_vector_end
trap_vector_end:
.Ltrap_vector_end:

It appears this resulted in error: operand must be a constant 64-bit integer until recently: See https://godbolt.org/z/WKPEMsGTe

@llvmbot
Copy link
Collaborator

llvmbot commented Aug 11, 2023

@llvm/issue-subscribers-backend-risc-v

@asb
Copy link
Contributor

asb commented Aug 14, 2023

CC @mtvec - I guess this behaviour changed with https://reviews.llvm.org/D135960

@mtvec
Copy link
Contributor

mtvec commented Aug 25, 2023

Candidate patch: https://reviews.llvm.org/D158830

Note that the error message will be different with this patch (error: unsupported relocation type) but the assertion is gone.

@mtvec
Copy link
Contributor

mtvec commented Aug 25, 2023

Cross-referencing another candidate patch: https://reviews.llvm.org/D157694

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants