Closed Linda-Njau closed 1 month ago
I have also renamed the function for more clarity.
pre-filter
to filter_non_operands
extract
to extract_operands
extract_operands
to extract_and_map_operands
@ThinkOpenly, I made the changes to address your comments.
This PR addresses the issue described in issue #26 by correcting the order of operands in the JSON output. Previously, operands were extracted from the function clause, but this change extracts them from the right-hand side of the assembly clause. Additionally, non-operand inputs are now filtered out.
To properly match operands to their respective types, the structure of operands stored in the Hashtbl operands has been updated. The previous structure was a simple list of names:
WXTYPE: funct6, vm, vs2, rs1, vd
The new structure stores a list of tuples, each containing a name and its type value:
WXTYPE: (vd, regidx), (vs2, regidx), (rs1, regidx), (vm, bits(1))
From the example above note: