f64.load
Takes 64 bits (8 bytes) of memory from the given location, looks at the binary data as the form of a f64 floating point data, creates a f64 value from it, and then pushes it onto to the stack.

Syntax

f64.load offset=n align=n

Parameters

offset Optional
A numeric value that gives an extra offset to the memory location given. Must be a positive value. Can be written as a decimal number or using the 0x00 hexadecimal notation. If the memory location is 8 and you add an extra offset of 2, then the final memory location is 10. This is useful if you are using a data structure with fields at different locations inside.
align Optional
Gives information to the machine running the application about the alignment that could be used when setting the location of the memory. This can only be 0, 1, 2, or 4. You will not see any difference and it may not even be used. It is more of a hint than a command.

Stack In

i32 Memory offset location to get the data from.

Stack Out

f64 The floating point value that was stored in memory.

Examples

;; Memory: 
;; 0x00, 0x00, 0x89, 0x41
;; 0x60, 0xE5, 0xD0, 0x22
;; 0x09, 0x40, 0x00, 0x00
;; 0x00, 0x00, 0x00, 0x00
  
;; Push the i32 memory offset value location onto the stack
i32.const 2

;; Pop the memory location off the stack, get the memory
;; at the given location, convert it into a f64 value and
;; push the value onto the stack
f64.load

;; The stack contains an f64 value of 3.142
;; Memory: 
;; 0x00, 0x00, 0x00, 0x00
;; 0x89, 0x41, 0x60, 0xE5
;; 0xD0, 0x22, 0x09, 0x40
;; 0x00, 0x00, 0x00, 0x00
  
;; Push the i32 memory offset value location onto the stack
i32.const 2

;; Pop the memory location off the stack, get the memory
;; at the given location, convert it into a f64 value and
;; push the value onto the stack
f64.load offset=2

;; The stack contains an f64 value of 3.142