[M3devel] Target.Allow_packed_byte_aligned

Rodney M. Bates rodney_bates at lcwb.coop
Sun Sep 20 21:05:51 CEST 2015



On 09/20/2015 11:53 AM, Jay K wrote:
> I propose that Allow_packed_byte_aligned be set to FALSE for all targets.
>
> Or make it const.
>
>
> Or remove it.
>

Also, removing it altogether from Target.i3 means the value will be copied
out the place(s) where it is now used, making it even harder for someone
to find.  Making it all the same is OK with me, but>>>
>
> This will degrade slightly x86/amd64 but in, I speculate, fairly rare paths.
> Specifically, if you manage to create a packed type with unaligned fields,
> presumably loads/stores get converted to multiple aligned loads/stores followed
> by putting stuff back together. The occurrence of the unaligned fields should
> be very rare in the first place.
>

Not sure what you are saying, nor whether this is true of all targets, but at
least some targets will refuse a packed field that crosses a word boundary,
at the point of type definition.  The language explicitly permits an implementation
to do this.  So multi-word loads/stores wouldn't happen anyway.  Within a native
word, bit-twiddling works fine.

>
> I does not affect any other target.
>
>
> Granted, x86 and amd64 are the most common targets.
>
>
> Ok?
>   - Jay
>
>
>
>
> _______________________________________________
> M3devel mailing list
> M3devel at elegosoft.com
> https://mail.elegosoft.com/cgi-bin/mailman/listinfo/m3devel
>

-- 
Rodney Bates
rodney.m.bates at acm.org



More information about the M3devel mailing list