|
|
1.1 ! root 1: /* ! 2: * n1/i386/snap1.c ! 3: * Machine specific parts of the debug routines. ! 4: * Many are macros in cc1mch.h, repeated here for documentation. ! 5: * i386. ! 6: */ ! 7: ! 8: #ifdef vax ! 9: #include "INC$LIB:cc1.h" ! 10: #else ! 11: #include "cc1.h" ! 12: #endif ! 13: ! 14: /* ! 15: * Print a pointer. ! 16: * Host dependent. ! 17: * Required even if TINY by other diagnostic messages. ! 18: */ ! 19: psnap(p) ! 20: char *p; ! 21: { ! 22: #if IAPX86 ! 23: #ifdef vax ! 24: printf("%08lx", (long) p); ! 25: #else ! 26: printf("%04x", (int) p); ! 27: #endif ! 28: #else ! 29: printf("%08lx", (long) p); ! 30: #endif ! 31: } ! 32: ! 33: #if !TINY ! 34: /* ! 35: * Print an ival_t. ! 36: * #define isnap(x) printf(" %d", x) ! 37: */ ! 38: ! 39: /* ! 40: * Print an lval_t. ! 41: * #define lsnap(x) printf(" %ld", x) ! 42: */ ! 43: ! 44: /* ! 45: * Print a dval_t. ! 46: */ ! 47: dsnap(d) ! 48: dval_t d; ! 49: { ! 50: register int i; ! 51: ! 52: for (i=0; i<8; ++i) ! 53: printf(" %02x", d[i]&0377); ! 54: } ! 55: ! 56: /* ! 57: * Print the t_cost field. ! 58: * #define csnap(x) (x!=0 ? printf(" cost=%d", x) : 0) ! 59: */ ! 60: ! 61: /* ! 62: * Print the t_flag field. ! 63: * #define fsnap(x) (x!=0 ? printf(" flag=%08lx", x) : 0) ! 64: */ ! 65: ! 66: /* ! 67: * Print machine dependent leaves. ! 68: * #define mdlsnap(x) snaptype(x, "Bad leaf"); ! 69: */ ! 70: ! 71: /* ! 72: * Print machine dependent op nodes. ! 73: * #define mdosnap(x) snaptype(x, "Bad op"); ! 74: */ ! 75: ! 76: #endif ! 77: ! 78: /* end of n1/i386/snap1.c */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.