From 4670103e86f59a80259fd593a6949d693382e536 Mon Sep 17 00:00:00 2001 From: Claudiu Zissulescu Date: Wed, 10 Feb 2016 12:09:01 +0000 Subject: Add support for ARC instruction relaxation in the assembler. gas/ 2016-01-26 Claudiu Zissulescu Janek van Oirschot * config/tc-arc.h (TC_FRAG_TYPE, TC_PCREL_ADJUST, MAX_INSN_ARGS) (MAX_INSN_FLGS, MAX_FLAG_NAME_LENGHT, TC_GENERIC_RELAX_TABLE): Define. (arc_flags, arc_relax_type): New structure. * config/tc-arc.c (FRAG_MAX_GROWTH, RELAX_TABLE_ENTRY) (RELAX_TABLE_ENTRY_MAX): New define. (relaxation_state, md_relax_table, arc_relaxable_insns) (arc_num_relaxable_ins): New variable. (rlx_operand_type, arc_rlx_types): New enums. (arc_relaxable_ins): New structure. (OPTION_RELAX): New option. (arc_insn): New relax member. (arc_flags): Remove. (relax_insn_p): New function. (apply_fixups): Likewise. (relaxable_operand): Likewise. (may_relax_expr): Likewise. (relaxable_flag): Likewise. (arc_pcrel_adjust): Likewise. (md_estimate_size_before_relax): Implement. (md_convert_frag): Likewise. (md_parse_option): Handle new mrelax option. (md_show_usage): Likewise. (assemble_insn): Set relax member. (emit_insn0): New function. (emit_insn1): Likewise. (emit_insn): Handle relaxation case. * NEWS: Mention the new relaxation option. * doc/c-arc.texi (ARC Options): Document new mrelax option. gas/testsuite 2016-01-26 Claudiu Zissulescu * gas/arc/relax-avoid1.d: New file. * gas/arc/relax-avoid1.s: Likewise. * gas/arc/relax-avoid2.d: Likewise. * gas/arc/relax-avoid2.s: Likewise. * gas/arc/relax-avoid3.d: Likewise. * gas/arc/relax-avoid3.s: Likewise. * gas/arc/relax-b.d: Likewise. * gas/arc/relax-b.s: Likewise. include/opcode/ 2016-01-26 Claudiu Zissulescu Janek van Oirschot * arc.h (arc_opcode arc_relax_opcodes, arc_num_relax_opcodes): Declare. opcodes/ 2016-01-26 Claudiu Zissulescu Janek van Oirschot * arc-opc.c (arc_relax_opcodes, arc_num_relax_opcodes): New variable. --- gas/NEWS | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gas/NEWS') diff --git a/gas/NEWS b/gas/NEWS index 7175ef0..87bdbd9 100644 --- a/gas/NEWS +++ b/gas/NEWS @@ -10,6 +10,8 @@ * New command line option -mfence-as-lock-add=yes for x86 target to encode lfence, mfence and sfence as "lock addl $0x0, (%[re]sp)". +* Add assembly-time relaxation option for ARC cpus. + Changes in 2.26: * Add a configure option --enable-compressed-debug-sections={all,gas} to -- cgit v1.1