This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] CRX port contribution


I've already sent my port two weeks ago but did not get feedback so far.

http://gcc.gnu.org/ml/gcc-patches/2005-04/msg01164.html
http://gcc.gnu.org/ml/gcc-patches/2005-04/msg01265.html

Thus i'm resending it so it doesn't get out of sight.

This patch now contains the crx-port (crx-gcc.diff.gz) + documentation
updates and a Changelog entry. Test results for 4.0.0 and recent 4.1 are
available on gcc-testresults.

------------------------------------------------------------------------

Since binutils and newlib are already contributed for quite some time i
would like to finally contribute the gcc port for the CRX architecture.

I already tried to submit a CRX port last year in June but there where
no ports for binutils and newlib at that time.

The port is now almost rewritten from scratch. It makes extensive use of
gcc's macro feature to keep the machine description compact and easy to
maintain. All predicates are defined in the machine description and cc0
is also not used anymore.

Target   | HMSLQNFICBD lqrcpfgmbdates
---------+---------------------------
crx      |  M    F         p g b    s

I will also provide a simulator binary to allow testing with dejagnu.
Please let me know who needs to get it. There is also a Programmer’s
Reference Manual that i would like to make available at:
http://gcc.gnu.org/readings.html

The Changelog:

2005-04-22  Paul Woegerer <paul.woegerer@nsc.com>

	* MAINTAINERS: Added myself
	* config/crx/*: Port for CRX architecture.
	* config.gcc (crx-*-elf): Add elfos.h, crtbegin.o, crtend.o.
	* doc/contrib.texi: Added CRX specific documentation
	* doc/extend.texi: Likewise
	* doc/install.texi: Likewise
	* doc/invoke.texi: Likewise
	* doc/md.texi: Likewise

Documentation updates:

Index: gcc/gcc/doc/contrib.texi
diff -c gcc/gcc/doc/contrib.texi:1.1.1.8 gcc/gcc/doc/contrib.texi:1.1.1.2.2.8
*** gcc/gcc/doc/contrib.texi:1.1.1.8    Tue Apr  5 17:45:40 2005
--- gcc/gcc/doc/contrib.texi    Tue Apr 12 11:06:31 2005
***************
*** 959,964 ****
--- 959,967 ----
  reduction and other loop optimizations.

  @item
+ Paul Woegerer for the CRX port.
+
+ @item
  Carlo Wood for various fixes.

  @item
Index: gcc/gcc/doc/extend.texi
diff -c gcc/gcc/doc/extend.texi:1.1.1.8 gcc/gcc/doc/extend.texi:1.1.1.2.2.8
*** gcc/gcc/doc/extend.texi:1.1.1.8    Tue Apr  5 17:45:40 2005
--- gcc/gcc/doc/extend.texi    Tue Apr 12 11:06:31 2005
***************
*** 1867,1875 ****

  @item interrupt
  @cindex interrupt handler functions
! Use this attribute on the ARM, AVR, C4x, M32R/D and Xstormy16 ports to indicate
! that the specified function is an interrupt handler.  The compiler will
! generate function entry and exit sequences suitable for use in an
  interrupt handler when this attribute is present.

  Note, interrupt handlers for the m68k, H8/300, H8/300H, H8S, and SH processors
--- 1867,1875 ----

  @item interrupt
  @cindex interrupt handler functions
! Use this attribute on the ARM, AVR, C4x, CRX, M32R/D and Xstormy16 ports to
! indicate that the specified function is an interrupt handler. The compiler
! will generate function entry and exit sequences suitable for use in an
  interrupt handler when this attribute is present.

  Note, interrupt handlers for the m68k, H8/300, H8/300H, H8S, and SH processors
Index: gcc/gcc/doc/install.texi
diff -c gcc/gcc/doc/install.texi:1.1.1.8 gcc/gcc/doc/install.texi:1.1.1.2.2.9
*** gcc/gcc/doc/install.texi:1.1.1.8    Tue Apr  5 17:45:40 2005
--- gcc/gcc/doc/install.texi    Tue Apr 12 11:06:31 2005
***************
*** 2558,2563 ****
--- 2558,2582 ----
  @html
  <hr />
  @end html
+ @heading @anchor{crx}CRX
+
+ The CRX CompactRISC architecture is a low-power 32-bit architecture with
+ fast context switching and architectural extensibility features.
+
+ @ifnothtml
+ @xref{CRX Options,, CRX Options, gcc, Using and Porting the GNU Compiler
+ Collection (GCC)},
+ @end ifnothtml
+
+ @ifhtml
+ See ``CRX Options'' in the main manual for a list of CRX-specific options.
+ @end ifhtml
+
+ Use @samp{configure --target=crx-elf --enable-languages="c"} to configure GCC@.
+
+ @html
+ <hr />
+ @end html
  @heading @anchor{dos}DOS

  Please have a look at the @uref{binaries.html,,binaries page}.
Index: gcc/gcc/doc/invoke.texi
diff -c gcc/gcc/doc/invoke.texi:1.1.1.8 gcc/gcc/doc/invoke.texi:1.1.1.2.2.8
*** gcc/gcc/doc/invoke.texi:1.1.1.8    Tue Apr  5 17:45:40 2005
--- gcc/gcc/doc/invoke.texi    Tue Apr 12 11:06:31 2005
***************
*** 410,415 ****
--- 410,418 ----
  -melf  -maout  -melinux  -mlinux  -sim  -sim2 @gol
  -mmul-bug-workaround  -mno-mul-bug-workaround}

+ @emph{CRX Options}
+ @gccoptlist{-mmac -mctors-dtors -maccumulate-outgoing-args -mpush-args}
+
  @emph{Darwin Options}
  @gccoptlist{-all_load  -allowable_client  -arch  -arch_errors_fatal @gol
  -arch_only  -bind_at_load  -bundle  -bundle_loader @gol
***************
*** 6731,6736 ****
--- 6734,6740 ----
  * ARM Options::
  * AVR Options::
  * CRIS Options::
+ * CRX Options::
  * Darwin Options::
  * DEC Alpha Options::
  * DEC Alpha/VMS Options::
***************
*** 7323,7328 ****
--- 7327,7363 ----
  @opindex sim2
  Like @option{-sim}, but pass linker options to locate initialized data at
  0x40000000 and zero-initialized data at 0x80000000.
+ @end table
+
+ @node CRX Options
+ @subsection CRX Options
+ @cindex CRX Options
+
+ These options are defined specifically for the CRX ports.
+
+ @table @gcctabopt
+
+ @item -mmac
+ @opindex mmac
+ Enable the use of multiply-accumulate instructions. Disabled by default.
+
+ @item -mctors-dtors
+ @opindex mno-ctors-dtors
+ Specifies that collect2 should be used for collecting constructors and
+ destructors that need to be run at startup and exit. The default is to
+ generate named sections for these constructors and destructors.
+
+ @item -maccumulate-outgoing-args
+ @opindex maccumulate-outgoing-args
+ The maximum amount of space required for outgoing arguments will be
+ allocated for each function. Outgoing arguments won't be pushed onto
+ the stack for each call. Disabled by default.
+
+ @item -mpush-args
+ @opindex mpush-args
+ Push instructions will be used to pass outgoing arguments when functions
+ are called. Enabled by default. This option cannot be used together with
+ @option{-maccumulate-outgoing-args}.
  @end table

  @node Darwin Options
Index: gcc/gcc/doc/md.texi
diff -c gcc/gcc/doc/md.texi:1.1.1.7 gcc/gcc/doc/md.texi:1.1.1.2.2.8
*** gcc/gcc/doc/md.texi:1.1.1.7    Tue Apr  5 17:45:40 2005
--- gcc/gcc/doc/md.texi    Tue Apr 12 11:06:31 2005
***************
*** 1746,1751 ****
--- 1746,1782 ----
  A floating point constant 0.0
  @end table

+ @item CRX Architecture---@file{crx.h}
+ @table @code
+
+ @item b
+ Registers from r0 to r14 (registers without stack pointer)
+
+ @item l
+ Register r16 (64-bit accumulator lo register)
+
+ @item h
+ Register r17 (64-bit accumulator hi register)
+
+ @item k
+ Register pair r16-r17. (64-bit accumulator lo-hi pair)
+
+ @item I
+ Constant that fits in 3 bits
+
+ @item J
+ Constant that fits in 4 bits
+
+ @item K
+ Constant that fits in 5 bits
+
+ @item L
+ Constant that is one of -1, 4, -4, 7, 8, 12, 16, 20, 32, 48
+
+ @item G
+ Floating point constant that is legal for store immediate
+ @end table
+
  @item PowerPC and IBM RS6000---@file{rs6000.h}
  @table @code
  @item b




--
Paul Woegerer                 phone:  +49-8141-35-1385
CRTools Development           fax:    +49-8141-35-1403
Cores Development Group       mailto: paul.woegerer@nsc.com

National Semiconductor GmbH
Livry-Gargan Str. 10
82256 Fuerstenfeldbruck, Germany
internet: http://www.national.com







Attachment: crx-gcc.diff.gz
Description: application/gunzip


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