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

operands are out of order #26

Closed
ThinkOpenly opened this issue Jun 11, 2024 · 3 comments
Closed

operands are out of order #26

ThinkOpenly opened this issue Jun 11, 2024 · 3 comments

Comments

@ThinkOpenly
Copy link
Owner

I made an unfortunate choice long ago to pull operands from the "function signature" of the function clause execute instances. The order of the inputs there need not match the order of the operands in the assembly syntax, and indeed there might be inputs which are not operands. For example, the vaadd.vv instruction's assembly syntax is:

vaadd.vv vd,vs2,vs1[,vm]

However, the function clause execute signature looks like:

function clause execute(MVVTYPE(funct6, vm, vs2, vs1, vd))

Here, there is an extra input, "funct6", and the operands are in fairly random order. This is also true of the signature for the other stanzas, including mapping clause encdec and mapping clause assembly.

The operands, not surprisingly, are well represented in the actual assembly syntax in mapping clause assembly:

mapping clause assembly = MVVTYPE(funct6, vm, vs2, vs1, vd)
  <-> mvvtype_mnemonic(funct6) ^ spc() ^ vreg_name(vd) ^ sep() ^ vreg_name(vs2) ^ sep() ^ vreg_name(vs1) ^ maybe_vmask(vm)

The latter line there translates fairly easily into vaadd.vv vd,vs2,vs1[,vm].

I think we need to move the operand extraction from the function clause execute processing to the mapping clause assembly processing, if possible.

@Shubhf
Copy link

Shubhf commented Jul 31, 2024

Hey Can I take up this issue?

@ThinkOpenly
Copy link
Owner Author

Hey Can I take up this issue?

@Shubhf Thanks for the offer. @Linda-Njau has been working on this, and it quite close, in #34 .

@ThinkOpenly
Copy link
Owner Author

Fixed by #34, that is now merged.

Closing...

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

2 participants