aboutsummaryrefslogtreecommitdiff
path: root/tests/tcg/aarch64/test-2375.c
blob: 84c7e7de7163fa5615c8912c18b4321b95f98078 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* SPDX-License-Identifier: GPL-2.0-or-later */
/* Copyright (c) 2024 Linaro Ltd */
/* See https://gitlab.com/qemu-project/qemu/-/issues/2375 */

#include <assert.h>

int main(void)
{
   int r, z;

   asm("msr fpcr, %2\n\t"
       "fjcvtzs %w0, %d3\n\t"
       "cset %1, eq"
       : "=r"(r), "=r"(z)
       : "r"(0x01000000L),      /* FZ = 1 */
         "w"(0xfcff00L));       /* denormal */

    assert(r == 0);
    assert(z == 0);
    return 0;
}