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] |
Hello, I am herewith attaching the GCC port code and patch that works with the current mainline (4.4). I have tested it with the IRA branch too.
Regards Hari
Hello Hariharan,
a typo-only quick review:
* Hariharan wrote on Mon, Feb 18, 2008 at 05:11:31PM CET:[...]--- gcc/doc/extend.texi (revision 132093) +++ gcc/doc/extend.texi (working copy)+@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 the result overflows.
s/the the/the/
[...]--- gcc/doc/invoke.texi (revision 132093) +++ gcc/doc/invoke.texi (working copy)
+@option{-mae=MUL} selects a MUL AE type. This is the most useful AE type +for copiled code, and is the default.
s/copiled/compiled/
Cheers, Ralf
Attachment:
picochip.tgz
Description: application/compressed-tar
Index: libgcc/config.host =================================================================== --- libgcc/config.host (revision 137693) +++ libgcc/config.host (working copy) @@ -428,6 +428,8 @@ ;; pdp11-*-*) ;; +picochip-*-*) + ;; powerpc64-*-linux*) tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128" ;; Index: gcc/doc/extend.texi =================================================================== --- gcc/doc/extend.texi (revision 137693) +++ gcc/doc/extend.texi (working copy) @@ -6792,6 +6792,7 @@ * 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:: @@ -9074,6 +9075,42 @@ @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 Index: gcc/doc/invoke.texi =================================================================== --- gcc/doc/invoke.texi (revision 137693) +++ gcc/doc/invoke.texi (working copy) @@ -678,6 +678,10 @@ -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. @@ -8429,6 +8433,7 @@ * MMIX Options:: * MN10300 Options:: * PDP-11 Options:: +* picoChip Options:: * PowerPC Options:: * RS/6000 and PowerPC Options:: * S/390 and zSeries Options:: @@ -12886,6 +12891,54 @@ 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 Index: gcc/doc/contrib.texi =================================================================== --- gcc/doc/contrib.texi (revision 137693) +++ gcc/doc/contrib.texi (working copy) @@ -917,6 +917,10 @@ 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. Index: gcc/doc/md.texi =================================================================== --- gcc/doc/md.texi (revision 137693) +++ gcc/doc/md.texi (working copy) @@ -1855,6 +1855,46 @@ 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 Index: gcc/config.gcc =================================================================== --- gcc/config.gcc (revision 137693) +++ gcc/config.gcc (working copy) @@ -309,6 +309,9 @@ 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" @@ -1677,6 +1680,9 @@ ;; pdp11-*-*) ;; +picochip-*) + # Nothing special + ;; # port not yet contributed #powerpc-*-openbsd*) # tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-fprules-fpbit " Index: MAINTAINERS =================================================================== --- MAINTAINERS (revision 137693) +++ MAINTAINERS (working copy) @@ -69,6 +69,8 @@ mn10300 port Jeff Law law@redhat.com mn10300 port Alexandre Oliva aoliva@redhat.com pdp11 port Paul Koning ni1d@arrl.net +picochip port Hari Sandanagobalane hariharan@picochip.com +picochip port Daniel Towner dant@picochip.com rs6000 port Geoff Keating geoffk@geoffk.org rs6000 port David Edelsohn dje@watson.ibm.com rs6000 vector extns Aldy Hernandez aldyh@redhat.com
Index: gcc/calls.c =================================================================== --- gcc/calls.c (revision 136670) +++ gcc/calls.c (working copy) @@ -3565,6 +3565,7 @@ rtx val = argvec[argnum].value; rtx reg = argvec[argnum].reg; int partial = argvec[argnum].partial; + unsigned int parm_align = argvec[argnum].locate.boundary; int lower_bound = 0, upper_bound = 0, i; if (! (reg != 0 && partial == 0)) @@ -3626,7 +3627,7 @@ } } - emit_push_insn (val, mode, NULL_TREE, NULL_RTX, PARM_BOUNDARY, + emit_push_insn (val, mode, NULL_TREE, NULL_RTX, parm_align, partial, reg, 0, argblock, GEN_INT (argvec[argnum].locate.offset.constant), reg_parm_stack_space,
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |