This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, V850] Add support for V850E2 and V850E2V3


Hi,

Please find attached the "v850-binutils-v850e2-v850e2v3-support.patch".
The patch adds support for new target variants of V850 i.e. V850E2 and
V850E2V3. These processors are upwardly compatible with earlier V850
targets already supported in the current binutils port. V850E2V3 target
supports floating point operations. Hence, these instructions along with 
registers supported by V850E2V3 are defined in the current patch.

The GCC and Newlib part of the support will be posted in respective
mailing list. The GDB support will also be posted. 

Please review the patch and let me know if there should be any 
modifications in it. 

2010-06-07  Naveen.H.S  <naveenh1@kpitcummins.com>

	* bfd/archures.c (DESCRIPTION):	Define bfd_mach_v850e2 and
	bfd_mach_v850e2v3.
	* bfd/bfd-in2.h (bfd_architecture): Define bfd_mach_v850e2 and
	bfd_mach_v850e2v3.
	(BFD_RELOC_V850_16_PCREL, BFD_RELOC_V850_17_PCREL, 
	BFD_RELOC_V850_22_PCREL, BFD_RELOC_V850_23, 
	BFD_RELOC_V850_32_PCREL, BFD_RELOC_V850_32_ABS,
	BFD_RELOC_V850_16_SPLIT_OFFSET, BFD_RELOC_V850_16_S1,
	BFD_RELOC_V850_LO16_SPLIT_OFFSET, BFD_RELOC_V850_SDA_15_16_OFFSET,
	BFD_RELOC_V850_ZDA_16_16_OFFSET, BFD_RELOC_V850_CALLT_15_16_OFFSET,
	BFD_RELOC_V850_32_GOTPCREL, BFD_RELOC_V850_16_GOT, 
	BFD_RELOC_V850_32_GOT, BFD_RELOC_V850_22_PLT_PCREL, 
	BFD_RELOC_V850_32_PLT_PCREL, BFD_RELOC_V850_COPY, 
	BFD_RELOC_V850_GLOB_DAT, BFD_RELOC_V850_JMP_SLOT, 
	BFD_RELOC_V850_RELATIVE, BFD_RELOC_V850_16_GOTOFF, 
	BFD_RELOC_V850_32_GOTOFF, BFD_RELOC_V850_CODE,
	BFD_RELOC_V850_DATA): New relocations for V850 target.
	* bfd/config.bfd: Remove support for v850ea.
	* bfd/cpu-v850.c (arch_info_struct): Define V850e2 and V850e2v3.
	* bfd/doc/archures.texi (bfd_architecture): Define bfd_mach_v850e2
	and bfd_mach_v850e2v3. 
	* bfd/elf32-v850.c (v850_elf_check_relocs): Check the newly added
	relocations.
	(v850_elf_perform_relocation ): Update the newly added 
	relocations.
	(v850_elf_howto_t): Update the specifications of added 
	relocations.
	(v850_elf_reloc_map): Update the relocation mappings.
	(v850_elf_final_link_relocate): Maps added relocation into the 
	appropriate howto structure.
	(v850_elf_object_p): Add support for V850E2 and V850E2V3.
	(v850_elf_final_write_processing): Likewise.
	(v850_elf_merge_private_bfd_data): Likewise.
	(v850_elf_print_private_bfd_data): Likewise.
	* bfd/libbfd.h(bfd_reloc_code_): Add BFD_RELOC_V850_16_PCREL and
	BFD_RELOC_V850_17_PCREL.
	* bfd/reloc.c: Likewise.
	* binutils/readelf.c: Add support for V850E2 and V850E2V3.
	* configure: Use libgloss system libraries and remove v850ea.
	* configure.ac: Likewise.
	* gas/config/tc-v850.c: Update processor_mask.
	(reg_name): Update the structure to use processors field.
	(md_relax_table): Define SUBYPTE_COND_9_22, SUBYPTE_SA_9_22, 
	SUBYPTE_UNCOND_9_22, SUBYPTE_COND_9_22_32, SUBYPTE_SA_9_22_32, 
	SUBYPTE_UNCOND_9_22_32, SUBYPTE_COND_9_17_22, 
	SUBYPTE_SA_9_17_22, SUBYPTE_COND_9_17_22_32 and
	SUBYPTE_SA_9_17_22_32.
	(set_machine): Add support for V850E2 and V850E2V3.
	(md_pseudo_table): Likewise.
	(pre_defined_registers): Update pre defined registers suitable 
	for each family of registers.
	(vector_registers): Update vector registers. many registers are
	added for V850E2V3.
	(system_registers): Likewise.
	(cc_names): Update the condition code.
	(float_cc_names): Update the condition code for float.
	(reg_name_search): Update based on current modifications.
	(register_name): Likewise.
	(vector_register_name): New function.
	(system_register_name): Update to support new system registers
	and supported families.
	(cc_name): Update to support new condition codes.
	(float_cc_name): New function to support float condition codes.
	(parse_register_list): Update to support newly added registers.
	(md_show_usage): Define support for V850E2 and V850E2V3 targets.
	Also support added for disp-size-default-22, disp-size-default-32,
	mextension, mno-bcond17 and mno-stld23.
	(md_parse_option): Implement the support for above options defined
	in md_show-usage.
	(md_convert_frag): Implement support for subtypes defined in 
	md_relax_table.
	(md_begin): Add support for V850E2 and V850E2V3.
	(handle_hi016, handle_hi16): new relocation handling functions
	(handle_lo16, handle_ctoff, handle_sdaoff, handle_zdaoff, 
	handle_tdaoff): Updated relocation handling functions for newly
	added relocations.
	(v850_reloc_prefix): Update the relocations handling functions.
	(v850_insert_operand): Updated the functions with error message
	parameter and modified the function to use it.
	(md_assemble): Update with added relocations.
	(md_apply_fix): Updated the functions with error message parameter
	and modified the function to use it.
	(v850_force_relocation): Update with newly added relocations.
	* gas/configure.tgt: Remove v850ea support.
	* include/elf/v850.h: Add support for V850E2 and V850E2V3.
	* v850_reloc_type: Update the newly added relocations.
	* include/opcode/v850.h: Define PROCESSOR_MASK, 
	PROCESSOR_OPTION_EXTENSION, PROCESSOR_OPTION_ALIAS, 
	PROCESSOR_V850E2, PROCESSOR_V850E2V3 and PROCESSOR_V850E2_ALL.
	Remove PROCESSOR_V850EA support.
	(v850_operand): Define V850_OPERAND_EP, V850_OPERAND_FLOAT_CC,
	V850_OPERAND_VREG, V850E_IMMEDIATE16, V850E_IMMEDIATE16HI, 
	V850E_IMMEDIATE23, V850E_IMMEDIATE32, V850_OPERAND_SIGNED, 
	V850_OPERAND_DISP, V850_PCREL, V850_REG_EVEN, V850E_PUSH_POP,
	V850_NOT_IMM0, V850_NOT_SA, V850_OPERAND_BANG and
	V850_OPERAND_PERCENT.
	Update V850_OPERAND_SRG, V850_OPERAND_CC, V850_OPERAND_RELAX and
	V850_NOT_R0.
	Remove V850_OPERAND_SIGNED, V850_OPERAND_EP, V850_OPERAND_DISP 
	and V850E_PUSH_POP
	* ld/configure.tgt: Remove v850ea support.
	* opcodes/configure: Likewise.
	* opcodes/configure.in: Likewise.
	* opcodes/v850-dis.c (v850_vreg_names): new structure for vector
	registers.
	(v850_sreg_names): Updated structure for system registers.
	(float_cc_names): new structure for condition codes.
	(print_value): Update the function that prints value for 
	V850_OPERAND_SIGNED.
	(get_operand_value): New function to get the operand value.
	(disassemble): New function to handle the disassembly of opcodes.
	(print_insn_v850): New function to print instruction for different
	families.
	* opcodes/v850-opc.c (v850_msg_is_out_of_range, insert_i5div1, 
	extract_i5div1, insert_i5div2, extract_i5div2, insert_i5div3, 
	extract_i5div3, insert_d5_4, extract_d5_4, extract_d8_6, 
	insert_d8_7, extract_d8_7, insert_v8, extract_v8, insert_u16_loop,
	extract_u16_loop, insert_d16_15, extract_d16_15, insert_d16_16,
	extract_d16_16, nsert_d17_16, extract_d17_16, insert_d22, 
	extract_d22, insert_d23, extract_d23, insert_i9, extract_i9,
	insert_u9, extract_u9, extract_spe, insert_r4, extract_r4: New.
	Remove insert_d8_7, insert_d5_4, insert_i5div.
	(v850_operands): Update with the relocation name. Also update
	the instructions with specific set of processors.

Thanks & Regards,
Naveen.H.S 

Attachment: v850-binutils-v850e2-v850e2v3-support.patch
Description: v850-binutils-v850e2-v850e2v3-support.patch


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]