XGATE bfd support.

Sean Keys skeys@ipdatasys.com
Mon Apr 2 16:34:00 GMT 2012


Thank you Nick for taking the time to review the patch. I believe that I 
have addressed your concerns in the attached files.

 >It helps a bit.  But it also has its own problems.  For example, the 
patched sources cannot be built because of missing files (eg 
include/elf/xgate.h).

I've broken the patch down to make the review process more 
convenient(one patch for each section of Binutils). When all of these 
sub-patches are applied you should have a build-able and complete XGATE 
port.

 > Still here are a couple of comments from visually reviewing the patch:

I went though all of my files and made the appropriate changes.  C++ 
style comments have been replaced with the correct C style comments. The 
PARAMS macro has been dropped and I omitted auto-generated files.

I applied the patch and then ran though the motions that create the 
auto-generated files and all seems well.

 > The code itself looks fine.  It would appear that the XGATE 
architecture is reasonably straightforward, so you have not been forced 
to leap through too many hoops in the bfd code.

Yes, it's nothing exotic by any means.

Thanks,
Sean

On 03/30/2012 08:57 AM, nick clifton wrote:
> Hi Sean,
>
>> Please find attached a patch that adds XGATE support to the BFD section
>> of Binutils. I thought submitting a smaller portion of my port would
>> help ease the review process.
>
> It helps a bit.  But it also has its own problems.  For example, the 
> patched sources cannot be built because of missing files (eg 
> include/elf/xgate.h).
>
> Still here are a couple of comments from visually reviewing the patch:
>
>   * Please do not use C++ style // comments.  Also if you comment out 
> code, please decide whether it really needs to be left in the sources. 
> If it is not needed, please just remove the code.  If there is a good 
> reason to leave the code in, albeit commented out, then please include 
> the reason in a comment.
>
>   * The use of the PARAMS macro is now deprecated.  We no longer 
> support compiling with K&R style compilers.  Please just include the 
> parameter list, unadorned, in function prototypes.
>
>   * If you wish, you can omit patches to auto-generated files (eg 
> Makefile.in, bfd-in2.h).  We will regenerate these files ourselves 
> when testing the patch.
>
> The code itself looks fine.  It would appear that the XGATE 
> architecture is reasonably straightforward, so you have not been 
> forced to leap through too many hoops in the bfd code.
>
> Cheers
>   Nick

-------------- next part --------------
src/gas/ChangeLog
2012-02-01  Sean Keys  <skeys@ipdatasys.com>
	* doc/Makefile.am (CPU_DOCS): Added XGATE file.
	* doc/c-xgate.texi: Document XGATE and XGATE port.
	* doc/as.texinfo: Ditto.
	* doc/all.texi: Ditto
	* configure, Makefile.in: Regenerate.
	* Makefile.am (CPU_TYPES, TARGET_CPU_CFILES, TARGET_CPU_HFILES):
	* configure.tgt: Added cpu type.
	Added files for XGATE assembler.
	* config/tc-xgate.c: Assembler for XGATE.
	* config/tc-xgate.h: Header definition for assembler
	Added files for XGATE testsuite.
	* testsuite/gas/all/gas.exp: Added xgate tex entry.
	* testsuite/gas/xgate/abi-xgate-16-32.d: Simple ABI flag test.
	* testsuite/gas/xgate/abi-xgate-16-64.d: Ditto
	* testsuite/gas/xgate/abi-xgate-32-32.d: Ditto
	* testsuite/gas/xgate/abi-xgate-32-64.d: Ditto
	* testsuite/gas/xgate/abi.s: Source file for ABI tests.
	* testsuite/gas/xgate/all_insns.d: Dump file for all instructions test.
	* testsuite/gas/xgate/all_insns.s: Source file for all instructions test.
	* testsuite/gas/xgate/insns-dwarf2.d: Dump file for dwarf2 test.
	* testsuite/gas/xgate/insns.d: Dump file for instructions test.
	* testsuite/gas/xgate/insns.s: Source file for instructions test.
	* testsuite/gas/xgate/xgate.exp: XGATE tests file.
	
src/bfd/ChangeLog
2012-02-01  Sean Keys	<skeys@ipdatasys.com>
	* cpu-xgate.c: New file. Added XGATE support.
	* archures.c (bfd_architecture): Add XGATE architecture.
	(bfd_archures_list): Add reference to XGATE architecture info.
	* elf-bfd.h (prep_headers): Handle bfd_arch_xgate.
	* reloc.c: Add various XGATE relocation enums.
	* targets.c (bfd_elf32_xgate_vec): Declare and add to target vector
	list.
	* Makefile.am: Add support for XGATE elf.
	* configure.in: Ditto.
	* config.bfd: Ditto.
	* Makefile.in: Regenerate.
	* configure: Ditto.
	* bfd-in2.h: Ditto.
	* libbfd.h: Ditto.
	Added files for XGATE relocations.
	* elf32-xgate.c: Created minimal relocation file.
	* elf32-xgate.h: Created minimal header file for elf32-xgate.

src/include/ChangeLog
2012-02-01  Sean Keys  <skeys@ipdatasys.com>

	* dis-asm.h (print_insn_xgate): Define.
	(print_insn_xgate): Ditto.
	Added new files for XGATE port.
	* elf/xgate.h: Mininal file to support XGATE relocations.
	* opcode/xgate.h: Header file for XGATE assembler. 

src/ld/ChangeLog
2012-02-01  Sean Keys  <skeys@ipdatasys.com>

	* Makefile.am (ALL_EMULATIONS): Added new emulation for XGATE
	and XGATE (elf).
	* Makefile.in: Rebuild.
	* configure.tgt: Recognize XGATE.
	* scripttempl/elfxgate.sc: New file, mostly cloned from m68hc12.
	* emulparams/xgateelf: New emulation, mostly cloned from m68hc12.
	
src/opcodes/ChangeLog
2012-02-01  Sean Keys  <skeys@ipdatasys.com>

	* Makefile.in, configure: regenerate
	* disassemble.c (disassembler): Recognize ARCH_XGATE.
	* xgate-dis.c (read_memory, print_insn, print_insn_xgate):
	New functions.
	* configure.in: Recognize xgate.
	* xgate-dis.c, xgate-opc.c: New files for support of xgate
	* Makefile.am (CFILES, ALL_MACHINES): New files for disassembly
	and opcode generation for xgate.
-------------- next part --------------
src/ld/NEWS
* Add support for the Freescale XGATE architecture.

src/binutils/NEWS
* Add support for the Freescale XGATE architecture.

src/binutils/GAS
* Add support for the Freescale XGATE architecture.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xgate-target.diff.tar.gz
Type: application/x-gzip
Size: 38166 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20120402/a2a8017f/attachment.bin>


More information about the Binutils mailing list