home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / GCC / GERLIB_USR08B.LHA / gerlib / support / os-include / inline / dtclass.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-12  |  789 b   |  42 lines

  1. #ifndef _INLINE_DTCLASS_H
  2. #define _INLINE_DTCLASS_H
  3.  
  4. #include <sys/cdefs.h>
  5. #include <inline/stubs.h>
  6.  
  7. __BEGIN_DECLS
  8.  
  9. #ifndef BASE_EXT_DECL
  10. #define BASE_EXT_DECL extern struct DTClassBase*  DTClassBase;
  11. #endif
  12. #ifndef BASE_PAR_DECL
  13. #define BASE_PAR_DECL
  14. #define BASE_PAR_DECL0 void
  15. #endif
  16. #ifndef BASE_NAME
  17. #define BASE_NAME DTClassBase
  18. #endif
  19.  
  20. typedef unsigned long Class;
  21.  
  22. static __inline Class *
  23. ObtainEngine (BASE_PAR_DECL0)
  24. {
  25.   BASE_EXT_DECL
  26.   register Class * _res  __asm("d0");
  27.   register struct DTClassBase* a6 __asm("a6") = BASE_NAME;
  28.   __asm __volatile ("jsr a6@(-0x1e)"
  29.   : "=r" (_res)
  30.   : "r" (a6)
  31.   : "a0","a1","d0","d1", "memory");
  32.   return _res;
  33. }
  34. #undef BASE_EXT_DECL
  35. #undef BASE_PAR_DECL
  36. #undef BASE_PAR_DECL0
  37. #undef BASE_NAME
  38.  
  39. __END_DECLS
  40.  
  41. #endif /* _INLINE_DTCLASS_H */
  42.