From 738a32940aa80d5762182c4141f6ce514a5de5e7 Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Fri, 9 Jan 2009 00:16:12 +0000 Subject: [PATCH] * config/tc-mips.c (NO_ISA_COP): New macro. (COP_INSN): New macro. (is_opcode_valid): Use them. (macro) : Use them. Don't accept coprocessor load store insns based on the ISA if CPU is NO_ISA_COP. : Likewise for coprocessor operations. testsuite/ * gas/mips/mips1-fp.s, gas/mips/mips1-fp.d, gas/mips/mips1-fp.l: New tests. * gas/mips/mips.exp: Run them. --- gas/ChangeLog | 9 +++++++++ gas/config/tc-mips.c | 7 +++---- gas/testsuite/ChangeLog | 6 ++++++ gas/testsuite/gas/mips/mips.exp | 3 +++ 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 78af3f72b17..d4e776058f3 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,12 @@ +2009-01-08 Adam Nemet + + * config/tc-mips.c (NO_ISA_COP): New macro. + (COP_INSN): New macro. + (is_opcode_valid): Use them. + (macro) : Use them. Don't accept coprocessor load store + insns based on the ISA if CPU is NO_ISA_COP. + : Likewise for coprocessor operations. + 2008-10-09 Eric Botcazou * dw2gencfi.c (cfi_finish): Deal with md_fix_up_eh_frame. diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index f55961b413d..3cdf97bf0ed 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -514,12 +514,11 @@ static int mips_32bitmode = 0; /* Returns true for a (non floating-point) coprocessor instruction. Reading or writing the condition code is only possible on the coprocessors and these insns are not marked with INSN_COP. Thus for these insns use the - condition-code flags unless this is the floating-point coprocessor. */ + condition-code flags. */ #define COP_INSN(PINFO) \ (PINFO != INSN_MACRO \ - && (((PINFO) & INSN_COP) \ - || ((PINFO) & (INSN_READ_COND_CODE | INSN_WRITE_COND_CODE) \ - && ((PINFO) & (FP_S | FP_D)) == 0))) + && ((PINFO) & (FP_S | FP_D)) == 0 \ + && ((PINFO) & (INSN_COP | INSN_READ_COND_CODE | INSN_WRITE_COND_CODE))) /* MIPS PIC level. */ diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 0ecd515ca5b..68e344f14e5 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2009-01-08 Adam Nemet + + * gas/mips/mips1-fp.s, gas/mips/mips1-fp.d, gas/mips/mips1-fp.l: + New tests. + * gas/mips/mips.exp: Run them. + 2008-09-15 Alan Modra * gas/all/gas.exp: Don't run redef tests on a bunch of targets. diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index e48b81f08c9..5fc23e8f820 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -398,6 +398,9 @@ if { [istarget mips*-*-vxworks*] } { run_dump_test_arches "abs" [mips_arch_list_matching mips1] run_dump_test_arches "add" [mips_arch_list_matching mips1] run_dump_test_arches "and" [mips_arch_list_matching mips1] + run_dump_test_arches "mips1-fp" [mips_arch_list_matching mips1] + run_list_test_arches "mips1-fp" "-32 -msoft-float" \ + [mips_arch_list_matching mips1] run_dump_test "break20" run_dump_test "trap20" -- 2.47.2