<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 23, 2015 at 9:17 AM, Rodney M. Bates <span dir="ltr"><<a href="mailto:rodney_bates@lcwb.coop" target="_blank">rodney_bates@lcwb.coop</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So the next question is, what about fields that that occupy only whole bytes, but<br>
are not 2^n bytes or aren't aligned to their size. Should I treat these as<br>
bitfields and produce shift-and-mask operations to access them?<br></blockquote><div><br></div><div>I would represent this with unaligned accesses. You can set the alignment on loads and stores generated for field access down to what the struct layout guarantees.</div><div><br></div><div>I just checked, and the Sparc backend will splice up such loads into individual byte accesses.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks for the advice.</blockquote><div><br></div><div>No problem. :) </div></div></div></div>