[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 13/14] tests/tcg/arm: Use vmrs/vmsr instead of mcr/mrc
From: |
Richard Henderson |
Subject: |
[PATCH v4 13/14] tests/tcg/arm: Use vmrs/vmsr instead of mcr/mrc |
Date: |
Sun, 30 Jun 2024 12:00:49 -0700 |
Clang 14 generates
/home/rth/qemu/src/tests/tcg/arm/fcvt.c:431:9: error: invalid operand for
instruction
asm("mrc p10, 7, r1, cr1, cr0, 0\n\t"
^
<inline asm>:1:6: note: instantiated into assembly here
mrc p10, 7, r1, cr1, cr0, 0
^
/home/rth/qemu/src/tests/tcg/arm/fcvt.c:432:32: error: invalid operand for
instruction
"orr r1, r1, %[flags]\n\t"
^
<inline asm>:3:6: note: instantiated into assembly here
mcr p10, 7, r1, cr1, cr0, 0
^
This is perhaps a clang bug, but using the neon mnemonic is clearer.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tests/tcg/arm/fcvt.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tests/tcg/arm/fcvt.c b/tests/tcg/arm/fcvt.c
index d8c61cd29f..ecebbb0247 100644
--- a/tests/tcg/arm/fcvt.c
+++ b/tests/tcg/arm/fcvt.c
@@ -427,10 +427,9 @@ int main(int argc, char *argv[argc])
/* And now with ARM alternative FP16 */
#if defined(__arm__)
- /* See glibc sysdeps/arm/fpu_control.h */
- asm("mrc p10, 7, r1, cr1, cr0, 0\n\t"
+ asm("vmrs r1, fpscr\n\t"
"orr r1, r1, %[flags]\n\t"
- "mcr p10, 7, r1, cr1, cr0, 0\n\t"
+ "vmsr fpscr, r1"
: /* no output */ : [flags] "n" (1 << 26) : "r1" );
#else
asm("mrs x1, fpcr\n\t"
--
2.34.1
- [PATCH v4 04/14] tests/tcg/aarch64: Explicitly specify register width, (continued)
- [PATCH v4 04/14] tests/tcg/aarch64: Explicitly specify register width, Richard Henderson, 2024/06/30
- [PATCH v4 07/14] tests/tcg/aarch64: Add -fno-integrated-as for sme, Richard Henderson, 2024/06/30
- [PATCH v4 05/14] tests/tcg/aarch64: Fix irg operand type, Richard Henderson, 2024/06/30
- [PATCH v4 09/14] tests/tcg/arm: Drop -N from LDFLAGS, Richard Henderson, 2024/06/30
- [PATCH v4 03/14] tests/tcg/aarch64: Drop -fno-tree-loop-distribute-patterns, Richard Henderson, 2024/06/30
- [PATCH v4 10/14] tests/tcg/arm: Use -fno-integrated-as for test-arm-iwmmxt, Richard Henderson, 2024/06/30
- [PATCH v4 08/14] tests/tcg/arm: Fix fcvt result messages, Richard Henderson, 2024/06/30
- [PATCH v4 14/14] linux-user/main: Suppress out-of-range comparison warning for clang, Richard Henderson, 2024/06/30
- [PATCH v4 11/14] tests/tcg/arm: Manually register allocate half-precision numbers, Richard Henderson, 2024/06/30
- [PATCH v4 12/14] tests/tcg/arm: Use -march and -mfpu for fcvt, Richard Henderson, 2024/06/30
- [PATCH v4 13/14] tests/tcg/arm: Use vmrs/vmsr instead of mcr/mrc,
Richard Henderson <=