help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] CStruct ABI and packed structs


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] CStruct ABI and packed structs
Date: Fri, 15 Oct 2010 18:20:01 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100907 Fedora/3.1.3-1.fc13 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.3

On 10/15/2010 06:17 PM, Holger Hans Peter Freyther wrote:
On 10/15/2010 06:14 PM, Paolo Bonzini wrote:
On 10/15/2010 05:55 PM, Holger Hans Peter Freyther wrote:

is there a place for CPackedStruct in the GST Kernel? Somewhere else?

There is; however, it's a bit more tricky than this, because access to
unaligned members will trap on some architectures.

Sure, would you want to patch it in the 'value' implementations? or somewhere
in the C code? Would you want to introduce 'parallel' types that can handle
unaligned access? CArray ->  CArrayUnaligned?

Not really CArrayUnaligned, because those are compound types. But yes, CIntUnaligned and friends would be needed so that the right alignment is also propagated to the fields (you want "packedStruct field alignof == 1" always).

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]