Skip to content

on loongarch host, LSX vec get wrong result

Host environment

  • Operating system: openEuler 22.03
  • OS/kernel version: 6.7.0-rc8+
  • Architecture: loongarch
  • QEMU flavor: qemu-loongarch64
  • QEMU version: 8.2.50
  • QEMU command line: qemu-loongarch64 test

Description of problem

on loongarch host, the lsx insns get wrong result.

Steps to reproduce

  1. build linux-user on loongarch host with '--configure --target-list ='loongarch64-linux-user''
  2. build test code 'gcc --static test.c -o test'
  3. run './build/qemu-loongarch64 test'

Additional information

run 'qemu-loongarch64 test' the result is

0: 2f2f2f2f 1: 0 2: 2f2f2f2f 3: 0 4: ffffffff 5: 0 6: ffffffff 7: ffffffff

and the 6 or 7 may be ffffff or 0.

run 'test' on loongarch host or run qemu-loongarch64 on x86_64 host. the result is

0: 2f2f2f2f 1: 0 2: 2f2f2f2f 3: 0 4: 0 5: 0 6: 0 7: 0

for more infomation see log.txt

Edited by Thomas Huth
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information