diff options
author | Matthew Fortune <matthew.fortune@imgtec.com> | 2014-09-15 10:32:38 +0100 |
---|---|---|
committer | Matthew Fortune <matthew.fortune@imgtec.com> | 2014-09-15 11:51:07 +0100 |
commit | ea79f94a7ab96c6114b80bf78830f877325b10ff (patch) | |
tree | f284d4729398fd4f64ba6a990fafc67d8541c342 /gas/config/tc-mips.c | |
parent | 64034f58a5fcd7746dd588b78d41b1a2f833df85 (diff) | |
download | gdb-ea79f94a7ab96c6114b80bf78830f877325b10ff.zip gdb-ea79f94a7ab96c6114b80bf78830f877325b10ff.tar.gz gdb-ea79f94a7ab96c6114b80bf78830f877325b10ff.tar.bz2 |
Ensure softfloat and singlefloat take precedence in consistency checks
gas/
* tc-mips.c (check_fpabi): Move softfloat and singlefloat
checks higher.
gas/testsuite/
* gas/mips/attr-gnu-4-5-msingle-float.l: New file.
* gas/mips/attr-gnu-4-5-msingle-float.s: Likewise.
* gas/mips/attr-gnu-4-5-msoft-float.l: Likewise.
* gas/mips/attr-gnu-4-5-msoft-float.s: Likewise.
* gas/mips/attr-gnu-4-6-msingle-float.l: Update expected output.
* gas/mips/attr-gnu-4-6-msoft-float.l: Likewise.
* gas/mips/attr-gnu-4-7-msingle-float.l: Likewise.
* gas/mips/attr-gnu-4-7-msoft-float.l: Likewise.
* gas/mips/mips.exp: Update expected output for FP ABI 5,6,7.
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r-- | gas/config/tc-mips.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 59d8635..2dabdf4 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -3672,39 +3672,44 @@ fpabi_requires (int fpabi, const char *what) static void check_fpabi (int fpabi) { - bfd_boolean needs_check = FALSE; switch (fpabi) { case Val_GNU_MIPS_ABI_FP_DOUBLE: + if (file_mips_opts.soft_float) + fpabi_incompatible_with (fpabi, "softfloat"); + else if (file_mips_opts.single_float) + fpabi_incompatible_with (fpabi, "singlefloat"); if (file_mips_opts.gp == 64 && file_mips_opts.fp == 32) fpabi_incompatible_with (fpabi, "gp=64 fp=32"); else if (file_mips_opts.gp == 32 && file_mips_opts.fp == 64) fpabi_incompatible_with (fpabi, "gp=32 fp=64"); - else - needs_check = TRUE; break; case Val_GNU_MIPS_ABI_FP_XX: if (mips_abi != O32_ABI) fpabi_requires (fpabi, "-mabi=32"); + else if (file_mips_opts.soft_float) + fpabi_incompatible_with (fpabi, "softfloat"); + else if (file_mips_opts.single_float) + fpabi_incompatible_with (fpabi, "singlefloat"); else if (file_mips_opts.fp != 0) fpabi_requires (fpabi, "fp=xx"); - else - needs_check = TRUE; break; case Val_GNU_MIPS_ABI_FP_64A: case Val_GNU_MIPS_ABI_FP_64: if (mips_abi != O32_ABI) fpabi_requires (fpabi, "-mabi=32"); + else if (file_mips_opts.soft_float) + fpabi_incompatible_with (fpabi, "softfloat"); + else if (file_mips_opts.single_float) + fpabi_incompatible_with (fpabi, "singlefloat"); else if (file_mips_opts.fp != 64) fpabi_requires (fpabi, "fp=64"); else if (fpabi == Val_GNU_MIPS_ABI_FP_64 && !file_mips_opts.oddspreg) fpabi_incompatible_with (fpabi, "nooddspreg"); else if (fpabi == Val_GNU_MIPS_ABI_FP_64A && file_mips_opts.oddspreg) fpabi_requires (fpabi, "nooddspreg"); - else - needs_check = TRUE; break; case Val_GNU_MIPS_ABI_FP_SINGLE: @@ -3729,11 +3734,6 @@ check_fpabi (int fpabi) " floating-point ABI"), Tag_GNU_MIPS_ABI_FP, fpabi); break; } - - if (needs_check && file_mips_opts.soft_float) - fpabi_incompatible_with (fpabi, "softfloat"); - else if (needs_check && file_mips_opts.single_float) - fpabi_incompatible_with (fpabi, "singlefloat"); } /* Perform consistency checks on the current options. */ |