version 1.3, 1999/02/06 22:28:25
|
version 1.5, 1999/05/14 20:55:14
|
Line 91
|
Line 91
|
|
|
*/ |
*/ |
|
|
#ifndef GETCFA |
/* CFA_NEXT: if NEXT uses cfa, you have to #define CFA_NEXT, to get |
# define CFA_NEXT |
* cfa declared in engine. |
/* 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 117
|
|
|
#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 131
|
|
|
#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 148
|
|
|
#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 162
|
|
|
#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 178
|
|
|
#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 192
|
|
|
#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 209
|
|
|
#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 223
|
|
|
#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 242
|
/* 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 257
|
|
|
#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 275
|
|
|
#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 289
|
|
|
#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 304
|
|
|
#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 318
|
|
|
#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 333
|
|
|
#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 347
|
|
|
#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 361
|
|
|
#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 375
|
|
|
#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;}) |