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

VxWorks

开发平台:

C/C++

  1. /* archSimhppa.h - simhppa specific header */
  2. /* Copyright 1993 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01d,29jul98,ms   added WV_INSTRUMENTATION
  7. 01c,20nov95,mem  added decl of _ARCH_va_list for c++, fixes for gcc.
  8. 01b,20jul94,ms   added _ARCH_INT_MIN, changed _ARCH_MULTIPLE_CACHELIB.
  9. 01a,11aug93,gae  from rrr.
  10. */
  11. #ifndef __INCarchSimhppah
  12. #define __INCarchSimhppah
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. #define WV_INSTRUMENTATION
  17. #define _STACK_DIR _STACK_GROWS_UP
  18. #define _ALLOC_ALIGN_SIZE 8 /* 8-byte alignment */
  19. #define _STACK_ALIGN_SIZE 8 /* 8-byte alignment */
  20. #define _ARCH_MULTIPLE_CACHELIB FALSE /* multiple cache libraries */
  21. #define _DYNAMIC_BUS_SIZING FALSE /* no dynamic bus sizing */
  22. #define _ARCH_INT_MIN (-2147483647 - 1)
  23. /* defines for stdarg.h */
  24. /* Amount of space required in an argument list for an arg of type TYPE.
  25.    TYPE may alternatively be an expression whose type is used.  */
  26. #ifndef _ARCH_va_list
  27. #define _ARCH_va_list typedef double *va_list
  28. #endif /* _ARCH_va_list */
  29. #define __WORD_MASK 0xFFFFFFFC
  30. #define __DW_MASK   0xFFFFFFF8
  31. /* Args > 8 bytes are passed by reference.  Args > 4 and <= 8 are
  32.  * right-justified in 8 bytes.  Args <= 4 are right-justified in
  33.  * 4 bytes.
  34.  */
  35. /*
  36.  * __list is the word-aligned address of the previous argument.
  37.  */
  38. /* If sizeof __mode > 8, address of arg is at __list - 4.  We need to do
  39.  * two indirections:  1 to fetch the address, and 1 to fetch the value.
  40.  * If sizeof __mode <= 8, the word-aligned address of arg is 
  41.  * __list - sizeof __mode, masked to requred alignment (4 or 8 byte).  
  42.  * The real address is the word-aligned address + extra byte offset.
  43.  */
  44. #ifdef __GNUC__
  45. #define __gnuc_va_start(AP) 
  46. ((AP) = (va_list)__builtin_saveregs())
  47. #define _ARCH_va_start(__list,__parmN) 
  48. (__builtin_next_arg (__parmN), __gnuc_va_start (__list))
  49. #else /* not __GNUC__ */
  50. #ifdef __cplusplus
  51. _ARCH_va_list;
  52. extern "C" {
  53. void __builtin_va_start(va_list, ...);
  54. }
  55. #define _ARCH_va_start(__list,__parmN) 
  56. (__list=0,__builtin_va_start(__list,&__parmN))
  57. #else /* not __cplusplus */
  58. #define _ARCH_va_start(__list,__parmN) 
  59. __builtin_va_start (__list, &__parmN)
  60. #endif /* __cplusplus */
  61. #endif /* __GNUC__ */
  62. #define _ARCH_va_arg(__list,__mode)
  63. (sizeof(__mode) > 8 ?
  64.   ((__list = (va_list) ((char *)__list - sizeof (int))),
  65.    (*((__mode *) (*((int *) (__list)))))) :
  66.   ((__list =
  67.       (va_list) ((long)((char *)__list - sizeof (__mode))
  68.       & (sizeof(__mode) > 4 ? __DW_MASK : __WORD_MASK))),
  69.    (*((__mode *) ((char *)__list +
  70. ((8 - sizeof(__mode)) % 4))))))
  71. #define _ARCH_va_end(__list)
  72. #ifdef __cplusplus
  73. }
  74. #endif
  75. #endif /* __INCarchSimhppah */