Diff for /gforth/Attic/m68k.h between versions 1.4 and 1.8

version 1.4, 1995/11/07 18:06:49 version 1.8, 1997/03/04 17:49:51
Line 21 Line 21
   
 #include "32bit.h"  #include "32bit.h"
   
 #define FLUSH_ICACHE(addr,size)    cache_$clear()  
 /* Clearing the whole cache is a bit drastic, but this is the only  /* Clearing the whole cache is a bit drastic, but this is the only
    cache control available on the apollo.   *    cache control available on the apollo and NeXT
 */   */
   #if defined(apollo)
   #  define FLUSH_ICACHE(addr,size)    cache_$clear()
   #elif defined(NeXT)
   #  define FLUSH_ICACHE(addr,size)     asm("trap #2");
   #elif defined(hpux)
   #  include <sys/cache.h>
   #  define FLUSH_ICACHE(addr,size) cachectl(CC_IPURGE,(addr),(size))
   #else
   #  warning no FLUSH_ICACHE defined. If your machine has an I-cache (68020+),
   #  warning direct threading and CODE words will not work.
   #endif
   
 #ifdef DIRECT_THREADED  #ifdef DIRECT_THREADED
   #warning untested
 /* PFA gives the parameter field address corresponding to a cfa */  /* PFA gives the parameter field address corresponding to a cfa */
 #define PFA(cfa)        (((Cell *)cfa)+2)  #define PFA(cfa)        (((Cell *)cfa)+2)
 /* PFA1 is a special version for use just after a NEXT1 */  /* PFA1 is a special version for use just after a NEXT1 */
Line 40 Line 50
                                   _cfa[0] = 0x4ef9; /* jmp.l */ \                                    _cfa[0] = 0x4ef9; /* jmp.l */ \
                                   *(long *)(_cfa+1) = (long)(ca);})                                    *(long *)(_cfa+1) = (long)(ca);})
   
 /* this is the point where the does code starts if label points to the  /* this is the point where the does code for the word with the xt cfa
  * jump dodoes */     starts. */
 #define DOES_CODE(label)        ((Xt *)(((char *)CODE_ADDRESS(label))+DOES_HANDLER_SIZE))  #define DOES_CODE(cfa) \
        ({ short *_cfa=(short *)(cfa); \
           short *_ca; \
           ((_cfa[0] == 0x4ef9 \
             && (_ca=CODE_ADDRESS(cfa), _ca[0] == 0x4ef9) \
             && *(long *)(_cfa+1) == &&docol) \
            ? ((unsigned)_ca)+DOES_HANDLER_SIZE \
            : 0); })
   
 /* this is a special version of DOES_CODE for use in dodoes */  /* this is a special version of DOES_CODE for use in dodoes */
 #define DOES_CODE1(label)       DOES_CODE(label)  #define DOES_CODE1(cfa) ((Xt *)(((char *)CODE_ADDRESS(cfa))+DOES_HANDLER_SIZE))
   
 /* this stores a call dodoes at addr */  /* this stores a call dodoes at addr */
 #define MAKE_DOES_HANDLER(addr) MAKE_CF(addr,symbols[DODOES])  #define MAKE_DOES_HANDLER(addr) MAKE_CF(addr,symbols[DODOES])
   
 #define DOES_HANDLER_SIZE       8  
   
 #define MAKE_DOES_CF(addr,doesp)   MAKE_CF(addr,((int)(doesp)-8))  #define MAKE_DOES_CF(addr,doesp)   MAKE_CF(addr,((int)(doesp)-8))
 #endif  #endif
   

Removed from v.1.4  
changed lines
  Added in v.1.8


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