### Diff for /gforth/Attic/decstation.h between versions 1.1 and 1.2

version 1.1, 1994/02/11 16:30:46 version 1.2, 1994/05/05 15:46:41
Line 51  typedef float SFloat; Line 51  typedef float SFloat;
/* CODE_ADDRESS is the address of the code jumped to through the code field */                  /* CODE_ADDRESS is the address of the code jumped to through the code field */
#               define MAKE_CF(cfa,ca)  ({long *_cfa = (long *)(cfa); \  #               define MAKE_CF(cfa,ca)  ({long *_cfa = (long *)(cfa); \
long _ca = (long)(ca);                                            long _ca = (long)(ca); \
_cfa = JAL_PATTERN|(((((long)_ca)>>2)+4)&JUMP_MASK), /* JAL ca+4 */ \                                                    _cfa = JAL_PATTERN|(((((long)_ca)>>2))&JUMP_MASK); /* JAL ca+4 */ \
_cfa = *(long *)_ca; /* delay slot */})                                                    _cfa = 0; /* *(long *)_ca; delay slot */})
#       endif /* undefined */  #       endif /* undefined */

/* this is the point where the does code starts if label points to the          /* this is the point where the does code starts if label points to the
Line 64  typedef float SFloat; Line 64  typedef float SFloat;
#       define DOES_CODE1(cfa)  DOES_CODE(cfa)  #       define DOES_CODE1(cfa)  DOES_CODE(cfa)

#       define DOES_HANDLER_SIZE        8  #       define DOES_HANDLER_SIZE        8
#       define MAKE_DOES_CF(cfa,does_code) \
({long does_handlerp=((long)(does_code))-DOES_HANDLER_SIZE; \
long *_cfa = (long*)(cfa); \
_cfa = J_PATTERN|((does_handlerp&JUMP_MASK)>>2); /* J ca */ \
_cfa = 0; /* nop */})
/*
#       define MAKE_DOES_CF(cfa, does_code)     ({char *does_handlerp=((char *)does_code)-DOES_HANDLER_SIZE;    \  #       define MAKE_DOES_CF(cfa, does_code)     ({char *does_handlerp=((char *)does_code)-DOES_HANDLER_SIZE;    \
MAKE_CF(cfa,does_handlerp);   \                                                    MAKE_CF(cfa,does_handlerp);   \
MAKE_DOES_HANDLER(does_handlerp);})                                                    MAKE_DOES_HANDLER(does_handlerp) ;})
*/
/* this stores a jump dodoes at addr */          /* this stores a jump dodoes at addr */
_addr = 0; /* nop */})
#endif  #endif
#ifdef undefined  #ifdef undefined
/* and here are some more efficient versions that can be tried later */  /* and here are some more efficient versions that can be tried later */
Line 80  typedef float SFloat; Line 86  typedef float SFloat;
*/  */

_addr = *(long *)symbols; /* delay */})                                    _addr = *(long *)symbols[DODOES]; /* delay */})

/* the following version uses JAL to make DOES_CODE1 faster */  /* the following version uses JAL to make DOES_CODE1 faster */
/* !! does the declaration clear the register ? */  /* !! does the declaration clear the register ? */
/* it's ok to use the same reg as in PFA1:  /* it's ok to use the same reg as in PFA1:
dodoes is the only potential problem and I have taken care of it */     dodoes is the only potential problem and I have taken care of it */

#define DOES_CODE1(cfa) ({register Code *_does_code asm("\$31"); \  #define DOES_CODE1(cfa) ({register Code *_does_code asm("\$31"); \
_does_code; })                                      _does_code; })