help-smalltalk
[Top][All Lists]
Advanced

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

[Help-smalltalk] CStruct ABI and packed structs


From: Holger Hans Peter Freyther
Subject: [Help-smalltalk] CStruct ABI and packed structs
Date: Sun, 06 Jun 2010 10:48:56 +0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b1 Thunderbird/3.0.4

Hi again,

I had some time to browse through the CStruct code and I think it is
really nice. There are two issues for my intended usecase and I wanted
to ask what to do about it.

1.) The alignment rules of the type are inside the type itself, but in
general this is coming from the ABI. E.g. one case (it might not apply
to smalltalk) is that 64 bit types have a 8 byte alignment on ARM EABI
and 4 byte on the old ABI...

2.) The structs I showed are all packed and should not follow the
alignment rules...


I would like to move the alignof out of the type classes and into an ABI
class and at first step contain the alignment rules we have right now,
the second thing would be to create a CPackedStruct subclass which will
ignore the alignment rules. I would change the CStruct to make
subclassing more easy.

does this make sense?
        z.



reply via email to

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