This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: XCOFF64 gas patch
On Mon, Apr 10, 2000 at 11:02:25AM -0700, Ian Lance Taylor wrote:
> *************** md_apply_fix3 (fixp, valuep, seg)
> *** 4803,4807 ****
> && operand->bits == 16
> && operand->shift == 0
> ! && operand->insert == NULL
> && fixp->fx_addsy != NULL
> && ppc_is_toc_sym (fixp->fx_addsy))
> --- 4844,4848 ----
> && operand->bits == 16
> && operand->shift == 0
> ! /* && operand->insert == NULL*/
> && fixp->fx_addsy != NULL
> && ppc_is_toc_sym (fixp->fx_addsy))
>
> This is not a good sort of change, because it is not maintainable.
> Either the test for insert == NULL is simply incorrect, and we should
> simply remove it, or there is some more subtle issue here, and we need
> a comment explaining what is going on.
Yikes, this wasn't meant to slip through; I left the comment in to remind
myself to ask about it, but that obviously didn't work.
This is related to the FIXME at the top of that block of code:
FIXME: We need to handle the DS field at the very least.
because for ppc64 we emit a lot of TOC loads like:
ld 9,LC..0(2)
which uses:
{ "ld", DSO(58,0), DS_MASK, PPC64, { RT, DS, RA } },
Where DS is:
{ 16, 0, insert_ds, extract_ds, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
So operand->insert is in this case insert_ds, not NULL. Perhaps someone can
explain why the operand->insert check is there, and I can try to fix it from
there?
-Clint