diff options
Diffstat (limited to 'arch/x86/math-emu/fpu_system.h')
-rw-r--r-- | arch/x86/math-emu/fpu_system.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/arch/x86/math-emu/fpu_system.h b/arch/x86/math-emu/fpu_system.h index a3ae28c49ddd..13488fa153e0 100644 --- a/arch/x86/math-emu/fpu_system.h +++ b/arch/x86/math-emu/fpu_system.h | |||
@@ -35,8 +35,8 @@ | |||
35 | #define SEG_EXPAND_DOWN(s) (((s).b & ((1 << 11) | (1 << 10))) \ | 35 | #define SEG_EXPAND_DOWN(s) (((s).b & ((1 << 11) | (1 << 10))) \ |
36 | == (1 << 10)) | 36 | == (1 << 10)) |
37 | 37 | ||
38 | #define I387 (current->thread.i387) | 38 | #define I387 (current->thread.xstate) |
39 | #define FPU_info (I387.soft.info) | 39 | #define FPU_info (I387->soft.info) |
40 | 40 | ||
41 | #define FPU_CS (*(unsigned short *) &(FPU_info->___cs)) | 41 | #define FPU_CS (*(unsigned short *) &(FPU_info->___cs)) |
42 | #define FPU_SS (*(unsigned short *) &(FPU_info->___ss)) | 42 | #define FPU_SS (*(unsigned short *) &(FPU_info->___ss)) |
@@ -46,25 +46,25 @@ | |||
46 | #define FPU_EIP (FPU_info->___eip) | 46 | #define FPU_EIP (FPU_info->___eip) |
47 | #define FPU_ORIG_EIP (FPU_info->___orig_eip) | 47 | #define FPU_ORIG_EIP (FPU_info->___orig_eip) |
48 | 48 | ||
49 | #define FPU_lookahead (I387.soft.lookahead) | 49 | #define FPU_lookahead (I387->soft.lookahead) |
50 | 50 | ||
51 | /* nz if ip_offset and cs_selector are not to be set for the current | 51 | /* nz if ip_offset and cs_selector are not to be set for the current |
52 | instruction. */ | 52 | instruction. */ |
53 | #define no_ip_update (*(u_char *)&(I387.soft.no_update)) | 53 | #define no_ip_update (*(u_char *)&(I387->soft.no_update)) |
54 | #define FPU_rm (*(u_char *)&(I387.soft.rm)) | 54 | #define FPU_rm (*(u_char *)&(I387->soft.rm)) |
55 | 55 | ||
56 | /* Number of bytes of data which can be legally accessed by the current | 56 | /* Number of bytes of data which can be legally accessed by the current |
57 | instruction. This only needs to hold a number <= 108, so a byte will do. */ | 57 | instruction. This only needs to hold a number <= 108, so a byte will do. */ |
58 | #define access_limit (*(u_char *)&(I387.soft.alimit)) | 58 | #define access_limit (*(u_char *)&(I387->soft.alimit)) |
59 | 59 | ||
60 | #define partial_status (I387.soft.swd) | 60 | #define partial_status (I387->soft.swd) |
61 | #define control_word (I387.soft.cwd) | 61 | #define control_word (I387->soft.cwd) |
62 | #define fpu_tag_word (I387.soft.twd) | 62 | #define fpu_tag_word (I387->soft.twd) |
63 | #define registers (I387.soft.st_space) | 63 | #define registers (I387->soft.st_space) |
64 | #define top (I387.soft.ftop) | 64 | #define top (I387->soft.ftop) |
65 | 65 | ||
66 | #define instruction_address (*(struct address *)&I387.soft.fip) | 66 | #define instruction_address (*(struct address *)&I387->soft.fip) |
67 | #define operand_address (*(struct address *)&I387.soft.foo) | 67 | #define operand_address (*(struct address *)&I387->soft.foo) |
68 | 68 | ||
69 | #define FPU_access_ok(x,y,z) if ( !access_ok(x,y,z) ) \ | 69 | #define FPU_access_ok(x,y,z) if ( !access_ok(x,y,z) ) \ |
70 | math_abort(FPU_info,SIGSEGV) | 70 | math_abort(FPU_info,SIGSEGV) |