1 #if XCHAL_HAVE_DFP || XCHAL_HAVE_FP_DIV
7 #define FCR_RM_NEAREST 0
10 #define FCR_RM_FLOOR 3
12 #define FSR__ 0x00000000
13 #define FSR_I 0x00000080
14 #define FSR_U 0x00000100
15 #define FSR_O 0x00000200
16 #define FSR_Z 0x00000400
17 #define FSR_V 0x00000800
19 #define FSR_UI (FSR_U | FSR_I)
20 #define FSR_OI (FSR_O | FSR_I)
22 #define F32_0 0x00000000
23 #define F32_0_5 0x3f000000
24 #define F32_1 0x3f800000
25 #define F32_MAX 0x7f7fffff
26 #define F32_PINF 0x7f800000
27 #define F32_NINF 0xff800000
29 #define F32_DNAN 0x7fc00000
30 #define F32_SNAN(v) (0x7f800000 | (v))
31 #define F32_QNAN(v) (0x7fc00000 | (v))
33 #define F32_MINUS 0x80000000
35 #define F64_0 0x0000000000000000
36 #define F64_MIN_NORM 0x0010000000000000
37 #define F64_1 0x3ff0000000000000
38 #define F64_MAX_2 0x7fe0000000000000
39 #define F64_MAX 0x7fefffffffffffff
40 #define F64_PINF 0x7ff0000000000000
41 #define F64_NINF 0xfff0000000000000
43 #define F64_DNAN 0x7ff8000000000000
44 #define F64_SNAN(v) (0x7ff0000000000000 | (v))
45 #define F64_QNAN(v) (0x7ff8000000000000 | (v))
47 #define F64_MINUS 0x8000000000000000
49 .macro test_op1_rm op
, fr0
, fr1
, v0
, r
, sr
54 check_res
\fr
1, \r, \sr
57 .macro test_op2_rm op
, fr0
, fr1
, fr2
, v0
, v1
, r
, sr
63 check_res
\fr
2, \r, \sr
66 .macro test_op3_rm op
, fr0
, fr1
, fr2
, fr3
, v0
, v1
, v2
, r
, sr
73 check_res
\fr
3, \r, \sr
76 .macro test_op1_ex op
, fr0
, fr1
, v0
, rm
, r
, sr
79 test_op1_rm \op
, \fr
0, \fr
1, \v0, \r, \sr
82 test_op1_rm \op
, \fr
0, \fr
1, \v0, \r, \sr
85 .macro test_op2_ex op
, fr0
, fr1
, fr2
, v0
, v1
, rm
, r
, sr
88 test_op2_rm \op
, \fr
0, \fr
1, \fr
2, \v0, \v1, \r, \sr
91 test_op2_rm \op
, \fr
0, \fr
1, \fr
2, \v0, \v1, \r, \sr
94 .macro test_op3_ex op
, fr0
, fr1
, fr2
, fr3
, v0
, v1
, v2
, rm
, r
, sr
97 test_op3_rm \op
, \fr
0, \fr
1, \fr
2, \fr
3, \v0, \v1, \v2, \r, \sr
100 test_op3_rm \op
, \fr
0, \fr
1, \fr
2, \fr
3, \v0, \v1, \v2, \r, \sr
103 .macro test_op1 op
, fr0
, fr1
, v0
, r0
, r1
, r2
, r3
, sr0
, sr1
, sr2
, sr3
104 test_op1_ex \op
, \fr
0, \fr
1, \v0, 0, \r0, \sr0
105 test_op1_ex \op
, \fr
0, \fr
1, \v0, 1, \r1, \sr1
106 test_op1_ex \op
, \fr
0, \fr
1, \v0, 2, \r2, \sr2
107 test_op1_ex \op
, \fr
0, \fr
1, \v0, 3, \r3, \sr3
110 .macro test_op2 op
, fr0
, fr1
, fr2
, v0
, v1
, r0
, r1
, r2
, r3
, sr0
, sr1
, sr2
, sr3
111 test_op2_ex \op
, \fr
0, \fr
1, \fr
2, \v0, \v1, 0, \r0, \sr0
112 test_op2_ex \op
, \fr
0, \fr
1, \fr
2, \v0, \v1, 1, \r1, \sr1
113 test_op2_ex \op
, \fr
0, \fr
1, \fr
2, \v0, \v1, 2, \r2, \sr2
114 test_op2_ex \op
, \fr
0, \fr
1, \fr
2, \v0, \v1, 3, \r3, \sr3
117 .macro test_op3 op
, fr0
, fr1
, fr2
, fr3
, v0
, v1
, v2
, r0
, r1
, r2
, r3
, sr0
, sr1
, sr2
, sr3
118 test_op3_ex \op
, \fr
0, \fr
1, \fr
2, \fr
3, \v0, \v1, \v2, 0, \r0, \sr0
119 test_op3_ex \op
, \fr
0, \fr
1, \fr
2, \fr
3, \v0, \v1, \v2, 1, \r1, \sr1
120 test_op3_ex \op
, \fr
0, \fr
1, \fr
2, \fr
3, \v0, \v1, \v2, 2, \r2, \sr2
121 test_op3_ex \op
, \fr
0, \fr
1, \fr
2, \fr
3, \v0, \v1, \v2, 3, \r3, \sr3
124 .macro test_op2_cpe op
125 set_vector kernel
, 2f