[kvm-unit-test] Unable to build kvm-unit-test on little-endian PowerPC (lswx/lswi invalid when little-endian)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

We have found an issue while trying to build this test on little-endian PowerPC:
gcc -std=gnu99 -ffreestanding -O2 -msoft-float -mabi=no-altivec
-mno-altivec -I /home/ubuntu/upstream/kvm-unit-tests/lib -I
/home/ubuntu/upstream/kvm-unit-tests/lib/libfdt -I lib -Wa,-mregnames
-g -MMD -MF powerpc/.emulator.d -fno-strict-aliasing -fno-common -Wall
-Wwrite-strings -Wempty-body -Wuninitialized -Wignored-qualifiers
-Werror  -fomit-frame-pointer  -fno-stack-protector
-Wno-frame-address   -fno-pic  -no-pie  -Wclobbered
-Wunused-but-set-parameter  -Wmissing-parameter-type
-Wold-style-declaration -Woverride-init -Wmissing-prototypes
-Wstrict-prototypes -mlittle-endian   -c -o powerpc/emulator.o
powerpc/emulator.c
/tmp/ccO2j7oR.s: Assembler messages:
/tmp/ccO2j7oR.s:335: Error: `lswx' invalid when little-endian
/tmp/ccO2j7oR.s:381: Error: `lswx' invalid when little-endian
/tmp/ccO2j7oR.s:403: Error: `lswx' invalid when little-endian
/tmp/ccO2j7oR.s:432: Error: `lswx' invalid when little-endian
/tmp/ccO2j7oR.s:643: Error: `lswi' invalid when little-endian
/tmp/ccO2j7oR.s:669: Error: `lswi' invalid when little-endian
/tmp/ccO2j7oR.s:690: Error: `lswi' invalid when little-endian
make: *** [<builtin>: powerpc/emulator.o] Error 1

A quick search on the Internet [1] indicates this has something to do
with a new version of binutils:
commit 86c0f617ac5f3a5f4aab76c7f90255254ca27576
Author: Alan Modra <amo...@xxxxxxxxx>
Date:   Mon Aug 10 15:06:43 2020 +0930

    Error on lmw, lswi and related PowerPC insns when LE
            * config/tc-ppc.c (md_assemble): Error for lmw, stmw, lswi, lswx,
            stswi, or stswx in little-endian mode.
            * testsuite/gas/ppc/476.d,
            * testsuite/gas/ppc/476.s: Delete lmw, stmw, lswi, lswx, stswi,
stswx.
            * testsuite/gas/ppc/a2.d,
            * testsuite/gas/ppc/a2.s: Move lmw, stmw, lswi, lswx, stswi,
stswx..
            * testsuite/gas/ppc/be.d,
            * testsuite/gas/ppc/be.s: ..to here, new big-endian only test.
            * testsuite/gas/ppc/le_error.d,
            * testsuite/gas/ppc/le_error.l: New little-endian test.
            * testsuite/gas/ppc/ppc.exp: Run new tests.

Since this test is not expected to work with little-endian, maybe we
can modify the endianess check in powerpc/emulator.c to skip this test
code snippet?

Thanks
PHLin

[1] https://www.mail-archive.com/kde-bugs-dist@xxxxxxx/msg489085.html
BugLink: https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/1931534



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux