Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site utcsri.UUCP Path: utzoo!utcsri!greg From: greg@utcsri.UUCP (Gregory Smith) Newsgroups: comp.lang.c Subject: Re: bit-field pointers / arrays Message-ID: <3811@utcsri.UUCP> Date: Fri, 19-Dec-86 14:31:19 EST Article-I.D.: utcsri.3811 Posted: Fri Dec 19 14:31:19 1986 Date-Received: Fri, 19-Dec-86 23:22:36 EST References: <2937@bu-cs.BU.EDU> <321@bms-at.UUCP> Reply-To: greg@utcsri.UUCP (Gregory Smith) Organization: CSRI, University of Toronto Lines: 66 Summary: In article <321@bms-at.UUCP> stuart@bms-at.UUCP (Stuart D. Gathman) writes: > Unfortunately, a set of macros cannot use hardware bit-field >instructions. Here is a list of processors which I know to have >bit-field instructions that I can't get at from 'C': ... > VAX ... >it could not be *that* difficult. My complaint is that the macros do >not utilize the hardware bitfield instructions. If your everyday optimizing >compiler can figure out when to use these from a mess of shifts and masks, >then I'll be satisfied. I think that bitfield arrays might be the easier >approach, however. Let's see: main(){ int a,b,c,d; register int x,y; x = (a>>13) & 15; /* extract 4 bits */ b |= 1<>13) & 15; can't complain ashl r10,$1,r0 | 1<