Sandra Loosemore
c8c8175b62
Opcodes and assembler support for Nios II R2
2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
gas/
* config/tc-nios2.c (nios2_min_align): New.
(nop): Replace with....
(nop_r1, nop_r2, nop_r2_cdx, nop32, nop16): New.
(nios2_align): Handle alignment on 2-byte boundaries when CDX
instructions may be present.
(s_nios2_align): Adjust reference to nop.
(CDXBRANCH, IS_CDXBRANCH): New.
(CDX_UBRANCH_SUBTYPE, CDX_CBRANCH_SUBTYPE): New.
(nios2_relax_subtype_size): Handle 2-byte CDX branches.
(nios2_relax_frag): Likewise.
(md_convert_frag): Handle R2 encodings.
(nios2_check_overflow): Check that low-order bits are zero
before applying rightshift from howto.
(nios2_check_overflow): Correct negative overflow calculation.
(nios2_diagnose_overflow): Handle signed_immed12_overflow. Issue
generic overflow messages for miscellaneous instruction formats.
(md_apply_fix): Recognize new R2 relocations. For pc_relative
relocations, store fixup in *valP.
(nios2_reglist_mask, nios2_reglist_dir): New.
(nios2_parse_reglist): New.
(nios2_parse_base_register): New.
(nios2_assemble_expression): Handle constant expressions designated
by BFD_RELOC_NONE.
(nios2_assemble_reg3): New.
(nios2_assemble_arg_c): Handle R2 instruction formats.
(nios2_assemble_arg_d): Likewise.
(nios2_assemble_arg_s): Likewise.
(nios2_assemble_arg_t): Likewise.
(nios2_assemble_arg_D): New.
(nios2_assemble_arg_S): New.
(nios2_assemble_arg_T): New.
(nios2_assemble_arg_i): Handle R2 instruction formats.
(nios2_assemble_arg_I): New.
(nios2_assemble_arg_u): Handle R2 instruction formats.
(nios2_assemble_arg_U): New.
(nios2_assemble_arg_V): New.
(nios2_assemble_arg_W): New.
(nios2_assemble_arg_X): New.
(nios2_assemble_arg_Y): New.
(nios2_assemble_arg_o): Handle R2 instruction formats.
(nios2_assemble_arg_O): New.
(nios2_assemble_arg_P): New.
(nios2_assemble_arg_j): Handle R2 instruction formats.
(nios2_assemble_arg_k): New.
(nios2_assemble_arg_l): Handle R2 instruction formats.
(nios2_assemble_arg_m): Likewise.
(nios2_assemble_arg_M): New.
(nios2_assemble_arg_N): New.
(nios2_assemble_arg_e): New.
(nios2_assemble_arg_f): New.
(nios2_assemble_arg_g): New.
(nios2_assemble_arg_h): New.
(nios2_assemble_arg_R): New.
(nios2_assemble_arg_B): New.
(nios2_assemble_args): Handle new argument letters.
(nios2_consume_arg): Likewise.
(nios2_translate_pseudo_insn): Avoid dereferencing null pointer
in error message.
(nios2_ps_insn_info_structs): Add nop.n.
(output_ubranch): Handle CDX branches.
(output_cbranch): Likewise.
(output_call): Handle R2 encodings.
(output_movia): Likewise.
(md_begin): Initialize nios2_min_align.
(md_assemble): Align to nios2_min_align. Adjust nios2_min_align
if a 16-bit instruction is seen.
(nios2_cons_align): Use appropriate nop pattern.
include/opcode/
* nios2.h (enum iw_format_type): Add R2 formats.
(enum overflow_type): Add signed_immed12_overflow and
enumeration_overflow for R2.
(struct nios2_opcode): Document new argument letters for R2.
(REG_3BIT, REG_LDWM, REG_POP): Define.
(includes): Include nios2r2.h.
(nios2_r2_opcodes, nios2_num_r2_opcodes): Declare.
(nios2_r2_asi_n_mappings, nios2_num_r2_asi_n_mappings): Declare.
(nios2_r2_shi_n_mappings, nios2_num_r2_shi_n_mappings): Declare.
(nios2_r2_andi_n_mappings, nios2_num_r2_andi_n_mappings): Declare.
(nios2_r2_reg3_mappings, nios2_num_r2_reg3_mappings): Declare.
(nios2_r2_reg_range_mappings, nios2_num_r2_reg_range_mappings):
Declare.
* nios2r2.h: New file.
opcodes/
* nios2-dis.c (nios2_extract_opcode): New.
(nios2_disassembler_state): New.
(nios2_find_opcode_hash): Use mach parameter to select correct
disassembler state.
(nios2_print_insn_arg): Extend to support new R2 argument letters
and formats.
(print_insn_nios2): Check for 16-bit instruction at end of memory.
* nios2-opc.c (nios2_builtin_regs): Add R2 register attributes.
(NIOS2_NUM_OPCODES): Rename to...
(NIOS2_NUM_R1_OPCODES): This.
(nios2_r2_opcodes): New.
(NIOS2_NUM_R2_OPCODES): New.
(nios2_num_r2_opcodes): New.
(nios2_r2_asi_n_mappings, nios2_num_r2_asi_n_mappings): New.
(nios2_r2_shi_n_mappings, nios2_num_r2_shi_n_mappings): New.
(nios2_r2_andi_n_mappings, nios2_num_r2_andi_n_mappings): New.
(nios2_r2_reg3_mappings, nios2_num_r2_reg3_mappings): New.
(nios2_r2_reg_range_mappings, nios2_num_r2_reg_range_mappings): New.
2015-07-01 16:08:03 -07:00
..
2015-04-29 16:26:14 +01:00
2010-12-09 09:03:18 +00:00
2015-06-02 12:20:00 +01:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-06-02 12:20:00 +01:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-06-02 12:20:00 +01:00
2015-06-16 14:17:34 +01:00
2015-01-02 00:53:45 +10:30
2015-06-02 12:20:00 +01:00
2012-08-13 14:26:14 +00:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-06-16 13:35:33 +01:00
2015-01-02 00:53:45 +10:30
2015-06-22 16:53:27 +01:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-07-01 16:08:03 -07:00
2012-12-10 12:48:03 +00:00
2012-12-10 12:48:03 +00:00
2012-12-10 12:48:03 +00:00
2012-12-10 12:48:03 +00:00
2012-12-10 12:48:03 +00:00
2012-12-10 12:48:03 +00:00
2012-12-10 12:48:03 +00:00
2012-12-10 12:48:03 +00:00
2012-12-10 12:48:03 +00:00
2012-12-10 12:48:03 +00:00
2013-01-02 13:13:36 +00:00
2014-01-08 05:32:12 -08:00
2015-01-02 00:53:45 +10:30
2012-12-10 12:48:03 +00:00
2012-12-10 12:48:03 +00:00
2014-07-04 13:40:28 +09:30
2015-05-11 10:48:21 -07:00
2015-05-11 10:48:21 -07:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-03-30 02:20:22 -04:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2009-06-04 06:57:56 +00:00
2015-06-22 16:53:27 +01:00
2015-01-02 00:53:45 +10:30
2015-05-11 10:48:21 -07:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-28 16:25:18 +10:30
2015-01-28 16:25:18 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-04-23 16:42:40 +02:00
2015-06-30 07:50:12 -07:00
2015-06-30 07:50:12 -07:00
2015-06-30 07:50:12 -07:00
2015-01-02 00:53:45 +10:30
2015-06-30 07:50:12 -07:00
2015-06-30 07:50:12 -07:00
2015-01-02 00:53:45 +10:30
2015-06-30 07:50:12 -07:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2012-09-04 13:52:06 +00:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2013-05-17 12:57:16 +00:00
2013-05-17 12:57:16 +00:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-28 16:25:18 +10:30
2015-03-29 07:37:50 -07:00
2015-01-02 00:53:45 +10:30
2015-06-22 16:53:27 +01:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-02-19 22:45:47 +00:00
2015-02-10 18:09:39 +00:00
2015-02-10 18:09:39 +00:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-03-13 23:01:34 +00:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-06-04 16:33:12 +01:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-29 16:29:42 +08:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-07-01 16:08:03 -07:00
2015-07-01 16:08:03 -07:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-06-19 17:17:07 -05:00
2015-06-22 14:55:24 -05:00
2015-04-30 15:25:49 -04:00
2015-04-30 15:25:49 -04:00
2015-04-30 15:25:49 -04:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-16 12:28:58 +01:00
2015-01-16 12:28:58 +01:00
2015-04-27 10:29:16 +02:00
2015-04-27 10:29:16 +02:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-06-22 16:53:27 +01:00
2015-02-25 21:26:59 +01:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-06-22 16:53:27 +01:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-06-22 16:53:27 +01:00
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30
2015-01-02 00:53:45 +10:30