Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/base/float-point-frm-run.h

raw
1 #ifndef FLOAT_POINT_FRM_RUN_H
2 #define FLOAT_POINT_FRM_RUN_H
3
4 static void
5 assert_equal (int a, int b, char *message)
6 {
7 if (a != b)
8 {
9 printf ("%s, but get %d != %d\n", message, a, b);
10 __builtin_abort ();
11 }
12 }
13
14 static int
15 get_frm ()
16 {
17 int frm = -1;
18
19 __asm__ volatile (
20 "frrm %0"
21 :"=r"(frm)
22 :
23 :
24 );
25
26 return frm;
27 }
28
29 static void
30 set_frm (int frm)
31 {
32 __asm__ volatile (
33 "fsrm %0"
34 :
35 :"r"(frm)
36 :
37 );
38 }
39
40 #endif