plugeth/core/asm
Michael Forney b0b277525c core/asm: assembly parser label fixes (#20210)
* core/asm: Fix encoding of pushed labels

EVM uses big-endian byte-order, so to pad a label value to 4 bytes,
zeros must be added to the front, not the end.

* core/asm: Fix PC calculations when a label is pushed

Incrementing PC by 5 is only correct if the label appears after a jump,
in which case there is an implicit push. When it appears after an explicit
push, PC should only be incremented by 4.

* core/asm: Allow JUMP with no argument

This way, a label can be pushed explicitly, or loaded from memory to
implement a jump table.
2019-10-29 13:47:18 +01:00
..
asm_test.go core, core/vm, cmd/disasm: unify procedures for disassembling evm code (#3530) 2017-02-27 12:21:19 +01:00
asm.go core/asm: Use hexadecimal addresses in assembly dumps (#17870) 2018-10-09 10:27:07 +03:00
compiler_test.go core/asm: assembly parser label fixes (#20210) 2019-10-29 13:47:18 +01:00
compiler.go core/asm: assembly parser label fixes (#20210) 2019-10-29 13:47:18 +01:00
lex_test.go asm: remove unused parameter for function Lex (#18058) 2019-03-14 10:35:55 +01:00
lexer.go asm: remove unused parameter for function Lex (#18058) 2019-03-14 10:35:55 +01:00