[m-rev.] for review: align functions in trailing grades

Mark Brown mark at csse.unimelb.edu.au
Tue Jan 22 21:51:03 AEDT 2008


On 22-Jan-2008, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
> In trailing grades, pass flags to the C compiler that force it to align
> functions on word boundaries.  For some architectures, and for some C 
> compiler
> optimisation settings, function addresses are not aligned and this breaks
> function trailing when using tagged trail entries.

...

> compiler/compile_target_code.m:
> scripts/mgnuc.in:
> 	When in a trailing grade and using gcc as a C compiler align
> 	functions on word boundaries in order to avoid problems
> 	with function trailing.

This only needs to be done for tagged trails.  Did you mean to pass the
option always, even if the `--disable-tagged-trail' configuration option
is given?

It doesn't matter that much, since I can't see how passing the option will
cause any significant harm, and it could be a fair bit of hassle to also
check if the trail is tagged.  So I'm happy for you to commit this as is,
although a comment in mgnuc.in saying that the option needs to be passed
because the trail *might* be tagged would be good.

Cheers,
Mark.

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list