HomeSource World

core/asm: assembly parser label fixes (#20210)

Authored by Michael Forney <> on Oct 29 2019, 12:47 PM.


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.


Felix Lange <>Oct 29 2019, 12:47 PM
rGETHecdbb402ee08: trie: remove node ordering slice in sync batch (#19929)

Event Timeline

Felix Lange <> committed rGETHb0b277525cb4: core/asm: assembly parser label fixes (#20210) (authored by Michael Forney <>).Oct 29 2019, 12:47 PM