This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: gas fix for ia64 target
- From: Nick Clifton <nickc at cambridge dot redhat dot com>
- To: davidm at hpl dot hp dot com
- Cc: binutils at sources dot redhat dot com, wilson at redhat dot com
- Date: 22 Feb 2002 11:59:15 +0000
- Subject: Re: gas fix for ia64 target
- References: <200202211946.g1LJkNtK017905@napali.hpl.hp.com>
Hi David,
> Unrelated but trivial: the patch adds documentation for the
> -mconstant-gp and -mauto-pic command-line options.
Note - although these options are now documented in the executable
they are still missing from the gas/doc directory... [hint hint]
> 2002-02-20 David Mosberger <davidm@hpl.hp.com>
>
> * config/tc-ia64.c (dot_restore): Issue error message of epilogue
> count exceeds prologue count.
> (md_show_usage): Describe -mconstant-gp and -mauto-pic.
> (unwind.label_prologue_count): New member.
>
> Based on a patch by Hans Boehm <hboehm@hpl.hp.com>:
>
> (get_saved_prologue_count): New function.
> (save_prologue_count): New function.
> (free_saved_prologue_count): New function.
> (dot_label_state): Record state label by calling save_prologue_count().
> (dot_copy_state): Restore prologue count by calling
> get_saved_prologue_count().
> (generate_unwind_image): Free up list of saved prologue
> counts by calling free_saved_prologue_counts().
Approved * applied (mainline & branch).
Note - your patch had a bug which I fixed whilst applying:
> +static void
> +save_prologue_count (lbl, count)
> + unsigned long lbl;
> + unsigned int count;
> +{
> + label_prologue_count *lpc = unwind.saved_prologue_counts;
> + while (lpc != 0 && lpc->label_number != lbl)
> + lpc = lpc->next;
> + if (lpc != 0)
> + lpc->prologue_count = count;
> + else
> + {
> + label_prologue_count * new_lpc = xmalloc (sizeof (label_prologue_count));
> + new_lpc->next = lpc;
> + new_lpc->label_number = lbl;
> + new_lpc->prologue_count = count;
> + unwind.saved_prologue_counts = new_lpc;
> + }
> +}
The assignment of 'lpc' to the 'next' field of the newly created
'new_lpc' structure means that any current elements on the
unwind.saved_prologue_counts list will be discarded. I assumed that
you meant to write:
new_lpc->next = unwind.saved_prologue_counts;
Cheers
Nick