File:  [gforth] / gforth / Attic / apollo68k.h
Revision 1.2: download - view: text, annotated - select for diffs
Tue May 31 07:08:10 1994 UTC (29 years, 10 months ago) by benschop
Branches: MAIN
CVS tags: HEAD
changed #endif to right place

    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 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: 
   43: /* this is the point where the does code starts if label points to the
   44:  * jump dodoes */
   45: #define DOES_CODE(label)	((Xt *)(((char *)label)+8))
   46: 
   47: /* this is a special version of DOES_CODE for use in dodoes */
   48: #define DOES_CODE1(label)	DOES_CODE(label)
   49: 
   50: /* this stores a jump dodoes at ca */
   51: #define MAKE_DOESJUMP(ca)	({short * _ca = (short *)ca; \
   52: 				  _ca[0] = 0x4ef9; /* jmp.l */ \
   53: 				  *(long *)(_ca+1) = (long)&&dodoes;})
   54: #endif
   55: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>