On 07/28/2018 07:44 AM, Dimitar Dimitrov wrote:
ChangeLog:
2018-07-27 Dimitar Dimitrov <dimi...@dinux.eu>
* configure: Regenerate.
* configure.ac: Add PRU target.
gcc/ChangeLog:
2018-07-27 Dimitar Dimitrov <dimi...@dinux.eu>
* common/config/pru/pru-common.c: New file.
* config.gcc: Add PRU target.
* config/pru/alu-zext.md: New file.
* config/pru/constraints.md: New file.
* config/pru/predicates.md: New file.
* config/pru/pru-opts.h: New file.
* config/pru/pru-passes.c: New file.
* config/pru/pru-pragma.c: New file.
* config/pru/pru-protos.h: New file.
* config/pru/pru.c: New file.
* config/pru/pru.h: New file.
* config/pru/pru.md: New file.
* config/pru/pru.opt: New file.
* config/pru/t-pru: New file.
* doc/extend.texi: Document PRU pragmas.
* doc/invoke.texi: Document PRU-specific options.
* doc/md.texi: Document PRU asm constraints.
I have a few nit-picky comments about the documentation parts.
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 1dcdfb51c47..ff3245ed3eb 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1041,6 +1041,10 @@ See RS/6000 and PowerPC Options.
-mstack-protector-guard=@var{guard} -mstack-protector-guard-reg=@var{reg} @gol
-mstack-protector-guard-offset=@var{offset}}
+@emph{PRU Options}
+@gccoptlist{-mmcu=@var{mcu} -minrt -mno-relax -mloop @gol
+-mabi=@var{variant} @gol}
+
@emph{RISC-V Options}
@gccoptlist{-mbranch-cost=@var{N-instruction} @gol
-mplt -mno-plt @gol
I think all the @gccoptlist items in this section are uniformly
formatted with two spaces between each option.... or they should be. :-S
@@ -23093,6 +23098,56 @@ the offset with a symbol reference to a canary in the
TLS block.
@end table
+@node PRU Options
+@subsection PRU Options
+@cindex PRU Options
+
+These command-line options are defined for PRU target:
+
+@table @gcctabopt
+@item -minrt
+@opindex minrt
+Enable the use of a minimum runtime environment - no static
Format long dashes like "environment---no"; that is, three dashes, and
no space around them.
+initializers or constructors. Results in significant code size
+reduction of final ELF binaries.
+
+@item -mmcu=@var{mcu}
+@opindex mmcu
+Specify the PRU MCU variant to use. Check newlib for exact list of options.
s/newlib/Newlib/
+
+@item -mno-relax
+@opindex mno-relax
+Pass on (or do not pass on) the @option{-mrelax} command-line option
+to the linker.
+
+@item -mloop
+@opindex mloop
+Allow (or do not allow) gcc to use the LOOP instruction.
s/gcc/GCC/
+
+@item -mabi=@var{variant}
+@opindex mabi
+Specify the ABI variant to output code for. Permissible values are @samp{gnu}
+for GCC, and @samp{ti} for fully conformant TI ABI. These are the differences:
+
+@table @samp
+@item Function Pointer Size
+TI ABI specifies that function (code) pointers are 16-bit, whereas GCC
+supports only 32-bit data and code pointers.
+
+@item Optional Return Value Pointer
+Function return values larger than 64-bits are passed by using a hidden
s/64-bits/64 bits/
+pointer as the first argument of the function. TI ABI, though, mandates that
+the pointer can be NULL in case the caller is not using the returned value.
+GCC always passes and expects a valid return value pointer.
+
+@end table
+
+The current @samp{mabi=ti} implementation will simply raise a compile error
+when any of the above code constructs is detected.
s/will simply raise/simply raises/
+
+@end table
+
+
@node RISC-V Options
@subsection RISC-V Options
@cindex RISC-V Options
-Sandra