File:  [MW Coherent from dump] / coherent / d / bin / cc / c / n1 / i8086 / snap1.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:39 2019 UTC (7 years, 2 months ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

/*
 * Machine specific parts of the
 * debug routines.
 * Many are macros in cc1mch.h,
 * repeated here for documentation.
 * Both SMALL and LARGE model of
 * the Intel 8086.
 */
#ifdef   vax
#include "INC$LIB:cc1.h"
#else
#include "cc1.h"
#endif

/*
 * Print a pointer.
 * This is actually host dependent
 * and required even if TINY by other
 * diagnostic messages.
 */
psnap(p)
char *p;
{
#if RUNNING_LARGE
	struct	{
		int	offs;
		int	base;
	};

	printf("%04x:%04x", p.base, p.offs);
#else
#ifdef vax
	printf("%08x", (int) p);
#else
	printf("%04x", (int) p);
#endif
#endif
}

#if !TINY
/*
 * Print an ival_t.
 * #define isnap(x)	printf(" %d", x)
 */

/*
 * Print an lval_t.
 * #define lsnap(x)	printf(" %ld", x)
 */

/*
 * Print a dval_t.
 */
dsnap(d)
dval_t d;
{
	register int i;

	for (i=0; i<8; ++i)
		printf(" %02x", d[i]&0377);
}

/*
 * Print the t_cost field.
 * #define csnap(x)	(x!=0 ? printf(" cost=%d", x) : 0)
 */

/*
 * Print the t_flag field.
 * #define fsnap(x)	(x!=0 ? printf(" flag=%08lx", x) : 0)
 */

/*
 * Print machine dependent leaves.
 * #define mdlsnap(x)	snaptype(x, "Bad leaf");
 */

/*
 * Print machine dependent op nodes.
 * #define mdosnap(x)	snaptype(x, "Bad op");
 */

#endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.