Sha256: 1ebdc90de48f13e6474ee17c406578fc090ff61e57c1f560ecf6e6b75c7ef10a

Contents?: true

Size: 1.65 KB

Versions: 38

Compression:

Stored size: 1.65 KB

Contents

#include "psm.h"

# Note that this function is not compiled when this package is uploaded to
# crates.io, this source is only here as a reference for how the corresponding
# wasm32.o was generated. This file can be compiled with:
#
#    cpp psm/src/arch/wasm32.s | llvm-mc -o psm/src/arch/wasm32.o --arch=wasm32 -filetype=obj
#
# where you'll want to ensure that `llvm-mc` is from a relatively recent
# version of LLVM.

.globaltype __stack_pointer, i32

.globl rust_psm_stack_direction
.type rust_psm_stack_direction,@function
rust_psm_stack_direction:
.functype rust_psm_stack_direction () -> (i32)
    i32.const STACK_DIRECTION_DESCENDING
    end_function

.globl rust_psm_stack_pointer
.type rust_psm_stack_pointer,@function
rust_psm_stack_pointer:
.functype rust_psm_stack_pointer () -> (i32)
    global.get __stack_pointer
    end_function

.globl rust_psm_on_stack
.type rust_psm_on_stack,@function
rust_psm_on_stack:
.functype rust_psm_on_stack (i32, i32, i32, i32) -> ()
    # get our new stack argument, then save the old stack
    # pointer into that local
    local.get 3
    global.get __stack_pointer
    local.set 3
    global.set __stack_pointer

    # Call our indirect function specified
    local.get 0
    local.get 1
    local.get 2
    call_indirect (i32, i32) -> ()

    # restore the stack pointer before returning
    local.get 3
    global.set __stack_pointer
    end_function

.globl rust_psm_replace_stack
.type rust_psm_replace_stack,@function
rust_psm_replace_stack:
.functype rust_psm_replace_stack (i32, i32, i32) -> ()
    local.get 2
    global.set __stack_pointer
    local.get 0
    local.get 1
    call_indirect (i32) -> ()
    unreachable
    end_function

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/psm-0.1.24/src/arch/wasm32.s
wasmtime-28.0.0 ./ext/cargo-vendor/psm-0.1.24/src/arch/wasm32.s
wasmtime-27.0.0 ./ext/cargo-vendor/psm-0.1.24/src/arch/wasm32.s
wasmtime-26.0.0 ./ext/cargo-vendor/psm-0.1.23/src/arch/wasm32.s
wasmtime-25.0.2 ./ext/cargo-vendor/psm-0.1.21/src/arch/wasm32.s
wasmtime-25.0.1 ./ext/cargo-vendor/psm-0.1.21/src/arch/wasm32.s
wasmtime-25.0.0 ./ext/cargo-vendor/psm-0.1.21/src/arch/wasm32.s
wasmtime-24.0.0 ./ext/cargo-vendor/psm-0.1.21/src/arch/wasm32.s
wasmtime-23.0.2 ./ext/cargo-vendor/psm-0.1.21/src/arch/wasm32.s
wasmtime-22.0.0 ./ext/cargo-vendor/psm-0.1.21/src/arch/wasm32.s
wasmtime-21.0.1 ./ext/cargo-vendor/psm-0.1.21/src/arch/wasm32.s
wasmtime-20.0.2 ./ext/cargo-vendor/psm-0.1.21/src/arch/wasm32.s
wasmtime-20.0.0 ./ext/cargo-vendor/psm-0.1.21/src/arch/wasm32.s
wasmtime-18.0.3 ./ext/cargo-vendor/psm-0.1.21/src/arch/wasm32.s
wasmtime-17.0.1 ./ext/cargo-vendor/psm-0.1.21/src/arch/wasm32.s
wasmtime-17.0.0 ./ext/cargo-vendor/psm-0.1.21/src/arch/wasm32.s
wasmtime-16.0.0 ./ext/cargo-vendor/psm-0.1.21/src/arch/wasm32.s
wasmtime-15.0.1 ./ext/cargo-vendor/psm-0.1.21/src/arch/wasm32.s
wasmtime-15.0.0 ./ext/cargo-vendor/psm-0.1.21/src/arch/wasm32.s
wasmtime-14.0.4 ./ext/cargo-vendor/psm-0.1.21/src/arch/wasm32.s