Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v128.store8_lane() etc are improperly declared. #2696

Closed
petercockerell-brt opened this issue Apr 27, 2023 · 0 comments · Fixed by #2697
Closed

v128.store8_lane() etc are improperly declared. #2696

petercockerell-brt opened this issue Apr 27, 2023 · 0 comments · Fixed by #2697
Labels

Comments

@petercockerell-brt
Copy link

Bug description

I'm trying to compile some code that uses v128.store8_lane():

      v128.store8_lane(i, v, 0, CHANNEL_R);

But I get the following compiler error:

[wasm-validator error in function src/assembly/wasm-util/wBayerToImageData] unexpected false: can only drop a valid value, on 
(drop
 (v128.store8_lane 0
  (local.get $35)
  (local.get $38)
 )
)

This seems to be because the declaration of the function is:

  export function store8_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;

implying that it returns a value. However, the specification at https://github.com/WebAssembly/simd/blob/main/proposals/simd/SIMD.md implies there is no result left on the stack after one of these instructions, so the drop() is unnecessary.

Steps to reproduce

Compile an AssemblyScript function that uses the v128.store8_lane() function.

AssemblyScript version

0.27.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant