Wasm instruction ambiguity for sign-extension?

66 views Asked by At

Are there any differences with respect to the effect of i64.extend32_s and i64.extend_i32_s or are they just duplicates?

I'm trying to implement a toy compiler/interpreter lib for wasm, and the specification/documentation are not clear about it, but it is kinda important for correctness.

1

There are 1 answers

0
kam On

I have just asked the formal working group for WASM.

Answer:

i64.extend32_s has type signature i64 -> i64

i64.extend_i32_s had type signature i32 -> i64

hence the difference is in input