Minres / RISCV_ISA_CoreDSL

CoreDSL descriptions of the RISC-V ISA
Apache License 2.0
4 stars 11 forks source link

Update assembly lines (Mnemonics) #11

Closed PhilippvK closed 5 months ago

PhilippvK commented 1 year ago

Changes

PhilippvK commented 1 year ago

@eyck Could you please have a look. I just learned that name(…) should make use of the aliases defined for the individual (GPR) registers. If that is the case I could rename fname to name and add the proper aliases for the 32 Float Regs instead.

eyck commented 1 year ago

Actually there is no specification of the asm format stirng set. So this is free form (a bit inspired by Python f strings) and since fstrings allow to call functions within the braces I introduced the name() function to look up the ABI names of the GPRs from register numbers. Are there aliases for the AF registers? If so we can keep the fname() in the format string otherwise it is totally legal (and it was orignally this way) to write "f{rd}, f{rs1}, f{rs2}" which is supposed to result in something like f3, f7, f9

PhilippvK commented 1 year ago

The RISC-V calling convection defines names for the F0-F31 registers, thus we should probably use/implement them.

IMG_1546

eyck commented 1 year ago

I see, so we should keep the fname() function for the format strings. Maybe we should rename them to gpr_name and fp_name?

PhilippvK commented 1 year ago

@wysiwyng WDYT?

PhilippvK commented 5 months ago

@eyck I think we should finally get this merged...

I saw that there is a huge gap between the master and develop branch. Are you going to update master anytime soon? If not, I guess I should rather make a new PR based on develop.

eyck commented 5 months ago

@PhilippvK Can you pls. check https://github.com/Minres/RISCV_ISA_CoreDSL/tree/tum-ei-eda-mnemonics-pr if I got all changes?

PhilippvK commented 5 months ago

@eyck looks fine for me. In case some mnemonics are missing, we can just add them in a follow-up PR. The CoreDSL passes the M2-ISA-R parser.

I realized that tum-ei-eda-mnemonics-pr needs to be rebased on your master to eliminate the conflicts...