[PATCH 1/2] MIPS: Add n32 VECs to non-vendor elf targets

Maciej W. Rozycki macro@orcam.me.uk
Mon Jun 5 23:37:26 GMT 2023


On Mon, 5 Jun 2023, YunQiang Su wrote:

> For triples mips*-elf without vendor, such as mipsisa32r2el-elf,
> mipstx39-elf, the NUBI is used. These targets use non-trad VECs.

 I guess you mean the IRIX variant of the psABI.  NUBI has never been 
deployed.

> Currently, N32 VECs are missing from targ_selvecs in bfd/config.bfd.
> Let's add them.

 NAK, the submitters of these targets had their reasons not to include 
n32.

> This patch also fixes gas testcases for these targets.

 This is backwards.  Any irrelevant tests just need to be disabled for 
targets that do not have n32 support enabled.

 Please follow the ${has_newabi} approach for now, or if you can be 
bothered port binutils/testsuite/binutils-all/mips/mips.exp approach, 
which I implemented a while ago that is cleaner (it has an advantage of 
also supporting targets that do not have o32 support enabled; yes, we do 
have such ones too).

> diff --git a/gas/testsuite/gas/mips/comdat-reloc-r6.d b/gas/testsuite/gas/mips/comdat-reloc-r6.d
> index 513589e73d3..f7d9a4e57c0 100644
> --- a/gas/testsuite/gas/mips/comdat-reloc-r6.d
> +++ b/gas/testsuite/gas/mips/comdat-reloc-r6.d
> @@ -26,9 +26,9 @@ Relocation section '\.rel\.text\.bar' at offset .+ contains .+ entries:
>   Offset     Info    Type            Sym\.Value  Sym\. Name
>  00000000  ......05 R_MIPS_HI16       00000000   _gp_disp
>  00000004  ......06 R_MIPS_LO16       00000000   _gp_disp
> -0000000c  0000070a R_MIPS_PC16       00000020   \.L1\^B1
> +0000000c  00000[7d]0a R_MIPS_PC16       00000020   \.L1\^B1
>  00000014  ......09 R_MIPS_GOT16      00000000   foo
>  00000024  ......09 R_MIPS_GOT16      00000000   foo
>  0000001c  ......06 R_MIPS_LO16       00000000   foo
> -00000020  0000080a R_MIPS_PC16       00000018   \.L0\^B1
> +00000020  00000[8e]0a R_MIPS_PC16       00000018   \.L0\^B1
>  #pass

 Where do these differences come from?

  Maciej


More information about the Binutils mailing list