bit-field pointers / arrays

Stuart D. Gathman stuart at bms-at.UUCP
Wed Dec 24 12:05:01 AEST 1986


In article <1170 at ucbcad.BERKELEY.EDU>, faustus at ucbcad.BERKELEY.EDU (Wayne A. Christopher) writes:

> In article <321 at bms-at.UUCP>, stuart at bms-at.UUCP (Stuart D. Gathman) writes:

> > 	Unfortunately, a set of macros cannot use hardware bit-field
> > instructions.

> Yes they can: you can always write asm("...").

But then the code is no longer portable, unless the macros were defined
as part of the standard library a la longjmp().  I have no objection
to this, but I can't get started on such a package because none of
the 'C' compilers we have used have an 'asm()' directive!  This includes

	SCO & IBM XENIX
	Motorola 6350, 8000, 6600, 2000  (using 68010 & 68020)

Not only that, but I am not sure that such a package would be any
easier to develop or maintain than adding it to the compiler.

BTW, I noticed that 'compress' has asm directives for the VAX.

BTW, another hardware feature that I miss in 'C' is the "carry flag".
In this case, however, the things that it is good for (like multiprecision
arithmetic) are quite naturally defined as functions written in assembler.
There have been some cases however . . .
-- 
Stuart D. Gathman	<..!seismo!dgis!bms-at!stuart>



More information about the Comp.lang.c mailing list