From 19e8f41aa49baed9fd1f4a154e3611bb19de0442 Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Tue, 4 Nov 2008 23:11:02 +0000 Subject: 2008-11-04 Sterling Augustine * config/tc-xtensa.c (xtensa_j_opcode): New. (xg_instruction_matches_option_term): Handle "FREEREG" option. (xg_build_to_insn): Likewise. Update renamed tls_reloc reference. (md_begin): Initialize xtensa_j_opcode. (md_assemble): Update renamed tls_reloc reference. Handle "j.l". (xg_assemble_vliw_tokens): Save free_reg info in the frag. (tinsn_immed_from_frag): Get free_reg info back out of the frag. (vinsn_to_insnbuf): Update renamed tls_reloc references. Distinguish extra argument for "FREEREG" from extra TLS argument. * config/tc-xtensa.h (struct xtensa_frag_type): Add free_reg field. * config/xtensa-istack.h (struct tinsn_struct): Rename tls_reloc field to extra_arg. * config/xtensa-relax.c (widen_spec_list): Add rules to relax "j.l". (build_transition): Handle "FREEREG" operand. * config/xtensa-relax.h (enum op_type): Add OP_FREEREG. 2008-11-04 Bob Wilson * gas/xtensa/all.exp: Run jlong test. * gas/xtensa/jlong.d: New. * gas/xtensa/jlong.s: New. --- gas/config/xtensa-relax.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'gas/config/xtensa-relax.c') diff --git a/gas/config/xtensa-relax.c b/gas/config/xtensa-relax.c index 8f49afab51a..5de7dd28c55 100644 --- a/gas/config/xtensa-relax.c +++ b/gas/config/xtensa-relax.c @@ -463,7 +463,14 @@ static string_pattern_pair widen_spec_list[] = {"call8 %label,%ar8 ? IsaUseConst16", "const16 a8,HI16U(%label); const16 a8,LOW16U(%label); callx8 a8,%ar8"}, {"call12 %label,%ar12 ? IsaUseConst16", - "const16 a12,HI16U(%label); const16 a12,LOW16U(%label); callx12 a12,%ar12"} + "const16 a12,HI16U(%label); const16 a12,LOW16U(%label); callx12 a12,%ar12"}, + + /* Expanding j.l with literals. */ + {"j %label ? FREEREG ? IsaUseL32R", + "LITERAL %label; l32r FREEREG,%LITERAL; jx FREEREG"}, + /* Expanding j.l with const16. */ + {"j %label ? FREEREG ? IsaUseConst16", + "const16 FREEREG,HI16U(%label); const16 FREEREG,LOW16U(%label); jx FREEREG"}, }; #define WIDEN_COUNT (sizeof (widen_spec_list) / sizeof (string_pattern_pair)) @@ -1793,6 +1800,10 @@ build_transition (insn_pattern *initial_insn, opcode_name, op->operand_name, to_string); append_field_op (bi, op->operand_num, orig_op->operand_num); } + else if (strcmp (op->operand_name, "FREEREG") == 0) + { + append_user_fn_field_op (bi, op->operand_num, OP_FREEREG, 0); + } else if (parse_special_fn (op->operand_name, &fn_name, &operand_arg_name)) { -- cgit v1.2.1