1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 // Copyright (C) 2005-2017 Andes Technology Corporation
4 #ifndef _ASMNDS32_SIGCONTEXT_H
5 #define _ASMNDS32_SIGCONTEXT_H
8 * Signal context structure - contains all info to do with the state
9 * before the signal handler was invoked. Note: only add new entries
10 * to the end of the structure.
13 unsigned long long fd_regs[32];
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
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
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
33 unsigned long UDF_IEX_trap;
37 unsigned long nds32_lc; /* $LC */
38 unsigned long nds32_le; /* $LE */
39 unsigned long nds32_lb; /* $LB */
43 unsigned long trap_no;
44 unsigned long error_code;
45 unsigned long oldmask;
46 unsigned long nds32_r0;
47 unsigned long nds32_r1;
48 unsigned long nds32_r2;
49 unsigned long nds32_r3;
50 unsigned long nds32_r4;
51 unsigned long nds32_r5;
52 unsigned long nds32_r6;
53 unsigned long nds32_r7;
54 unsigned long nds32_r8;
55 unsigned long nds32_r9;
56 unsigned long nds32_r10;
57 unsigned long nds32_r11;
58 unsigned long nds32_r12;
59 unsigned long nds32_r13;
60 unsigned long nds32_r14;
61 unsigned long nds32_r15;
62 unsigned long nds32_r16;
63 unsigned long nds32_r17;
64 unsigned long nds32_r18;
65 unsigned long nds32_r19;
66 unsigned long nds32_r20;
67 unsigned long nds32_r21;
68 unsigned long nds32_r22;
69 unsigned long nds32_r23;
70 unsigned long nds32_r24;
71 unsigned long nds32_r25;
72 unsigned long nds32_fp; /* $r28 */
73 unsigned long nds32_gp; /* $r29 */
74 unsigned long nds32_lp; /* $r30 */
75 unsigned long nds32_sp; /* $r31 */
76 unsigned long nds32_ipc;
77 unsigned long fault_address;
78 unsigned long used_math_flag;
80 struct fpu_struct fpu;
81 struct zol_struct zol;