bit-field pointers / arrays

Wayne A. Christopher faustus at ucbcad.BERKELEY.EDU
Wed Dec 17 05:55:27 AEST 1986


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("...").

> Here is a list of processors which I know to have
> bit-field instructions that I can't get at from 'C':
> 
> 	NEC V20, V30
> 	M68000 & family
> 	PDP-11	(From previous posting)
> 	DEC-10, 20
> 	VAX
>
> Here are processors which do not:
> 
> 	8088 & kin
> 	other 8-bits: 6502 8080 etc

You should also include a lot of newer RISC machines in the second category.
These machines don't support unaligned word access or in some cases access to
individual bytes (you have to load the word and extract it).  These machines
certainly aren't going to have "set bit" instructions.  Also, they're
probably going to run faster than the machines with bit instructions, even
for code that uses bitfields.

	Wayne



More information about the Comp.lang.c mailing list