root/drivers/FPU-emu/fpu_system.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*---------------------------------------------------------------------------+
   2  |  fpu_system.h                                                             |
   3  |                                                                           |
   4  | Copyright (C) 1992    W. Metzenthen, 22 Parker St, Ormond, Vic 3163,      |
   5  |                       Australia.  E-mail   billm@vaxc.cc.monash.edu.au    |
   6  |                                                                           |
   7  +---------------------------------------------------------------------------*/
   8 
   9 #ifndef _FPU_SYSTEM_H
  10 #define _FPU_SYSTEM_H
  11 
  12 /* system dependent definitions */
  13 
  14 #include <linux/sched.h>
  15 #include <linux/kernel.h>
  16 
  17 /* This sets the pointer FPU_info to point to the argument part
  18    of the stack frame of math_emulate() */
  19 #define SETUP_DATA_AREA(arg)    FPU_info = (struct info *) &arg
  20 
  21 #define I387                    (current->tss.i387)
  22 #define FPU_info                (I387.soft.info)
  23 
  24 #define FPU_CS                  (*(unsigned short *) &(FPU_info->___cs))
  25 #define FPU_DS                  (*(unsigned short *) &(FPU_info->___ds))
  26 #define FPU_EAX                 (FPU_info->___eax)
  27 #define FPU_EFLAGS              (FPU_info->___eflags)
  28 #define FPU_EIP                 (FPU_info->___eip)
  29 #define FPU_ORIG_EIP            (FPU_info->___orig_eip)
  30 
  31 #define FPU_lookahead           (I387.soft.lookahead)
  32 #define FPU_entry_eip           (I387.soft.entry_eip)
  33 
  34 #define partial_status          (I387.soft.swd)
  35 #define control_word            (I387.soft.cwd)
  36 #define regs                    (I387.soft.regs)
  37 #define top                     (I387.soft.top)
  38 
  39 #define ip_offset               (I387.soft.fip)
  40 #define cs_selector             (I387.soft.fcs)
  41 #define data_operand_offset     (I387.soft.foo)
  42 #define operand_selector        (I387.soft.fos)
  43 
  44 /* ######## temporary and ugly ;-) */
  45 #define FPU_data_address        ((void *)(I387.soft.twd))
  46 
  47 #endif

/* [previous][next][first][last][top][bottom][index][help] */