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: support for NEC SX architecture


hi, Nick (& other folks)!

attached you will find a (long ago promised) set of patches against
current binutils CVS head that implement support for the NEC SX series
of vector CPUs.

one patch per binutils subproject. note, however, that they really do
make sense only as a whole.

the patch provides support for two new targets:
- sx?-nec-superux*: for Super-UX OS on NEC SX, and
- sx?-nec-linux*: for Kitten light-weight kernel on NEC SX.

both targets are COFF targets, and the latter currently only differs in
the linker scripts.

while most certainly there are still some bugs hidden, the port is fully
functional and used in our GCC ( http://code.google.com/p/sx-gcc/ ) and
Kitten ( https://software.sandia.gov/trac/kitten ) porting efforts. as
it can build a functioning OS kernel, I suppose it's good enough to be
included in the binutils mainline. ;)

the port does, however, touch parts of the target-independent COFF code,
as SX COFF format is a bit peculiar. the most invasive of these changes
implements support for variable (that is: per-target variable) sized
symbol name filed in symbol entries.

changelogs for each subproject are attached in a separate file.

generated files are not included in the patch. after patching, running
autoreconf is required in bfd/, opcodes/, gas/ and ld/ dirs; also, one
should do a "make headers" in bfd/.

patched binutils show no regressions (when compared to an unpatched CVS
HEAD); I have regression tested the following configurations (on an ia32
host):
--enable-target=all --enable-64bit-bfd
--target=i386-coff
--target=i686-pc-linux-gnu
--target=alpha-linuxecoff
--target=i586-pc-msdosdjgpp
--target=x86_64-pc-mingw32
--target=arm-vxworks
--target=i686-pc-cygwin
--target=z8k-coff

looking forward to your comments. thanks & best regards,
  jaKa

-- 
email: jaka@xlab.si
w3:    http://www.gmajna.net/svojat/jaka/

Attachment: 20090507-sx-binutils-diff.tar.gz
Description: application/compressed-tar

opcodes/ChangeLog:

2009-05-07  Jaka Mocnik  <jaka@xlab.si>

	* Makefile.am: Added sx-[dis|opc].c to build.
	* configure.in: Added NEC SX target CPU.
	* disassemble.c: Added dissassembler hook for NEC SX CPU.
	* sx-dis.c: Implementation of disassembler for NEC SX CPU.
	* sx-opc.c: Definition of opcodes for NEC SX CPU.

ld/ChangeLog:

2009-05-07  Jaka Mocnik  <jaka@xlab.si>

	* Makefile.am: Added generation of linker scripts for
	sx?-nec-[superux|linux] targets.
	* configure.tgt: Added sx?-nec-[superux|linux] targets.
	* emulparams/sxcoff.sh, emulparams/sxcoff_linux.sh: Defined emulation
	parameters for SX targets.
	* emultempl/sxcoff.em, emultempl/sxcoff_linux.em: Emulation scripts
	for SX targets.
	* scripttempl/sxcoff.sc, scripttempl/sxcoff_linux.sc: Linker scripts
	for SX targets.
	* Updated NEWS file.
	
include/ChangeLog

2009-05-07  Jaka Mocnik  <jaka@xlab.si>

	* coff/external.h (GET_LINENO_SYMNDX, PUT_LINENO_SYMNDX): Added
	accessors for a few more fields in the COFF header that have
	non-standard sizes in SX COFF format.
	(E_SYMNMLEN, E_DIMNUM): Conditionally define only if not defined by
	the target headers.
	* coff/internal.h: Increased sizes for some internal representation
	fields, in order to accomodate non-standard sizes in SX COFF format.
	Added some extra SX COFF specific flags, storage classes, etc.
	Introduce MAX_FILNMLEN and MAX_SYMNMLEN macros that allow for variable
	(with an upper limit) sizes of symbol and file names; use them instead
	of SYMNMLEN and FILNMLEN, respectively.
	* coff/sx.h: Defined SX COFF external representation.
	* opcode/sx.h: Defined SX opcode related data types.

gas/ChangeLog
	
2009-05-07  Jaka Mocnik  <jaka@xlab.si>

	* config/atof-ieee.c: Added support for SX quad precision fp format
	(almost, but not quite IEEE compliant ...).
	* config/obj-coff.h: Include NEC SX target headers when required.
	* config/tc-sx.c: Implemented an assembler for the NEC SX CPU.
	* configure.tgt: Added sx?-nec-[superux|linux] targets.
	* Updated NEWS file.
	
binutils/ChangeLog

2009-05-07  Jaka Mocnik  <jaka@xlab.si>

	* Updated NEWS file.

bfd/ChangeLog

2009-05-07  Jaka Mocnik  <jaka@xlab.si>

	* Makefile.am: Added SX sources to build.
	* archures.c: Added sx[4-9] machine types.
	* coff-sx.c: Implemented SX COFF bfd support.
	* coff-alpha.c, coff-arm.c, coff-i960.c, coff-mcore.c, coff-mips.c,
	coff-or32.c, coff-ppc.c, coff-rs6000.c, coff-sh.c, coff-tic80.c,
	coff64-rs6000.c, peXXigen.c, pei-ppc.c, ticoff.h, xcofflink.c: Minor
	changes to accomodate variable symbol name lengths in internal COFF
	representation.
	* coffcode.h: Added SX COFF support.
	Implemented handling of variable symbol name lengths.
	(bfd_coff_symnmlen) New function: returns target-specific max symbol
	name length, as specified in the bfd descriptor.
	Minor changes to accomodate larger sizes of some COFF fields in SX COFF.
	* cofflink.c: Implemented handling of variable symbol name lengths.
	* coffswap.h: Added more field accessors in cases where SX COFF has
	non-standard field sizes. Provided sane, backwards-compatible defaults.
	Use these accessors instead of the generic ones used before.
	Implemented handling of variable symbol name lengths.
	* config.bfd: Added sx?-nec-[superux|linux] targets.
	* configure.in: Added sxcoff_big_vec target.
	* cpu-sx.c: Defined NEC SX architecture variants.
	* libbfd.c (bfd_write_bigendian_8byte_long_long): New function.
	* libcoff-in.h: Added some SX COFF specific fields.
	* reloc.c: Added SX COFF specific relocations.
	* targets.c: Added NEC SX target.

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