All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Po-Hsu Lin <po-hsu.lin@canonical.com>
To: kvm@vger.kernel.org
Subject: [kvm-unit-test] Unable to build kvm-unit-test on little-endian PowerPC (lswx/lswi invalid when little-endian)
Date: Thu, 10 Jun 2021 18:44:35 +0800	[thread overview]
Message-ID: <CAMy_GT_BnuUBjNhNpSP4ZRXCs5vcXcfTM3qxfE=4CkC39_jTpw@mail.gmail.com> (raw)

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...@gmail.com>
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@kde.org/msg489085.html
BugLink: https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/1931534

                 reply	other threads:[~2021-06-10 10:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMy_GT_BnuUBjNhNpSP4ZRXCs5vcXcfTM3qxfE=4CkC39_jTpw@mail.gmail.com' \
    --to=po-hsu.lin@canonical.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.