]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
MIPS: make mipsisa32 and mipsisa64 link more systematic
authorYunQiang Su <yunqiang.su@cipunited.com>
Wed, 12 Apr 2023 12:25:46 +0000 (13:25 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Wed, 12 Apr 2023 12:25:46 +0000 (13:25 +0100)
commit0a12bf174dd171edf153dbdcfb82d04f53d6cfab
treeca4dfeb0a6e1f6bf55dd2d29d35752ab705d9469
parent93cda40b4cbef77a45e678f8d8919da18f7d011c
MIPS: make mipsisa32 and mipsisa64 link more systematic

Introduce `static const struct mips_mach_extension mips_mach_32_64[]`
and `mips_mach_extends_32_64 (unsigned long base, unsigned long extension)`,
to make mipsisa32 and mipsisa64 interlink more systemtic.

Normally, the ISA mipsisa64rN has two subset: mipsisa64r(N-1) and
mipsisa32rN. `mips_mach_extensions` can hold only mipsisa64r(N-1),
so we need to introduce a new instruction `mips_mach_32_64`, which holds the pair 32vs64.

Note: R6 is not compatible with pre-R6.

bfd/ChangeLog:

* elfxx-mips.c (mips_mach_extends_p): make mipsisa32 and
  mipsisa64 interlink more systematic.
  (mips_mach_32_64): new struct added.
  (mips_mach_extends_32_64): new function added.
bfd/elfxx-mips.c