erigon-pulse/core/asm
Michael Forney ccbacdf8e1 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-12-03 13:05:34 +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 Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
compiler_test.go core/asm: assembly parser label fixes (#20210) 2019-12-03 13:05:34 +01:00
compiler.go core/asm: assembly parser label fixes (#20210) 2019-12-03 13:05:34 +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