[M3devel] bit field operations for insert/extract
Tony Hosking
hosking at cs.purdue.edu
Tue Nov 23 22:34:25 CET 2010
Are they wrong? Seems strange that they worked previously!
On Nov 23, 2010, at 1:46 PM, Jay K wrote:
> None yet. But notice the endian checks around the insert_mn or extract_mn uses in cg.m3.
> The change would be to remove those.
>
> - Jay
>
>
> Subject: Re: [M3devel] bit field operations for insert/extract
> From: hosking at cs.purdue.edu
> Date: Tue, 23 Nov 2010 09:37:00 -0500
> CC: m3devel at elegosoft.com
> To: jay.krell at cornell.edu
>
> 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/f98b4529/attachment-0002.html>
More information about the M3devel
mailing list