mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 11:00:01 +08:00
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.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2014-09-15 Matthew Fortune <matthew.fortune@imgtec.com>
|
||||||
|
|
||||||
|
* tc-mips.c (check_fpabi): Move softfloat and singlefloat
|
||||||
|
checks higher.
|
||||||
|
|
||||||
2014-09-12 Jose E. Marchesi <jose.marchesi@oracle.com>
|
2014-09-12 Jose E. Marchesi <jose.marchesi@oracle.com>
|
||||||
|
|
||||||
* config/tc-sparc.c (sparc_ip): Update the set of allowed hwcaps
|
* config/tc-sparc.c (sparc_ip): Update the set of allowed hwcaps
|
||||||
|
@ -3672,39 +3672,44 @@ fpabi_requires (int fpabi, const char *what)
|
|||||||
static void
|
static void
|
||||||
check_fpabi (int fpabi)
|
check_fpabi (int fpabi)
|
||||||
{
|
{
|
||||||
bfd_boolean needs_check = FALSE;
|
|
||||||
switch (fpabi)
|
switch (fpabi)
|
||||||
{
|
{
|
||||||
case Val_GNU_MIPS_ABI_FP_DOUBLE:
|
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)
|
if (file_mips_opts.gp == 64 && file_mips_opts.fp == 32)
|
||||||
fpabi_incompatible_with (fpabi, "gp=64 fp=32");
|
fpabi_incompatible_with (fpabi, "gp=64 fp=32");
|
||||||
else if (file_mips_opts.gp == 32 && file_mips_opts.fp == 64)
|
else if (file_mips_opts.gp == 32 && file_mips_opts.fp == 64)
|
||||||
fpabi_incompatible_with (fpabi, "gp=32 fp=64");
|
fpabi_incompatible_with (fpabi, "gp=32 fp=64");
|
||||||
else
|
|
||||||
needs_check = TRUE;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Val_GNU_MIPS_ABI_FP_XX:
|
case Val_GNU_MIPS_ABI_FP_XX:
|
||||||
if (mips_abi != O32_ABI)
|
if (mips_abi != O32_ABI)
|
||||||
fpabi_requires (fpabi, "-mabi=32");
|
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)
|
else if (file_mips_opts.fp != 0)
|
||||||
fpabi_requires (fpabi, "fp=xx");
|
fpabi_requires (fpabi, "fp=xx");
|
||||||
else
|
|
||||||
needs_check = TRUE;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Val_GNU_MIPS_ABI_FP_64A:
|
case Val_GNU_MIPS_ABI_FP_64A:
|
||||||
case Val_GNU_MIPS_ABI_FP_64:
|
case Val_GNU_MIPS_ABI_FP_64:
|
||||||
if (mips_abi != O32_ABI)
|
if (mips_abi != O32_ABI)
|
||||||
fpabi_requires (fpabi, "-mabi=32");
|
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)
|
else if (file_mips_opts.fp != 64)
|
||||||
fpabi_requires (fpabi, "fp=64");
|
fpabi_requires (fpabi, "fp=64");
|
||||||
else if (fpabi == Val_GNU_MIPS_ABI_FP_64 && !file_mips_opts.oddspreg)
|
else if (fpabi == Val_GNU_MIPS_ABI_FP_64 && !file_mips_opts.oddspreg)
|
||||||
fpabi_incompatible_with (fpabi, "nooddspreg");
|
fpabi_incompatible_with (fpabi, "nooddspreg");
|
||||||
else if (fpabi == Val_GNU_MIPS_ABI_FP_64A && file_mips_opts.oddspreg)
|
else if (fpabi == Val_GNU_MIPS_ABI_FP_64A && file_mips_opts.oddspreg)
|
||||||
fpabi_requires (fpabi, "nooddspreg");
|
fpabi_requires (fpabi, "nooddspreg");
|
||||||
else
|
|
||||||
needs_check = TRUE;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Val_GNU_MIPS_ABI_FP_SINGLE:
|
case Val_GNU_MIPS_ABI_FP_SINGLE:
|
||||||
@ -3729,11 +3734,6 @@ check_fpabi (int fpabi)
|
|||||||
" floating-point ABI"), Tag_GNU_MIPS_ABI_FP, fpabi);
|
" floating-point ABI"), Tag_GNU_MIPS_ABI_FP, fpabi);
|
||||||
break;
|
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. */
|
/* Perform consistency checks on the current options. */
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
2014-09-15 Matthew Fortune <matthew.fortune@imgtec.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2014-09-12 Andrew Bennett <andrew.bennett@imgtec.com>
|
2014-09-12 Andrew Bennett <andrew.bennett@imgtec.com>
|
||||||
|
|
||||||
* gas/mips/mips.exp: Add mips*-img-elf* target triple.
|
* gas/mips/mips.exp: Add mips*-img-elf* target triple.
|
||||||
|
2
gas/testsuite/gas/mips/attr-gnu-4-5-msingle-float.l
Normal file
2
gas/testsuite/gas/mips/attr-gnu-4-5-msingle-float.l
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.*: Assembler messages:
|
||||||
|
.*: Warning: .gnu_attribute 4,5 is incompatible with `singlefloat'
|
1
gas/testsuite/gas/mips/attr-gnu-4-5-msingle-float.s
Normal file
1
gas/testsuite/gas/mips/attr-gnu-4-5-msingle-float.s
Normal file
@ -0,0 +1 @@
|
|||||||
|
.gnu_attribute 4,5
|
2
gas/testsuite/gas/mips/attr-gnu-4-5-msoft-float.l
Normal file
2
gas/testsuite/gas/mips/attr-gnu-4-5-msoft-float.l
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.*: Assembler messages:
|
||||||
|
.*: Warning: .gnu_attribute 4,5 is incompatible with `softfloat'
|
1
gas/testsuite/gas/mips/attr-gnu-4-5-msoft-float.s
Normal file
1
gas/testsuite/gas/mips/attr-gnu-4-5-msoft-float.s
Normal file
@ -0,0 +1 @@
|
|||||||
|
.gnu_attribute 4,5
|
@ -1,2 +1,2 @@
|
|||||||
.*: Assembler messages:
|
.*: Assembler messages:
|
||||||
.*: Warning: .gnu_attribute 4,6 is incompatible with `fp=32'
|
.*: Warning: .gnu_attribute 4,6 is incompatible with `singlefloat'
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
.*: Assembler messages:
|
.*: Assembler messages:
|
||||||
.*: Warning: .gnu_attribute 4,6 is incompatible with `fp=32'
|
.*: Warning: .gnu_attribute 4,6 is incompatible with `softfloat'
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
.*: Assembler messages:
|
.*: Assembler messages:
|
||||||
.*: Warning: .gnu_attribute 4,6 is incompatible with `fp=32'
|
.*: Warning: .gnu_attribute 4,6 is incompatible with `singlefloat'
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
.*: Assembler messages:
|
.*: Assembler messages:
|
||||||
.*: Warning: .gnu_attribute 4,6 is incompatible with `fp=32'
|
.*: Warning: .gnu_attribute 4,6 is incompatible with `softfloat'
|
||||||
|
@ -1327,9 +1327,9 @@ if { [istarget mips*-*-vxworks*] } {
|
|||||||
[mips_arch_list_matching mips32r2]
|
[mips_arch_list_matching mips32r2]
|
||||||
run_list_test_arches "attr-gnu-4-5-64" "-64 -mfp64" \
|
run_list_test_arches "attr-gnu-4-5-64" "-64 -mfp64" \
|
||||||
[mips_arch_list_matching mips3]
|
[mips_arch_list_matching mips3]
|
||||||
run_list_test_arches "attr-gnu-4-5" "-32 -msingle-float" \
|
run_list_test_arches "attr-gnu-4-5-msingle-float" "-32 -msingle-float" \
|
||||||
[mips_arch_list_matching mips1]
|
[mips_arch_list_matching mips1]
|
||||||
run_list_test_arches "attr-gnu-4-5" "-32 -msoft-float" \
|
run_list_test_arches "attr-gnu-4-5-msoft-float" "-32 -msoft-float" \
|
||||||
[mips_arch_list_matching mips1]
|
[mips_arch_list_matching mips1]
|
||||||
run_dump_test_arches "attr-gnu-4-5" \
|
run_dump_test_arches "attr-gnu-4-5" \
|
||||||
[mips_arch_list_matching mips2 !r5900]
|
[mips_arch_list_matching mips2 !r5900]
|
||||||
@ -1340,9 +1340,9 @@ if { [istarget mips*-*-vxworks*] } {
|
|||||||
[mips_arch_list_matching mips32r2]
|
[mips_arch_list_matching mips32r2]
|
||||||
run_list_test_arches "attr-gnu-4-6-64" "-64 -mfp64" \
|
run_list_test_arches "attr-gnu-4-6-64" "-64 -mfp64" \
|
||||||
[mips_arch_list_matching mips3]
|
[mips_arch_list_matching mips3]
|
||||||
run_list_test_arches "attr-gnu-4-6" "-32 -msingle-float" \
|
run_list_test_arches "attr-gnu-4-6-msingle-float" "-32 -msingle-float" \
|
||||||
[mips_arch_list_matching mips1]
|
[mips_arch_list_matching mips1]
|
||||||
run_list_test_arches "attr-gnu-4-6" "-32 -msoft-float" \
|
run_list_test_arches "attr-gnu-4-6-msoft-float" "-32 -msoft-float" \
|
||||||
[mips_arch_list_matching mips1]
|
[mips_arch_list_matching mips1]
|
||||||
run_list_test_arches "attr-gnu-4-6" "-32 -mfpxx" \
|
run_list_test_arches "attr-gnu-4-6" "-32 -mfpxx" \
|
||||||
[mips_arch_list_matching mips2 !r5900]
|
[mips_arch_list_matching mips2 !r5900]
|
||||||
@ -1355,9 +1355,9 @@ if { [istarget mips*-*-vxworks*] } {
|
|||||||
[mips_arch_list_matching mips32r2]
|
[mips_arch_list_matching mips32r2]
|
||||||
run_list_test_arches "attr-gnu-4-7-64" "-64 -mfp64" \
|
run_list_test_arches "attr-gnu-4-7-64" "-64 -mfp64" \
|
||||||
[mips_arch_list_matching mips3]
|
[mips_arch_list_matching mips3]
|
||||||
run_list_test_arches "attr-gnu-4-7" "-32 -msingle-float" \
|
run_list_test_arches "attr-gnu-4-7-msingle-float" "-32 -msingle-float" \
|
||||||
[mips_arch_list_matching mips1]
|
[mips_arch_list_matching mips1]
|
||||||
run_list_test_arches "attr-gnu-4-7" "-32 -msoft-float" \
|
run_list_test_arches "attr-gnu-4-7-msoft-float" "-32 -msoft-float" \
|
||||||
[mips_arch_list_matching mips1]
|
[mips_arch_list_matching mips1]
|
||||||
run_list_test_arches "attr-gnu-4-7" "-32 -mfpxx" \
|
run_list_test_arches "attr-gnu-4-7" "-32 -mfpxx" \
|
||||||
[mips_arch_list_matching mips2 !r5900]
|
[mips_arch_list_matching mips2 !r5900]
|
||||||
|
Reference in New Issue
Block a user