i64.extend_i32_s
Pops an i32 value off the stack, converts it into an i64 value, and then pushes it back on to the stack. This looks at the i32 value as a signed integer (can be negative). If the value is negative then the result will be too.

Syntax

i64.extend_i32_s

Stack In

i32 The value to be converted.

Stack Out

i64 The i64 version of the i32 value.

Examples

;; Convert i32 0x12345678 (305419896) into an i64 value
i64.const 0x12345678
i64.extend_i32_s

;; The stack contains an i64 value of 0x0000000012345678
;; Convert i32 0xAB124129 (-1424867031) into an i64 value
i64.const 0xAB124129
i64.extend_i32_s

;; The stack contains an i64 value of 0xFFFFFFFFAB124129