.. | .. |
---|
1 | | -// SPDX-License-Identifier: GPL-2.0 |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
---|
2 | 2 | // Copyright (C) 2005-2017 Andes Technology Corporation |
---|
3 | 3 | |
---|
4 | 4 | #ifndef _ASMNDS32_SIGCONTEXT_H |
---|
.. | .. |
---|
9 | 9 | * before the signal handler was invoked. Note: only add new entries |
---|
10 | 10 | * to the end of the structure. |
---|
11 | 11 | */ |
---|
| 12 | +struct fpu_struct { |
---|
| 13 | + unsigned long long fd_regs[32]; |
---|
| 14 | + unsigned long fpcsr; |
---|
| 15 | + /* |
---|
| 16 | + * When CONFIG_SUPPORT_DENORMAL_ARITHMETIC is defined, kernel prevents |
---|
| 17 | + * hardware from treating the denormalized output as an underflow case |
---|
| 18 | + * and rounding it to a normal number. Hence kernel enables the UDF and |
---|
| 19 | + * IEX trap in the fpcsr register to step in the calculation. |
---|
| 20 | + * However, the UDF and IEX trap enable bit in $fpcsr also lose |
---|
| 21 | + * their use. |
---|
| 22 | + * |
---|
| 23 | + * UDF_IEX_trap replaces the feature of UDF and IEX trap enable bit in |
---|
| 24 | + * $fpcsr to control the trap of underflow and inexact. The bit filed |
---|
| 25 | + * of UDF_IEX_trap is the same as $fpcsr, 10th bit is used to enable UDF |
---|
| 26 | + * exception trapping and 11th bit is used to enable IEX exception |
---|
| 27 | + * trapping. |
---|
| 28 | + * |
---|
| 29 | + * UDF_IEX_trap is only modified through fp_udfiex_crtl syscall. |
---|
| 30 | + * Therefore, UDF_IEX_trap needn't be saved and restored in each |
---|
| 31 | + * context switch. |
---|
| 32 | + */ |
---|
| 33 | + unsigned long UDF_IEX_trap; |
---|
| 34 | +}; |
---|
12 | 35 | |
---|
13 | 36 | struct zol_struct { |
---|
14 | 37 | unsigned long nds32_lc; /* $LC */ |
---|
.. | .. |
---|
54 | 77 | unsigned long fault_address; |
---|
55 | 78 | unsigned long used_math_flag; |
---|
56 | 79 | /* FPU Registers */ |
---|
| 80 | + struct fpu_struct fpu; |
---|
57 | 81 | struct zol_struct zol; |
---|
58 | 82 | }; |
---|
59 | 83 | |
---|