From c67a084a243288154497d1433b8ebfc556bac45c Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 25 Feb 2010 11:15:48 +0000 Subject: * config/tc-mips.c (mips_fix_loongson2f, mips_fix_loongson2f_nop, mips_fix_loongson2f_jump): New variables. (md_longopts): Add New options -mfix-loongson2f-nop/jump, -mno-fix-loongson2f-nop/jump. (md_parse_option): Initialize variables via above options. (options): New enums for the above options. (md_begin): Initialize nop_insn from LOONGSON2F_NOP_INSN. (fix_loongson2f, fix_loongson2f_nop, fix_loongson2f_jump): New functions. (append_insn): call fix_loongson2f(). (mips_handle_align): Replace the implicit nops. * config/tc-mips.h (MAX_MEM_FOR_RS_ALIGN_CODE): Modified for the new mips_handle_align(). * doc/c-mips.texi: Document the new options. * gas/mips/loongson-2f-2.s: New test of -mfix-loongson2f-nop. * gas/mips/loongson-2f-2.d: Likewise. * gas/mips/loongson-2f-3.s: New test of -mfix-loongson2f-jump. * gas/mips/loongson-2f-3.d: Likewise. * gas/mips/mips.exp: Run the new tests. * opcode/mips.h (LOONGSON2F_NOP_INSN): New macro. --- include/opcode/ChangeLog | 4 ++++ include/opcode/mips.h | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog index 39cecde..549d565 100644 --- a/include/opcode/ChangeLog +++ b/include/opcode/ChangeLog @@ -1,3 +1,7 @@ +2010-02-25 Wu Zhangjin + + * mips.h: (LOONGSON2F_NOP_INSN): New macro. + 2010-02-08 Philipp Tomsich * opcode/ppc.h (PPC_OPCODE_TITAN): Define. diff --git a/include/opcode/mips.h b/include/opcode/mips.h index 27d10e6..d6b3cf4 100644 --- a/include/opcode/mips.h +++ b/include/opcode/mips.h @@ -1,6 +1,6 @@ /* mips.h. Mips opcode list for GDB, the GNU debugger. Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2008, 2009 + 2003, 2004, 2005, 2008, 2009, 2010 Free Software Foundation, Inc. Contributed by Ralph Campbell and OSF Commented and modified by Ian Lance Taylor, Cygnus Support @@ -1106,4 +1106,8 @@ extern int bfd_mips_num_opcodes; extern const struct mips_opcode mips16_opcodes[]; extern const int bfd_mips16_num_opcodes; +/* A NOP insn impemented as "or at,at,zero". + Used to implement -mfix-loongson2f. */ +#define LOONGSON2F_NOP_INSN 0x00200825 + #endif /* _MIPS_H_ */ -- cgit v1.1