Annotation of gforth/m68k.h, revision 1.1
1.1 ! anton 1: /*
! 2: $Id: apollo68k.h,v 1.2 1994/05/31 07:08:10 benschop Exp $
! 3: Copyright 1992 by the ANSI figForth Development Group
! 4:
! 5: This is the machine-specific part for the 68000 and family
! 6: */
! 7:
! 8: #include "32bit.h"
! 9:
! 10: #ifdef DIRECT_THREADED
! 11: /* PFA gives the parameter field address corresponding to a cfa */
! 12: #define PFA(cfa) (((Cell *)cfa)+2)
! 13: /* PFA1 is a special version for use just after a NEXT1 */
! 14: #define PFA1(cfa) PFA(cfa)
! 15: /* CODE_ADDRESS is the address of the code jumped to through the code field */
! 16: #define CODE_ADDRESS(cfa) (*(Label *)(((char *)(cfa))+2))
! 17: /* MAKE_CF creates an appropriate code field at the cfa;
! 18: ca is the code address */
! 19: #define MAKE_CF(cfa,ca) ({short * _cfa = (short *)cfa; \
! 20: _cfa[0] = 0x4ef9; /* jmp.l */ \
! 21: *(long *)(_cfa+1) = (long)(ca);})
! 22:
! 23: /* this is the point where the does code starts if label points to the
! 24: * jump dodoes */
! 25: #define DOES_CODE(label) ((Xt *)(((char *)label)+8))
! 26:
! 27: /* this is a special version of DOES_CODE for use in dodoes */
! 28: #define DOES_CODE1(label) DOES_CODE(label)
! 29:
! 30: /* this stores a jump dodoes at ca */
! 31: #define MAKE_DOESJUMP(ca) ({short * _ca = (short *)ca; \
! 32: _ca[0] = 0x4ef9; /* jmp.l */ \
! 33: *(long *)(_ca+1) = (long)&&dodoes;})
! 34: #endif
! 35:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>