tests/tcg/arm: Remove test-arm-iwmmxt test

The test-arm-iwmmmxt test isn't testing what it thinks it's testing.

If you run it with a CPU type that supports iwMMXt then it will crash
immediately with a SIGILL, because (even with -marm) GCC will link it
against startup code that is in Thumb mode, and no iwMMXt CPU has
Thumb:

00010338 <_start>:
   10338:       f04f 0b00       mov.w   fp, #0
   1033c:       f04f 0e00       mov.w   lr, #0

If you run it with a CPU type which does *not* support iwMMXt, which
is what 'make check-tcg' does, then QEMU will not try to handle the
insns as iwMMXt.  Instead the translator turns them into illegal
instructions.  Then in the linux-user cpu_loop() code we identify
them as FPA11 instructions inside emulate_arm_fpa11(), because the
FPA11 happened to use the same coprocessor number as these iwMMXt
insns.  So we execute a completely different set of FPA11 insns,
which means we don't crash, but we will print garbage to stdout.
Then the test binary always exits with a 0 return code, so 'make
check-tcg' thinks the test passes.

Modern gnueabihf toolchains assume in their startup code that the CPU
is not so old as to not support Thumb, so there's no way to get them
to generate a binary that actually does what the test wants.  Since
we're deprecating iwMMXt emulation anyway, it's not worth trying to
salvage the test case to get it to really test the iwMMXt insns.

Delete the test entirely.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20250127112715.2936555-3-peter.maydell@linaro.org
This commit is contained in:
Peter Maydell 2025-02-07 16:09:18 +00:00
parent 5a3c49dedf
commit 86f847a39a
3 changed files with 0 additions and 61 deletions

View File

@ -20,13 +20,6 @@ ARM_TESTS = hello-arm
hello-arm: CFLAGS+=-marm -ffreestanding -fno-stack-protector
hello-arm: LDFLAGS+=-nostdlib
# IWMXT floating point extensions
ARM_TESTS += test-arm-iwmmxt
# Clang assembler does not support IWMXT, so use the external assembler.
test-arm-iwmmxt: CFLAGS += -marm -march=iwmmxt -mabi=aapcs -mfpu=fpv4-sp-d16 $(CROSS_CC_HAS_FNIA)
test-arm-iwmmxt: test-arm-iwmmxt.S
$(CC) $(CFLAGS) -Wa,--noexecstack $< -o $@ $(LDFLAGS)
# Float-convert Tests
ARM_TESTS += fcvt
fcvt: LDFLAGS += -lm

View File

@ -4,8 +4,3 @@ hello-arm
---------
A very simple inline assembly, write syscall based hello world
test-arm-iwmmxt
---------------
A simple test case for older iwmmxt extended ARMs

View File

@ -1,49 +0,0 @@
@ Checks whether iwMMXt is functional.
.code 32
.globl main
main:
ldr r0, =data0
ldr r1, =data1
ldr r2, =data2
#ifndef FPA
wldrd wr0, [r0, #0]
wldrd wr1, [r0, #8]
wldrd wr2, [r1, #0]
wldrd wr3, [r1, #8]
wsubb wr2, wr2, wr0
wsubb wr3, wr3, wr1
wldrd wr0, [r2, #0]
wldrd wr1, [r2, #8]
waddb wr0, wr0, wr2
waddb wr1, wr1, wr3
wstrd wr0, [r2, #0]
wstrd wr1, [r2, #8]
#else
ldfe f0, [r0, #0]
ldfe f1, [r0, #8]
ldfe f2, [r1, #0]
ldfe f3, [r1, #8]
adfdp f2, f2, f0
adfdp f3, f3, f1
ldfe f0, [r2, #0]
ldfe f1, [r2, #8]
adfd f0, f0, f2
adfd f1, f1, f3
stfe f0, [r2, #0]
stfe f1, [r2, #8]
#endif
mov r0, #1
mov r1, r2
mov r2, #0x11
swi #0x900004
mov r0, #0
swi #0x900001
.data
data0:
.string "aaaabbbbccccdddd"
data1:
.string "bbbbccccddddeeee"
data2:
.string "hvLLWs\x1fsdrs9\x1fNJ-\n"