]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/math-emu/fpu_system.h
Merge branches 'x86/acpi', 'x86/asm', 'x86/cpudetect', 'x86/crashdump', 'x86/debug...
[linux-2.6-omap-h63xx.git] / arch / x86 / math-emu / fpu_system.h
index a3ae28c49dddad063de9c177f7d0f13480df3da5..50fa0ec2c8a5f87a463a14164cf365291627a532 100644 (file)
 #include <linux/kernel.h>
 #include <linux/mm.h>
 
-/* This sets the pointer FPU_info to point to the argument part
-   of the stack frame of math_emulate() */
-#define SETUP_DATA_AREA(arg)   FPU_info = (struct info *) &arg
-
 /* s is always from a cpu register, and the cpu does bounds checking
  * during register load --> no further bounds checks needed */
 #define LDT_DESCRIPTOR(s)      (((struct desc_struct *)current->mm->context.ldt)[(s) >> 3])
 #define SEG_EXPAND_DOWN(s)     (((s).b & ((1 << 11) | (1 << 10))) \
                                 == (1 << 10))
 
-#define I387                   (current->thread.i387)
-#define FPU_info               (I387.soft.info)
+#define I387                   (current->thread.xstate)
+#define FPU_info               (I387->soft.info)
 
-#define FPU_CS                 (*(unsigned short *) &(FPU_info->___cs))
-#define FPU_SS                 (*(unsigned short *) &(FPU_info->___ss))
-#define FPU_DS                 (*(unsigned short *) &(FPU_info->___ds))
-#define FPU_EAX                        (FPU_info->___eax)
-#define FPU_EFLAGS             (FPU_info->___eflags)
-#define FPU_EIP                        (FPU_info->___eip)
+#define FPU_CS                 (*(unsigned short *) &(FPU_info->regs->cs))
+#define FPU_SS                 (*(unsigned short *) &(FPU_info->regs->ss))
+#define FPU_DS                 (*(unsigned short *) &(FPU_info->regs->ds))
+#define FPU_EAX                        (FPU_info->regs->ax)
+#define FPU_EFLAGS             (FPU_info->regs->flags)
+#define FPU_EIP                        (FPU_info->regs->ip)
 #define FPU_ORIG_EIP           (FPU_info->___orig_eip)
 
-#define FPU_lookahead           (I387.soft.lookahead)
+#define FPU_lookahead           (I387->soft.lookahead)
 
 /* nz if ip_offset and cs_selector are not to be set for the current
    instruction. */
-#define no_ip_update           (*(u_char *)&(I387.soft.no_update))
-#define FPU_rm                 (*(u_char *)&(I387.soft.rm))
+#define no_ip_update           (*(u_char *)&(I387->soft.no_update))
+#define FPU_rm                 (*(u_char *)&(I387->soft.rm))
 
 /* Number of bytes of data which can be legally accessed by the current
    instruction. This only needs to hold a number <= 108, so a byte will do. */
-#define access_limit           (*(u_char *)&(I387.soft.alimit))
+#define access_limit           (*(u_char *)&(I387->soft.alimit))
 
-#define partial_status         (I387.soft.swd)
-#define control_word           (I387.soft.cwd)
-#define fpu_tag_word           (I387.soft.twd)
-#define registers              (I387.soft.st_space)
-#define top                    (I387.soft.ftop)
+#define partial_status         (I387->soft.swd)
+#define control_word           (I387->soft.cwd)
+#define fpu_tag_word           (I387->soft.twd)
+#define registers              (I387->soft.st_space)
+#define top                    (I387->soft.ftop)
 
-#define instruction_address    (*(struct address *)&I387.soft.fip)
-#define operand_address                (*(struct address *)&I387.soft.foo)
+#define instruction_address    (*(struct address *)&I387->soft.fip)
+#define operand_address                (*(struct address *)&I387->soft.foo)
 
 #define FPU_access_ok(x,y,z)   if ( !access_ok(x,y,z) ) \
                                math_abort(FPU_info,SIGSEGV)