C-SKY port: Documentation
2018-08-17 Sandra Loosemore <sandra@codesourcery.com> C-SKY port: Documentation gcc/ * doc/extend.texi (C-SKY Function Attributes): New section. * doc/invoke.texi (Option Summary): Add C-SKY options. (C-SKY Options): New section. * doc/md.texi (Machine Constraints): Document C-SKY constraints. From-SVN: r263629
This commit is contained in:
parent
cc7232b999
commit
fbceb769e6
@ -1,3 +1,12 @@
|
||||
2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
|
||||
|
||||
C-SKY port: Documentation
|
||||
|
||||
* doc/extend.texi (C-SKY Function Attributes): New section.
|
||||
* doc/invoke.texi (Option Summary): Add C-SKY options.
|
||||
(C-SKY Options): New section.
|
||||
* doc/md.texi (Machine Constraints): Document C-SKY constraints.
|
||||
|
||||
2018-08-17 Jojo <jijie_rong@c-sky.com>
|
||||
Huibin Wang <huibin_wang@c-sky.com>
|
||||
Sandra Loosemore <sandra@codesourcery.com>
|
||||
|
@ -2324,6 +2324,7 @@ GCC plugins may provide their own attributes.
|
||||
* AVR Function Attributes::
|
||||
* Blackfin Function Attributes::
|
||||
* CR16 Function Attributes::
|
||||
* C-SKY Function Attributes::
|
||||
* Epiphany Function Attributes::
|
||||
* H8/300 Function Attributes::
|
||||
* IA-64 Function Attributes::
|
||||
@ -4147,6 +4148,38 @@ function entry and exit sequences suitable for use in an interrupt handler
|
||||
when this attribute is present.
|
||||
@end table
|
||||
|
||||
@node C-SKY Function Attributes
|
||||
@subsection C-SKY Function Attributes
|
||||
|
||||
These function attributes are supported by the C-SKY back end:
|
||||
|
||||
@table @code
|
||||
@item interrupt
|
||||
@itemx isr
|
||||
@cindex @code{interrupt} function attribute, C-SKY
|
||||
@cindex @code{isr} function attribute, C-SKY
|
||||
Use these attributes to indicate that the specified function
|
||||
is an interrupt handler.
|
||||
The compiler generates function entry and exit sequences suitable for
|
||||
use in an interrupt handler when either of these attributes are present.
|
||||
|
||||
Use of these options requires the @option{-mistack} command-line option
|
||||
to enable support for the necessary interrupt stack instructions. They
|
||||
are ignored with a warning otherwise. @xref{C-SKY Options}.
|
||||
|
||||
@item naked
|
||||
@cindex @code{naked} function attribute, C-SKY
|
||||
This attribute allows the compiler to construct the
|
||||
requisite function declaration, while allowing the body of the
|
||||
function to be assembly code. The specified function will not have
|
||||
prologue/epilogue sequences generated by the compiler. Only basic
|
||||
@code{asm} statements can safely be included in naked functions
|
||||
(@pxref{Basic Asm}). While using extended @code{asm} or a mixture of
|
||||
basic @code{asm} and C code may appear to work, they cannot be
|
||||
depended upon to work reliably and are not supported.
|
||||
@end table
|
||||
|
||||
|
||||
@node Epiphany Function Attributes
|
||||
@subsection Epiphany Function Attributes
|
||||
|
||||
|
@ -723,6 +723,16 @@ Objective-C and Objective-C++ Dialects}.
|
||||
-msim -mint32 -mbit-ops
|
||||
-mdata-model=@var{model}}
|
||||
|
||||
@emph{C-SKY Options}
|
||||
@gccoptlist{-march=@var{arch} -mcpu=@var{cpu} @gol
|
||||
-mbig-endian -EB -mlittle-endian -EL @gol
|
||||
-mhard-float -msoft-float -mfpu=@var{fpu} -mdouble-float -mfdivdu @gol
|
||||
-melrw -mistack -mmp -mcp -mcache -msecurity -mtrust @gol
|
||||
-mdsp -medsp -mvdsp @gol
|
||||
-mdiv -msmart -mhigh-registers -manchor @gol
|
||||
-mpushpop -mmultiple-stld -mconstpool -mstack-size -mccrt @gol
|
||||
-mbranch-cost=@var{n} -mcse-cc -msched-prolog}
|
||||
|
||||
@emph{Darwin Options}
|
||||
@gccoptlist{-all_load -allowable_client -arch -arch_errors_fatal @gol
|
||||
-arch_only -bind_at_load -bundle -bundle_loader @gol
|
||||
@ -14633,6 +14643,7 @@ platform.
|
||||
* C6X Options::
|
||||
* CRIS Options::
|
||||
* CR16 Options::
|
||||
* C-SKY Options::
|
||||
* Darwin Options::
|
||||
* DEC Alpha Options::
|
||||
* FR30 Options::
|
||||
@ -17757,6 +17768,198 @@ However, @samp{far} is not valid with @option{-mcr16c}, as the
|
||||
CR16C architecture does not support the far data model.
|
||||
@end table
|
||||
|
||||
@node C-SKY Options
|
||||
@subsection C-SKY Options
|
||||
@cindex C-SKY Options
|
||||
|
||||
GCC supports these options when compiling for C-SKY V2 processors.
|
||||
|
||||
@table @gcctabopt
|
||||
|
||||
@item -march=@var{arch}
|
||||
@opindex march=
|
||||
Specify the C-SKY target architecture. Valid values for @var{arch} are:
|
||||
@samp{ck801}, @samp{ck802}, @samp{ck803}, @samp{ck807}, and @samp{ck810}.
|
||||
The default is @samp{ck810}.
|
||||
|
||||
@item -mcpu=@var{cpu}
|
||||
@opindex mcpu=
|
||||
Specify the C-SKY target processor. Valid values for @var{cpu} are:
|
||||
@samp{ck801}, @samp{ck801t},
|
||||
@samp{ck802}, @samp{ck802t}, @samp{ck802j},
|
||||
@samp{ck803}, @samp{ck803h}, @samp{ck803t}, @samp{ck803ht},
|
||||
@samp{ck803f}, @samp{ck803fh}, @samp{ck803e}, @samp{ck803eh},
|
||||
@samp{ck803et}, @samp{ck803eht}, @samp{ck803ef}, @samp{ck803efh},
|
||||
@samp{ck803ft}, @samp{ck803eft}, @samp{ck803efht}, @samp{ck803r1},
|
||||
@samp{ck803hr1}, @samp{ck803tr1}, @samp{ck803htr1}, @samp{ck803fr1},
|
||||
@samp{ck803fhr1}, @samp{ck803er1}, @samp{ck803ehr1}, @samp{ck803etr1},
|
||||
@samp{ck803ehtr1}, @samp{ck803efr1}, @samp{ck803efhr1}, @samp{ck803ftr1},
|
||||
@samp{ck803eftr1}, @samp{ck803efhtr1},
|
||||
@samp{ck803s}, @samp{ck803st}, @samp{ck803se}, @samp{ck803sf},
|
||||
@samp{ck803sef}, @samp{ck803seft},
|
||||
@samp{ck807e}, @samp{ck807ef}, @samp{ck807}, @samp{ck807f},
|
||||
@samp{ck810e}, @samp{ck810et}, @samp{ck810ef}, @samp{ck810eft},
|
||||
@samp{ck810}, @samp{ck810v}, @samp{ck810f}, @samp{ck810t}, @samp{ck810fv},
|
||||
@samp{ck810tv}, @samp{ck810ft}, and @samp{ck810ftv}.
|
||||
|
||||
@item -mbig-endian
|
||||
@opindex mbig-endian
|
||||
@itemx -EB
|
||||
@opindex -EB
|
||||
@itemx -mlittle-endian
|
||||
@opindex mlittle-endian
|
||||
@itemx -EL
|
||||
@opindex -EL
|
||||
|
||||
Select big- or little-endian code. The default is little-endian.
|
||||
|
||||
@item -mhard-float
|
||||
@opindex mhard-float
|
||||
@itemx -msoft-float
|
||||
@opindex msoft-float
|
||||
|
||||
Select hardware or software floating-point implementations.
|
||||
The default is soft float.
|
||||
|
||||
@item -mdouble-float
|
||||
@itemx -mno-double-float
|
||||
@opindex mdouble-float
|
||||
When @option{-mhard-float} is in effect, enable generation of
|
||||
double-precision float instructions. This is the default except
|
||||
when compiling for CK803.
|
||||
|
||||
@item -mfdivdu
|
||||
@itemx -mno-fdivdu
|
||||
@opindex mfdivdu
|
||||
When @option{-mhard-float} is in effect, enable generation of
|
||||
@code{frecipd}, @code{fsqrtd}, and @code{fdivd} instructions.
|
||||
This is the default except when compiling for CK803.
|
||||
|
||||
@item -mfpu=@var{fpu}
|
||||
@opindex mfpu=
|
||||
Select the floating-point processor. This option can only be used with
|
||||
@option{-mhard-float}.
|
||||
Values for @var{fpu} are
|
||||
@samp{fpv2_sf} (equivalent to @samp{-mno-double-float -mno-fdivdu}),
|
||||
@samp{fpv2} (@samp{-mdouble-float -mno-divdu}), and
|
||||
@samp{fpv2_divd} (@samp{-mdouble-float -mdivdu}).
|
||||
|
||||
@item -melrw
|
||||
@itemx -mno-elrw
|
||||
@opindex melrw
|
||||
Enable the extended @code{lrw} instruction. This option defaults to on
|
||||
for CK801 and off otherwise.
|
||||
|
||||
@item -mistack
|
||||
@itemx -mno-istack
|
||||
@opindex mistack
|
||||
Enable interrupt stack instructions; the default is off.
|
||||
|
||||
The @option{-mistack} option is required to handle the
|
||||
@code{interrupt} and @code{isr} function attributes
|
||||
(@pxref{C-SKY Function Attributes}).
|
||||
|
||||
@item -mmp
|
||||
@opindex mmp
|
||||
Enable multiprocessor instructions; the default is off.
|
||||
|
||||
@item -mcp
|
||||
@opindex mcp
|
||||
Enable coprocessor instructions; the default is off.
|
||||
|
||||
@item -mcache
|
||||
@opindex mcache
|
||||
Enable coprocessor instructions; the default is off.
|
||||
|
||||
@item -msecurity
|
||||
@opindex msecurity
|
||||
Enable C-SKY security instructions; the default is off.
|
||||
|
||||
@item -mtrust
|
||||
@opindex mtrust
|
||||
Enable C-SKY trust instructions; the default is off.
|
||||
|
||||
@item -mdsp
|
||||
@opindex mdsp
|
||||
@itemx -medsp
|
||||
@opindex medsp
|
||||
@itemx -mvdsp
|
||||
@opindex mvdsp
|
||||
Enable C-SKY DSP, Enhanced DSP, or Vector DSP instructions, respectively.
|
||||
All of these options default to off.
|
||||
|
||||
@item -mdiv
|
||||
@itemx -mno-div
|
||||
@opindex mdiv
|
||||
Generate divide instructions. Default is off.
|
||||
|
||||
@item -msmart
|
||||
@itemx -mno-smart
|
||||
@opindex msmart
|
||||
Generate code for Smart Mode, using only registers numbered 0-7 to allow
|
||||
use of 16-bit instructions. This option is ignored for CK801 where this
|
||||
is the required behavior, and it defaults to on for CK802.
|
||||
For other targets, the default is off.
|
||||
|
||||
@item -mhigh-registers
|
||||
@itemx -mno-high-registers
|
||||
@opindex mhigh-registers
|
||||
Generate code using the high registers numbered 16-31. This option
|
||||
is not supported on CK801, CK802, or CK803, and is enabled by default
|
||||
for other processors.
|
||||
|
||||
@item -manchor
|
||||
@itemx -mno-anchor
|
||||
@opindex manchor
|
||||
Generate code using global anchor symbol addresses.
|
||||
|
||||
@item -mpushpop
|
||||
@itemx -mno-pushpop
|
||||
@opindex mpushpop
|
||||
Generate code using @code{push} and @code{pop} instructions. This option
|
||||
defaults to on.
|
||||
|
||||
@item -mmultiple-stld
|
||||
@itemx -mstm
|
||||
@itemx -mno-multiple-stld
|
||||
@itemx -mno-stm
|
||||
@opindex mmultiple-stld
|
||||
Generate code using @code{stm} and @code{ldm} instructions. This option
|
||||
isn't supported on CK801 but is enabled by default on other processors.
|
||||
|
||||
@item -mconstpool
|
||||
@itemx -mno-constpool
|
||||
@opindex mconstpool
|
||||
Create constant pools in the compiler instead of deferring it to the
|
||||
assembler. This option is the default and required for correct code
|
||||
generation on CK801 and CK802, and is optional on other processors.
|
||||
|
||||
@item -mstack-size
|
||||
@item -mno-stack-size
|
||||
@opindex mstack-size
|
||||
Emit @code{.stack_size} directives for each function in the assembly
|
||||
output. This option defaults to off.
|
||||
|
||||
@item -mccrt
|
||||
@itemx -mno-ccrt
|
||||
@opindex mccrt
|
||||
Generate code for the C-SKY compiler runtime instead of libgcc. This
|
||||
option defaults to off.
|
||||
|
||||
@item -mbranch-cost=@var{n}
|
||||
@opindex mbranch-cost=
|
||||
Set the branch costs to roughly @code{n} instructions. The default is 1.
|
||||
|
||||
@item -msched-prolog
|
||||
@itemx -mno-sched-prolog
|
||||
@opindex msched-prolog
|
||||
Permit scheduling of function prologue and epilogue sequences. Using
|
||||
this option can result in code that is not compliant with the C-SKY V2 ABI
|
||||
prologue requirements and that cannot be debugged or backtraced.
|
||||
It is disabled by default.
|
||||
|
||||
@end table
|
||||
|
||||
@node Darwin Options
|
||||
@subsection Darwin Options
|
||||
@cindex Darwin options
|
||||
|
@ -2132,6 +2132,42 @@ Check for 64 bits wide constants for add/sub instructions
|
||||
Floating point constant that is legal for store immediate
|
||||
@end table
|
||||
|
||||
@item C-SKY---@file{config/csky/constraints.md}
|
||||
@table @code
|
||||
|
||||
@item a
|
||||
The mini registers r0 - r7.
|
||||
|
||||
@item b
|
||||
The low registers r0 - r15.
|
||||
|
||||
@item c
|
||||
C register.
|
||||
|
||||
@item y
|
||||
HI and LO registers.
|
||||
|
||||
@item l
|
||||
LO register.
|
||||
|
||||
@item h
|
||||
HI register.
|
||||
|
||||
@item v
|
||||
Vector registers.
|
||||
|
||||
@item z
|
||||
Stack pointer register (SP).
|
||||
@end table
|
||||
|
||||
@ifset INTERNALS
|
||||
The C-SKY back end supports a large set of additional constraints
|
||||
that are only useful for instruction selection or splitting rather
|
||||
than inline asm, such as constraints representing constant integer
|
||||
ranges accepted by particular instruction encodings.
|
||||
Refer to the source code for details.
|
||||
@end ifset
|
||||
|
||||
@item Epiphany---@file{config/epiphany/constraints.md}
|
||||
@table @code
|
||||
@item U16
|
||||
|
Loading…
x
Reference in New Issue
Block a user