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

Add all SIMD operations into switch, implement V128 comparison operations. #3833

Commits on Oct 15, 2024

  1. Add all SIMD operations into wasm_interp_fast switch

    James Marsh committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    5b2ab61 View commit details
    Browse the repository at this point in the history
  2. Add V128 comparison operations

    Tested using
    ```
    (module
      (import "wasi_snapshot_preview1" "proc_exit" (func $proc_exit (param i32)))
    
      (memory (export "memory") 1)
    
      (func $assert_true (param v128)
        local.get 0
        v128.any_true
        i32.eqz
        if
          unreachable
        end
      )
    
      (func $main (export "_start")
        ;; Test v128.not
        v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
        v128.not
        v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
        i8x16.eq
        call $assert_true
    
        ;; Test v128.and
        v128.const i8x16 255 255 255 255 0 0 0 0 255 255 255 255 0 0 0 0
        v128.const i8x16 255 255 0 0 255 255 0 0 255 255 0 0 255 255 0 0
        v128.and
        v128.const i8x16 255 255 0 0 0 0 0 0 255 255 0 0 0 0 0 0
        i8x16.eq
        call $assert_true
    
        ;; Test v128.andnot
        v128.const i8x16 255 255 255 255 0 0 0 0 255 255 255 255 0 0 0 0
        v128.const i8x16 255 255 0 0 255 255 0 0 255 255 0 0 255 255 0 0
        v128.andnot
        v128.const i8x16 0 0 255 255 0 0 0 0 0 0 255 255 0 0 0 0
        i8x16.eq
        call $assert_true
    
        ;; Test v128.or
        v128.const i8x16 255 255 0 0 0 0 255 255 255 255 0 0 0 0 255 0
        v128.const i8x16 0 0 255 255 255 255 0 0 0 0 255 255 255 255 0 0
        v128.or
        v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 0
        i8x16.eq
        call $assert_true
    
        ;; Test v128.xor
        v128.const i8x16 255 255 0 0 255 255 0 0 255 255 0 0 255 255 0 0
        v128.const i8x16 255 255 255 255 0 0 0 0 255 255 255 255 0 0 0 0
        v128.xor
        v128.const i8x16 0 0 255 255 255 255 0 0 0 0 255 255 255 255 0 0
        i8x16.eq
        call $assert_true
    
        i32.const 0
        call $proc_exit
      )
    )
    ```
    James Marsh committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    c1bfe2a View commit details
    Browse the repository at this point in the history