OSDN Git Service

Remove spurious ChangeLog entry
[pf3gnuchains/gcc-fork.git] / gcc / target.def
index b11c0c0..6137e97 100644 (file)
    You are forbidden to forbid anyone else to use, share and improve
    what you give them.   Help stamp out software-hoarding!  */
 
-/* The following macros should be provided by the including file:
-
-   DEFHOOK(NAME, DOC, TYPE, PARAMS, INIT): Define a function-valued hook.
-   DEFHOOKPOD(DOC, TYPE, NAME, INIT): Define a piece-of-data 'hook'.  */
-
-/* Defaults for optional macros:
-   DEFHOOKPODX(NAME, TYPE, INIT): Like DEFHOOKPOD, but share documentation
-   with the previous 'hook'.  */
-#ifndef DEFHOOKPODX
-#define DEFHOOKPODX(NAME, TYPE, INIT) DEFHOOKPOD (NAME, 0, TYPE, INIT)
-#endif
-   
-/* HOOKSTRUCT(FRAGMENT): Declarator fragments to encapsulate all the
-   members into a struct gcc_target, which in turn contains several
-   sub-structs.  */
-#ifndef HOOKSTRUCT
-#define HOOKSTRUCT(FRAGMENT)
-#endif
-/* HOOK_VECTOR: Start a struct declaration, which then gets its own initializer.
-   HOOK_VECTOR_END: Close a struct declaration, providing a member declarator
-                    name for nested use.  */
-#ifndef HOOK_VECTOR_1
-#define HOOK_VECTOR_1(NAME, FRAGMENT) HOOKSTRUCT(FRAGMENT)
-#endif
-#define HOOK_VECTOR(INIT_NAME, SNAME) HOOK_VECTOR_1 (INIT_NAME, struct SNAME {)
-#define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
+/* See target-hooks-macros.h for details of macros that should be
+   provided by the including file, and how to use them here.  */
+#include "target-hooks-macros.h"
 
-HOOK_VECTOR (TARGET_INITIALIZER, gcc_target)
+#undef HOOK_TYPE
+#define HOOK_TYPE "Target Hook"
 
-/* FIXME: For pre-existing hooks, we can't place the documentation in the
-   documentation field here till we get permission from the FSF to include
-   it in GPLed software - the target hook documentation is so far only
-   available under the GFDL.  */
-
-/* A hook should generally be documented by a string in the DOC parameter,
-   which should contain texinfo markup.  If the documentation is only available
-   under the GPL, but not under the GFDL, put it in a comment above the hook
-   definition.  If the function declaration is available both under GPL and
-   GFDL, but the documentation is only available under the GFDL, put the
-   documentaton in tm.texi.in, heading with @hook <hookname> and closing
-   the paragraph with @end deftypefn / deftypevr as appropriate, and marking
-   the next autogenerated hook with @hook <hookname>.
-   In both these cases, leave the DOC string empty, i.e. "".
-   Sometimes, for some historic reason the function declaration 
-   has to be documented differently
-   than what it is.  In that case, use DEFHOOK_UNDOC to supress auto-generation
-   of documentation.  DEFHOOK_UNDOC takes a DOC string which it ignores, so
-   you can put GPLed documentation string there if you have hopes that you
-   can clear the declaration & documentation for GFDL distribution later,
-   in which case you can then simply change the DEFHOOK_UNDOC to DEFHOOK
-   to turn on the autogeneration of the documentation.
-
-   A documentation string of "*" means not to emit any documentation at all,
-   and is mainly used internally for DEFHOOK_UNDOC.  It should generally not
-   be used otherwise, but it has its use for exceptional cases where automatic
-   documentation is not wanted, and the real documentation is elsewere, like
-   for TARGET_ASM_{,UN}ALIGNED_INT_OP, which are hooks only for implementation
-   purposes; they refer to structs, the components of which are documented as
-   separate hooks TARGET_ASM_{,UN}ALIGNED_[HSDT]I_OP.
-   A DOC string of 0 is for internal use of DEFHOOKPODX and special table
-   entries only.  */
+HOOK_VECTOR (TARGET_INITIALIZER, gcc_target)
 
 /* Functions that output assembler for the target.  */
 #define HOOK_PREFIX "TARGET_ASM_"
@@ -1295,6 +1242,17 @@ DEFHOOK
  void, (void),
  hook_void_void)
 
+ /* Add a __gnu_ prefix to library functions rather than just __.  */
+DEFHOOKPOD
+(libfunc_gnu_prefix,
+ "If false (the default), internal library routines start with two\n\
+underscores.  If set to true, these routines start with @code{__gnu_}\n\
+instead.  E.g., @code{__muldi3} changes to @code{__gnu_muldi3}.  This\n\
+currently only affects functions defined in @file{libgcc2.c}.  If this\n\
+is set to true, the @file{tm.h} file must also\n\
+@code{#define LIBGCC2_GNU_PREFIX}.",
+  bool, false)
+
 /* Given a decl, a section name, and whether the decl initializer
    has relocs, choose attributes for the section.  */
 /* ??? Should be merged with SELECT_SECTION and UNIQUE_SECTION.  */
@@ -1344,12 +1302,19 @@ DEFHOOK
  unsigned, (unsigned nunroll, struct loop *loop),
  NULL)
 
+/* True if X is a legitimate MODE-mode immediate operand.  */
+DEFHOOK
+(legitimate_constant_p,
+ "",
+ bool, (enum machine_mode mode, rtx x),
+ hook_bool_mode_rtx_true)
+
 /* True if the constant X cannot be placed in the constant pool.  */
 DEFHOOK
 (cannot_force_const_mem,
  "",
- bool, (rtx x),
- hook_bool_rtx_false)
+ bool, (enum machine_mode mode, rtx x),
+ hook_bool_mode_rtx_false)
 
 DEFHOOK_UNDOC
 (cannot_copy_insn_p,
@@ -1611,6 +1576,38 @@ DEFHOOK
  bool, (enum machine_mode mode),
  hook_bool_mode_false)
 
+/* True if we should try to use a scalar mode to represent an array,
+   overriding the usual MAX_FIXED_MODE limit.  */
+DEFHOOK
+(array_mode_supported_p,
+ "Return true if GCC should try to use a scalar mode to store an array\n\
+of @var{nelems} elements, given that each element has mode @var{mode}.\n\
+Returning true here overrides the usual @code{MAX_FIXED_MODE} limit\n\
+and allows GCC to use any defined integer mode.\n\
+\n\
+One use of this hook is to support vector load and store operations\n\
+that operate on several homogeneous vectors.  For example, ARM NEON\n\
+has operations like:\n\
+\n\
+@smallexample\n\
+int8x8x3_t vld3_s8 (const int8_t *)\n\
+@end smallexample\n\
+\n\
+where the return type is defined as:\n\
+\n\
+@smallexample\n\
+typedef struct int8x8x3_t\n\
+@{\n\
+  int8x8_t val[3];\n\
+@} int8x8x3_t;\n\
+@end smallexample\n\
+\n\
+If this hook allows @code{val} to have a scalar mode, then\n\
+@code{int8x8x3_t} can have the same mode.  GCC can then store\n\
+@code{int8x8x3_t}s in registers rather than forcing them onto the stack.",
+ bool, (enum machine_mode mode, unsigned HOST_WIDE_INT nelems),
+ hook_bool_mode_uhwi_false)
+
 /* Compute cost of moving data from a register of class FROM to one of
    TO, using MODE.  */
 DEFHOOK
@@ -2715,58 +2712,5 @@ DEFHOOKPOD
 
 /* Leave the boolean fields at the end.  */
 
-/* Empty macro arguments are undefined in C90, so use an empty macro.  */
-#define C90_EMPTY_HACK
 /* Close the 'struct gcc_target' definition.  */
 HOOK_VECTOR_END (C90_EMPTY_HACK)
-
-HOOK_VECTOR (TARGETCM_INITIALIZER, gcc_targetcm)
-
-/* Handle target switch CODE (an OPT_* value).  ARG is the argument
-   passed to the switch; it is NULL if no argument was.  VALUE is the
-   value of ARG if CODE specifies a UInteger option, otherwise it is
-   1 if the positive form of the switch was used and 0 if the negative
-   form was.  Return true if the switch was valid.  */
-DEFHOOK
-(handle_c_option,
- "",
- bool, (size_t code, const char *arg, int value),
- default_handle_c_option)
-
-/* Targets may provide a string object type that can be used within
-   and between C, C++, and Objective-C dialects.  */
-
-DEFHOOK
-(objc_construct_string_object,
- "Targets may provide a string object type that can be used within\
- and between C, C++ and their respective Objective-C dialects.\
- A string object might, for example, embed encoding and length information.\
- These objects are considered opaque to the compiler and handled as references.\
- An ideal implementation makes the composition of the string object\
- match that of the Objective-C @code{NSString} (@code{NXString} for GNUStep),\
- allowing efficient interworking between C-only and Objective-C code.\
- If a target implements string objects then this hook should return a\
- reference to such an object constructed from the normal `C' string\
- representation provided in @var{string}.\
- At present, the hook is used by Objective-C only, to obtain a\
- common-format string object when the target provides one.",
- tree, (tree string),
- NULL)
-DEFHOOK
-(string_object_ref_type_p,
- "If a target implements string objects then this hook should return\
- @code{true} if @var{stringref} is a valid reference to such an object.",
- bool, (const_tree stringref),
- hook_bool_const_tree_false)
-
-DEFHOOK
-(check_string_object_format_arg,
- "If a target implements string objects then this hook should should\
-  provide a facility to check the function arguments in @var{args_list}\
-  against the format specifiers in @var{format_arg} where the type of\
-  @var{format_arg} is one recognized as a valid string reference type.",
- void, (tree format_arg, tree args_list),
- NULL)
-HOOK_VECTOR_END (C90_EMPTY_HACK)