From mboxrd@z Thu Jan 1 00:00:00 1970 References: In-Reply-To: Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Message-Id: <166D6D22-2379-4200-94B8-355CFF8B277B@bitblocks.com> Content-Transfer-Encoding: quoted-printable From: Bakul Shah Date: Mon, 23 Apr 2012 07:37:52 -0700 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Subject: Re: [9fans] some pcc questions Topicbox-Message-UUID: 7ae401f6-ead7-11e9-9d60-3106f5b1d025 On Apr 23, 2012, at 6:42 AM, erik quanstrom wrote: > crazy idea i haven't tried. >=20 > why not use X in sam or acme to mass-edit fu:bar -> fu[bar] and just make > fu an array. ? How will that work for something like struct X {int a:5, :8, c:12,:7; float d;} x; Usually you can convert bitfields ops to operations under masked -- what the= compiler has to do. So reading x.c becomes ((x.i>>7)&0xfff) etc. Where x.i r= epresents the same word where a &c are stored. I thought that (except for pc= c) bitfields code gen & performance issues got fixed a long time ago?