Skip to content
Snippets Groups Projects
Unverified Commit 4302f74f authored by xermicus's avatar xermicus Committed by GitHub
Browse files

[pallet-revive] pack exceeding syscall arguments into registers (#7319)


This PR changes how we call runtime API methods with more than 6
arguments: They are no longer spilled to the stack but packed into
registers instead. Pointers are 32 bit wide so we can pack two of them
into a single 64 bit register. Since we mostly pass pointers, this
technique effectively increases the number of arguments we can pass
using the available registers.

To make this work for `instantiate` too we now pass the code hash and
the call data in the same buffer, akin to how the `create` family
opcodes work in the EVM. The code hash is fixed in size, implying the
start of the constructor call data.

---------

Signed-off-by: default avatarxermicus <cyrill@parity.io>
Signed-off-by: default avatarCyrill Leutwiler <bigcyrill@hotmail.com>
Co-authored-by: command-bot <>
Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: default avatarAlexander Theißen <alex.theissen@me.com>
parent e6aad5b0
No related merge requests found
Pipeline #513442 waiting for manual action with stages
in 33 minutes and 52 seconds
Showing
with 715 additions and 745 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment