Skip to content

A bug in the instruction select on fast interpreter mode #4228

@erxiaozhou

Description

@erxiaozhou

Subject of the issue

According to the specification, the test case output should be the first operand (i.e., <0x0000000000000000 0x0000000000000000>:v128). However, the fast interpreter mode output the wrong result (i.e.,<0x0099055a00000000 0x6e28e1a119d541ac>:v128)

Test case

(module
  (type (;0;) (func))
  (type (;1;) (func (result v128)))
  (func (;0;) (type 1) (result v128)
    v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000
    v128.const i32x4 0x8aaed7e8 0x0099055a 0x19d541ac 0x6e28e1a1
    i32.const 2147483647
    select)
  (export "_start" (func 0))
  (export "to_test" (func 0)))

Your environment

  • Host OS : Ubuntu 20.04
  • WAMR version : 6593b3f
  • cpu architecture : x86-64
  • running mode : fast interpreter mode

Steps to reproduce

  1. transform the given wat to wasm
  2. use the fast interpreter mode to execute it

Expected behavior

Ourput

<0x0000000000000000 0x0000000000000000>:v128

Actual behavior

Ourput

<0x0099055a00000000 0x6e28e1a119d541ac>:v128

Extra Info

LLVM JIT mode works well.

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