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

la tp,0' instruction and why it is not allowed in pulp-riscv compiler #14

Open
dspg-arch1 opened this issue Oct 10, 2019 · 0 comments
Open

Comments

@dspg-arch1
Copy link

we encountered an issue with `la tp,0' instruction

pulp-riscv compiler mark it as illegal.

taken from the spec(RISC-V Unprivileged ISA p.139):
la rd, symbol (PIC ) auipc rd, delta[31 : 12] + delta[11] Load absolute address

page 20 - regarding AUIPC (add upper immediate to pc) instruction:
command syntax is-
U-immediate[31:12] dest AUIPC

The current PC can be obtained by setting the U-immediate to 0. Although a JAL +4
instruction could also be used to obtain the local PC (of the instruction following the JAL),
it might cause pipeline breaks in simpler microarchitectures or pollute BTB structures in more
complex microarchitectures.

so it seems like a correct synatx, but perhaps not implemented in ri5cy?

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

No branches or pull requests

1 participant