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]

RE: [PATCH, V850] Add support for V850E2 and V850E2V3


Hi Nick,

Thanks a lot for reviewing the patch and suggesting many useful comments.
The comments suggested have been addressed and the modified patch 
"v850-binutils-v850e2-v850e2v3-support.patch" has been attached.  

>>   * It renumbers the existing v850 relocs.

The relocations have been properly ordered as per the suggestion.

>>   * It adds new relocations but it does not include them in bfd/reloc.c.

The relocations have been included in bfd/reloc.c file.

>>   * It adds new features to the v850 GAS port without documenting them.

The gas/doc/c-v850.texi and gas/NEWS files have been updated for the
new support.

>>   * It removes the "v850ea" without explaining why.
>> It would be much cleaner to change the configuration files so that match
>> any v850 target

The support for v850ea is continued and configuration files have been
modified to match any v850 target.

>>   * It introduces new failures into the binutils testsuites.

The regressions caused due to the patch have been fixed. The current test
shows that the regression results are same with and without the patch.

>>   * The new code does not always follow the GNU Coding Standards.
>> In particular there are lots of cases of the "func(args)" without
>> a space between "func" and "(args)".  

The functions are formatted as per the GNU Coding standards.

>> there are many comments that are not formatted as sentances, with
>> a capital initial letter and a full stop followed by two spaces at end.

The comments are modified as per the GNU Coding standards.

>> I hope that this review will prove useful to you.

The comments helped us a lot in improving the patch and hence the code.

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

Changelog is updated as follows for the modified patch.

2010-07-02  Naveen.H.S  <naveen.S@kpitcummins.com>
		Ina Pandit	<ina.pandit@kpitcummins.com>

bfd/ChangeLog:
	* 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: Match all v850 targets.
	* 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_): Update.
	* bfd/reloc.c: Add the newly added relocations.

binutils/ChangeLog:
	* binutils/readelf.c: Add support for V850E2 and V850E2V3.

	* configure: Use libgloss system libraries.
	* configure.ac: Likewise.

gas/ChangeLog:
	* 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.
	(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.
	(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 to support branch operations.
	(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 relocation handling functions.
	(v850_insert_operand): Updated the functions with error message
	parameter and modified the function to use it.
	(md_assemble): Update according to the latest modifications.
	(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: Match all v850 targets.
	* gas/doc/c-v850.texi: Document the newly added targets.
	* gas/NEWS: Likewise.
	* gas/testsuite/gas/v850/split-lo16.d: Update the "ld" instructions
	with a space for second operand.
	* gas/testsuite/gas/v850/v850e1.d: Likewise.
	* 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/ChangeLog:
	* ld/testsuite/ld-v850/split-lo16.d: Update the "ld" instructions
	with a space for second operand.
	* ld/configure.tgt: Match all v850 targets.

	* opcodes/v850-dis.c (v850_sreg_names): Updated structure for 
	system registers.
	(float_cc_names): new structure for condition codes.
	(print_value): Update the function that prints value.	
	(get_operand_value): New function to get the operand value.
	(disassemble): Updated to handle the disassembly of instructions.
	(print_insn_v850): Updated 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.
	(insert_d8_7, insert_d5_4, insert_i5div): Remove.
	(v850_operands): Update with the relocation name. Also update
	the instructions with specific set of processors.

Thanks & Regards,
Naveen

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]