Skip to content

Wasm2JS double heap assignments get split into two i32 assignments. #13365

Open
WebAssembly/binaryen
#4083
@juj

Description

@juj

In juj/wasm_webgpu@4c2600b, I have the following code:

  WGpuRenderPassColorAttachment colorAttachment = {};
  ...
  colorAttachment.loadColor[3] = 0.05;

here loadColor struct member is of type double loadColor[4]. When building with WASM2JS, I see

HEAP32[$1 + 88 >> 2] = -1259857073;
HEAP32[$1 + 92 >> 2] = 1063997057;

getting generated for the double number heap set operation, instead of a

HEAPF64[$1 + 88 >> 3] = 0.05;

I wonder if this is some special case, or if Wasm2JS does not do HEAPF64 assignments?

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