Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: Ron Natalie <ron@sensor.com>
Subject: Re: Digital UNIX C 'long double' support questions
Date: 1996/09/18	[thread overview]
Message-ID: <323FFE13.526B@sensor.com> (raw)
In-Reply-To: 9609172132.AA01303@bigpink.pa.dec.com


This reminds me of when we were working on the Denelcor HEP
computer and getting ready to write the C compiler.  The
HEP had 8, 16, 32, and 64 bit quantities (and this was back
in 1981).  Well, it's basic unit was 64, 32 was a partial
word for it.  So it was pretty clear we wanted to make 
int==long==64.  So what do we call the 32 bit things.
I voted for short longs (or long shorts) and others voted
for a new keyword "medium."  (We finally settled on _int32).

The HEP was amusing in that the partial word access was quaintly
encoded in the lower 3 bits of the address.  While the compiler
handled:

	int *x;
	short *y;
	x = &foo;
	y = x;

Doing something like this (which the BSD kernel we were porting
does all over the file system code, naughty, naughty)....

	union {
	     int * x;
	     short *y;
	} p;

	p.x = foo;
	woo = *p.y;

The assignment into woo would be of an "int" sized thing rather
than a short sized thing.

-Ron



  reply	other threads:[~1996-09-18  4:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-17  4:00 Digital UNIX C 'long double' support questions berc
1996-09-18  4:00 ` Ron Natalie [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-09-13  4:00 Al Simons
1996-09-17  4:00 ` John R. Campbell
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox