aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorMatthew Fortune <matthew.fortune@imgtec.com>2014-07-29 11:27:59 +0100
committerMatthew Fortune <matthew.fortune@imgtec.com>2014-07-29 11:27:59 +0100
commit351cdf24d223290b15fa991e5052ec9e9bd1e284 (patch)
treede4c8ba7c7c1f74323befdb6fca0873a4da678d5 /gas/testsuite
parent7e09a22367934a6d53f79d8b01135832b80ab246 (diff)
downloadgdb-351cdf24d223290b15fa991e5052ec9e9bd1e284.zip
gdb-351cdf24d223290b15fa991e5052ec9e9bd1e284.tar.gz
gdb-351cdf24d223290b15fa991e5052ec9e9bd1e284.tar.bz2
[MIPS] Implement O32 FPXX, FP64 and FP64A ABI extensions
Specification: https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking include/ * elf/mips.h (PT_MIPS_ABIFLAGS, SHT_MIPS_ABIFLAGS): Define. (Val_GNU_MIPS_ABI_FP_OLD_64): Rename from Val_GNU_MIPS_ABI_FP_64. (Val_GNU_MIPS_ABI_FP_64): Redefine. (Val_GNU_MIPS_ABI_FP_XX): Define. (Elf_External_ABIFlags_v0, Elf_Internal_ABIFlags_v0): New structures. (AFL_REG_NONE, AFL_REG_32, AFL_REG_64, AFL_REG_128): Define. (AFL_ASE_DSP, AFL_ASE_DSPR2, AFL_ASE_EVA, AFL_ASE_MCU): Likewise. (AFL_ASE_MDMX, AFL_ASE_MIPS3D, AFL_ASE_MT, AFL_ASE_SMARTMIPS): Likewise. (AFL_ASE_VIRT, AFL_ASE_MSA, AFL_ASE_MIPS16): Likewise. (AFL_ASE_MICROMIPS, AFL_ASE_XPA): Likewise. (AFL_EXT_XLR, AFL_EXT_OCTEON2, AFL_EXT_OCTEONP): Likewise. (AFL_EXT_LOONGSON_3A, AFL_EXT_OCTEON, AFL_EXT_5900): Likewise. (AFL_EXT_4650, AFL_EXT_4010, AFL_EXT_4100, AFL_EXT_3900): Likewise. (AFL_EXT_10000, AFL_EXT_SB1, AFL_EXT_4111, AFL_EXT_4120): Likewise. (AFL_EXT_5400, AFL_EXT_5500, AFL_EXT_LOONGSON_2E): Likewise. (AFL_EXT_LOONGSON_2F): Likewise. (bfd_mips_elf_swap_abiflags_v0_in): Prototype. (bfd_mips_elf_swap_abiflags_v0_out): Likewise. (bfd_mips_isa_ext): Likewise. bfd/ * elfxx-mips.c (ABI_O32_P, MIPS_ELF_ABIFLAGS_SECTION_NAME_P): New macro. (mips_elf_obj_tdata): Add abiflags and abiflags_valid fields. (bfd_mips_elf_swap_abiflags_v0_in): New function. (bfd_mips_elf_swap_abiflags_v0_out): Likewise. (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_ABIFLAGS. (_bfd_mips_elf_fake_sections): Likewise. (_bfd_mips_elf_always_size_sections): Handle .MIPS.abiflags. (_bfd_mips_elf_additional_program_headers): Account for new PT_MIPS_ABIFLAGS program header. (_bfd_mips_elf_modify_segment_map): Create PT_MIPS_ABIFLAGS segment and associate with .MIPS.abiflags. (_bfd_mips_elf_gc_mark_extra_sections): New function. (bfd_mips_isa_ext, update_mips_abiflags_isa): New static function. (infer_mips_abiflags): Likewise. (_bfd_mips_elf_final_link): Handle .MIPS.abiflags. (mips_32bit_flags_p): Moved higher. (mips_elf_merge_obj_attributes, _bfd_mips_fp_abi_string): Error checking for FP ABIs. (_bfd_mips_elf_merge_private_bfd_data): Restructure and add abiflags checks. Check EF_MIPS_FP64 flag consistency. (print_mips_ases, print_mips_isa_ext): New static function. (print_mips_fp_abi_value, get_mips_reg_size): Likewise. (_bfd_mips_elf_print_private_bfd_data): Display abiflags data. (_bfd_mips_post_process_headers): Set EI_ABIVERSION = 3 for Val_GNU_MIPS_ABI_FP_64 or Val_GNU_MIPS_ABI_FP_64A. * elfxx-mips.h (_bfd_mips_elf_gc_mark_extra_sections): New prototype. * elf32-mips.c (elf_backend_gc_mark_extra_sections): Implement. * elfn32-mips.c (elf_backend_gc_mark_extra_sections): Implement. * elf64-mips.c (elf_backend_gc_mark_extra_sections): Implement. binutils/ * readelf.c (get_mips_segment_type): Display name for PT_MIPS_ABIFLAGS. (get_mips_section_type_name): Display name for SHT_MIPS_ABIFLAGS. (display_mips_gnu_attribute): Abstracted fp abi printing to... (print_mips_fp_abi_value): New static function. Handle new FP ABIs. (print_mips_ases, print_mips_isa_ext): New static functions. (get_mips_reg_size): Likewise. (process_mips_specific): Display abiflags data. elfcpp/ * elfcpp.h (PT_MIPS_ABIFLAGS): New program header type. gas/ * config/tc-mips.c (mips_flags_frag): New static global. (struct mips_set_options): Add oddspreg field. (file_mips_opts, mips_opts): Initialize oddspreg. (ISA_HAS_ODD_SINGLE_FPR): Add CPU argument and update for R5900 and Loongson-3a. (enum options, md_longopts, md_parse_option): Add -mfpxx, -modd-spreg and -mno-odd-spreg options. (md_begin): Create .MIPS.abiflags section. (fpabi_incompatible_with, fpabi_requires): New static function. (check_fpabi): Likewise. (mips_check_options): Handle fp=xx and oddspreg restrictions. (file_mips_check_options): Set oddspreg by default for fp=xx. (mips_oddfpreg_ok): Re-write function. (check_regno): Check odd numbered registers regardless of FPR size. For fp != 32 use as_bad instead of as_warn. (match_float_constant): Rewrite check regarding FP register width. Add support for generating constants when MXHC1 is present. Handle fp=xx to comply with the ABI. (macro): Update M_LI_DD similarly to match_float_constant. Generate MTHC1 when available. Check that correct code can be generated for fp=xx and fp=64 ABIs. (parse_code_option, s_mipsset): Add fp=xx, oddspreg and nooddspreg options. (mips_convert_ase_flags): New static function. (mips_elf_final_processing): Use fpabi == Val_GNU_MIPS_ABI_FP_OLD_64 to determine when to add the EF_MIPS_FP64 flag. Populate the .MIPS.abiflags section. (md_mips_end): Update .gnu_attribute based on command line and .module as applicable. Use check_fpabi to ensure .gnu.attribute and command line/.module options are consistent. * doc/as.texinfo: Add missing -mgp64/-mfp64 options and document new -mfpxx, -modd-spreg and -mno-odd-spreg options. * doc/c-mips.texi: Document -mfpxx, -modd-spreg, -mno-odd-spreg, gnu_attribute values and FP ABIs. ld/ * emulparams/elf32bmip.sh: Add .MIPS.abiflags. * emulparams/elf32bmipn32-defs.sh: Likewise. * emulparams/elf64bmip-defs.sh: Likewise. opcodes/ * micromips-opc.c (COD, LCD) New macros. (cfc1, ctc1): Remove FP_S attribute. (dmfc1, mfc1, mfhc1): Add LCD attribute. (dmtc1, mtc1, mthc1): Add COD attribute. * mips-opc.c (cfc1, cftc1, ctc, cttc1): Remove FP_S attribute. binutils/testsuite/ * binutils-all/readelf.s: Account for .MIPS.abiflags and .gnu.attributes. * binutils-all/readelf.ss-tmips: Likewise. * binutils-all/strip-3.d: Likewise. gas/testsuite/ * gas/mips/attr-gnu-4-0.d: New. * gas/mips/attr-gnu-4-0.s: Likewise. * gas/mips/attr-gnu-4-1-mfp32.l: Likewise. * gas/mips/attr-gnu-4-1-mfp32.s: Likewise. * gas/mips/attr-gnu-4-1-mfp64.l: Likewise. * gas/mips/attr-gnu-4-1-mfp64.s: Likewise. * gas/mips/attr-gnu-4-1-mfpxx.s: Likewise. * gas/mips/attr-gnu-4-1-msingle-float.l: Likewise. * gas/mips/attr-gnu-4-1-msingle-float.s: Likewise. * gas/mips/attr-gnu-4-1-msoft-float.l: Likewise. * gas/mips/attr-gnu-4-1-msoft-float.s: Likewise. * gas/mips/attr-gnu-4-1.d: Likewise. * gas/mips/attr-gnu-4-1.s: Likewise. * gas/mips/attr-gnu-4-2-mdouble-float.l: Likewise. * gas/mips/attr-gnu-4-2-mdouble-float.s: Likewise. * gas/mips/attr-gnu-4-2-msoft-float.l: Likewise. * gas/mips/attr-gnu-4-2-msoft-float.s: Likewise. * gas/mips/attr-gnu-4-2.d: Likewise. * gas/mips/attr-gnu-4-2.s: Likewise. * gas/mips/attr-gnu-4-3-mhard-float.l: Likewise. * gas/mips/attr-gnu-4-3-mhard-float.s: Likewise. * gas/mips/attr-gnu-4-3.d: Likewise. * gas/mips/attr-gnu-4-3.s: Likewise. * gas/mips/attr-gnu-4-4.l: Likewise. * gas/mips/attr-gnu-4-4.s: Likewise. * gas/mips/attr-gnu-4-5-64.l: Likewise. * gas/mips/attr-gnu-4-5-64.s: Likewise. * gas/mips/attr-gnu-4-5.d: Likewise. * gas/mips/attr-gnu-4-5.l: Likewise. * gas/mips/attr-gnu-4-5.s: Likewise. * gas/mips/attr-gnu-4-6-64.l: Likewise. * gas/mips/attr-gnu-4-6-64.s: Likewise. * gas/mips/attr-gnu-4-6.d: Likewise. * gas/mips/attr-gnu-4-6.l: Likewise. * gas/mips/attr-gnu-4-6.s: Likewise. * gas/mips/attr-gnu-4-6-msingle-float.l: Likewise. * gas/mips/attr-gnu-4-6-msingle-float.s: Likewise. * gas/mips/attr-gnu-4-6-msoft-float.l: Likewise. * gas/mips/attr-gnu-4-6-msoft-float.s: Likewise. * gas/mips/attr-gnu-4-6-noodd.l: Likewise. * gas/mips/attr-gnu-4-6-noodd.s: Likewise. * gas/mips/attr-gnu-4-7-64.l: Likewise. * gas/mips/attr-gnu-4-7-64.s: Likewise. * gas/mips/attr-gnu-4-7-msingle-float.l: Likewise. * gas/mips/attr-gnu-4-7-msingle-float.s: Likewise. * gas/mips/attr-gnu-4-7-msoft-float.l: Likewise. * gas/mips/attr-gnu-4-7-msoft-float.s: Likewise. * gas/mips/attr-gnu-4-7-odd.l: Likewise. * gas/mips/attr-gnu-4-7-odd.s: Likewise. * gas/mips/attr-gnu-4-7.d: Likewise. * gas/mips/attr-gnu-4-7.l: Likewise. * gas/mips/attr-gnu-4-7.s: Likewise. * gas/mips/attr-none-double.d: Likewise. * gas/mips/attr-none-o32-fp64.d: Likewise. * gas/mips/attr-none-o32-fp64-nooddspreg.d * gas/mips/attr-none-o32-fpxx.d: Likewise. * gas/mips/attr-none-single-float.d: Likewise. * gas/mips/attr-none-soft-float.d: Likewise. * gas/mips/elf_arch_mips32r3.d: Likewise. * gas/mips/elf_arch_mips32r5.d: Likewise. * gas/mips/elf_arch_mips64r3.d: Likewise. * gas/mips/elf_arch_mips64r5.d: Likewise. * gas/mips/li-d.d: Likewise. * gas/mips/li-d.s: Likewise. * gas/mips/module-check-warn.l: Likewise. * gas/mips/module-check-warn.s: Likewise. * gas/mips/module-check.d: Likewise. * gas/mips/module-check.s: Likewise. * gas/mips/module-mfp32.d: Likewise. * gas/mips/module-mfp32.s: Likewise. * gas/mips/module-mfp64.d: Likewise. * gas/mips/module-mfp64.s: Likewise. * gas/mips/module-mfp64-noodd.d: Likewise. * gas/mips/module-mfp64-noodd.s: Likewise. * gas/mips/module-mfpxx.d: Likewise. * gas/mips/module-mfpxx.s: Likewise. * gas/mips/module-msingle-float.d: Likewise. * gas/mips/module-msingle-float.s: Likewise. * gas/mips/module-msoft-float.d: Likewise. * gas/mips/module-msoft-float.s: Likewise. * gas/mips/module-set-mfpxx.d: Likewise. * gas/mips/module-set-mfpxx.s: Likewise. * gas/mips/fpxx-oddfpreg.d: Likewise. * gas/mips/fpxx-oddfpreg.l: Likewise. * gas/mips/fpxx-oddfpreg.s: Likewise. * gas/mips/no-odd-spreg.d: Likewise. * gas/mips/odd-spreg.d: Likewise. * gas/elf/section2.e-mips: Adjust expected output. * gas/mips/attr-gnu-abi-fp-1.d: Likewise. * gas/mips/attr-gnu-abi-msa-1.d: Likewise. * gas/mips/call-nonpic-1.d: Likewise. * gas/mips/elf_arch_mips1.d: Likewise. * gas/mips/elf_arch_mips2.d: Likewise. * gas/mips/elf_arch_mips3.d: Likewise. * gas/mips/elf_arch_mips32.d: Likewise. * gas/mips/elf_arch_mips32r2.d: Likewise. * gas/mips/elf_arch_mips4.d: Likewise. * gas/mips/elf_arch_mips5.d: Likewise. * gas/mips/elf_arch_mips64.d: Likewise. * gas/mips/elf_arch_mips64r2.d: Likewise. * gas/mips/elf_ase_micromips-2.d: Likewise. * gas/mips/elf_ase_micromips.d: Likewise. * gas/mips/elf_ase_mips16-2.d: Likewise. * gas/mips/elf_ase_mips16.d: Likewise. * gas/mips/module-defer-warn1.d: Likewise. * gas/mips/module-override.d: Likewise. * gas/mips/n32-consec.d: Likewise. * gas/mips/nan-2008-1.d: Likewise. * gas/mips/nan-2008-2.d: Likewise. * gas/mips/nan-2008-3.d: Likewise. * gas/mips/nan-2008-4.d: Likewise. * gas/mips/nan-legacy-1.d: Likewise. * gas/mips/nan-legacy-2.d: Likewise. * gas/mips/nan-legacy-3.d: Likewise. * gas/mips/nan-legacy-4.d: Likewise. * gas/mips/nan-legacy-5.d: Likewise. * gas/mips/tmips16-e.d: Likewise. * gas/mips/tmips16-f.d: Likewise. * gas/mips/tmipsel16-e.d: Likewise. * gas/mips/tmipsel16-f.d: Likewise. * gas/testsuite/gas/mips/mips.exp: Add new tests. ld/testsuite/ * ld-mips-elf/abiflags-strip1-ph.d: New. * ld-mips-elf/abiflags-strip2-ph.d: Likewise. * ld-mips-elf/abiflags-strip3-ph.d: Likewise. * ld-mips-elf/abiflags-strip4-ph.d: Likewise. * ld-mips-elf/abiflags-strip5-ph.d: Likewise. * ld-mips-elf/abiflags-strip6-ph.d: Likewise. * ld-mips-elf/abiflags-strip7-ph.d: Likewise. * ld-mips-elf/abiflags-strip8-ph.d: Likewise. * ld-mips-elf/abiflags-strip9-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-0-n32-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-0-n64-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-0-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-06.d: Likewise. * ld-mips-elf/attr-gnu-4-07.d: Likewise. * ld-mips-elf/attr-gnu-4-08.d: Likewise. * ld-mips-elf/attr-gnu-4-1-n32-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-1-n64-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-1-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-16.d: Likewise. * ld-mips-elf/attr-gnu-4-17.d: Likewise. * ld-mips-elf/attr-gnu-4-18.d: Likewise. * ld-mips-elf/attr-gnu-4-2-n32-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-2-n64-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-2-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-26.d: Likewise. * ld-mips-elf/attr-gnu-4-27.d: Likewise. * ld-mips-elf/attr-gnu-4-28.d: Likewise. * ld-mips-elf/attr-gnu-4-3-n32-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-3-n64-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-3-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-36.d: Likewise. * ld-mips-elf/attr-gnu-4-37.d: Likewise. * ld-mips-elf/attr-gnu-4-38.d: Likewise. * ld-mips-elf/attr-gnu-4-4-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-46.d: Likewise. * ld-mips-elf/attr-gnu-4-47.d: Likewise. * ld-mips-elf/attr-gnu-4-48.d: Likewise. * ld-mips-elf/attr-gnu-4-5-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-50.d: Likewise. * ld-mips-elf/attr-gnu-4-52.d: Likewise. * ld-mips-elf/attr-gnu-4-53.d: Likewise. * ld-mips-elf/attr-gnu-4-54.d: Likewise. * ld-mips-elf/attr-gnu-4-55.d: Likewise. * ld-mips-elf/attr-gnu-4-56.d: Likewise. * ld-mips-elf/attr-gnu-4-57.d: Likewise. * ld-mips-elf/attr-gnu-4-58.d: Likewise. * ld-mips-elf/attr-gnu-4-6-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-6.s: Likewise. * ld-mips-elf/attr-gnu-4-60.d: Likewise. * ld-mips-elf/attr-gnu-4-61.d: Likewise. * ld-mips-elf/attr-gnu-4-62.d: Likewise. * ld-mips-elf/attr-gnu-4-63.d: Likewise. * ld-mips-elf/attr-gnu-4-64.d: Likewise. * ld-mips-elf/attr-gnu-4-65.d: Likewise. * ld-mips-elf/attr-gnu-4-66.d: Likewise. * ld-mips-elf/attr-gnu-4-67.d: Likewise. * ld-mips-elf/attr-gnu-4-68.d: Likewise. * ld-mips-elf/attr-gnu-4-7-ph.d: Likewise. * ld-mips-elf/attr-gnu-4-7.s: Likewise. * ld-mips-elf/attr-gnu-4-70.d: Likewise. * ld-mips-elf/attr-gnu-4-71.d: Likewise. * ld-mips-elf/attr-gnu-4-72.d: Likewise. * ld-mips-elf/attr-gnu-4-73.d: Likewise. * ld-mips-elf/attr-gnu-4-74.d: Likewise. * ld-mips-elf/attr-gnu-4-75.d: Likewise. * ld-mips-elf/attr-gnu-4-76.d: Likewise. * ld-mips-elf/attr-gnu-4-77.d: Likewise. * ld-mips-elf/attr-gnu-4-78.d: Likewise. * ld-mips-elf/attr-gnu-4-8.s: Likewise. * ld-mips-elf/attr-gnu-4-81.d: Likewise. * ld-mips-elf/empty.s: Likewise. * ld-mips-elf/attr-gnu-4-00.d: Adjust expected output. * ld-mips-elf/attr-gnu-4-01.d: Likewise. * ld-mips-elf/attr-gnu-4-02.d: Likewise. * ld-mips-elf/attr-gnu-4-03.d: Likewise. * ld-mips-elf/attr-gnu-4-04.d: Likewise. * ld-mips-elf/attr-gnu-4-05.d: Likewise. * ld-mips-elf/attr-gnu-4-10.d: Likewise. * ld-mips-elf/attr-gnu-4-11.d: Likewise. * ld-mips-elf/attr-gnu-4-14.d: Likewise. * ld-mips-elf/attr-gnu-4-15.d: Likewise. * ld-mips-elf/attr-gnu-4-2.s: Likewise. * ld-mips-elf/attr-gnu-4-20.d: Likewise. * ld-mips-elf/attr-gnu-4-22.d: Likewise. * ld-mips-elf/attr-gnu-4-24.d: Likewise. * ld-mips-elf/attr-gnu-4-25.d: Likewise. * ld-mips-elf/attr-gnu-4-3.s: Likewise. * ld-mips-elf/attr-gnu-4-30.d: Likewise. * ld-mips-elf/attr-gnu-4-33.d: Likewise. * ld-mips-elf/attr-gnu-4-34.d: Likewise. * ld-mips-elf/attr-gnu-4-35.d: Likewise. * ld-mips-elf/attr-gnu-4-40.d: Likewise. * ld-mips-elf/attr-gnu-4-41.d: Likewise. * ld-mips-elf/attr-gnu-4-42.d: Likewise. * ld-mips-elf/attr-gnu-4-43.d: Likewise. * ld-mips-elf/attr-gnu-4-44.d: Likewise. * ld-mips-elf/attr-gnu-4-45.d: Likewise. * ld-mips-elf/attr-gnu-4-5.s: Likewise. * ld-mips-elf/attr-gnu-4-51.d: Likewise. * ld-mips-elf/attr-gnu-8-00.d: Likewise. * ld-mips-elf/attr-gnu-8-01.d: Likewise. * ld-mips-elf/attr-gnu-8-02.d: Likewise. * ld-mips-elf/attr-gnu-8-10.d: Likewise. * ld-mips-elf/attr-gnu-8-11.d: Likewise. * ld-mips-elf/attr-gnu-8-20.d: Likewise. * ld-mips-elf/attr-gnu-8-22.d: Likewise. * ld-mips-elf/jalx-2.dd: Likewise. * ld-mips-elf/mips16-pic-1.gd: Likewise. * ld-mips-elf/mips16-pic-2.gd: Likewise. * ld-mips-elf/mips16-pic-3.gd: Likewise. * ld-mips-elf/mips16-pic-4a.gd: Likewise. * ld-mips-elf/multi-got-no-shared.d: Likewise. * ld-mips-elf/nan-2008.d: Likewise. * ld-mips-elf/nan-legacy.d: Rework test. * ld-mips-elf/pic-and-nonpic-3a.gd: Likewise. * ld-mips-elf/pic-and-nonpic-3b.gd: Likewise. * ld-mips-elf/pic-and-nonpic-5b.gd: Likewise. * ld-mips-elf/pic-and-nonpic-6.ld: Likewise. * ld-mips-elf/rel32-n32.d: Likewise. * ld-mips-elf/rel32-o32.d: Likewise. * ld-mips-elf/rel64.d: Likewise. * ld-mips-elf/tls-multi-got-1.r: Likewise. * ld-elf/group.ld: Discard .MIPS.abiflags and .gnu.attributes. * ld-elf/orphan-region.ld: Likewise. * ld-elf/orphan.ld: Likewise. * ld-mips-elf/compressed-plt-1.ld: Likewise. * ld-mips-elf/dyn-sec64.ld: Likewise. * ld-mips-elf/got-dump-1.ld: Likewise. * ld-mips-elf/got-dump-2.ld: Likewise. * ld-mips-elf/got-page-1.ld: Likewise. * ld-mips-elf/mips-dyn.ld: Likewise. * ld-mips-elf/mips-lib.ld: Likewise. * ld-mips-elf/pic-and-nonpic-3a.ld: Likewise. * ld-mips-elf/pic-and-nonpic-3b.ld: Likewise. * ld-mips-elf/pic-and-nonpic-4b.ld: Likewise. * ld-mips-elf/pic-and-nonpic-5b.ld: Likewise. * ld-mips-elf/region1.t: Likewise. * ld-mips-elf/stub-dynsym-1.ld: Likewise. * ld-mips-elf/tls-hidden3.ld: Likewise. * ld-mips-elf/vxworks1.ld: Likewise. * ld-scripts/overlay-size.t: Likewise. * ld-mips-elf/elf-rel-got-n32-embed.d: Remove .MIPS.abiflags from objects. * ld-mips-elf/elf-rel-got-n32.d: Likewise. * ld-mips-elf/elf-rel-got-n64-embed.d: Likewise. * ld-mips-elf/elf-rel-got-n64-linux.d: Likewise. * ld-mips-elf/elf-rel-got-n64.d: Likewise. * ld-mips-elf/elf-rel-xgot-n32.d: Likewise. * ld-mips-elf/elf-rel-xgot-n32-embed.d: Likewise. * ld-mips-elf/elf-rel-xgot-n64.d: Likewise. * ld-mips-elf/elf-rel-xgot-n64-linux.d: Likewise. * ld-mips-elf/elf-rel-xgot-n64-embed.d: Likewise. * ld-mips-elf/mips-elf.exp: Add new tests.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog124
-rw-r--r--gas/testsuite/gas/elf/section2.e-mips8
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-0.d17
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-0.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-1-mfp32.l3
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-1-mfp32.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-1-mfp64.l2
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-1-mfp64.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-1-mfpxx.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-1-msingle-float.l2
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-1-msingle-float.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-1-msoft-float.l2
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-1-msoft-float.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-1.d22
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-1.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-2-mdouble-float.l2
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-2-mdouble-float.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-2-msoft-float.l2
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-2-msoft-float.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-2.d23
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-2.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-3-mhard-float.l2
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-3-mhard-float.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-3.d23
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-3.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-4.l2
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-4.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-5-64.l2
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-5-64.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-5.d23
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-5.l2
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-5.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-6-64.l2
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-6-64.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-6-msingle-float.l2
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-6-msingle-float.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-6-msoft-float.l2
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-6-msoft-float.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-6-noodd.l2
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-6-noodd.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-6.d23
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-6.l2
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-6.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-7-64.l2
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-7-64.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-7-msingle-float.l2
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-7-msingle-float.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-7-msoft-float.l2
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-7-msoft-float.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-7-odd.l2
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-7-odd.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-7.d23
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-7.l2
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-4-7.s1
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-abi-fp-1.d14
-rw-r--r--gas/testsuite/gas/mips/attr-gnu-abi-msa-1.d3
-rw-r--r--gas/testsuite/gas/mips/attr-none-double.d22
-rw-r--r--gas/testsuite/gas/mips/attr-none-o32-fp64-nooddspreg.d23
-rw-r--r--gas/testsuite/gas/mips/attr-none-o32-fp64.d23
-rw-r--r--gas/testsuite/gas/mips/attr-none-o32-fpxx.d23
-rw-r--r--gas/testsuite/gas/mips/attr-none-single-float.d23
-rw-r--r--gas/testsuite/gas/mips/attr-none-soft-float.d23
-rw-r--r--gas/testsuite/gas/mips/call-nonpic-1.d13
-rw-r--r--gas/testsuite/gas/mips/elf_arch_mips1.d13
-rw-r--r--gas/testsuite/gas/mips/elf_arch_mips2.d13
-rw-r--r--gas/testsuite/gas/mips/elf_arch_mips3.d13
-rw-r--r--gas/testsuite/gas/mips/elf_arch_mips32.d13
-rw-r--r--gas/testsuite/gas/mips/elf_arch_mips32r2.d13
-rw-r--r--gas/testsuite/gas/mips/elf_arch_mips32r3.d21
-rw-r--r--gas/testsuite/gas/mips/elf_arch_mips32r5.d21
-rw-r--r--gas/testsuite/gas/mips/elf_arch_mips4.d13
-rw-r--r--gas/testsuite/gas/mips/elf_arch_mips5.d13
-rw-r--r--gas/testsuite/gas/mips/elf_arch_mips64.d13
-rw-r--r--gas/testsuite/gas/mips/elf_arch_mips64r2.d15
-rw-r--r--gas/testsuite/gas/mips/elf_arch_mips64r3.d21
-rw-r--r--gas/testsuite/gas/mips/elf_arch_mips64r5.d21
-rw-r--r--gas/testsuite/gas/mips/elf_ase_micromips-2.d13
-rw-r--r--gas/testsuite/gas/mips/elf_ase_micromips.d13
-rw-r--r--gas/testsuite/gas/mips/elf_ase_mips16-2.d13
-rw-r--r--gas/testsuite/gas/mips/elf_ase_mips16.d13
-rw-r--r--gas/testsuite/gas/mips/fpxx-oddfpreg.d12
-rw-r--r--gas/testsuite/gas/mips/fpxx-oddfpreg.l5
-rw-r--r--gas/testsuite/gas/mips/fpxx-oddfpreg.s4
-rw-r--r--gas/testsuite/gas/mips/li-d.d31
-rw-r--r--gas/testsuite/gas/mips/li-d.s24
-rw-r--r--gas/testsuite/gas/mips/micromips@mips1-fp.d2
-rw-r--r--gas/testsuite/gas/mips/mips.exp204
-rw-r--r--gas/testsuite/gas/mips/mips1-fp.d2
-rw-r--r--gas/testsuite/gas/mips/mips1-fp.l2
-rw-r--r--gas/testsuite/gas/mips/mips1-fp.s2
-rw-r--r--gas/testsuite/gas/mips/module-check-warn.l5
-rw-r--r--gas/testsuite/gas/mips/module-check-warn.s3
-rw-r--r--gas/testsuite/gas/mips/module-check.d21
-rw-r--r--gas/testsuite/gas/mips/module-check.s4
-rw-r--r--gas/testsuite/gas/mips/module-defer-warn1.d13
-rw-r--r--gas/testsuite/gas/mips/module-mfp32.d21
-rw-r--r--gas/testsuite/gas/mips/module-mfp32.s3
-rw-r--r--gas/testsuite/gas/mips/module-mfp64-noodd.d21
-rw-r--r--gas/testsuite/gas/mips/module-mfp64-noodd.s4
-rw-r--r--gas/testsuite/gas/mips/module-mfp64.d21
-rw-r--r--gas/testsuite/gas/mips/module-mfp64.s4
-rw-r--r--gas/testsuite/gas/mips/module-mfpxx.d21
-rw-r--r--gas/testsuite/gas/mips/module-mfpxx.s3
-rw-r--r--gas/testsuite/gas/mips/module-msingle-float.d21
-rw-r--r--gas/testsuite/gas/mips/module-msingle-float.s3
-rw-r--r--gas/testsuite/gas/mips/module-msoft-float.d21
-rw-r--r--gas/testsuite/gas/mips/module-msoft-float.s3
-rw-r--r--gas/testsuite/gas/mips/module-override.d13
-rw-r--r--gas/testsuite/gas/mips/module-set-mfpxx.d21
-rw-r--r--gas/testsuite/gas/mips/module-set-mfpxx.s16
-rw-r--r--gas/testsuite/gas/mips/n32-consec.d13
-rw-r--r--gas/testsuite/gas/mips/nan-2008-1.d1
-rw-r--r--gas/testsuite/gas/mips/nan-2008-2.d1
-rw-r--r--gas/testsuite/gas/mips/nan-2008-3.d1
-rw-r--r--gas/testsuite/gas/mips/nan-2008-4.d1
-rw-r--r--gas/testsuite/gas/mips/nan-legacy-1.d14
-rw-r--r--gas/testsuite/gas/mips/nan-legacy-2.d14
-rw-r--r--gas/testsuite/gas/mips/nan-legacy-3.d14
-rw-r--r--gas/testsuite/gas/mips/nan-legacy-4.d14
-rw-r--r--gas/testsuite/gas/mips/nan-legacy-5.d14
-rw-r--r--gas/testsuite/gas/mips/no-odd-spreg.d22
-rw-r--r--gas/testsuite/gas/mips/odd-spreg.d22
-rw-r--r--gas/testsuite/gas/mips/tmips16-e.d7
-rw-r--r--gas/testsuite/gas/mips/tmips16-f.d7
-rw-r--r--gas/testsuite/gas/mips/tmipsel16-e.d7
-rw-r--r--gas/testsuite/gas/mips/tmipsel16-f.d7
126 files changed, 1448 insertions, 15 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 93ee465..9d93224 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,127 @@
+2014-07-29 Matthew Fortune <matthew.fortune@imgtec.com>
+
+ * gas/mips/attr-gnu-4-0.d: New.
+ * gas/mips/attr-gnu-4-0.s: Likewise.
+ * gas/mips/attr-gnu-4-1-mfp32.l: Likewise.
+ * gas/mips/attr-gnu-4-1-mfp32.s: Likewise.
+ * gas/mips/attr-gnu-4-1-mfp64.l: Likewise.
+ * gas/mips/attr-gnu-4-1-mfp64.s: Likewise.
+ * gas/mips/attr-gnu-4-1-mfpxx.s: Likewise.
+ * gas/mips/attr-gnu-4-1-msingle-float.l: Likewise.
+ * gas/mips/attr-gnu-4-1-msingle-float.s: Likewise.
+ * gas/mips/attr-gnu-4-1-msoft-float.l: Likewise.
+ * gas/mips/attr-gnu-4-1-msoft-float.s: Likewise.
+ * gas/mips/attr-gnu-4-1.d: Likewise.
+ * gas/mips/attr-gnu-4-1.s: Likewise.
+ * gas/mips/attr-gnu-4-2-mdouble-float.l: Likewise.
+ * gas/mips/attr-gnu-4-2-mdouble-float.s: Likewise.
+ * gas/mips/attr-gnu-4-2-msoft-float.l: Likewise.
+ * gas/mips/attr-gnu-4-2-msoft-float.s: Likewise.
+ * gas/mips/attr-gnu-4-2.d: Likewise.
+ * gas/mips/attr-gnu-4-2.s: Likewise.
+ * gas/mips/attr-gnu-4-3-mhard-float.l: Likewise.
+ * gas/mips/attr-gnu-4-3-mhard-float.s: Likewise.
+ * gas/mips/attr-gnu-4-3.d: Likewise.
+ * gas/mips/attr-gnu-4-3.s: Likewise.
+ * gas/mips/attr-gnu-4-4.l: Likewise.
+ * gas/mips/attr-gnu-4-4.s: Likewise.
+ * gas/mips/attr-gnu-4-5-64.l: Likewise.
+ * gas/mips/attr-gnu-4-5-64.s: Likewise.
+ * gas/mips/attr-gnu-4-5.d: Likewise.
+ * gas/mips/attr-gnu-4-5.l: Likewise.
+ * gas/mips/attr-gnu-4-5.s: Likewise.
+ * gas/mips/attr-gnu-4-6-64.l: Likewise.
+ * gas/mips/attr-gnu-4-6-64.s: Likewise.
+ * gas/mips/attr-gnu-4-6.d: Likewise.
+ * gas/mips/attr-gnu-4-6.l: Likewise.
+ * gas/mips/attr-gnu-4-6.s: Likewise.
+ * gas/mips/attr-gnu-4-6-msingle-float.l: Likewise.
+ * gas/mips/attr-gnu-4-6-msingle-float.s: Likewise.
+ * gas/mips/attr-gnu-4-6-msoft-float.l: Likewise.
+ * gas/mips/attr-gnu-4-6-msoft-float.s: Likewise.
+ * gas/mips/attr-gnu-4-6-noodd.l: Likewise.
+ * gas/mips/attr-gnu-4-6-noodd.s: Likewise.
+ * gas/mips/attr-gnu-4-7-64.l: Likewise.
+ * gas/mips/attr-gnu-4-7-64.s: Likewise.
+ * gas/mips/attr-gnu-4-7-msingle-float.l: Likewise.
+ * gas/mips/attr-gnu-4-7-msingle-float.s: Likewise.
+ * gas/mips/attr-gnu-4-7-msoft-float.l: Likewise.
+ * gas/mips/attr-gnu-4-7-msoft-float.s: Likewise.
+ * gas/mips/attr-gnu-4-7-odd.l: Likewise.
+ * gas/mips/attr-gnu-4-7-odd.s: Likewise.
+ * gas/mips/attr-gnu-4-7.d: Likewise.
+ * gas/mips/attr-gnu-4-7.l: Likewise.
+ * gas/mips/attr-gnu-4-7.s: Likewise.
+ * gas/mips/attr-none-double.d: Likewise.
+ * gas/mips/attr-none-o32-fp64.d: Likewise.
+ * gas/mips/attr-none-o32-fp64-nooddspreg.d
+ * gas/mips/attr-none-o32-fpxx.d: Likewise.
+ * gas/mips/attr-none-single-float.d: Likewise.
+ * gas/mips/attr-none-soft-float.d: Likewise.
+ * gas/mips/elf_arch_mips32r3.d: Likewise.
+ * gas/mips/elf_arch_mips32r5.d: Likewise.
+ * gas/mips/elf_arch_mips64r3.d: Likewise.
+ * gas/mips/elf_arch_mips64r5.d: Likewise.
+ * gas/mips/li-d.d: Likewise.
+ * gas/mips/li-d.s: Likewise.
+ * gas/mips/module-check-warn.l: Likewise.
+ * gas/mips/module-check-warn.s: Likewise.
+ * gas/mips/module-check.d: Likewise.
+ * gas/mips/module-check.s: Likewise.
+ * gas/mips/module-mfp32.d: Likewise.
+ * gas/mips/module-mfp32.s: Likewise.
+ * gas/mips/module-mfp64.d: Likewise.
+ * gas/mips/module-mfp64.s: Likewise.
+ * gas/mips/module-mfp64-noodd.d: Likewise.
+ * gas/mips/module-mfp64-noodd.s: Likewise.
+ * gas/mips/module-mfpxx.d: Likewise.
+ * gas/mips/module-mfpxx.s: Likewise.
+ * gas/mips/module-msingle-float.d: Likewise.
+ * gas/mips/module-msingle-float.s: Likewise.
+ * gas/mips/module-msoft-float.d: Likewise.
+ * gas/mips/module-msoft-float.s: Likewise.
+ * gas/mips/module-set-mfpxx.d: Likewise.
+ * gas/mips/module-set-mfpxx.s: Likewise.
+ * gas/mips/fpxx-oddfpreg.d: Likewise.
+ * gas/mips/fpxx-oddfpreg.l: Likewise.
+ * gas/mips/fpxx-oddfpreg.s: Likewise.
+ * gas/mips/no-odd-spreg.d: Likewise.
+ * gas/mips/odd-spreg.d: Likewise.
+ * gas/elf/section2.e-mips: Adjust expected output.
+ * gas/mips/attr-gnu-abi-fp-1.d: Likewise.
+ * gas/mips/attr-gnu-abi-msa-1.d: Likewise.
+ * gas/mips/call-nonpic-1.d: Likewise.
+ * gas/mips/elf_arch_mips1.d: Likewise.
+ * gas/mips/elf_arch_mips2.d: Likewise.
+ * gas/mips/elf_arch_mips3.d: Likewise.
+ * gas/mips/elf_arch_mips32.d: Likewise.
+ * gas/mips/elf_arch_mips32r2.d: Likewise.
+ * gas/mips/elf_arch_mips4.d: Likewise.
+ * gas/mips/elf_arch_mips5.d: Likewise.
+ * gas/mips/elf_arch_mips64.d: Likewise.
+ * gas/mips/elf_arch_mips64r2.d: Likewise.
+ * gas/mips/elf_ase_micromips-2.d: Likewise.
+ * gas/mips/elf_ase_micromips.d: Likewise.
+ * gas/mips/elf_ase_mips16-2.d: Likewise.
+ * gas/mips/elf_ase_mips16.d: Likewise.
+ * gas/mips/module-defer-warn1.d: Likewise.
+ * gas/mips/module-override.d: Likewise.
+ * gas/mips/n32-consec.d: Likewise.
+ * gas/mips/nan-2008-1.d: Likewise.
+ * gas/mips/nan-2008-2.d: Likewise.
+ * gas/mips/nan-2008-3.d: Likewise.
+ * gas/mips/nan-2008-4.d: Likewise.
+ * gas/mips/nan-legacy-1.d: Likewise.
+ * gas/mips/nan-legacy-2.d: Likewise.
+ * gas/mips/nan-legacy-3.d: Likewise.
+ * gas/mips/nan-legacy-4.d: Likewise.
+ * gas/mips/nan-legacy-5.d: Likewise.
+ * gas/mips/tmips16-e.d: Likewise.
+ * gas/mips/tmips16-f.d: Likewise.
+ * gas/mips/tmipsel16-e.d: Likewise.
+ * gas/mips/tmipsel16-f.d: Likewise.
+ * gas/testsuite/gas/mips/mips.exp: Add new tests.
+
2014-07-22 Sergey Guriev <sergey.s.guriev@intel.com>
Alexander Ivchenko <alexander.ivchenko@intel.com>
Maxim Kuznetsov <maxim.kuznetsov@intel.com>
diff --git a/gas/testsuite/gas/elf/section2.e-mips b/gas/testsuite/gas/elf/section2.e-mips
index 9e70f5c..e7588cf 100644
--- a/gas/testsuite/gas/elf/section2.e-mips
+++ b/gas/testsuite/gas/elf/section2.e-mips
@@ -1,10 +1,12 @@
-Symbol table '.symtab' contains 7 entries:
+Symbol table '.symtab' contains 9 entries:
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+0: 0+0 +0 +NOTYPE +LOCAL +DEFAULT +UND
+1: 0+0 +0 +SECTION +LOCAL +DEFAULT +1 (|\.text)
+2: 0+0 +0 +SECTION +LOCAL +DEFAULT +2 (|\.data)
+3: 0+0 +0 +SECTION +LOCAL +DEFAULT +3 (|\.bss)
- +4: 0+0 +0 +SECTION +LOCAL +DEFAULT +6 (|A)
+ +4: 0+0 +0 +SECTION +LOCAL +DEFAULT +7 (|A)
+5: 0+0 +0 +SECTION +LOCAL +DEFAULT +4 (|\.reginfo)
- +6: 0+0 +0 +SECTION +LOCAL +DEFAULT +5 (|\.pdr)
+ +6: 0+0 +0 +SECTION +LOCAL +DEFAULT +5 (|\.MIPS\.abiflags)
+ +7: 0+0 +0 +SECTION +LOCAL +DEFAULT +6 (|\.pdr)
+ +8: 0+0 +0 +SECTION +LOCAL +DEFAULT +8 (|\.gnu\.attributes)
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-0.d b/gas/testsuite/gas/mips/attr-gnu-4-0.d
new file mode 100644
index 0000000..7728079
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-0.d
@@ -0,0 +1,17 @@
+#PROG: readelf
+#readelf: -A
+#name: MIPS gnu_attribute 4,0
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard or soft float
+ISA Extension: .*
+ASEs:
+#...
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-0.s b/gas/testsuite/gas/mips/attr-gnu-4-0.s
new file mode 100644
index 0000000..a143746
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-0.s
@@ -0,0 +1 @@
+.gnu_attribute 4,0
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-1-mfp32.l b/gas/testsuite/gas/mips/attr-gnu-4-1-mfp32.l
new file mode 100644
index 0000000..96db3ce
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-1-mfp32.l
@@ -0,0 +1,3 @@
+.*: Assembler messages:
+.*: Warning: `fp=32' used with a 64-bit ABI
+.*: Warning: .gnu_attribute 4,1 is incompatible with `gp=64 fp=32'
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-1-mfp32.s b/gas/testsuite/gas/mips/attr-gnu-4-1-mfp32.s
new file mode 100644
index 0000000..e985a56
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-1-mfp32.s
@@ -0,0 +1 @@
+.gnu_attribute 4,1
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-1-mfp64.l b/gas/testsuite/gas/mips/attr-gnu-4-1-mfp64.l
new file mode 100644
index 0000000..78b5fc4
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-1-mfp64.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*: Warning: .gnu_attribute 4,1 is incompatible with `gp=32 fp=64'
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-1-mfp64.s b/gas/testsuite/gas/mips/attr-gnu-4-1-mfp64.s
new file mode 100644
index 0000000..e985a56
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-1-mfp64.s
@@ -0,0 +1 @@
+.gnu_attribute 4,1
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-1-mfpxx.s b/gas/testsuite/gas/mips/attr-gnu-4-1-mfpxx.s
new file mode 100644
index 0000000..e985a56
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-1-mfpxx.s
@@ -0,0 +1 @@
+.gnu_attribute 4,1
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-1-msingle-float.l b/gas/testsuite/gas/mips/attr-gnu-4-1-msingle-float.l
new file mode 100644
index 0000000..c37c520
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-1-msingle-float.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*: Warning: .gnu_attribute 4,1 is incompatible with `singlefloat'
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-1-msingle-float.s b/gas/testsuite/gas/mips/attr-gnu-4-1-msingle-float.s
new file mode 100644
index 0000000..e985a56
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-1-msingle-float.s
@@ -0,0 +1 @@
+.gnu_attribute 4,1
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-1-msoft-float.l b/gas/testsuite/gas/mips/attr-gnu-4-1-msoft-float.l
new file mode 100644
index 0000000..819abfa
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-1-msoft-float.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*: Warning: .gnu_attribute 4,1 is incompatible with `softfloat'
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-1-msoft-float.s b/gas/testsuite/gas/mips/attr-gnu-4-1-msoft-float.s
new file mode 100644
index 0000000..e985a56
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-1-msoft-float.s
@@ -0,0 +1 @@
+.gnu_attribute 4,1
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-1.d b/gas/testsuite/gas/mips/attr-gnu-4-1.d
new file mode 100644
index 0000000..ee1bc49
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-1.d
@@ -0,0 +1,22 @@
+#source: attr-gnu-4-1.s
+#PROG: readelf
+#readelf: -A
+#name: MIPS gnu_attribute 4,1 (double precision)
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: .*
+ASEs:
+#...
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-1.s b/gas/testsuite/gas/mips/attr-gnu-4-1.s
new file mode 100644
index 0000000..e985a56
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-1.s
@@ -0,0 +1 @@
+.gnu_attribute 4,1
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-2-mdouble-float.l b/gas/testsuite/gas/mips/attr-gnu-4-2-mdouble-float.l
new file mode 100644
index 0000000..b138323
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-2-mdouble-float.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*: Warning: .gnu_attribute 4,2 requires `singlefloat'
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-2-mdouble-float.s b/gas/testsuite/gas/mips/attr-gnu-4-2-mdouble-float.s
new file mode 100644
index 0000000..54ebf4e
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-2-mdouble-float.s
@@ -0,0 +1 @@
+.gnu_attribute 4,2
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-2-msoft-float.l b/gas/testsuite/gas/mips/attr-gnu-4-2-msoft-float.l
new file mode 100644
index 0000000..9d421bd
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-2-msoft-float.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*: Warning: .gnu_attribute 4,2 is incompatible with `softfloat'
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-2-msoft-float.s b/gas/testsuite/gas/mips/attr-gnu-4-2-msoft-float.s
new file mode 100644
index 0000000..54ebf4e
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-2-msoft-float.s
@@ -0,0 +1 @@
+.gnu_attribute 4,2
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-2.d b/gas/testsuite/gas/mips/attr-gnu-4-2.d
new file mode 100644
index 0000000..eb06a1f
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-2.d
@@ -0,0 +1,23 @@
+#source: attr-gnu-4-2.s
+#as: -msingle-float
+#PROG: readelf
+#readelf: -A
+#name: MIPS gnu_attribute 4,2 (single precision)
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(single precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(single precision\)
+ISA Extension: .*
+ASEs:
+#...
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-2.s b/gas/testsuite/gas/mips/attr-gnu-4-2.s
new file mode 100644
index 0000000..54ebf4e
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-2.s
@@ -0,0 +1 @@
+.gnu_attribute 4,2
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-3-mhard-float.l b/gas/testsuite/gas/mips/attr-gnu-4-3-mhard-float.l
new file mode 100644
index 0000000..21b1039
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-3-mhard-float.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*: Warning: .gnu_attribute 4,3 requires `softfloat'
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-3-mhard-float.s b/gas/testsuite/gas/mips/attr-gnu-4-3-mhard-float.s
new file mode 100644
index 0000000..32e5f5d
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-3-mhard-float.s
@@ -0,0 +1 @@
+.gnu_attribute 4,3
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-3.d b/gas/testsuite/gas/mips/attr-gnu-4-3.d
new file mode 100644
index 0000000..ed0be23
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-3.d
@@ -0,0 +1,23 @@
+#as: -msoft-float
+#source: attr-gnu-4-3.s
+#PROG: readelf
+#readelf: -A
+#name: MIPS gnu_attribute 4,3 (-msoft-float)
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Soft float
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Soft float
+ISA Extension: .*
+ASEs:
+#...
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-3.s b/gas/testsuite/gas/mips/attr-gnu-4-3.s
new file mode 100644
index 0000000..32e5f5d
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-3.s
@@ -0,0 +1 @@
+.gnu_attribute 4,3
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-4.l b/gas/testsuite/gas/mips/attr-gnu-4-4.l
new file mode 100644
index 0000000..c7d611d
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-4.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*: Warning: .gnu_attribute 4,4 is no longer supported
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-4.s b/gas/testsuite/gas/mips/attr-gnu-4-4.s
new file mode 100644
index 0000000..3ff129a
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-4.s
@@ -0,0 +1 @@
+.gnu_attribute 4,4
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-5-64.l b/gas/testsuite/gas/mips/attr-gnu-4-5-64.l
new file mode 100644
index 0000000..26c187b
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-5-64.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*: Warning: .gnu_attribute 4,5 requires `-mabi=32'
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-5-64.s b/gas/testsuite/gas/mips/attr-gnu-4-5-64.s
new file mode 100644
index 0000000..b21ec3b
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-5-64.s
@@ -0,0 +1 @@
+.gnu_attribute 4,5
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-5.d b/gas/testsuite/gas/mips/attr-gnu-4-5.d
new file mode 100644
index 0000000..e6eb677
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-5.d
@@ -0,0 +1,23 @@
+#as: -32 -mfpxx
+#source: attr-gnu-4-5.s
+#PROG: readelf
+#readelf: -A
+#name: MIPS gnu_attribute 4,5 (-mfpxx)
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(32-bit CPU, Any FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, Any FPU\)
+ISA Extension: .*
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-5.l b/gas/testsuite/gas/mips/attr-gnu-4-5.l
new file mode 100644
index 0000000..018d692
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-5.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*: Warning: .gnu_attribute 4,5 requires `fp=xx'
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-5.s b/gas/testsuite/gas/mips/attr-gnu-4-5.s
new file mode 100644
index 0000000..b21ec3b
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-5.s
@@ -0,0 +1 @@
+.gnu_attribute 4,5
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-6-64.l b/gas/testsuite/gas/mips/attr-gnu-4-6-64.l
new file mode 100644
index 0000000..fa1764e
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-6-64.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*: Warning: .gnu_attribute 4,6 requires `-mabi=32'
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-6-64.s b/gas/testsuite/gas/mips/attr-gnu-4-6-64.s
new file mode 100644
index 0000000..96ace49
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-6-64.s
@@ -0,0 +1 @@
+.gnu_attribute 4,6
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-6-msingle-float.l b/gas/testsuite/gas/mips/attr-gnu-4-6-msingle-float.l
new file mode 100644
index 0000000..999b5e2
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-6-msingle-float.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*: Warning: .gnu_attribute 4,6 is incompatible with `fp=32'
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-6-msingle-float.s b/gas/testsuite/gas/mips/attr-gnu-4-6-msingle-float.s
new file mode 100644
index 0000000..96ace49
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-6-msingle-float.s
@@ -0,0 +1 @@
+.gnu_attribute 4,6
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-6-msoft-float.l b/gas/testsuite/gas/mips/attr-gnu-4-6-msoft-float.l
new file mode 100644
index 0000000..999b5e2
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-6-msoft-float.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*: Warning: .gnu_attribute 4,6 is incompatible with `fp=32'
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-6-msoft-float.s b/gas/testsuite/gas/mips/attr-gnu-4-6-msoft-float.s
new file mode 100644
index 0000000..96ace49
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-6-msoft-float.s
@@ -0,0 +1 @@
+.gnu_attribute 4,6
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-6-noodd.l b/gas/testsuite/gas/mips/attr-gnu-4-6-noodd.l
new file mode 100644
index 0000000..e885317
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-6-noodd.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*: Warning: .gnu_attribute 4,6 is incompatible with `nooddspreg'
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-6-noodd.s b/gas/testsuite/gas/mips/attr-gnu-4-6-noodd.s
new file mode 100644
index 0000000..96ace49
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-6-noodd.s
@@ -0,0 +1 @@
+.gnu_attribute 4,6
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-6.d b/gas/testsuite/gas/mips/attr-gnu-4-6.d
new file mode 100644
index 0000000..5df111f
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-6.d
@@ -0,0 +1,23 @@
+#as: -32
+#source: attr-gnu-4-6.s
+#PROG: readelf
+#readelf: -A
+#name: MIPS gnu_attribute 4,6 (-mfp64)
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(32-bit CPU, 64-bit FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: 32
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
+ISA Extension: .*
+ASEs:
+ None
+FLAGS 1: 00000001
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-6.l b/gas/testsuite/gas/mips/attr-gnu-4-6.l
new file mode 100644
index 0000000..f8f1733
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-6.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*: Warning: .gnu_attribute 4,6 requires `fp=64'
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-6.s b/gas/testsuite/gas/mips/attr-gnu-4-6.s
new file mode 100644
index 0000000..96ace49
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-6.s
@@ -0,0 +1 @@
+.gnu_attribute 4,6
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-7-64.l b/gas/testsuite/gas/mips/attr-gnu-4-7-64.l
new file mode 100644
index 0000000..53b914e
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-7-64.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*: Warning: .gnu_attribute 4,7 requires `-mabi=32'
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-7-64.s b/gas/testsuite/gas/mips/attr-gnu-4-7-64.s
new file mode 100644
index 0000000..0ab9aea
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-7-64.s
@@ -0,0 +1 @@
+.gnu_attribute 4,7
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-7-msingle-float.l b/gas/testsuite/gas/mips/attr-gnu-4-7-msingle-float.l
new file mode 100644
index 0000000..999b5e2
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-7-msingle-float.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*: Warning: .gnu_attribute 4,6 is incompatible with `fp=32'
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-7-msingle-float.s b/gas/testsuite/gas/mips/attr-gnu-4-7-msingle-float.s
new file mode 100644
index 0000000..96ace49
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-7-msingle-float.s
@@ -0,0 +1 @@
+.gnu_attribute 4,6
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-7-msoft-float.l b/gas/testsuite/gas/mips/attr-gnu-4-7-msoft-float.l
new file mode 100644
index 0000000..999b5e2
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-7-msoft-float.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*: Warning: .gnu_attribute 4,6 is incompatible with `fp=32'
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-7-msoft-float.s b/gas/testsuite/gas/mips/attr-gnu-4-7-msoft-float.s
new file mode 100644
index 0000000..96ace49
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-7-msoft-float.s
@@ -0,0 +1 @@
+.gnu_attribute 4,6
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-7-odd.l b/gas/testsuite/gas/mips/attr-gnu-4-7-odd.l
new file mode 100644
index 0000000..cb4f739
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-7-odd.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*: Warning: .gnu_attribute 4,7 requires `nooddspreg'
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-7-odd.s b/gas/testsuite/gas/mips/attr-gnu-4-7-odd.s
new file mode 100644
index 0000000..0ab9aea
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-7-odd.s
@@ -0,0 +1 @@
+.gnu_attribute 4,7
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-7.d b/gas/testsuite/gas/mips/attr-gnu-4-7.d
new file mode 100644
index 0000000..b453218
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-7.d
@@ -0,0 +1,23 @@
+#as: -32
+#source: attr-gnu-4-7.s
+#PROG: readelf
+#readelf: -A
+#name: MIPS gnu_attribute 4,7 (-mfp64 -mno-odd-spreg)
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float compat \(32-bit CPU, 64-bit FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: 32
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float compat \(32-bit CPU, 64-bit FPU\)
+ISA Extension: .*
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-7.l b/gas/testsuite/gas/mips/attr-gnu-4-7.l
new file mode 100644
index 0000000..e3abfb5
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-7.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*: Warning: .gnu_attribute 4,7 requires `fp=64'
diff --git a/gas/testsuite/gas/mips/attr-gnu-4-7.s b/gas/testsuite/gas/mips/attr-gnu-4-7.s
new file mode 100644
index 0000000..0ab9aea
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-gnu-4-7.s
@@ -0,0 +1 @@
+.gnu_attribute 4,7
diff --git a/gas/testsuite/gas/mips/attr-gnu-abi-fp-1.d b/gas/testsuite/gas/mips/attr-gnu-abi-fp-1.d
index 63eaf8d..ce5bbc2 100644
--- a/gas/testsuite/gas/mips/attr-gnu-abi-fp-1.d
+++ b/gas/testsuite/gas/mips/attr-gnu-abi-fp-1.d
@@ -6,3 +6,17 @@
Attribute Section: gnu
File Attributes
Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS1
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/attr-gnu-abi-msa-1.d b/gas/testsuite/gas/mips/attr-gnu-abi-msa-1.d
index 4720029..97fc8bf 100644
--- a/gas/testsuite/gas/mips/attr-gnu-abi-msa-1.d
+++ b/gas/testsuite/gas/mips/attr-gnu-abi-msa-1.d
@@ -4,4 +4,7 @@
Attribute Section: gnu
File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
Tag_GNU_MIPS_ABI_MSA: 128-bit MSA
+
+#...
diff --git a/gas/testsuite/gas/mips/attr-none-double.d b/gas/testsuite/gas/mips/attr-none-double.d
new file mode 100644
index 0000000..639bb53
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-none-double.d
@@ -0,0 +1,22 @@
+#PROG: readelf
+#source: empty.s
+#readelf: -A
+#name: MIPS infer fpabi (double-precision)
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: .*
+ASEs:
+#...
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/attr-none-o32-fp64-nooddspreg.d b/gas/testsuite/gas/mips/attr-none-o32-fp64-nooddspreg.d
new file mode 100644
index 0000000..d122268
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-none-o32-fp64-nooddspreg.d
@@ -0,0 +1,23 @@
+#as: -mfp64 -mno-odd-spreg -32
+#source: empty.s
+#PROG: readelf
+#readelf: -A
+#name: MIPS infer fpabi (O32 fp64 nooddspreg)
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float compat \(32-bit CPU, 64-bit FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: 32
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard float compat \(32-bit CPU, 64-bit FPU\)
+ISA Extension: .*
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/attr-none-o32-fp64.d b/gas/testsuite/gas/mips/attr-none-o32-fp64.d
new file mode 100644
index 0000000..1f5abd2
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-none-o32-fp64.d
@@ -0,0 +1,23 @@
+#as: -mfp64 -32
+#source: empty.s
+#PROG: readelf
+#readelf: -A
+#name: MIPS infer fpabi (O32 fp64)
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(32-bit CPU, 64-bit FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: 32
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
+ISA Extension: .*
+ASEs:
+ None
+FLAGS 1: 00000001
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/attr-none-o32-fpxx.d b/gas/testsuite/gas/mips/attr-none-o32-fpxx.d
new file mode 100644
index 0000000..1e440bd
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-none-o32-fpxx.d
@@ -0,0 +1,23 @@
+#as: -mfpxx -32
+#source: empty.s
+#PROG: readelf
+#readelf: -A
+#name: MIPS infer fpabi (O32 fpxx)
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(32-bit CPU, Any FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, Any FPU\)
+ISA Extension: .*
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/attr-none-single-float.d b/gas/testsuite/gas/mips/attr-none-single-float.d
new file mode 100644
index 0000000..9c03a51
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-none-single-float.d
@@ -0,0 +1,23 @@
+#as: -msingle-float
+#PROG: readelf
+#source: empty.s
+#readelf: -A
+#name: MIPS infer fpabi (single-precision)
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(single precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(single precision\)
+ISA Extension: .*
+ASEs:
+#...
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/attr-none-soft-float.d b/gas/testsuite/gas/mips/attr-none-soft-float.d
new file mode 100644
index 0000000..0b4cf7a
--- /dev/null
+++ b/gas/testsuite/gas/mips/attr-none-soft-float.d
@@ -0,0 +1,23 @@
+#as: -msoft-float
+#PROG: readelf
+#source: empty.s
+#readelf: -A
+#name: MIPS infer fpabi (soft-precision)
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Soft float
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: 0
+CPR2 size: 0
+FP ABI: Soft float
+ISA Extension: .*
+ASEs:
+#...
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/call-nonpic-1.d b/gas/testsuite/gas/mips/call-nonpic-1.d
index 61d2b09..cd1b442 100644
--- a/gas/testsuite/gas/mips/call-nonpic-1.d
+++ b/gas/testsuite/gas/mips/call-nonpic-1.d
@@ -4,6 +4,19 @@
.*
private flags = 10001004: .*
+MIPS ABI Flags Version: 0
+
+ISA: MIPS2
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
Disassembly of section \.text:
diff --git a/gas/testsuite/gas/mips/elf_arch_mips1.d b/gas/testsuite/gas/mips/elf_arch_mips1.d
index a7af692..3a3da16 100644
--- a/gas/testsuite/gas/mips/elf_arch_mips1.d
+++ b/gas/testsuite/gas/mips/elf_arch_mips1.d
@@ -8,3 +8,16 @@
# flags are _not_ 8 chars long.
private flags = (.......|......|.....|....|...|..|.): .*\[mips1\].*
+MIPS ABI Flags Version: 0
+
+ISA: MIPS1
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/elf_arch_mips2.d b/gas/testsuite/gas/mips/elf_arch_mips2.d
index c2c0c54..db8baf5 100644
--- a/gas/testsuite/gas/mips/elf_arch_mips2.d
+++ b/gas/testsuite/gas/mips/elf_arch_mips2.d
@@ -6,3 +6,16 @@
.*:.*file format.*elf.*mips.*
private flags = 1.......: .*\[mips2\].*
+MIPS ABI Flags Version: 0
+
+ISA: MIPS2
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/elf_arch_mips3.d b/gas/testsuite/gas/mips/elf_arch_mips3.d
index cf42635..1ff003c 100644
--- a/gas/testsuite/gas/mips/elf_arch_mips3.d
+++ b/gas/testsuite/gas/mips/elf_arch_mips3.d
@@ -6,3 +6,16 @@
.*:.*file format.*elf.*mips.*
private flags = 2.......: .*\[mips3\].*
+MIPS ABI Flags Version: 0
+
+ISA: MIPS3
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/elf_arch_mips32.d b/gas/testsuite/gas/mips/elf_arch_mips32.d
index 0c4bc93..922e803 100644
--- a/gas/testsuite/gas/mips/elf_arch_mips32.d
+++ b/gas/testsuite/gas/mips/elf_arch_mips32.d
@@ -6,3 +6,16 @@
.*:.*file format.*elf.*mips.*
private flags = 5.......: .*\[mips32\].*
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/elf_arch_mips32r2.d b/gas/testsuite/gas/mips/elf_arch_mips32r2.d
index b0044ba..aa30299 100644
--- a/gas/testsuite/gas/mips/elf_arch_mips32r2.d
+++ b/gas/testsuite/gas/mips/elf_arch_mips32r2.d
@@ -6,3 +6,16 @@
.*:.*file format.*elf.*mips.*
private flags = 7.......: .*\[mips32r2\].*
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r2
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/elf_arch_mips32r3.d b/gas/testsuite/gas/mips/elf_arch_mips32r3.d
new file mode 100644
index 0000000..0b43353
--- /dev/null
+++ b/gas/testsuite/gas/mips/elf_arch_mips32r3.d
@@ -0,0 +1,21 @@
+# name: ELF MIPS32r3 markings
+# source: empty.s
+# objdump: -p
+# as: -32 -march=mips32r3
+
+.*:.*file format.*elf.*mips.*
+private flags = 7.......: .*\[mips32r2\].*
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r3
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/elf_arch_mips32r5.d b/gas/testsuite/gas/mips/elf_arch_mips32r5.d
new file mode 100644
index 0000000..1da7b13
--- /dev/null
+++ b/gas/testsuite/gas/mips/elf_arch_mips32r5.d
@@ -0,0 +1,21 @@
+# name: ELF MIPS32r5 markings
+# source: empty.s
+# objdump: -p
+# as: -32 -march=mips32r5
+
+.*:.*file format.*elf.*mips.*
+private flags = 7.......: .*\[mips32r2\].*
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r5
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/elf_arch_mips4.d b/gas/testsuite/gas/mips/elf_arch_mips4.d
index d465582..d550e14 100644
--- a/gas/testsuite/gas/mips/elf_arch_mips4.d
+++ b/gas/testsuite/gas/mips/elf_arch_mips4.d
@@ -6,3 +6,16 @@
.*:.*file format.*elf.*mips.*
private flags = 3.......: .*\[mips4\].*
+MIPS ABI Flags Version: 0
+
+ISA: MIPS4
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/elf_arch_mips5.d b/gas/testsuite/gas/mips/elf_arch_mips5.d
index 39327ae..31a0f18 100644
--- a/gas/testsuite/gas/mips/elf_arch_mips5.d
+++ b/gas/testsuite/gas/mips/elf_arch_mips5.d
@@ -6,3 +6,16 @@
.*:.*file format.*elf.*mips.*
private flags = 4.......: .*\[mips5\].*
+MIPS ABI Flags Version: 0
+
+ISA: MIPS5
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/elf_arch_mips64.d b/gas/testsuite/gas/mips/elf_arch_mips64.d
index c3aea0f..25277b3 100644
--- a/gas/testsuite/gas/mips/elf_arch_mips64.d
+++ b/gas/testsuite/gas/mips/elf_arch_mips64.d
@@ -6,3 +6,16 @@
.*:.*file format.*elf.*mips.*
private flags = 6.......: .*\[mips64\].*
+MIPS ABI Flags Version: 0
+
+ISA: MIPS64
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/elf_arch_mips64r2.d b/gas/testsuite/gas/mips/elf_arch_mips64r2.d
index aa318ce..2f5063b 100644
--- a/gas/testsuite/gas/mips/elf_arch_mips64r2.d
+++ b/gas/testsuite/gas/mips/elf_arch_mips64r2.d
@@ -1,8 +1,21 @@
# name: ELF MIPS64r2 markings
# source: empty.s
# objdump: -p
-# as: -march=mips64r2
+# as: -32 -march=mips64r2
.*:.*file format.*elf.*mips.*
private flags = 8.......: .*\[mips64r2\].*
+MIPS ABI Flags Version: 0
+
+ISA: MIPS64r2
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/elf_arch_mips64r3.d b/gas/testsuite/gas/mips/elf_arch_mips64r3.d
new file mode 100644
index 0000000..5b74f2d
--- /dev/null
+++ b/gas/testsuite/gas/mips/elf_arch_mips64r3.d
@@ -0,0 +1,21 @@
+# name: ELF MIPS64r3 markings
+# source: empty.s
+# objdump: -p
+# as: -32 -march=mips64r3
+
+.*:.*file format.*elf.*mips.*
+private flags = 8.......: .*\[mips64r2\].*
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS64r3
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/elf_arch_mips64r5.d b/gas/testsuite/gas/mips/elf_arch_mips64r5.d
new file mode 100644
index 0000000..da4ee31
--- /dev/null
+++ b/gas/testsuite/gas/mips/elf_arch_mips64r5.d
@@ -0,0 +1,21 @@
+# name: ELF MIPS64r5 markings
+# source: empty.s
+# objdump: -p
+# as: -32 -march=mips64r5
+
+.*:.*file format.*elf.*mips.*
+private flags = 8.......: .*\[mips64r2\].*
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS64r5
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/elf_ase_micromips-2.d b/gas/testsuite/gas/mips/elf_ase_micromips-2.d
index 28b7f81..e600880 100644
--- a/gas/testsuite/gas/mips/elf_ase_micromips-2.d
+++ b/gas/testsuite/gas/mips/elf_ase_micromips-2.d
@@ -6,3 +6,16 @@
.*:.*file format.*mips.*
private flags = [0-9a-f]*[2367abef]......: .*[[,]micromips[],].*
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ MICROMIPS ASE
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/elf_ase_micromips.d b/gas/testsuite/gas/mips/elf_ase_micromips.d
index c748dfb..13bb65a 100644
--- a/gas/testsuite/gas/mips/elf_ase_micromips.d
+++ b/gas/testsuite/gas/mips/elf_ase_micromips.d
@@ -6,3 +6,16 @@
.*:.*file format.*mips.*
!private flags = .*micromips.*
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/elf_ase_mips16-2.d b/gas/testsuite/gas/mips/elf_ase_mips16-2.d
index 89b28b0..afd923c 100644
--- a/gas/testsuite/gas/mips/elf_ase_mips16-2.d
+++ b/gas/testsuite/gas/mips/elf_ase_mips16-2.d
@@ -6,3 +6,16 @@
.*:.*file format.*mips.*
private flags = [0-9a-f]*[4-7c-f]......: .*[[,]mips16[],].*
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ MIPS16 ASE
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/elf_ase_mips16.d b/gas/testsuite/gas/mips/elf_ase_mips16.d
index 89fbc5b..27135f1 100644
--- a/gas/testsuite/gas/mips/elf_ase_mips16.d
+++ b/gas/testsuite/gas/mips/elf_ase_mips16.d
@@ -6,3 +6,16 @@
.*:.*file format.*mips.*
!private flags = .*mips16.*
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/fpxx-oddfpreg.d b/gas/testsuite/gas/mips/fpxx-oddfpreg.d
new file mode 100644
index 0000000..b1fdc06
--- /dev/null
+++ b/gas/testsuite/gas/mips/fpxx-oddfpreg.d
@@ -0,0 +1,12 @@
+#as: -32 -mfpxx -modd-spreg
+#objdump: -d
+#name: FPXX with odd-singles test
+.*: file format .*
+
+Disassembly of section .text:
+
+[ 0-9a-f]+ <.text>:
+[ 0-9a-f]+: 44840800 mtc1 a0,\$f1
+[ 0-9a-f]+: 44040800 mfc1 a0,\$f1
+[ 0-9a-f]+: c4610000 lwc1 \$f1,0\(v1\)
+[ 0-9a-f]+: e4610000 swc1 \$f1,0\(v1\)
diff --git a/gas/testsuite/gas/mips/fpxx-oddfpreg.l b/gas/testsuite/gas/mips/fpxx-oddfpreg.l
new file mode 100644
index 0000000..f441b6f
--- /dev/null
+++ b/gas/testsuite/gas/mips/fpxx-oddfpreg.l
@@ -0,0 +1,5 @@
+.*: Assembler messages:
+.*:1: Error: float register should be even, was 1
+.*:2: Error: float register should be even, was 1
+.*:3: Error: float register should be even, was 1
+.*:4: Error: float register should be even, was 1
diff --git a/gas/testsuite/gas/mips/fpxx-oddfpreg.s b/gas/testsuite/gas/mips/fpxx-oddfpreg.s
new file mode 100644
index 0000000..2136619
--- /dev/null
+++ b/gas/testsuite/gas/mips/fpxx-oddfpreg.s
@@ -0,0 +1,4 @@
+mtc1 $4, $f1
+mfc1 $4, $f1
+lwc1 $f1, 0($3)
+swc1 $f1, 0($3)
diff --git a/gas/testsuite/gas/mips/li-d.d b/gas/testsuite/gas/mips/li-d.d
new file mode 100644
index 0000000..ca24570
--- /dev/null
+++ b/gas/testsuite/gas/mips/li-d.d
@@ -0,0 +1,31 @@
+#objdump: -d --prefix-addresses
+#as: -mips64r2
+#name: MIPS li.d
+#source: li-d.s
+
+# Test the li.d macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> li v(0|1),0
+[0-9a-f]+ <[^>]*> move v(1|0),zero
+[0-9a-f]+ <[^>]*> li at,0
+[0-9a-f]+ <[^>]*> mtc1 at,\$f1
+[0-9a-f]+ <[^>]*> mtc1 zero,\$f0
+[0-9a-f]+ <[^>]*> li at,0
+[0-9a-f]+ <[^>]*> mtc1 at,\$f1
+[0-9a-f]+ <[^>]*> mtc1 zero,\$f0
+[0-9a-f]+ <[^>]*> ldc1 \$f0,0\(gp\)
+[0-9a-f]+ <[^>]*> li at,0
+[0-9a-f]+ <[^>]*> mthc1 at,\$f0
+[0-9a-f]+ <[^>]*> mtc1 zero,\$f0
+[0-9a-f]+ <[^>]*> li at,0
+[0-9a-f]+ <[^>]*> mthc1 at,\$f0
+[0-9a-f]+ <[^>]*> mtc1 zero,\$f0
+[0-9a-f]+ <[^>]*> li at,0
+[0-9a-f]+ <[^>]*> mthc1 at,\$f0
+[0-9a-f]+ <[^>]*> mtc1 zero,\$f0
+[0-9a-f]+ <[^>]*> li at,0
+[0-9a-f]+ <[^>]*> dmtc1 at,\$f0
+ \.\.\.
diff --git a/gas/testsuite/gas/mips/li-d.s b/gas/testsuite/gas/mips/li-d.s
new file mode 100644
index 0000000..8578097
--- /dev/null
+++ b/gas/testsuite/gas/mips/li-d.s
@@ -0,0 +1,24 @@
+# Source file used to test the li macro.
+
+foo:
+ .set mips1
+ .set fp=32
+ li.d $2, 0
+ li.d $f0, 0
+ .set mips2
+ li.d $f0, 0
+ .set fp=xx
+ li.d $f0, 0
+ .set mips32r2
+ .set fp=32
+ li.d $f0, 0
+ .set fp=xx
+ li.d $f0, 0
+ .set fp=64
+ li.d $f0, 0
+ .set mips3
+ li.d $f0, 0
+
+# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 2
+ .space 8
diff --git a/gas/testsuite/gas/mips/micromips@mips1-fp.d b/gas/testsuite/gas/mips/micromips@mips1-fp.d
index 60e605f..7cfb2d8 100644
--- a/gas/testsuite/gas/mips/micromips@mips1-fp.d
+++ b/gas/testsuite/gas/mips/micromips@mips1-fp.d
@@ -8,5 +8,5 @@
Disassembly of section \.text:
[0-9a-f]+ <foo>:
[0-9a-f ]+: 5482 0030 add\.s \$f0,\$f2,\$f4
-[0-9a-f ]+: 5440 103b cfc1 \$2,\$0
+[0-9a-f ]+: 5440 203b mfc1 \$2,\$f0
#pass
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index c3135ca..ed63cdc 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -86,6 +86,10 @@
# nollsc
# The CPU doesn't support ll, sc, lld and scd instructions.
#
+# oddspreg
+# The CPU has odd-numbered single-precision registers
+# available and GAS enables use of them by default.
+#
# as_flags: The assembler flags used when assembling tests for this
# architecture.
#
@@ -452,19 +456,19 @@ mips_arch_create r4000 64 mips3 {} \
{ -march=r4000 -mtune=r4000 } { -mmips:4000 }
mips_arch_create vr5400 64 mips4 { ror } \
{ -march=vr5400 -mtune=vr5400 } { -mmips:5400 }
-mips_arch_create sb1 64 mips64 { mips3d } \
+mips_arch_create sb1 64 mips64 { mips3d oddspreg } \
{ -march=sb1 -mtune=sb1 } { -mmips:sb1 } \
{ mipsisa64sb1-*-* mipsisa64sb1el-*-* }
-mips_arch_create octeon 64 mips64r2 {} \
+mips_arch_create octeon 64 mips64r2 { oddspreg } \
{ -march=octeon -mtune=octeon } { -mmips:octeon } \
{ mips64octeon*-*-* }
-mips_arch_create octeonp 64 octeon {} \
+mips_arch_create octeonp 64 octeon { oddspreg } \
{ -march=octeon+ -mtune=octeon+ } { -mmips:octeon+ } \
{ }
-mips_arch_create octeon2 64 octeonp {} \
+mips_arch_create octeon2 64 octeonp { oddspreg } \
{ -march=octeon2 -mtune=octeon2 } { -mmips:octeon2 } \
{ }
-mips_arch_create xlr 64 mips64 {} \
+mips_arch_create xlr 64 mips64 { oddspreg } \
{ -march=xlr -mtune=xlr } { -mmips:xlr }
mips_arch_create r5900 64 mips3 { gpr_ilocks singlefloat nollsc } \
{ -march=r5900 -mtune=r5900 } { -mmips:5900 } \
@@ -824,8 +828,12 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test "elf_arch_mips5"
run_dump_test "elf_arch_mips32"
run_dump_test "elf_arch_mips32r2"
+ run_dump_test "elf_arch_mips32r3"
+ run_dump_test "elf_arch_mips32r5"
run_dump_test "elf_arch_mips64"
run_dump_test "elf_arch_mips64r2"
+ run_dump_test "elf_arch_mips64r3"
+ run_dump_test "elf_arch_mips64r5"
# Verify that ASE markings are handled properly.
run_dump_test "elf_ase_mips16"
@@ -1187,7 +1195,7 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test_arches "msa-branch" [mips_arch_list_matching mips32r2]
run_dump_test_arches "xpa" [mips_arch_list_matching mips32r2 !micromips]
- run_dump_test_arches "r5" [mips_arch_list_matching mips32r5 !micromips]
+ run_dump_test_arches "r5" "-32" [mips_arch_list_matching mips32r5 !micromips]
run_dump_test "pcrel-1"
run_dump_test "pcrel-2"
@@ -1198,10 +1206,192 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test "pcrel-4-64"
}
+ run_dump_test_arches "attr-gnu-4-0" "-32" \
+ [mips_arch_list_matching mips1]
+ run_dump_test_arches "attr-gnu-4-0" "-64" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "attr-gnu-4-0" "-mfp32 -32" \
+ [mips_arch_list_matching mips1]
+ run_dump_test_arches "attr-gnu-4-0" "-mfpxx -32" \
+ [mips_arch_list_matching mips2 !r5900]
+ run_dump_test_arches "attr-gnu-4-0" "-mfp64 -32" \
+ [mips_arch_list_matching mips32r2]
+ run_dump_test_arches "attr-gnu-4-0" "-mfp64 -mno-odd-spreg -32" \
+ [mips_arch_list_matching mips32r2]
+ run_dump_test_arches "attr-gnu-4-0" "-mfp64 -64" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "attr-gnu-4-0" "-msingle-float -32" \
+ [mips_arch_list_matching mips1]
+ run_dump_test_arches "attr-gnu-4-0" "-msingle-float -64" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "attr-gnu-4-0" "-msoft-float -32" \
+ [mips_arch_list_matching mips1]
+ run_dump_test_arches "attr-gnu-4-0" "-msoft-float -64" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "attr-none-double" "-32" \
+ [mips_arch_list_matching mips1]
+ run_dump_test_arches "attr-none-double" "-64" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "attr-none-o32-fpxx" \
+ [mips_arch_list_matching mips2 !r5900]
+ run_dump_test_arches "attr-none-o32-fp64" \
+ [mips_arch_list_matching mips32r2]
+ run_dump_test_arches "attr-none-o32-fp64-nooddspreg" \
+ [mips_arch_list_matching mips32r2]
+ run_dump_test_arches "attr-none-single-float" "-32" \
+ [mips_arch_list_matching mips1]
+ run_dump_test_arches "attr-none-single-float" "-64" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "attr-none-soft-float" "-32 -msoft-float" \
+ [mips_arch_list_matching mips1]
+ run_dump_test_arches "attr-none-soft-float" "-64 -msoft-float" \
+ [mips_arch_list_matching mips3]
+
+ run_list_test_arches "attr-gnu-4-1-mfp64" \
+ "-32 -mfp64 -mno-odd-spreg" \
+ [mips_arch_list_matching mips32r2]
+ run_list_test_arches "attr-gnu-4-1-mfp64" "-32 -mfp64" \
+ [mips_arch_list_matching mips32r2]
+ run_list_test_arches "attr-gnu-4-1-mfp32" "-64 -mfp32" \
+ [mips_arch_list_matching mips3]
+ run_list_test_arches "attr-gnu-4-1-msingle-float" "-32 -msingle-float" \
+ [mips_arch_list_matching mips1]
+ run_list_test_arches "attr-gnu-4-1-msoft-float" "-32 -msoft-float" \
+ [mips_arch_list_matching mips1]
+ run_dump_test_arches "attr-gnu-4-1" "-32 -mfpxx" \
+ [mips_arch_list_matching mips2 !r5900]
+ run_dump_test_arches "attr-gnu-4-1" "-32 -mfp32" \
+ [mips_arch_list_matching mips1]
+ run_dump_test_arches "attr-gnu-4-1" "-64 -mfp64" \
+ [mips_arch_list_matching mips3]
+
+ run_list_test_arches "attr-gnu-4-2-mdouble-float" "-32 -mfp32" \
+ [mips_arch_list_matching mips1]
+ run_list_test_arches "attr-gnu-4-2-mdouble-float" "-32 -mfpxx" \
+ [mips_arch_list_matching mips2 !r5900]
+ run_list_test_arches "attr-gnu-4-2-mdouble-float" "-32 -mfp64" \
+ [mips_arch_list_matching mips32r2]
+ run_list_test_arches "attr-gnu-4-2-mdouble-float" \
+ "-32 -mfp64 -mno-odd-spreg" \
+ [mips_arch_list_matching mips32r2]
+ run_list_test_arches "attr-gnu-4-2-mdouble-float" "-64 -mfp64" \
+ [mips_arch_list_matching mips3]
+ run_list_test_arches "attr-gnu-4-2-msoft-float" "-32 -msoft-float" \
+ [mips_arch_list_matching mips1]
+ run_dump_test_arches "attr-gnu-4-2" "-32" \
+ [mips_arch_list_matching mips1]
+ run_dump_test_arches "attr-gnu-4-2" "-64" \
+ [mips_arch_list_matching mips3]
+
+ run_list_test_arches "attr-gnu-4-3-mhard-float" "-32 -mfp32" \
+ [mips_arch_list_matching mips1]
+ run_list_test_arches "attr-gnu-4-3-mhard-float" "-32 -mfpxx" \
+ [mips_arch_list_matching mips2 !r5900]
+ run_list_test_arches "attr-gnu-4-3-mhard-float" "-32 -mfp64" \
+ [mips_arch_list_matching mips32r2]
+ run_list_test_arches "attr-gnu-4-3-mhard-float" \
+ "-32 -mfp64 -mno-odd-spreg" \
+ [mips_arch_list_matching mips32r2]
+ run_list_test_arches "attr-gnu-4-3-mhard-float" "-64 -mfp64" \
+ [mips_arch_list_matching mips3]
+ run_list_test_arches "attr-gnu-4-3-mhard-float" "-32 -msingle-float" \
+ [mips_arch_list_matching mips1]
+ run_dump_test_arches "attr-gnu-4-3" "-32" \
+ [mips_arch_list_matching mips1]
+ run_dump_test_arches "attr-gnu-4-3" "-64" \
+ [mips_arch_list_matching mips3]
+
+ run_list_test_arches "attr-gnu-4-4" "-32 -mfp32" \
+ [mips_arch_list_matching mips1]
+ run_list_test_arches "attr-gnu-4-4" "-32 -mfpxx" \
+ [mips_arch_list_matching mips2 !r5900]
+ run_list_test_arches "attr-gnu-4-4" "-32 -mfp64" \
+ [mips_arch_list_matching mips32r2]
+ run_list_test_arches "attr-gnu-4-4" "-32 -mfp64 -mno-odd-spreg" \
+ [mips_arch_list_matching mips32r2]
+ run_list_test_arches "attr-gnu-4-4" "-64 -mfp64" \
+ [mips_arch_list_matching mips3]
+ run_list_test_arches "attr-gnu-4-4" "-32 -msingle-float" \
+ [mips_arch_list_matching mips1]
+ run_list_test_arches "attr-gnu-4-4" "-32 -msoft-float" \
+ [mips_arch_list_matching mips1]
+
+ run_list_test_arches "attr-gnu-4-5" "-32 -mfp32" \
+ [mips_arch_list_matching mips1]
+ run_list_test_arches "attr-gnu-4-5" "-32 -mfp64" \
+ [mips_arch_list_matching mips32r2]
+ run_list_test_arches "attr-gnu-4-5" "-32 -mfp64 -mno-odd-spreg" \
+ [mips_arch_list_matching mips32r2]
+ run_list_test_arches "attr-gnu-4-5-64" "-64 -mfp64" \
+ [mips_arch_list_matching mips3]
+ run_list_test_arches "attr-gnu-4-5" "-32 -msingle-float" \
+ [mips_arch_list_matching mips1]
+ run_list_test_arches "attr-gnu-4-5" "-32 -msoft-float" \
+ [mips_arch_list_matching mips1]
+ run_dump_test_arches "attr-gnu-4-5" \
+ [mips_arch_list_matching mips2 !r5900]
+
+ run_list_test_arches "attr-gnu-4-6" "-32 -mfp32" \
+ [mips_arch_list_matching mips1]
+ run_list_test_arches "attr-gnu-4-6-noodd" "-32 -mfp64 -mno-odd-spreg" \
+ [mips_arch_list_matching mips32r2]
+ run_list_test_arches "attr-gnu-4-6-64" "-64 -mfp64" \
+ [mips_arch_list_matching mips3]
+ run_list_test_arches "attr-gnu-4-6" "-32 -msingle-float" \
+ [mips_arch_list_matching mips1]
+ run_list_test_arches "attr-gnu-4-6" "-32 -msoft-float" \
+ [mips_arch_list_matching mips1]
+ run_list_test_arches "attr-gnu-4-6" "-32 -mfpxx" \
+ [mips_arch_list_matching mips2 !r5900]
+ run_dump_test_arches "attr-gnu-4-6" "-32 -mfp64" \
+ [mips_arch_list_matching mips32r2]
+
+ run_list_test_arches "attr-gnu-4-7" "-32 -mfp32" \
+ [mips_arch_list_matching mips1]
+ run_list_test_arches "attr-gnu-4-7-odd" "-32 -mfp64" \
+ [mips_arch_list_matching mips32r2]
+ run_list_test_arches "attr-gnu-4-7-64" "-64 -mfp64" \
+ [mips_arch_list_matching mips3]
+ run_list_test_arches "attr-gnu-4-7" "-32 -msingle-float" \
+ [mips_arch_list_matching mips1]
+ run_list_test_arches "attr-gnu-4-7" "-32 -msoft-float" \
+ [mips_arch_list_matching mips1]
+ run_list_test_arches "attr-gnu-4-7" "-32 -mfpxx" \
+ [mips_arch_list_matching mips2 !r5900]
+ run_dump_test_arches "attr-gnu-4-7" "-32 -mfp64 -mno-odd-spreg" \
+ [mips_arch_list_matching mips32r2]
+
run_dump_test "attr-gnu-abi-fp-1"
run_dump_test "attr-gnu-abi-msa-1"
run_dump_test "module-override"
run_dump_test "module-defer-warn1"
- run_list_test "module-defer-warn2" -32
+ run_list_test "module-defer-warn2" "-32"
+
+ foreach testopt [list -mfp32 -mfpxx -mfp64 "-mfp64-noodd" \
+ -msingle-float -msoft-float] {
+ foreach cmdopt [list -mfp32 -mfpxx -mfp64 "-mfp64 -mno-odd-spreg" \
+ -msingle-float -msoft-float] {
+ run_dump_test "module${testopt}" \
+ [list [list as $cmdopt] [list name ($cmdopt)]]
+ }
+ }
+
+ run_dump_test "module-set-mfpxx"
+ run_list_test_arches "fpxx-oddfpreg" "-32 -mfpxx" \
+ [mips_arch_list_matching mips2 !singlefloat]
+ run_list_test_arches "fpxx-oddfpreg" "-32 -mfpxx -mno-odd-spreg" \
+ [mips_arch_list_matching mips2 !singlefloat]
+ run_dump_test_arches "fpxx-oddfpreg" \
+ [mips_arch_list_matching oddspreg]
+ run_dump_test_arches "odd-spreg" "-mfp32" [mips_arch_list_matching oddspreg]
+ run_dump_test_arches "odd-spreg" "-mfpxx" [mips_arch_list_matching oddspreg]
+ run_dump_test_arches "odd-spreg" "-mfp64" [mips_arch_list_matching mips32r2]
+ run_dump_test_arches "no-odd-spreg" "-mfp32" [mips_arch_list_matching mips1]
+ run_dump_test_arches "no-odd-spreg" "-mfpxx" [mips_arch_list_matching mips2 !r5900]
+ run_dump_test_arches "no-odd-spreg" "-mfp64" [mips_arch_list_matching mips32r2]
+ run_dump_test "module-check"
+ run_list_test "module-check-warn" "-32"
+
+ run_dump_test "li-d"
}
diff --git a/gas/testsuite/gas/mips/mips1-fp.d b/gas/testsuite/gas/mips/mips1-fp.d
index 1ab89ca..2aa229b 100644
--- a/gas/testsuite/gas/mips/mips1-fp.d
+++ b/gas/testsuite/gas/mips/mips1-fp.d
@@ -8,5 +8,5 @@ Disassembly of section .text:
[0-9a-f]+ <.*>:
.*: 46041000 add.s \$f0,\$f2,\$f4
-.*: 44420000 cfc1 \$2,\$0
+.*: 44020000 mfc1 \$2,\$f0
#pass
diff --git a/gas/testsuite/gas/mips/mips1-fp.l b/gas/testsuite/gas/mips/mips1-fp.l
index 72ed043..7526e2f 100644
--- a/gas/testsuite/gas/mips/mips1-fp.l
+++ b/gas/testsuite/gas/mips/mips1-fp.l
@@ -1,3 +1,3 @@
.*: Assembler messages:
.*:6: Error: opcode not supported on this processor: .* \(.*\) `add.s \$f0,\$f2,\$f4'
-.*:7: Error: opcode not supported on this processor: .* \(.*\) `cfc1 \$2,\$0'
+.*:7: Error: opcode not supported on this processor: .* \(.*\) `mfc1 \$2,\$f0'
diff --git a/gas/testsuite/gas/mips/mips1-fp.s b/gas/testsuite/gas/mips/mips1-fp.s
index 0c71761..5509ddb 100644
--- a/gas/testsuite/gas/mips/mips1-fp.s
+++ b/gas/testsuite/gas/mips/mips1-fp.s
@@ -4,4 +4,4 @@
foo:
add.s $f0,$f2,$f4
- cfc1 $2,$0
+ mfc1 $2,$f0
diff --git a/gas/testsuite/gas/mips/module-check-warn.l b/gas/testsuite/gas/mips/module-check-warn.l
new file mode 100644
index 0000000..2670b91
--- /dev/null
+++ b/gas/testsuite/gas/mips/module-check-warn.l
@@ -0,0 +1,5 @@
+.*: Assembler messages:
+.*:3: Error: `fp=64' used with a 32-bit fpu
+.*:3: Warning: float register should be even, was 1
+.*:3: Warning: float register should be even, was 1
+.*:3: Warning: float register should be even, was 1
diff --git a/gas/testsuite/gas/mips/module-check-warn.s b/gas/testsuite/gas/mips/module-check-warn.s
new file mode 100644
index 0000000..ee5c3f0
--- /dev/null
+++ b/gas/testsuite/gas/mips/module-check-warn.s
@@ -0,0 +1,3 @@
+.module mips1
+.module fp=64
+add.s $f1,$f1,$f1
diff --git a/gas/testsuite/gas/mips/module-check.d b/gas/testsuite/gas/mips/module-check.d
new file mode 100644
index 0000000..5542e74
--- /dev/null
+++ b/gas/testsuite/gas/mips/module-check.d
@@ -0,0 +1,21 @@
+#as: -32
+#readelf: -A
+#name: MIPS module check
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(32-bit CPU, 64-bit FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r2
+GPR size: 32
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/module-check.s b/gas/testsuite/gas/mips/module-check.s
new file mode 100644
index 0000000..09dec20
--- /dev/null
+++ b/gas/testsuite/gas/mips/module-check.s
@@ -0,0 +1,4 @@
+.module mips1
+.module fp=64
+.module mips32r2
+add.s $f1,$f1,$f1
diff --git a/gas/testsuite/gas/mips/module-defer-warn1.d b/gas/testsuite/gas/mips/module-defer-warn1.d
index d5ee70e..c20f367 100644
--- a/gas/testsuite/gas/mips/module-defer-warn1.d
+++ b/gas/testsuite/gas/mips/module-defer-warn1.d
@@ -5,3 +5,16 @@
.*:.*file format.*elf.*mips.*
private flags = 1.......: .*\[mips2\].*
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS2
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
diff --git a/gas/testsuite/gas/mips/module-mfp32.d b/gas/testsuite/gas/mips/module-mfp32.d
new file mode 100644
index 0000000..f5c66f6
--- /dev/null
+++ b/gas/testsuite/gas/mips/module-mfp32.d
@@ -0,0 +1,21 @@
+#as: -32
+#readelf: -A
+#name: MIPS module fp=32
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS1
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/module-mfp32.s b/gas/testsuite/gas/mips/module-mfp32.s
new file mode 100644
index 0000000..8f247b4
--- /dev/null
+++ b/gas/testsuite/gas/mips/module-mfp32.s
@@ -0,0 +1,3 @@
+.module fp=32
+.module doublefloat
+.module hardfloat
diff --git a/gas/testsuite/gas/mips/module-mfp64-noodd.d b/gas/testsuite/gas/mips/module-mfp64-noodd.d
new file mode 100644
index 0000000..3a9b459
--- /dev/null
+++ b/gas/testsuite/gas/mips/module-mfp64-noodd.d
@@ -0,0 +1,21 @@
+#as: -mips32r2 -32
+#readelf: -A
+#name: MIPS module fp=64 nooddspreg
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float compat \(32-bit CPU, 64-bit FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r2
+GPR size: 32
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard float compat \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/module-mfp64-noodd.s b/gas/testsuite/gas/mips/module-mfp64-noodd.s
new file mode 100644
index 0000000..6eff127
--- /dev/null
+++ b/gas/testsuite/gas/mips/module-mfp64-noodd.s
@@ -0,0 +1,4 @@
+.module fp=64
+.module doublefloat
+.module hardfloat
+.module nooddspreg
diff --git a/gas/testsuite/gas/mips/module-mfp64.d b/gas/testsuite/gas/mips/module-mfp64.d
new file mode 100644
index 0000000..8060b3e
--- /dev/null
+++ b/gas/testsuite/gas/mips/module-mfp64.d
@@ -0,0 +1,21 @@
+#as: -mips32r2 -32
+#readelf: -A
+#name: MIPS module fp=64
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(32-bit CPU, 64-bit FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r2
+GPR size: 32
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/module-mfp64.s b/gas/testsuite/gas/mips/module-mfp64.s
new file mode 100644
index 0000000..6847eed
--- /dev/null
+++ b/gas/testsuite/gas/mips/module-mfp64.s
@@ -0,0 +1,4 @@
+.module fp=64
+.module doublefloat
+.module hardfloat
+.module oddspreg
diff --git a/gas/testsuite/gas/mips/module-mfpxx.d b/gas/testsuite/gas/mips/module-mfpxx.d
new file mode 100644
index 0000000..2387eb1
--- /dev/null
+++ b/gas/testsuite/gas/mips/module-mfpxx.d
@@ -0,0 +1,21 @@
+#as: -mips32r2 -32
+#readelf: -A
+#name: MIPS module fp=xx
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(32-bit CPU, Any FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r2
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, Any FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/module-mfpxx.s b/gas/testsuite/gas/mips/module-mfpxx.s
new file mode 100644
index 0000000..8dd2a4c
--- /dev/null
+++ b/gas/testsuite/gas/mips/module-mfpxx.s
@@ -0,0 +1,3 @@
+.module fp=xx
+.module doublefloat
+.module hardfloat
diff --git a/gas/testsuite/gas/mips/module-msingle-float.d b/gas/testsuite/gas/mips/module-msingle-float.d
new file mode 100644
index 0000000..588003f
--- /dev/null
+++ b/gas/testsuite/gas/mips/module-msingle-float.d
@@ -0,0 +1,21 @@
+#as: -32
+#readelf: -A
+#name: MIPS module singlefloat
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(single precision\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS1
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(single precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/module-msingle-float.s b/gas/testsuite/gas/mips/module-msingle-float.s
new file mode 100644
index 0000000..082cccf
--- /dev/null
+++ b/gas/testsuite/gas/mips/module-msingle-float.s
@@ -0,0 +1,3 @@
+.module fp=32
+.module singlefloat
+.module hardfloat
diff --git a/gas/testsuite/gas/mips/module-msoft-float.d b/gas/testsuite/gas/mips/module-msoft-float.d
new file mode 100644
index 0000000..98a9ea1
--- /dev/null
+++ b/gas/testsuite/gas/mips/module-msoft-float.d
@@ -0,0 +1,21 @@
+#as: -32
+#readelf: -A
+#name: MIPS module softfloat
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Soft float
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS1
+GPR size: 32
+CPR1 size: 0
+CPR2 size: 0
+FP ABI: Soft float
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/module-msoft-float.s b/gas/testsuite/gas/mips/module-msoft-float.s
new file mode 100644
index 0000000..4de4be7
--- /dev/null
+++ b/gas/testsuite/gas/mips/module-msoft-float.s
@@ -0,0 +1,3 @@
+.module fp=32
+.module doublefloat
+.module softfloat
diff --git a/gas/testsuite/gas/mips/module-override.d b/gas/testsuite/gas/mips/module-override.d
index 0305b02..464eb06 100644
--- a/gas/testsuite/gas/mips/module-override.d
+++ b/gas/testsuite/gas/mips/module-override.d
@@ -5,3 +5,16 @@
.*:.*file format.*elf.*mips.*
private flags = 1.......: .*\[mips2\].*
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS2
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
diff --git a/gas/testsuite/gas/mips/module-set-mfpxx.d b/gas/testsuite/gas/mips/module-set-mfpxx.d
new file mode 100644
index 0000000..d2e4ffe
--- /dev/null
+++ b/gas/testsuite/gas/mips/module-set-mfpxx.d
@@ -0,0 +1,21 @@
+#as: -32
+#readelf: -A
+#name: MIPS module fp=xx set
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(32-bit CPU, Any FPU\)
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r2
+GPR size: 32
+CPR1 size: 32
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, Any FPU\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/module-set-mfpxx.s b/gas/testsuite/gas/mips/module-set-mfpxx.s
new file mode 100644
index 0000000..313d768
--- /dev/null
+++ b/gas/testsuite/gas/mips/module-set-mfpxx.s
@@ -0,0 +1,16 @@
+.module mips32r2
+.module fp=xx
+.module doublefloat
+.module hardfloat
+.module oddspreg
+
+add.s $f1,$f1,$f1
+.set push
+.set fp=32
+add.s $f1,$f1,$f1
+.set pop
+
+.set push
+.set fp=64
+add.d $f1,$f1,$f1
+.set pop
diff --git a/gas/testsuite/gas/mips/n32-consec.d b/gas/testsuite/gas/mips/n32-consec.d
index 806857e..03b4970 100644
--- a/gas/testsuite/gas/mips/n32-consec.d
+++ b/gas/testsuite/gas/mips/n32-consec.d
@@ -12,3 +12,16 @@ Disassembly of section .data:
0: R_MIPS_32 .data\+0x4
Disassembly of section .reginfo:
...
+
+Disassembly of section .MIPS.abiflags:
+.*
+.*
+ ...
+.*
+.*
+
+Disassembly of section .gnu.attributes:
+.*
+.*
+.*
+.*
diff --git a/gas/testsuite/gas/mips/nan-2008-1.d b/gas/testsuite/gas/mips/nan-2008-1.d
index 3649fd2..78556f5 100644
--- a/gas/testsuite/gas/mips/nan-2008-1.d
+++ b/gas/testsuite/gas/mips/nan-2008-1.d
@@ -4,3 +4,4 @@
.*:.*file format.*mips.*
private flags = [0-9a-f]*[4-7c-f]..: .*[[,]nan2008[],].*
+#pass
diff --git a/gas/testsuite/gas/mips/nan-2008-2.d b/gas/testsuite/gas/mips/nan-2008-2.d
index e8a07ce..c98455b 100644
--- a/gas/testsuite/gas/mips/nan-2008-2.d
+++ b/gas/testsuite/gas/mips/nan-2008-2.d
@@ -5,3 +5,4 @@
.*:.*file format.*mips.*
private flags = [0-9a-f]*[4-7c-f]..: .*[[,]nan2008[],].*
+#pass
diff --git a/gas/testsuite/gas/mips/nan-2008-3.d b/gas/testsuite/gas/mips/nan-2008-3.d
index 7c3c4a3..8f179fb 100644
--- a/gas/testsuite/gas/mips/nan-2008-3.d
+++ b/gas/testsuite/gas/mips/nan-2008-3.d
@@ -4,3 +4,4 @@
.*:.*file format.*mips.*
private flags = [0-9a-f]*[4-7c-f]..: .*[[,]nan2008[],].*
+#pass
diff --git a/gas/testsuite/gas/mips/nan-2008-4.d b/gas/testsuite/gas/mips/nan-2008-4.d
index 22ba87f..44d5d22 100644
--- a/gas/testsuite/gas/mips/nan-2008-4.d
+++ b/gas/testsuite/gas/mips/nan-2008-4.d
@@ -5,3 +5,4 @@
.*:.*file format.*mips.*
private flags = [0-9a-f]*[4-7c-f]..: .*[[,]nan2008[],].*
+#pass
diff --git a/gas/testsuite/gas/mips/nan-legacy-1.d b/gas/testsuite/gas/mips/nan-legacy-1.d
index 4dcb93c..a2f6d0c 100644
--- a/gas/testsuite/gas/mips/nan-legacy-1.d
+++ b/gas/testsuite/gas/mips/nan-legacy-1.d
@@ -5,3 +5,17 @@
.*:.*file format.*mips.*
#failif
private flags = [0-9a-f]*[4-7c-f]..: .*[[]nan2008[]].*
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/nan-legacy-2.d b/gas/testsuite/gas/mips/nan-legacy-2.d
index 6ad4dce..83c559f 100644
--- a/gas/testsuite/gas/mips/nan-legacy-2.d
+++ b/gas/testsuite/gas/mips/nan-legacy-2.d
@@ -6,3 +6,17 @@
.*:.*file format.*mips.*
#failif
private flags = [0-9a-f]*[4-7c-f]..: .*[[]nan2008[]].*
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/nan-legacy-3.d b/gas/testsuite/gas/mips/nan-legacy-3.d
index 649f0ee..f19d1aa 100644
--- a/gas/testsuite/gas/mips/nan-legacy-3.d
+++ b/gas/testsuite/gas/mips/nan-legacy-3.d
@@ -5,3 +5,17 @@
.*:.*file format.*mips.*
#failif
private flags = [0-9a-f]*[4-7c-f]..: .*[[]nan2008[]].*
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/nan-legacy-4.d b/gas/testsuite/gas/mips/nan-legacy-4.d
index 3dc00cb..c70d1d1 100644
--- a/gas/testsuite/gas/mips/nan-legacy-4.d
+++ b/gas/testsuite/gas/mips/nan-legacy-4.d
@@ -6,3 +6,17 @@
.*:.*file format.*mips.*
#failif
private flags = [0-9a-f]*[4-7c-f]..: .*[[]nan2008[]].*
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/nan-legacy-5.d b/gas/testsuite/gas/mips/nan-legacy-5.d
index db3a954..d3b2480 100644
--- a/gas/testsuite/gas/mips/nan-legacy-5.d
+++ b/gas/testsuite/gas/mips/nan-legacy-5.d
@@ -5,3 +5,17 @@
.*:.*file format.*mips.*
#failif
private flags = [0-9a-f]*[4-7c-f]..: .*[[]nan2008[]].*
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: Hard float \(double precision\)
+ISA Extension: None
+ASEs:
+ None
+FLAGS 1: 00000000
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/no-odd-spreg.d b/gas/testsuite/gas/mips/no-odd-spreg.d
new file mode 100644
index 0000000..f33e3a6
--- /dev/null
+++ b/gas/testsuite/gas/mips/no-odd-spreg.d
@@ -0,0 +1,22 @@
+#PROG: readelf
+#source: empty.s
+#as: -32 -mno-odd-spreg
+#readelf: -A
+#name: -mno-odd-spreg test
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: .*
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: .*
+ISA Extension: .*
+ASEs:
+#...
+FLAGS 1: 00000000
+FLAGS 2: 00000000
diff --git a/gas/testsuite/gas/mips/odd-spreg.d b/gas/testsuite/gas/mips/odd-spreg.d
new file mode 100644
index 0000000..7f80c2c
--- /dev/null
+++ b/gas/testsuite/gas/mips/odd-spreg.d
@@ -0,0 +1,22 @@
+#PROG: readelf
+#source: empty.s
+#as: -32 -modd-spreg
+#readelf: -A
+#name: -modd-spreg test
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: .*
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS.*
+GPR size: .*
+CPR1 size: .*
+CPR2 size: 0
+FP ABI: .*
+ISA Extension: .*
+ASEs:
+#...
+FLAGS 1: 00000001
+FLAGS 2: 00000000
diff --git a/gas/testsuite/gas/mips/tmips16-e.d b/gas/testsuite/gas/mips/tmips16-e.d
index ddd6aaa..708ff11 100644
--- a/gas/testsuite/gas/mips/tmips16-e.d
+++ b/gas/testsuite/gas/mips/tmips16-e.d
@@ -15,7 +15,9 @@ SYMBOL TABLE:
0+0000004 l \.text 0+0000000 0xf0 \.L1.1
0+0000000 l d foo 0+0000000 (|foo)
0+0000000 l d \.reginfo 0+0000000 (|\.reginfo)
+0+0000000 l d \.MIPS\.abiflags 0+0000000 (|\.MIPS\.abiflags)
0+0000000 l d \.(mdebug|pdr) 0+0000000 (|\.mdebug|\.pdr)
+0+0000000 l d \.gnu\.attributes 0+0000000 (|\.gnu\.attributes)
0+0000000 \*UND\* 0+0000000 g1
@@ -34,6 +36,11 @@ Contents of section \.text:
Contents of section \.reginfo:
0000 00010000 00000000 00000000 00000000 .*
0010 00000000 00000000 .*
+Contents of section .MIPS.abiflags:
+ .*
+ .*
Contents of section foo:
0000 00000000 00000008 00000000 00000003 .*
0010 00000000 00000008 00000000 00000000 .*
+Contents of section .gnu.attributes:
+ .*
diff --git a/gas/testsuite/gas/mips/tmips16-f.d b/gas/testsuite/gas/mips/tmips16-f.d
index f865d1d..057122c 100644
--- a/gas/testsuite/gas/mips/tmips16-f.d
+++ b/gas/testsuite/gas/mips/tmips16-f.d
@@ -14,7 +14,9 @@ SYMBOL TABLE:
0+0000002 l \.text 0+0000000 0xf0 l1
0+0000000 l d foo 0+0000000 (|foo)
0+0000000 l d \.reginfo 0+0000000 (|\.reginfo)
+0+0000000 l d \.MIPS\.abiflags 0+0000000 (|\.MIPS\.abiflags)
0+0000000 l d \.(mdebug|pdr) 0+0000000 (|\.mdebug|\.pdr)
+0+0000000 l d \.gnu\.attributes 0+0000000 (|\.gnu\.attributes)
RELOCATION RECORDS FOR \[foo\]:
@@ -27,5 +29,10 @@ Contents of section \.text:
Contents of section \.reginfo:
0000 00010000 00000000 00000000 00000000 .*
0010 00000000 00000000 .*
+Contents of section .MIPS.abiflags:
+ .*
+ .*
Contents of section foo:
0000 00000003 00000000 00000000 00000000 .*
+Contents of section .gnu.attributes:
+ .*
diff --git a/gas/testsuite/gas/mips/tmipsel16-e.d b/gas/testsuite/gas/mips/tmipsel16-e.d
index 0af3793..839446b 100644
--- a/gas/testsuite/gas/mips/tmipsel16-e.d
+++ b/gas/testsuite/gas/mips/tmipsel16-e.d
@@ -15,7 +15,9 @@ SYMBOL TABLE:
0+0000004 l \.text 0+0000000 0xf0 \.L1.1
0+0000000 l d foo 0+0000000 (|foo)
0+0000000 l d \.reginfo 0+0000000 (|\.reginfo)
+0+0000000 l d \.MIPS\.abiflags 0+0000000 (|\.MIPS\.abiflags)
0+0000000 l d \.(mdebug|pdr) 0+0000000 (|\.mdebug|\.pdr)
+0+0000000 l d \.gnu\.attributes 0+0000000 (|\.gnu\.attributes)
0+0000000 \*UND\* 0+0000000 g1
@@ -34,6 +36,11 @@ Contents of section \.text:
Contents of section \.reginfo:
0000 00000100 00000000 00000000 00000000 .*
0010 00000000 00000000 .*
+Contents of section .MIPS.abiflags:
+ .*
+ .*
Contents of section foo:
0000 00000000 08000000 00000000 03000000 .*
0010 00000000 08000000 00000000 00000000 .*
+Contents of section .gnu.attributes:
+ .*
diff --git a/gas/testsuite/gas/mips/tmipsel16-f.d b/gas/testsuite/gas/mips/tmipsel16-f.d
index 5daa593..edc6068 100644
--- a/gas/testsuite/gas/mips/tmipsel16-f.d
+++ b/gas/testsuite/gas/mips/tmipsel16-f.d
@@ -14,7 +14,9 @@ SYMBOL TABLE:
0+0000002 l \.text 0+0000000 0xf0 l1
0+0000000 l d foo 0+0000000 (|foo)
0+0000000 l d \.reginfo 0+0000000 (\.reginfo)
+0+0000000 l d \.MIPS\.abiflags 0+0000000 (\.MIPS\.abiflags)
0+0000000 l d \.(mdebug|pdr) 0+0000000 (\.mdebug|\.pdr)
+0+0000000 l d \.gnu\.attributes 0+0000000 (\.gnu\.attributes)
RELOCATION RECORDS FOR \[foo\]:
@@ -27,5 +29,10 @@ Contents of section \.text:
Contents of section \.reginfo:
0000 00000100 00000000 00000000 00000000 .*
0010 00000000 00000000 .*
+Contents of section .MIPS.abiflags:
+ .*
+ .*
Contents of section foo:
0000 03000000 00000000 00000000 00000000 .*
+Contents of section .gnu.attributes:
+ .*