8000 Remove pseudo_op to rv64_i for slli,srli,srai by Avimitin · Pull Request #355 · riscv/riscv-opcodes · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Remove pseudo_op to rv64_i for slli,srli,srai #355

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Avimitin
Copy link

Instructions slli,srli,srai have different bit pattern in rv32_i versus rv64_i. It is better to re-define them, and alias those _rv32 suffix instruction to rv32_i self specification.

Instructions slli,srli,srai have different bit pattern in rv32_i versus
rv64_i. It is better to re-define them, and alias those `_rv32` suffix
instruction to rv32_i self specification.
@Avimitin
Copy link
Author

Hi, I'm having some second thoughts on my current implementation and would appreciate your guidance.

The pseudo_op definition states that they "are instructions which are aliases of regular instructions. Their encodings force certain restrictions over the regular instruction." This got me thinking about a different way to handle the aliases for rv32 and rv64. My idea is to use the same pseudo-alias for the rv64_i instructions while removing the separate instructions that have the _rv32 suffix.

I'm trying to decide between my current implementation and this new approach. Do you have a preference, or could you offer any advice on which direction would be more consistent with the project's design? Any insights would be greatly appreciated. Thanks!

@sequencer
Copy link
Contributor

Based on the README, the semantic of pseudo is:

These are instructions which are aliases of regular instructions. Their encodings force certain restrictions over the regular instruction.

It means: the pseduo instruction can be covered by the original instruction.
For example, jalr can cover the ret encoding space, by constrains rs1 and imm to 0.
Generally, the pseduo instruction alias can provide to the hardware decoder with additional information for micro-architecture: for example, ret is special to pop from the RAS in the BPU.

So does the ?_rv32 mean a pseduo? I think it is, based on the pseduo semantic.
However, in this case, the original and pseudo instructions cannot live together, although the 32-bits version of these instructions are covered by 64-bits.

I think the true issue is the existence of the instructions with _rv32 suffix, which is actually the "old name" like fmv.x.s.

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

Successfully merging this pull request may close these issues.

2 participants
0