[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 18/40] tests/tcg/arm: Use vmrs/vmsr instead of mcr/mrc
From: |
Alex Bennée |
Subject: |
[PATCH v2 18/40] tests/tcg/arm: Use vmrs/vmsr instead of mcr/mrc |
Date: |
Fri, 5 Jul 2024 09:40:25 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
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>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20240630190050.160642-14-richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@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.39.2
- [PATCH v2 03/40] tracepoints: move physmem trace points, (continued)
- [PATCH v2 03/40] tracepoints: move physmem trace points, Alex Bennée, 2024/07/05
- [PATCH v2 01/40] tests/lcitool: fix debian-i686-cross toolchain prefix, Alex Bennée, 2024/07/05
- [PATCH v2 04/40] hw/core: ensure kernel_end never gets used undefined, Alex Bennée, 2024/07/05
- [PATCH v2 07/40] tests/tcg: Adjust variable defintion from cc-option, Alex Bennée, 2024/07/05
- [PATCH v2 06/40] tests/tcg/minilib: Constify digits in print_num, Alex Bennée, 2024/07/05
- [PATCH v2 05/40] tests/docker: Specify --userns keep-id for Podman, Alex Bennée, 2024/07/05
- [PATCH v2 10/40] tests/tcg/aarch64: Fix irg operand type, Alex Bennée, 2024/07/05
- [PATCH v2 08/40] tests/tcg/aarch64: Drop -fno-tree-loop-distribute-patterns, Alex Bennée, 2024/07/05
- [PATCH v2 15/40] tests/tcg/arm: Use -fno-integrated-as for test-arm-iwmmxt, Alex Bennée, 2024/07/05
- [PATCH v2 18/40] tests/tcg/arm: Use vmrs/vmsr instead of mcr/mrc,
Alex Bennée <=
- [PATCH v2 09/40] tests/tcg/aarch64: Explicitly specify register width, Alex Bennée, 2024/07/05
- [PATCH v2 17/40] tests/tcg/arm: Use -march and -mfpu for fcvt, Alex Bennée, 2024/07/05
- [PATCH v2 20/40] gitlab: don't bother with KVM for TCI builds, Alex Bennée, 2024/07/05
[PATCH v2 22/40] test/plugins: preserve the instruction record over translations, Alex Bennée, 2024/07/05