include/opcode/
* mips.h (M_JALR_1, M_JALR_2, M_JR, M_NOP): New macro enums.
opcodes/
* mips-opc.c (nop, jr, jalr): Treat as macros.
gas/
* doc/c-mips.texi (-mfix-loongson2f-jump): Be more specific.
* config/tc-mips.c (mips_fix_loongson2f): Delete.
(fix_loongson2f_nop, fix_loongson2f_jump, fix_loongson2f): Likewise.
(append_insn): Don't call mips_fix_loongson2f.
(append_simple_insn): New function, extracted from...
(md_assemble): ...here.
(macro_build_nop, modify_jump_target): New functions.
(macro_build_jalr, macro_build_jr): Likewise.
(macro_build_jalr): Rename existing function to...
(macro_build_pic_jalr): ...this. Add a used_at parameter and use
the new macro_build_jalr.
(load_delay_nop): Use macro_build_nop.
(load_address): Likewise.
(macro): Use macro_build_nop, macro_build_jr and macro_build_jalr.
Handle M_NOP, M_JR, M_JALR_1 and M_JALR_2. Update calls to what
is now macro_build_pic_jalr.
(macro2): Likewise.
(md_parse_option): Don't set mips_fix_loongson2f.
gas/testsuite/
* gas/mips/loongson-2f-2.s: Swap the explicit and implicit cases.
Add tests for various macro modes.
* gas/mips/loongson-2f-3.s: Test J, JR, single-operand JA{L,}R and
double-operand JA{L,}R for both the "fix" and "no fix" cases.
* gas/mips/loongson-2f-3.d: Require -mips1 -mabi=32. Update after
above changes.
* gas/mips/loongson-2f-4.s, gas/mips/loongson-2f-4.d,
gas/mips/loongson-2f-4.l, gas/mips/loongson-2f-5.s,
gas/mips/loongson-2f-5.l: New tests.
* gas/mips/mips.exp: Run them.