guile-devel
[Top][All Lists]
Advanced

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

Re: Attempting to unbox struct fields


From: Mark H Weaver
Subject: Re: Attempting to unbox struct fields
Date: Mon, 29 Feb 2016 12:43:53 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (gnu/linux)

"Thompson, David" <address@hidden> writes:

>> The first thing I noticed is that the patch assumes that doubles are the
>> same size as pointers.  Obviously this is not the case on 32-bit
>> systems.  What's the plan for those systems?
>
> Yeah, I just hacked this together on my x86_64 system and paid no mind
> to portability.  I was hoping that you or Andy or Ludovic would have
> an idea for how to address portability issues. :)

I think the approach we need to take is that for 32-bit systems, doubles
will need to use two consecutive slots.  Furthermore, those slots will
either need to be aligned (i.e. the first slot must have an even index)
or else the code that accesses 'double' struct fields will need to
perform the access carefully, perhaps by copying each half separately
into a local 'union' and then copying the double from there.

> My current plan is to keep pressing onward and produce a
> proof-of-concept, hacky patch set that allows unboxed struct fields on
> x86_64.  Then, with some help and guidance, I can sort out the
> portability issues, code style issues, unit tests, and documentation
> after confirmation that the prototype is on the right track.

I think the issue above is fairly fundamental, and might not be easy to
address as an after-thought.  It would be good to test your preliminary
work on 32-bit systems throughout the development process.  Fortunately,
I know that you run GuixSD which makes this easy :)

What do you think?

    Thanks,
      Mark



reply via email to

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