Skip to content

load_global after store_global doesn't return the value? #56

@marianoguerra

Description

@marianoguerra

hi, the following code returns 0 for the 3 expressions in comments at the bottom.

shouldn't the last one return 32?

(module
   (global $rx0 i32)

   (func $gx0 (load_global $rx0))
   (func $sx0 (param i32) (store_global $rx0 (get_local 0)))

   (export "gx0" $gx0)
   (export "sx0" $gx0)

   (;
    (invoke "gx0") ;; returns 0
    (invoke "sx0" (i32.const 32)) ;; returns 0
    (invoke "gx0") ;; returns 0, should return 32?
   ;)
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions