Annotation of gforth/apollo68k.h, revision 1.1
1.1 ! anton 1: /*
! 2: $Id: apollo68k.h,v 1.3 1993/02/11 15:57:33 anton Exp $
! 3: Copyright 1992 by the ANSI figForth Development Group
! 4:
! 5: This is the machine-specific part for a HP/Apollo with a 680x0
! 6: processor running Domain/OS
! 7: */
! 8:
! 9:
! 10: /* Cell and UCell must be the same size as a pointer */
! 11: typedef long Cell;
! 12: typedef unsigned long UCell;
! 13:
! 14: /* DCell and UDCell must be twice as large as Cell */
! 15: typedef long long DCell;
! 16: typedef unsigned long long UDCell;
! 17:
! 18: /* define this if IEEE singles and doubles are available as C data types */
! 19: #define IEEE_FP
! 20:
! 21: /* the IEEE types are used only for loading and storing */
! 22: /* the IEEE double precision type */
! 23: typedef double DFloat;
! 24: /* the IEEE single precision type */
! 25: typedef float SFloat;
! 26:
! 27: /* define this if the least-significant byte is at the largets address */
! 28: #define BIG_ENDIAN
! 29:
! 30: #ifdef DIRECT_THREADED
! 31: /* PFA gives the parameter field address corresponding to a cfa */
! 32: #define PFA(cfa) (((Cell *)cfa)+2)
! 33: /* PFA1 is a special version for use just after a NEXT1 */
! 34: #define PFA1(cfa) PFA(cfa)
! 35: /* CODE_ADDRESS is the address of the code jumped to through the code field */
! 36: #define CODE_ADDRESS(cfa) (*(Label *)(((char *)(cfa))+2))
! 37: /* MAKE_CF creates an appropriate code field at the cfa;
! 38: ca is the code address */
! 39: #define MAKE_CF(cfa,ca) ({short * _cfa = (short *)cfa; \
! 40: _cfa[0] = 0x4ef9; /* jmp.l */ \
! 41: *(long *)(_cfa+1) = (long)(ca);})
! 42: #endif
! 43:
! 44: /* this is the point where the does code starts if label points to the
! 45: * jump dodoes */
! 46: #define DOES_CODE(label) ((Xt *)(((char *)label)+8))
! 47:
! 48: /* this is a special version of DOES_CODE for use in dodoes */
! 49: #define DOES_CODE1(label) DOES_CODE(label)
! 50:
! 51: /* this stores a jump dodoes at ca */
! 52: #define MAKE_DOESJUMP(ca) ({short * _ca = (short *)ca; \
! 53: _ca[0] = 0x4ef9; /* jmp.l */ \
! 54: *(long *)(_ca+1) = (long)&&dodoes;})
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>