[M3devel] bit field operations for insert/extract

Tony Hosking hosking at cs.purdue.edu
Tue Nov 23 15:37:00 CET 2010


Refresh my memory.  What m3front change did you make?


On Nov 23, 2010, at 3:33 AM, Jay K wrote:

> Tony, I'm going to try again to use bitfield operations for extract_mn.
> And insert_mn.
> I think I know what went wrong before for extract_mn: just remove the endian check in m3front.
> But I'm going to be sure test p240 covers it well.
> 
> The easy part, duh, your original extract_mn was correct I think, just, again, missing the m3front change.
> 
> Insert_mn is less obvious.
> I started writing it... bitfield_ref..modify_expr...uh, seems suspicious, to be modifying an existing value.
> 
> I guess it's more like, that, but with a temp that starts with the full value of x:
>  create temp
>  modify(temp, x)
>  modify(bitfield_ref(temp, count, offset), y);
>  m3_load(temp) 
> 
> ?
> 
> I'll try something like that.
> It seems unfortunate.
> Maybe we can know if x is already a value and not a variable?
> 
> 
>  - Jay

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20101123/dad2cbd6/attachment-0002.html>


More information about the M3devel mailing list