Miden assembly instruction format #678
hackaugusto
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The current instructions have a few inconsistencies that would be nice to fix. This mostly boils down to how the noun is separated from the verb on some instructions.
Some times there is no separation character, e.g.
ext2sub
, sometimes there are, e.g.loc_load
.Most of the times
.
separates arguments, e.g.push.1
, but is used as a part of the instruction name, e.g.adv.mem
. Sometimes the type of the value is expressed in the instruction, e.g.u32checked_add
, sometimes it is not, e.g.and
(type is bool).We could come up with a consistent naming, I'm not sure if it would be worth it now. We could also try to rename a few of the instructions so that the format is more consistent, if the amount of extra work is small. Or just do nothing :)
Here is an assortment of suggestions:
assertz
->assert_eqz
(orassert_eq
->asserteq
)locaddr
->loc_addr
adv.mem
->advmem_load
and
->band
or
->bor
xor
->bxor
There are ofcourse other changes that could be done, I'm just not sure if it is worth the work
Beta Was this translation helpful? Give feedback.
All reactions