fppSimsolarisLib.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:2k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* fppSimsparcLib.h - simsparc floating-point header */
  2. /* Copyright 1993-95 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01a,07jun95,ism  derived from simsparc
  7. */
  8. #ifndef __INCfppSimsparcLibh
  9. #define __INCfppSimsparcLibh
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. #include "vxWorks.h"
  14. #define  FP_NUM_DREGS    16              /* Floating-Point Data Registers */
  15. /* equates for fppState, fpstate */
  16. #define UNKNOWN          0x00           /* default */
  17. #define FPU_TESTED       0x01           /* set by fppProbe */
  18. #define FPU_TESTED_TRUE  0x02           /* set by fppProbe */
  19. #define FPU_TESTED_FALSE 0x00           /* set by fppProbe */
  20. #define FPU_AVAILABLE    (FPU_TESTED + FPU_TESTED_TRUE)
  21. #define NO_FPU_AVAILABLE (FPU_TESTED + FPU_TESTED_FALSE)
  22. #ifndef _ASMLANGUAGE
  23. typedef struct fpContext                /* Floating-Point Context */
  24.     {
  25.     double fpd[FP_NUM_DREGS]; /* Data Registers */
  26.     unsigned int fsr; /* Status Register */
  27.     } FP_CONTEXT;
  28. #define FPREG_SET FP_CONTEXT
  29. /* variable declarations */
  30. extern REG_INDEX fpRegName[]; /* f-point data register table */
  31. extern REG_INDEX fpCtlRegName[]; /* f-point control register table */
  32. extern WIND_TCB *pFppTaskIdPrevious; /* task id for deferred exceptions */
  33. extern FUNCPTR  fppCreateHookRtn; /* arch dependent create hook routine */
  34. extern FUNCPTR  fppDisplayHookRtn; /* arch dependent display routine */
  35. /* function declarations */
  36. #if defined(__STDC__) || defined(__cplusplus)
  37. extern void fppArchInit (void);
  38. extern void fppArchTaskCreateInit (FP_CONTEXT *pFpContext);
  39. extern void fsrShow (UINT fsrValue);
  40. extern void     fppFlushInit (void);
  41. extern UINT     fppQueueInit (void);
  42. extern STATUS   fppProbeSup (void);
  43. extern void     fppNan (FP_CONTEXT *pFpContext, ULONG fppFsr);
  44. #else
  45. extern void fppArchInit ();
  46. extern void fppArchTaskCreateInit ();
  47. extern void fsrShow ();
  48. extern void     fppFlushInit ();
  49. extern UINT     fppQueueInit ();
  50. extern STATUS   fppProbeSup ();
  51. extern void     fppNan ();
  52. #endif /* __STDC__ */
  53. #endif /* _ASMLANGUAGE */
  54. #define FP_DATA         0x0            /* Data Registers */
  55. #define FPD(n)          (FP_DATA + (4 * (n)))
  56. #define FP_QUEUE        (FPD(FP_NUM_DREGS*2)) /* Q Registers (dword aligned)*/
  57. #define FSR             (FP_QUEUE + 4) /* Status Register */
  58. #ifdef __cplusplus
  59. }
  60. #endif
  61. #endif /* __INCfppSimsparcLibh */