[squeak-dev] FFI | Byte alignment

tim Rowledge tim at rowledge.org
Fri May 29 18:58:34 UTC 2020


Could always do this dynamically; write out the file, compile and run, read results, set values. 

Obviously there might be a small problem with needing to have ffi working to call the OS routines to write the file etc in order to derive the type parameter sizes... :-) A bit more seriously one could do this as part of some install/run scripting that we have already touched on doing to derive the right VM for the chosen image file and OS etc.

> On 2020-05-29, at 10:18 AM, Marcel Taeumel <marcel.taeumel at hpi.de> wrote:
> 
> Ha! So #isUnix but not #isARM? I can work with that. :-)
> 
> Best,
> Marcel
>> Am 29.05.2020 19:16:22 schrieb tim Rowledge <tim at rowledge.org>:
>> 
>> 
>> 
>> > On 2020-05-29, at 8:37 AM, Nicolas Cellier wrote:
>> > 
>> > Found a 32bits debian VM:
>> > 
>> > st at debi9:~$ gcc test_align.c 
>> > st at debi9:~$ ./a.out 
>> > size of x = 16
>> > size of y = 16
>> > 
>> > So keep the code, just correct it!
>> 
>> On a 32 bit Raspberry Pi OS machine (note the OS name has officially changed as of this week!)
>> size of x = 24
>> size of y = 24
>> 
>> 
>> tim
>> --
>> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
>> Fractured Idiom:- J'Y SUIS, J'Y PESTES - I can stay for the weekend
>> 
>> 
>> 
> 


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: DTF: Dump Tape to Floor




More information about the Squeak-dev mailing list