On Wed, Sep 10, 2003 at 03:37:57PM -0400, John Dennis wrote:
> 1) It may be hard to know the alignment requirements for all OS's and
> architectures (thats part of the reason we have system header
> files). We could guess 16 byte is sufficient. But even if we got the
> alignment requirement right how do we specify the alignment requirement
> to the compiler in a portable way such that it will build on a variety
> of systems and compilers? My understanding is that compiler alignment
> directives are not portable (e.g. not part of ANSI C). Are we
> comfortable picking one or two common alignment directives and
> conditionally compiling with the right one?

Since we already have a jmp_buf which is much larger than necisarry, all
that is needed is to take the first offset into it which is properly
aligned for the given architecture and use that as the system jmp_buf.
when the compiler can guarentee the proper alignment this becomes a
'nop', otherwise we waste at most alignment - sizeof(intmax_t) - 1
bytes. not a big deal. best of all, this can be implemented portably
quite easily.
        John

-- 
---------------------------------------------------------------------------
John Meacham - California Institute of Technology, Alum. - [EMAIL PROTECTED]
---------------------------------------------------------------------------
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to