Diff for /gforth/engine/threaded.h between versions 1.3 and 1.4

version 1.3, 1999/02/06 22:28:25 version 1.4, 1999/05/04 12:51:35
Line 91 Line 91
   
 */  */
   
 #ifndef GETCFA  /* CFA_NEXT: a more appropriate name would be CFA_LIVE, i.e., cfa is live after NEXT */
 #  define CFA_NEXT  
 /* a more appropriate name would be CFA_LIVE, i.e., cfa is live after NEXT */  
 #endif  
   
 #ifdef DOUBLY_INDIRECT  #ifdef DOUBLY_INDIRECT
   #  define CFA_NEXT
 #  define NEXT_P0       ({cfa=*ip;})  #  define NEXT_P0       ({cfa=*ip;})
 #  define IP            (ip)  #  define IP            (ip)
 #  define SET_IP(p)     ({ip=(p); NEXT_P0;})  #  define SET_IP(p)     ({ip=(p); NEXT_P0;})
Line 117 Line 115
   
 #if THREADING_SCHEME==1  #if THREADING_SCHEME==1
 #warning direct threading scheme 1: autoinc, long latency, cfa live  #warning direct threading scheme 1: autoinc, long latency, cfa live
   #  define CFA_NEXT
 #  define NEXT_P0       ({cfa=*ip++;})  #  define NEXT_P0       ({cfa=*ip++;})
 #  define IP            (ip-1)  #  define IP            (ip-1)
 #  define SET_IP(p)     ({ip=(p); NEXT_P0;})  #  define SET_IP(p)     ({ip=(p); NEXT_P0;})
Line 130 Line 129
   
 #if THREADING_SCHEME==2  #if THREADING_SCHEME==2
 #warning direct threading scheme 2: autoinc, long latency, cfa dead  #warning direct threading scheme 2: autoinc, long latency, cfa dead
   #ifndef GETCFA
   #error GETCFA must be defined for cfa dead threading
   #endif
 #  define NEXT_P0       (ip++)  #  define NEXT_P0       (ip++)
 #  define IP            (ip-1)  #  define IP            (ip-1)
 #  define SET_IP(p)     ({ip=(p); NEXT_P0;})  #  define SET_IP(p)     ({ip=(p); NEXT_P0;})
Line 144 Line 146
   
 #if THREADING_SCHEME==3  #if THREADING_SCHEME==3
 #warning direct threading scheme 3: autoinc, low latency, cfa live  #warning direct threading scheme 3: autoinc, low latency, cfa live
   #  define CFA_NEXT
 #  define NEXT_P0  #  define NEXT_P0
 #  define IP            (ip)  #  define IP            (ip)
 #  define SET_IP(p)     ({ip=(p); NEXT_P0;})  #  define SET_IP(p)     ({ip=(p); NEXT_P0;})
Line 157 Line 160
   
 #if THREADING_SCHEME==4  #if THREADING_SCHEME==4
 #warning direct threading scheme 4: autoinc, low latency, cfa dead  #warning direct threading scheme 4: autoinc, low latency, cfa dead
   #ifndef GETCFA
   #error GETCFA must be defined for cfa dead threading
   #endif
 #  define NEXT_P0  #  define NEXT_P0
 #  define IP            (ip)  #  define IP            (ip)
 #  define SET_IP(p)     ({ip=(p); NEXT_P0;})  #  define SET_IP(p)     ({ip=(p); NEXT_P0;})
Line 170 Line 176
   
 #if THREADING_SCHEME==5  #if THREADING_SCHEME==5
 #warning direct threading scheme 5: long latency, cfa live  #warning direct threading scheme 5: long latency, cfa live
   #  define CFA_NEXT
 #  define NEXT_P0       ({cfa=*ip;})  #  define NEXT_P0       ({cfa=*ip;})
 #  define IP            (ip)  #  define IP            (ip)
 #  define SET_IP(p)     ({ip=(p); NEXT_P0;})  #  define SET_IP(p)     ({ip=(p); NEXT_P0;})
Line 183 Line 190
   
 #if THREADING_SCHEME==6  #if THREADING_SCHEME==6
 #warning direct threading scheme 6: long latency, cfa dead  #warning direct threading scheme 6: long latency, cfa dead
   #ifndef GETCFA
   #error GETCFA must be defined for cfa dead threading
   #endif
 #  define NEXT_P0  #  define NEXT_P0
 #  define IP            (ip)  #  define IP            (ip)
 #  define SET_IP(p)     ({ip=(p); NEXT_P0;})  #  define SET_IP(p)     ({ip=(p); NEXT_P0;})
Line 197 Line 207
   
 #if THREADING_SCHEME==7  #if THREADING_SCHEME==7
 #warning direct threading scheme 7: low latency, cfa live  #warning direct threading scheme 7: low latency, cfa live
   #  define CFA_NEXT
 #  define NEXT_P0  #  define NEXT_P0
 #  define IP            (ip)  #  define IP            (ip)
 #  define SET_IP(p)     ({ip=(p); NEXT_P0;})  #  define SET_IP(p)     ({ip=(p); NEXT_P0;})
Line 210 Line 221
   
 #if THREADING_SCHEME==8  #if THREADING_SCHEME==8
 #warning direct threading scheme 8: cfa dead, i386 hack  #warning direct threading scheme 8: cfa dead, i386 hack
   #ifndef GETCFA
   #error GETCFA must be defined for cfa dead threading
   #endif
 #  define NEXT_P0  #  define NEXT_P0
 #  define IP            (ip)  #  define IP            (ip)
 #  define SET_IP(p)     ({ip=(p); NEXT_P0;})  #  define SET_IP(p)     ({ip=(p); NEXT_P0;})
Line 226 Line 240
 /* Power uses a prepare-to-branch instruction, and the latency between  /* Power uses a prepare-to-branch instruction, and the latency between
    this inst and the branch is 5 cycles on a PPC604; so we utilize this     this inst and the branch is 5 cycles on a PPC604; so we utilize this
    to do some prefetching in between */     to do some prefetching in between */
   #  define CFA_NEXT
 #  define NEXT_P0  #  define NEXT_P0
 #  define IP            ip  #  define IP            ip
 #  define SET_IP(p)     ({ip=(p); next_cfa=*ip; NEXT_P0;})  #  define SET_IP(p)     ({ip=(p); next_cfa=*ip; NEXT_P0;})
Line 240 Line 255
   
 #if THREADING_SCHEME==10  #if THREADING_SCHEME==10
 #warning direct threading scheme 10: plain (no attempt at scheduling)  #warning direct threading scheme 10: plain (no attempt at scheduling)
   #  define CFA_NEXT
 #  define NEXT_P0  #  define NEXT_P0
 #  define IP            (ip)  #  define IP            (ip)
 #  define SET_IP(p)     ({ip=(p); NEXT_P0;})  #  define SET_IP(p)     ({ip=(p); NEXT_P0;})
Line 257 Line 273
   
 #if THREADING_SCHEME==1  #if THREADING_SCHEME==1
 #warning indirect threading scheme 1: autoinc, long latency, cisc  #warning indirect threading scheme 1: autoinc, long latency, cisc
   #  define CFA_NEXT
 #  define NEXT_P0       ({cfa=*ip++;})  #  define NEXT_P0       ({cfa=*ip++;})
 #  define IP            (ip-1)  #  define IP            (ip-1)
 #  define SET_IP(p)     ({ip=(p); NEXT_P0;})  #  define SET_IP(p)     ({ip=(p); NEXT_P0;})
Line 270 Line 287
   
 #if THREADING_SCHEME==2  #if THREADING_SCHEME==2
 #warning indirect threading scheme 2: autoinc, long latency  #warning indirect threading scheme 2: autoinc, long latency
   #  define CFA_NEXT
 #  define NEXT_P0       ({cfa=*ip++;})  #  define NEXT_P0       ({cfa=*ip++;})
 #  define IP            (ip-1)  #  define IP            (ip-1)
 #  define SET_IP(p)     ({ip=(p); NEXT_P0;})  #  define SET_IP(p)     ({ip=(p); NEXT_P0;})
Line 284 Line 302
   
 #if THREADING_SCHEME==3  #if THREADING_SCHEME==3
 #warning indirect threading scheme 3: autoinc, low latency, cisc  #warning indirect threading scheme 3: autoinc, low latency, cisc
   #  define CFA_NEXT
 #  define NEXT_P0  #  define NEXT_P0
 #  define IP            (ip)  #  define IP            (ip)
 #  define SET_IP(p)     ({ip=(p); NEXT_P0;})  #  define SET_IP(p)     ({ip=(p); NEXT_P0;})
Line 297 Line 316
   
 #if THREADING_SCHEME==4  #if THREADING_SCHEME==4
 #warning indirect threading scheme 4: autoinc, low latency  #warning indirect threading scheme 4: autoinc, low latency
   #  define CFA_NEXT
 #  define NEXT_P0       ({cfa=*ip++;})  #  define NEXT_P0       ({cfa=*ip++;})
 #  define IP            (ip-1)  #  define IP            (ip-1)
 #  define SET_IP(p)     ({ip=(p); NEXT_P0;})  #  define SET_IP(p)     ({ip=(p); NEXT_P0;})
Line 311 Line 331
   
 #if THREADING_SCHEME==5  #if THREADING_SCHEME==5
 #warning indirect threading scheme 5: long latency, cisc  #warning indirect threading scheme 5: long latency, cisc
   #  define CFA_NEXT
 #  define NEXT_P0       ({cfa=*ip;})  #  define NEXT_P0       ({cfa=*ip;})
 #  define IP            (ip)  #  define IP            (ip)
 #  define SET_IP(p)     ({ip=(p); NEXT_P0;})  #  define SET_IP(p)     ({ip=(p); NEXT_P0;})
Line 324 Line 345
   
 #if THREADING_SCHEME==6  #if THREADING_SCHEME==6
 #warning indirect threading scheme 6: long latency  #warning indirect threading scheme 6: long latency
   #  define CFA_NEXT
 #  define NEXT_P0       ({cfa=*ip;})  #  define NEXT_P0       ({cfa=*ip;})
 #  define IP            (ip)  #  define IP            (ip)
 #  define SET_IP(p)     ({ip=(p); NEXT_P0;})  #  define SET_IP(p)     ({ip=(p); NEXT_P0;})
Line 337 Line 359
   
 #if THREADING_SCHEME==7  #if THREADING_SCHEME==7
 #warning indirect threading scheme 7: low latency  #warning indirect threading scheme 7: low latency
   #  define CFA_NEXT
 #  define NEXT_P0       ({cfa=*ip;})  #  define NEXT_P0       ({cfa=*ip;})
 #  define IP            (ip)  #  define IP            (ip)
 #  define SET_IP(p)     ({ip=(p); NEXT_P0;})  #  define SET_IP(p)     ({ip=(p); NEXT_P0;})
Line 350 Line 373
   
 #if THREADING_SCHEME==8  #if THREADING_SCHEME==8
 #warning indirect threading scheme 8: low latency,cisc  #warning indirect threading scheme 8: low latency,cisc
   #  define CFA_NEXT
 #  define NEXT_P0  #  define NEXT_P0
 #  define IP            (ip)  #  define IP            (ip)
 #  define SET_IP(p)     ({ip=(p); NEXT_P0;})  #  define SET_IP(p)     ({ip=(p); NEXT_P0;})

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


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