aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorHari Sandanagobalane <hariharan@picochip.com>2008-09-03 12:10:49 +0000
committerPaul Brook <pbrook@gcc.gnu.org>2008-09-03 12:10:49 +0000
commit358da97e4e90811bbfbe26d60f142e7ebc9a2244 (patch)
tree646b39b9d13d74c6e891802aeb4609ac1500539a /gcc
parent44299c960128427cf464bd1d8f6497e2b4cfb2ed (diff)
downloadgcc-358da97e4e90811bbfbe26d60f142e7ebc9a2244.zip
gcc-358da97e4e90811bbfbe26d60f142e7ebc9a2244.tar.gz
gcc-358da97e4e90811bbfbe26d60f142e7ebc9a2244.tar.bz2
Add picoChip port.
2008-09-03 Hari Sandanagobalane <hariharan@picochip.com> Add picoChip port. * MAINTAINERS: Add picoChip maintainers. libgcc/ * config.host: Add picochip-*-*. gcc/ * doc/extend.texi: Document picoChip builtin functions. * doc/invoke.texi: Document picoChip options. * doc/contrib.texi: Add picoChip contribution. * doc/md.texi: Document picoChip constraints. * config.gcc: Add picochip-*-*. * config/picochip/: Add new port. From-SVN: r139932
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config.gcc6
-rw-r--r--gcc/doc/contrib.texi4
-rw-r--r--gcc/doc/extend.texi37
-rw-r--r--gcc/doc/invoke.texi53
-rw-r--r--gcc/doc/md.texi40
6 files changed, 150 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5e491e97..5f6fe22 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2008-09-03 Hari Sandanagobalane <hariharan@picochip.com>
+
+ Add picoChip port.
+ * doc/extend.texi: Document picoChip builtin functions.
+ * doc/invoke.texi: Document picoChip options.
+ * doc/contrib.texi: Add picoChip contribution.
+ * doc/md.texi: Document picoChip constraints.
+ * config.gcc: Add picochip-*-*.
+ * config/picochip/: Add new port.
+
2008-09-03 Richard Guenther <rguenther@suse.de>
PR tree-optimization/37328
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 877761b..22bca4d 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -329,6 +329,9 @@ mips*-*-*)
need_64bit_hwint=yes
extra_headers="loongson.h"
;;
+picochip-*-*)
+ cpu_type=picochip
+ ;;
powerpc*-*-*)
cpu_type=rs6000
extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h"
@@ -1707,6 +1710,9 @@ pdp11-*-bsd)
;;
pdp11-*-*)
;;
+picochip-*)
+ # Nothing special
+ ;;
# port not yet contributed
#powerpc-*-openbsd*)
# tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-fprules-fpbit "
diff --git a/gcc/doc/contrib.texi b/gcc/doc/contrib.texi
index 0b13b10..2ae03c9 100644
--- a/gcc/doc/contrib.texi
+++ b/gcc/doc/contrib.texi
@@ -917,6 +917,10 @@ Teemu Torma for thread safe exception handling support.
Leonard Tower wrote parts of the parser, RTL generator, and RTL
definitions, and of the VAX machine description.
+@item
+Daniel Towner and Hariharan Sandanagobalane contributed and
+maintain the picoChip port.
+
@item
Tom Tromey for internationalization support and for his many Java
contributions and libgcj maintainership.
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 05203dd..21debf7 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -6985,6 +6985,7 @@ instructions, but allow the compiler to schedule those calls.
* MIPS DSP Built-in Functions::
* MIPS Paired-Single Support::
* MIPS Loongson Built-in Functions::
+* picoChip Built-in Functions::
* PowerPC AltiVec Built-in Functions::
* SPARC VIS Built-in Functions::
* SPU Built-in Functions::
@@ -9403,6 +9404,42 @@ else
@end smallexample
@end table
+@node picoChip Built-in Functions
+@subsection picoChip Built-in Functions
+
+GCC provides an interface to selected machine instructions from the
+picoChip instruction set.
+
+@table @code
+@item int __builtin_sbc (int @var{value})
+Sign bit count. Return the number of consecutive bits in @var{value}
+which have the same value as the sign-bit. The result is the number of
+leading sign bits minus one, giving the number of redundant sign bits in
+@var{value}.
+
+@item int __builtin_byteswap (int @var{value})
+Byte swap. Return the result of swapping the upper and lower bytes of
+@var{value}.
+
+@item int __builtin_brev (int @var{value})
+Bit reversal. Return the result of reversing the bits in
+@var{value}. Bit 15 is swapped with bit 0, bit 14 is swapped with bit 1,
+and so on.
+
+@item int __builtin_adds (int @var{x}, int @var{y})
+Saturating addition. Return the result of adding @var{x} and @var{y},
+storing the value 32767 if the result overflows.
+
+@item int __builtin_subs (int @var{x}, int @var{y})
+Saturating subtraction. Return the result of subtracting @var{y} from
+@var{x}, storing the value -32768 if the result overflows.
+
+@item void __builtin_halt (void)
+Halt. The processor will stop execution. This built-in is useful for
+implementing assertions.
+
+@end table
+
@node PowerPC AltiVec Built-in Functions
@subsection PowerPC AltiVec Built-in Functions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 5768f08..2b2ebc85 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -691,6 +691,10 @@ Objective-C and Objective-C++ Dialects}.
-mbranch-expensive -mbranch-cheap @gol
-msplit -mno-split -munix-asm -mdec-asm}
+@emph{picoChip Options}
+@gccoptlist{-mae=@var{ae_type} -mvliw-lookahead=@var{N}
+-msymbol-as-address -mno-inefficient-warnings}
+
@emph{PowerPC Options}
See RS/6000 and PowerPC Options.
@@ -8603,6 +8607,7 @@ platform.
* MMIX Options::
* MN10300 Options::
* PDP-11 Options::
+* picoChip Options::
* PowerPC Options::
* RS/6000 and PowerPC Options::
* S/390 and zSeries Options::
@@ -13095,6 +13100,54 @@ Use DEC assembler syntax. This is the default when configured for any
PDP-11 target other than @samp{pdp11-*-bsd}.
@end table
+@node picoChip Options
+@subsection picoChip Options
+@cindex picoChip options
+
+These @samp{-m} options are defined for picoChip implementations:
+
+@table @gcctabopt
+
+@item -mae=@var{ae_type}
+@opindex mcpu
+Set the instruction set, register set, and instruction scheduling
+parameters for array element type @var{ae_type}. Supported values
+for @var{ae_type} are @samp{ANY}, @samp{MUL}, and @samp{MAC}.
+
+@option{-mae=ANY} selects a completely generic AE type. Code
+generated with this option will run on any of the other AE types. The
+code will not be as efficient as it would be if compiled for a specific
+AE type, and some types of operation (e.g., multiplication) will not
+work properly on all types of AE.
+
+@option{-mae=MUL} selects a MUL AE type. This is the most useful AE type
+for compiled code, and is the default.
+
+@option{-mae=MAC} selects a DSP-style MAC AE. Code compiled with this
+option may suffer from poor performance of byte (char) manipulation,
+since the DSP AE does not provide hardware support for byte load/stores.
+
+@item -msymbol-as-address
+Enable the compiler to directly use a symbol name as an address in a
+load/store instruction, without first loading it into a
+register. Typically, the use of this option will generate larger
+programs, which run faster than when the option isn't used. However, the
+results vary from program to program, so it is left as a user option,
+rather than being permanently enabled.
+
+@item -mno-inefficient-warnings
+Disables warnings about the generation of inefficient code. These
+warnings can be generated, for example, when compiling code which
+performs byte-level memory operations on the MAC AE type. The MAC AE has
+no hardware support for byte-level memory operations, so all byte
+load/stores must be synthesised from word load/store operations. This is
+inefficient and a warning will be generated indicating to the programmer
+that they should rewrite the code to avoid byte operations, or to target
+an AE type which has the necessary hardware support. This option enables
+the warning to be turned off.
+
+@end table
+
@node PowerPC Options
@subsection PowerPC Options
@cindex PowerPC options
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
index 66ca3e9..528c6a1 100644
--- a/gcc/doc/md.texi
+++ b/gcc/doc/md.texi
@@ -1855,6 +1855,46 @@ A memory operand for floating-point loads and stores
A register indirect memory operand
@end table
+@item picoChip family---@file{picochip.h}
+@table @code
+@item k
+Stack register.
+
+@item f
+Pointer register. A register which can be used to access memory without
+supplying an offset. Any other register can be used to access memory,
+but will need a constant offset. In the case of the offset being zero,
+it is more efficient to use a pointer register, since this reduces code
+size.
+
+@item t
+A twin register. A register which may be paired with an adjacent
+register to create a 32-bit register.
+
+@item a
+Any absolute memory address (e.g., symbolic constant, symbolic
+constant + offset).
+
+@item I
+4-bit signed integer.
+
+@item J
+4-bit unsigned integer.
+
+@item K
+8-bit signed integer.
+
+@item M
+Any constant whose absolute value is no greater than 4-bits.
+
+@item N
+10-bit signed integer
+
+@item O
+16-bit signed integer.
+
+@end table
+
@item PowerPC and IBM RS6000---@file{config/rs6000/rs6000.h}
@table @code
@item b