Skip to content

Instantly share code, notes, and snippets.

@tpmccallum
Created October 20, 2019 00:14
Show Gist options
  • Select an option

  • Save tpmccallum/28637eca1025d9fb825c7d9b8f5272f8 to your computer and use it in GitHub Desktop.

Select an option

Save tpmccallum/28637eca1025d9fb825c7d9b8f5272f8 to your computer and use it in GitHub Desktop.
function mstore(x1, x2, x3, x4, y1, y2, y3, y4) {
    let pos := u256_to_i32ptr(x1, x2, x3, x4)
    i64.store(pos, endian_swap(x1))
    i64.store(i64.add(pos, 8), endian_swap(x2))
    i64.store(i64.add(pos, 16), endian_swap(x3))
    i64.store(i64.add(pos, 24), endian_swap(x4))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment