This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] MIPS: Use BFD_RELOC_UNUSED when no relocation


Maciej W. Rozycki wrote:
[snip]
> --- binutils-2.15.91-20040625.macro/gas/config/tc-mips.c	2004-06-15 03:25:28.000000000 +0000
> +++ binutils-2.15.91-20040625/gas/config/tc-mips.c	2004-06-27 11:09:41.000000000 +0000
> @@ -2079,7 +2079,7 @@ append_insn (struct mips_cl_insn *ip, ex
>      }
>  
>    fixp[0] = fixp[1] = fixp[2] = NULL;
> -  if (address_expr != NULL && *reloc_type < BFD_RELOC_UNUSED)
> +  if (address_expr != NULL)

This may break the mips16 support, I'd use "<= BFD_RELOC_UNUSED".

>      {
>        if (address_expr->X_op == O_constant)
>  	{
> @@ -2112,6 +2112,7 @@ append_insn (struct mips_cl_insn *ip, ex
>  	      ip->insn_opcode |= (address_expr->X_add_number >> 16) & 0xffff;
>  	      break;
>  
> +	    case BFD_RELOC_UNUSED:
>  	    case BFD_RELOC_LO16:
>  	    case BFD_RELOC_MIPS_GOT_DISP:
>  	      ip->insn_opcode |= address_expr->X_add_number & 0xffff;
> @@ -2147,7 +2148,7 @@ append_insn (struct mips_cl_insn *ip, ex
>  	      internalError ();
>  	    }
>  	}
> -      else
> +      else if (*reloc_type < BFD_RELOC_UNUSED)
>  	need_reloc:

Same problem, AFAICS this shouldn't change.


Thiemo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]