xref: /qemu/tests/tcg/aarch64/test-2375.c (revision 9de2049c)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* Copyright (c) 2024 Linaro Ltd */
3 /* See https://gitlab.com/qemu-project/qemu/-/issues/2375 */
4 
5 #include <assert.h>
6 
7 int main(void)
8 {
9    int r, z;
10 
11    asm("msr fpcr, %2\n\t"
12        "fjcvtzs %w0, %d3\n\t"
13        "cset %1, eq"
14        : "=r"(r), "=r"(z)
15        : "r"(0x01000000L),      /* FZ = 1 */
16          "w"(0xfcff00L));       /* denormal */
17 
18     assert(r == 0);
19     assert(z == 0);
20     return 0;
21 }
22