From 3350cc01deccb8289c1c26938628f996df3e390c Mon Sep 17 00:00:00 2001 From: Catherine Moore Date: Thu, 9 Jul 2015 08:24:54 -0700 Subject: [PATCH] 2015-07-09 Catherine Moore include/ * elf/mips/mips.h (Val_GNU_MIPS_ABI_FP_NAN2008): New. gas/ * config/tc-mips.c (check_fpabi): Handle VAL_GNU_MIPS_ABI_FP_NAN2008. binutils/ * readelf.c (print_mips_fp_abi_value): Handle Val_GNU_MIPS_ABI_FP_NAN2008. ld/testsuite/ * ld-mips-elf/attr-gnu-4-08.d: Update expected output. * ld-mips-elf/attr-gnu-4-09.d: New. * ld-mips-elf/attr-gnu-4-19.d: New. * ld-mips-elf/attr-gnu-4-29.d: New. * ld-mips-elf/attr-gnu-4-39.d: New. * ld-mips-elf/attr-gnu-4-49.d: New. * ld-mips-elf/attr-gnu-4-59.d: New. * ld-mips-elf/attr-gnu-4-69.d: New. * ld-mips-elf/attr-gnu-4-79.d: New. * ld-mips-elf/attr-gnu-4-89.d: New. * ld-mips-elf/attr-gnu-4-9.s: New. * ld-mips-elf/mips-elf.exp: Run new tests. --- binutils/ChangeLog | 5 +++++ binutils/readelf.c | 3 +++ gas/ChangeLog | 5 +++++ gas/config/tc-mips.c | 4 ++++ include/ChangeLog | 4 ++++ include/elf/mips.h | 4 ++++ ld/testsuite/ChangeLog | 15 +++++++++++++++ ld/testsuite/ld-mips-elf/attr-gnu-4-08.d | 4 ++-- ld/testsuite/ld-mips-elf/attr-gnu-4-09.d | 21 +++++++++++++++++++++ ld/testsuite/ld-mips-elf/attr-gnu-4-19.d | 22 ++++++++++++++++++++++ ld/testsuite/ld-mips-elf/attr-gnu-4-29.d | 22 ++++++++++++++++++++++ ld/testsuite/ld-mips-elf/attr-gnu-4-39.d | 22 ++++++++++++++++++++++ ld/testsuite/ld-mips-elf/attr-gnu-4-49.d | 6 ++++++ ld/testsuite/ld-mips-elf/attr-gnu-4-59.d | 4 ++++ ld/testsuite/ld-mips-elf/attr-gnu-4-69.d | 4 ++++ ld/testsuite/ld-mips-elf/attr-gnu-4-79.d | 4 ++++ ld/testsuite/ld-mips-elf/attr-gnu-4-89.d | 4 ++++ ld/testsuite/ld-mips-elf/attr-gnu-4-9.s | 1 + ld/testsuite/ld-mips-elf/mips-elf.exp | 4 ++-- 19 files changed, 154 insertions(+), 4 deletions(-) create mode 100644 ld/testsuite/ld-mips-elf/attr-gnu-4-09.d create mode 100644 ld/testsuite/ld-mips-elf/attr-gnu-4-19.d create mode 100644 ld/testsuite/ld-mips-elf/attr-gnu-4-29.d create mode 100644 ld/testsuite/ld-mips-elf/attr-gnu-4-39.d create mode 100644 ld/testsuite/ld-mips-elf/attr-gnu-4-49.d create mode 100644 ld/testsuite/ld-mips-elf/attr-gnu-4-59.d create mode 100644 ld/testsuite/ld-mips-elf/attr-gnu-4-69.d create mode 100644 ld/testsuite/ld-mips-elf/attr-gnu-4-79.d create mode 100644 ld/testsuite/ld-mips-elf/attr-gnu-4-89.d create mode 100644 ld/testsuite/ld-mips-elf/attr-gnu-4-9.s diff --git a/binutils/ChangeLog b/binutils/ChangeLog index ab36fd93c8a..53b69ca176b 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2015-07-09 Catherine Moore + + * readelf.c (print_mips_fp_abi_value): Handle + Val_GNU_MIPS_ABI_FP_NAN2008. + 2015-06-26 Matthew Fortune * readelf.c (get_mips_dynamic_type): Handle DT_MIPS_RLD_MAP_REL. diff --git a/binutils/readelf.c b/binutils/readelf.c index 398a165d2bd..ceedf3d17be 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -13197,6 +13197,9 @@ print_mips_fp_abi_value (int val) case Val_GNU_MIPS_ABI_FP_64A: printf (_("Hard float compat (32-bit CPU, 64-bit FPU)\n")); break; + case Val_GNU_MIPS_ABI_FP_NAN2008: + printf (_("NaN 2008 compatibility\n")); + break; default: printf ("??? (%d)\n", val); break; diff --git a/gas/ChangeLog b/gas/ChangeLog index e54d8a7ea08..5374c5e71ce 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2015-07-09 Catherine Moore + + * config/tc-mips.c (check_fpabi): Handle + VAL_GNU_MIPS_ABI_FP_NAN2008. + 2015-07-08 Ciro Santilli * doc/as.texinfo: Clarify case requirements for pseudo ops. diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 8f2ec65f1a6..f67fbd0e687 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -3797,6 +3797,10 @@ check_fpabi (int fpabi) Tag_GNU_MIPS_ABI_FP, fpabi); break; + case Val_GNU_MIPS_ABI_FP_NAN2008: + /* Silently ignore compatibility value. */ + break; + default: as_warn (_(".gnu_attribute %d,%d is not a recognized" " floating-point ABI"), Tag_GNU_MIPS_ABI_FP, fpabi); diff --git a/include/ChangeLog b/include/ChangeLog index 015e304f7e9..cd83b28f058 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2015-07-09 Catherine Moore + + * elf/mips/mips.h (Val_GNU_MIPS_ABI_FP_NAN2008): New. + 2015-07-08 Pitchumani Sivanupandi * elf/avr.h: Add new 32 bit PC relative relocation. diff --git a/include/elf/mips.h b/include/elf/mips.h index 3926380e45c..57de3bca6b0 100644 --- a/include/elf/mips.h +++ b/include/elf/mips.h @@ -1298,6 +1298,10 @@ enum /* Using -mips32r2 -mfp64 -mno-odd-spreg. */ Val_GNU_MIPS_ABI_FP_64A = 7, + /* This is reserved for backward-compatibility with an earlier + implementation of the MIPS NaN2008 functionality. */ + Val_GNU_MIPS_ABI_FP_NAN2008 = 8, + /* Values defined for Tag_GNU_MIPS_ABI_MSA. */ /* Not tagged or not using any ABIs affected by the differences. */ diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 9bf1e5b42ba..410359c11ab 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,18 @@ +2015-07-09 Catherine Moore + + * ld-mips-elf/attr-gnu-4-08.d: Update expected output. + * ld-mips-elf/attr-gnu-4-09.d: New. + * ld-mips-elf/attr-gnu-4-19.d: New. + * ld-mips-elf/attr-gnu-4-29.d: New. + * ld-mips-elf/attr-gnu-4-39.d: New. + * ld-mips-elf/attr-gnu-4-49.d: New. + * ld-mips-elf/attr-gnu-4-59.d: New. + * ld-mips-elf/attr-gnu-4-69.d: New. + * ld-mips-elf/attr-gnu-4-79.d: New. + * ld-mips-elf/attr-gnu-4-89.d: New. + * ld-mips-elf/attr-gnu-4-9.s: New. + * ld-mips-elf/mips-elf.exp: Run new tests. + 2015-07-08 Pitchumani Sivanupandi * ld-avr/gc-section-debugline.d: New test. diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-08.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-08.d index 3eb1797bf6b..82215b09c72 100644 --- a/ld/testsuite/ld-mips-elf/attr-gnu-4-08.d +++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-08.d @@ -5,7 +5,7 @@ Attribute Section: gnu File Attributes - Tag_GNU_MIPS_ABI_FP: \?\?\? \(8\) + Tag_GNU_MIPS_ABI_FP: NaN 2008 compatibility MIPS ABI Flags Version: 0 @@ -13,7 +13,7 @@ ISA: MIPS.* GPR size: .* CPR1 size: .* CPR2 size: 0 -FP ABI: \?\?\? \(8\) +FP ABI: NaN 2008 compatibility ISA Extension: .* ASEs: None diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-09.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-09.d new file mode 100644 index 00000000000..20c0ebabcd3 --- /dev/null +++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-09.d @@ -0,0 +1,21 @@ +#source: attr-gnu-4-0.s +#source: attr-gnu-4-9.s -W +#ld: -r +#readelf: -A + +Attribute Section: gnu +File Attributes + Tag_GNU_MIPS_ABI_FP: \?\?\? \(9\) + +MIPS ABI Flags Version: 0 + +ISA: MIPS.* +GPR size: .* +CPR1 size: .* +CPR2 size: 0 +FP ABI: \?\?\? \(9\) +ISA Extension: .* +ASEs: + None +FLAGS 1: 0000000. +FLAGS 2: 00000000 diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-19.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-19.d new file mode 100644 index 00000000000..008dcc1ecfc --- /dev/null +++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-19.d @@ -0,0 +1,22 @@ +#source: attr-gnu-4-1.s +#source: attr-gnu-4-9.s -W +#ld: -r +#readelf: -A +#warning: Warning: .* uses -mdouble-float \(set by .*\), .* uses unknown floating point ABI 9 + +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: + None +FLAGS 1: 0000000. +FLAGS 2: 00000000 diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-29.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-29.d new file mode 100644 index 00000000000..dd460e54b8b --- /dev/null +++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-29.d @@ -0,0 +1,22 @@ +#source: attr-gnu-4-2.s +#source: attr-gnu-4-9.s -W +#ld: -r +#readelf: -A +#warning: Warning: .* uses -msingle-float \(set by .*\), .* uses unknown floating point ABI 9 + +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: + None +FLAGS 1: 0000000. +FLAGS 2: 00000000 diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-39.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-39.d new file mode 100644 index 00000000000..458c129cc74 --- /dev/null +++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-39.d @@ -0,0 +1,22 @@ +#source: attr-gnu-4-3.s +#source: attr-gnu-4-9.s -W +#ld: -r +#readelf: -A +#warning: Warning: .* uses -msoft-float \(set by .*\), .* uses unknown floating point ABI 9 + +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: + None +FLAGS 1: 0000000. +FLAGS 2: 00000000 diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-49.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-49.d new file mode 100644 index 00000000000..d03074e0245 --- /dev/null +++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-49.d @@ -0,0 +1,6 @@ +#source: attr-gnu-4-4.s -W +#source: attr-gnu-4-9.s -W +#ld: -r +#error: \A[^\n]*: Warning: .* uses -mips32r2 -mfp64 \(12 callee-saved\) \(set by .*\), .* uses unknown floating point ABI 9\n +#error: [^\n]*: [^\n]* linking -mfp32 module with previous -mfp64 modules\n +#error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-59.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-59.d new file mode 100644 index 00000000000..59516ced48b --- /dev/null +++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-59.d @@ -0,0 +1,4 @@ +#source: attr-gnu-4-5.s +#source: attr-gnu-4-9.s -W -mips32r2 +#ld: -r +#warning: Warning: .* uses -mfpxx \(set by .*\), .* uses unknown floating point ABI 9 diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-69.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-69.d new file mode 100644 index 00000000000..abf8e3ee6af --- /dev/null +++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-69.d @@ -0,0 +1,4 @@ +#source: attr-gnu-4-6.s +#source: attr-gnu-4-9.s -W -mips32r2 +#ld: -r +#warning: Warning: .* uses -mgp32 -mfp64 \(set by .*\), .* uses unknown floating point ABI 9 diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-79.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-79.d new file mode 100644 index 00000000000..a70a22fe82f --- /dev/null +++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-79.d @@ -0,0 +1,4 @@ +#source: attr-gnu-4-7.s +#source: attr-gnu-4-9.s -W -mips32r2 +#ld: -r +#warning: Warning: .* uses -mgp32 -mfp64 -mno-odd-spreg \(set by .*\), .* uses unknown floating point ABI 9 diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-89.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-89.d new file mode 100644 index 00000000000..331a3efc258 --- /dev/null +++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-89.d @@ -0,0 +1,4 @@ +#source: attr-gnu-4-8.s +#source: attr-gnu-4-9.s -W -mips32r2 +#ld: -r +#warning: Warning: .* uses -mgp32 -mfp64 -mno-odd-spreg \(set by .*\), .* uses unknown floating point ABI 8 diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-9.s b/ld/testsuite/ld-mips-elf/attr-gnu-4-9.s new file mode 100644 index 00000000000..49c7a873d7a --- /dev/null +++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-9.s @@ -0,0 +1 @@ +.gnu_attribute 4,9 diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp index 923d8dffc60..dd8b2288623 100644 --- a/ld/testsuite/ld-mips-elf/mips-elf.exp +++ b/ld/testsuite/ld-mips-elf/mips-elf.exp @@ -674,12 +674,12 @@ foreach firstfpabi [list 0 1 2 3 4 5 6 7 ] { } } foreach firstfpabi [list 4 5 6 7 ] { - foreach secondfpabi [list 0 1 2 3 8] { + foreach secondfpabi [list 0 1 2 3 8 9] { run_dump_test "attr-gnu-4-${firstfpabi}${secondfpabi}" $o32flagslist } } foreach firstfpabi [list 0 1 2 3 ] { - foreach secondfpabi [list 0 1 2 3 8] { + foreach secondfpabi [list 0 1 2 3 8 9] { run_dump_test "attr-gnu-4-${firstfpabi}${secondfpabi}" } } -- 2.30.2