6 Commits

Author SHA1 Message Date
Daniel Lubarov
aaf7ace396 Remove JUMPDESTs 2022-09-04 22:31:56 -07:00
Daniel Lubarov
616eb618f2 Support macro-local labels
Again borrowing syntax from NASM. Example from the test:

    %macro spin
    %%start:
        PUSH %%start
        JUMP
    %endmacro

One thing this lets us do is create "wrapper" macros which call a function, then return to the code immediately following the macro call, such as

    %macro decode_rlp_scalar
        %stack (pos) -> (pos, %%after)
        %jump(decode_rlp_scalar)
    %%after:
    %endmacro

I used this to clean up `type_0.asm`.

However, since such macros need to insert `%%after` beneath any arguments in the stack, using them will be suboptimal in some cases. I wouldn't worry about it generally, but we might want to avoid them in performance-critical code, or functions with many arguments like `memcpy`.
2022-08-04 12:32:20 -07:00
Daniel Lubarov
d6b5193c9b RLP decoding tests 2022-07-31 20:29:57 -07:00
Daniel Lubarov
3d8ac2a391 style 2022-07-26 16:25:01 -07:00
Daniel Lubarov
05c7dfa115 Feedback 2022-07-25 16:32:59 -07:00
Daniel Lubarov
544c84b420 Transaction (RLP) parsing
Will add tests once we have the interpreter support for other segmnets.
2022-07-23 21:39:01 -07:00