Annotation of gforth/m68k.h, revision 1.2
1.1 anton 1: /*
1.2 ! anton 2: $Id: m68k.h,v 1.1 1994/12/12 17:10:41 anton Exp $
1.1 anton 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
1.2 ! anton 11:
! 12: #define CACHE_FLUSH(addr,size) cache_$clear()
! 13: /* Clearing the whole cache is a bit drastic, but this is the only
! 14: cache control available on the apollo.
! 15: */
! 16:
1.1 anton 17: /* PFA gives the parameter field address corresponding to a cfa */
18: #define PFA(cfa) (((Cell *)cfa)+2)
19: /* PFA1 is a special version for use just after a NEXT1 */
20: #define PFA1(cfa) PFA(cfa)
21: /* CODE_ADDRESS is the address of the code jumped to through the code field */
22: #define CODE_ADDRESS(cfa) (*(Label *)(((char *)(cfa))+2))
23: /* MAKE_CF creates an appropriate code field at the cfa;
24: ca is the code address */
25: #define MAKE_CF(cfa,ca) ({short * _cfa = (short *)cfa; \
26: _cfa[0] = 0x4ef9; /* jmp.l */ \
27: *(long *)(_cfa+1) = (long)(ca);})
28:
29: /* this is the point where the does code starts if label points to the
30: * jump dodoes */
1.2 ! anton 31: #define DOES_CODE(label) ((Xt *)(((char *)CODE_ADDRESS(label))+DOES_HANDLER_SIZE))
1.1 anton 32:
33: /* this is a special version of DOES_CODE for use in dodoes */
34: #define DOES_CODE1(label) DOES_CODE(label)
35:
1.2 ! anton 36: /* this stores a call dodoes at addr */
! 37: #define MAKE_DOES_HANDLER(addr) MAKE_CF(addr,symbols[DODOES])
! 38:
! 39: #define DOES_HANDLER_SIZE 8
! 40:
! 41: #define MAKE_DOES_CF(addr,doesp) MAKE_CF(addr,((int)(doesp)-8))
1.1 anton 42: #endif
43:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>