9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Bakul Shah <bakul@bitblocks.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] some pcc questions
Date: Mon, 23 Apr 2012 07:37:52 -0700	[thread overview]
Message-ID: <166D6D22-2379-4200-94B8-355CFF8B277B@bitblocks.com> (raw)
In-Reply-To: <be234b67ea66906d62cbc5298e49f3c0@kw.quanstro.net>

On Apr 23, 2012, at 6:42 AM, erik quanstrom <quanstro@quanstro.net> wrote:
> crazy idea i haven't tried.
> 
> 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 represents the same word where a &c are stored. I thought that (except for pcc) bitfields code gen & performance issues got fixed a long time ago?



      reply	other threads:[~2012-04-23 14:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-20 16:01 Jens Staal
2012-04-20 16:24 ` cinap_lenrek
2012-04-20 16:29   ` cinap_lenrek
2012-04-20 17:31   ` Charles Forsyth
2012-04-23  6:30 ` Jens Staal
2012-04-23 13:23   ` Comeau At9Fans
2012-04-23 13:19 ` Comeau At9Fans
     [not found] ` <CAE9W7-gU72RNgbs6Pcuxp5KEtXBUsApZNGzNiEpvTgLtbL7wjw@mail.gmail.c>
2012-04-23 13:42   ` erik quanstrom
2012-04-23 14:37     ` Bakul Shah [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=166D6D22-2379-4200-94B8-355CFF8B277B@bitblocks.com \
    --to=bakul@bitblocks.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).