-
Notifications
You must be signed in to change notification settings - Fork 303
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
Added Pseudo-instructions from F and D. Allow for instructions to have a special field. #279
Added Pseudo-instructions from F and D. Allow for instructions to have a special field. #279
Conversation
…e a special field Signed-off-by: Afonso Oliveira <Afonso.Oliveira@synopsys.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep things symmetric, can you add the analogous pseudoinstructions for Zfh and Q, too?
Sorry to get back on this but I'm actually having a hard time finding "Zfh" and ''Q'' pseudo-instructions since I believe they aren't in the ASM Manual and I also could not find them in the ISA spec, is there somewhere you can point me to so I can indeed add them here? |
It's possible that someone forgot to update the asm manual, but Zfh and Q have exactly analogous pseudoinstructions (fmv.h, fabs.h, fneg.h; fmv.q, fabs.q, fneg.q). Binutils implements them, for example. We should include them here, this repo being the source of truth, then update the asm manual accordingly. |
Thank you for clarifying and linking the binutils! Latest commit should address all of this. |
0935a89
to
e3d0e74
Compare
e3d0e74
to
6164d93
Compare
Signed-off-by: Afonso Oliveira <Afonso.Oliveira@synopsys.com>
…he same name. (JAL and JALR case) Signed-off-by: Afonso Oliveira <Afonso.Oliveira@synopsys.com>
6164d93
to
5132029
Compare
All should now be solved. Sorry for the mess and the copy-paste error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AFOliveira no prob, that's what code review is for!
This time there was a need to modify parse.py a tiny bit in order to fully accommodate all pseudo-instructions.
Since parse.py did not allow to have pseudoinstructions with the two of the same register(e.g. fmv_s rs, rs) due to how it parses, I created a work around, that I succesfully checked does not break any of the pre-existing instructions. It allows that a register is equalled to anything, as in, "rs2=rs1" and uses the "rs2" to know it's position in encoding.
Adittionally, I added the following pseudo-instructions:
F
fmv.s
fabs.s
fneg.s
D
fmv.d
fabs.d
fneg.d