* alpha.h, arc.h, arm/aout.h, avr.h, cris.h, d30v.h, dsp16xx.h,
[gcc.git] / gcc / config / stormy16 / stormy16.h
index b2a2ad1e3d4035ae121143ad956b08e5a3c8e495..4430e3313a8df4e048c1cee582eb6ed0d8b1e8a4 100644 (file)
@@ -67,7 +67,7 @@ Boston, MA 02111-1307, USA.  */
 \f
 /* Run-time target specifications */
 
-#define CPP_PREDEFINES "-Dxstormy16 -Amachine=xstormy16 -D__INT_MAX__=32767"
+#define CPP_PREDEFINES "-Dxstormy16 -Amachine=xstormy16"
 
 /* This declaration should be present.  */
 extern int target_flags;
@@ -89,14 +89,8 @@ extern int target_flags;
 
 #define WORDS_BIG_ENDIAN 0
 
-#define BITS_PER_UNIT 8
-
-#define BITS_PER_WORD 16
-
 #define UNITS_PER_WORD 2
 
-#define POINTER_SIZE 16
-
 #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE)                              \
 do {                                                                   \
   if (GET_MODE_CLASS (MODE) == MODE_INT                                        \
@@ -146,8 +140,6 @@ do {                                                                        \
 
 #define LONG_LONG_TYPE_SIZE 64
 
-#define CHAR_TYPE_SIZE 8
-
 #define FLOAT_TYPE_SIZE 32
 
 #define DOUBLE_TYPE_SIZE 64
@@ -394,20 +386,6 @@ do {                                                                       \
    treatment of leaf functions, and registers need to be renumbered to do this.  */
 /* #define LEAF_REG_REMAP(REGNO) */
 
-\f
-/* Registers That Form a Stack.  */
-
-/* Define this if the machine has any stack-like registers.  */
-/* #define STACK_REGS */
-
-/* The number of the first stack-like register.  This one is the top
-   of the stack.  */
-/* #define FIRST_STACK_REG */
-
-/* The number of the last stack-like register.  This one is the
-   bottom of the stack.  */
-/* #define LAST_STACK_REG */
-
 \f
 /* Register Classes */
 
@@ -1341,7 +1319,7 @@ enum reg_class
 
    For this platform, the value of CUMULATIVE_ARGS is the number of words
    of arguments that have been passed in registers so far.  */
-typedef int CUMULATIVE_ARGS;
+#define CUMULATIVE_ARGS int
 
 /* A C statement (sans semicolon) for initializing the variable CUM for the
    state at the beginning of the argument list.  The variable has type
@@ -1751,8 +1729,8 @@ typedef int CUMULATIVE_ARGS;
    variable to initialize.  NEXTARG is the machine independent notion of the
    'next' argument after the variable arguments.  If not defined, a standard
    implementation will be defined that works for arguments passed on the stack.  */
-#define EXPAND_BUILTIN_VA_START(STDARG_P, VALIST, NEXTARG) \
-  xstormy16_expand_builtin_va_start (STDARG_P, VALIST, NEXTARG)
+#define EXPAND_BUILTIN_VA_START(VALIST, NEXTARG) \
+  xstormy16_expand_builtin_va_start (VALIST, NEXTARG)
 
 /* Implement the stdarg/varargs va_arg macro.  VALIST is the variable of type
    va_list as a tree, TYPE is the type passed to va_arg.  */
@@ -2066,59 +2044,7 @@ typedef int CUMULATIVE_ARGS;
 
 /* A C compound statement with a conditional `goto LABEL;' executed if X (an
    RTX) is a legitimate memory address on the target machine for a memory
-   operand of mode MODE.
-
-   It usually pays to define several simpler macros to serve as subroutines for
-   this one.  Otherwise it may be too complicated to understand.
-
-   This macro must exist in two variants: a strict variant and a non-strict
-   one.  The strict variant is used in the reload pass.  It must be defined so
-   that any pseudo-register that has not been allocated a hard register is
-   considered a memory reference.  In contexts where some kind of register is
-   required, a pseudo-register with no hard register must be rejected.
-
-   The non-strict variant is used in other passes.  It must be defined to
-   accept all pseudo-registers in every context where some kind of register is
-   required.
-
-   Compiler source files that want to use the strict variant of this macro
-   define the macro `REG_OK_STRICT'.  You should use an `#ifdef REG_OK_STRICT'
-   conditional to define the strict variant in that case and the non-strict
-   variant otherwise.
-
-   Subroutines to check for acceptable registers for various purposes (one for
-   base registers, one for index registers, and so on) are typically among the
-   subroutines used to define `GO_IF_LEGITIMATE_ADDRESS'.  Then only these
-   subroutine macros need have two variants; the higher levels of macros may be
-   the same whether strict or not.
-
-   Normally, constant addresses which are the sum of a `symbol_ref' and an
-   integer are stored inside a `const' RTX to mark them as constant.
-   Therefore, there is no need to recognize such sums specifically as
-   legitimate addresses.  Normally you would simply recognize any `const' as
-   legitimate.
-
-   Usually `PRINT_OPERAND_ADDRESS' is not prepared to handle constant sums that
-   are not marked with `const'.  It assumes that a naked `plus' indicates
-   indexing.  If so, then you *must* reject such naked constant sums as
-   illegitimate addresses, so that none of them will be given to
-   `PRINT_OPERAND_ADDRESS'.
-
-   On some machines, whether a symbolic address is legitimate depends on the
-   section that the address refers to.  On these machines, define the macro
-   `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and
-   then check for it here.  When you see a `const', you will have to look
-   inside it to find the `symbol_ref' in order to determine the section.
-
-   The best way to modify the name string is by adding text to the beginning,
-   with suitable punctuation to prevent any ambiguity.  Allocate the new name
-   in `saveable_obstack'.  You will have to modify `ASM_OUTPUT_LABELREF' to
-   remove and decode the added text and output the name accordingly, and define
-   `STRIP_NAME_ENCODING' to access the original name string.
-
-   You can check the information stored here into the `symbol_ref' in the
-   definitions of the macros `GO_IF_LEGITIMATE_ADDRESS' and
-   `PRINT_OPERAND_ADDRESS'.  */
+   operand of mode MODE.  */
 #ifdef REG_OK_STRICT
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL)       \
 do {                                                   \
@@ -2543,74 +2469,12 @@ do {                                                    \
    Defined in svr4.h.  */
 /* #define EXTRA_SECTION_FUNCTIONS */
 
-/* On most machines, read-only variables, constants, and jump tables are placed
-   in the text section.  If this is not the case on your machine, this macro
-   should be defined to be the name of a function (either `data_section' or a
-   function defined in `EXTRA_SECTIONS') that switches to the section to be
-   used for read-only items.
-
-   If these items should be placed in the text section, this macro should not
-   be defined.  */
-/* #define READONLY_DATA_SECTION */
-
-/* A C statement or statements to switch to the appropriate section for output
-   of EXP.  You can assume that EXP is either a `VAR_DECL' node or a constant
-   of some sort.  RELOC indicates whether the initial value of EXP requires
-   link-time relocations.  Select the section by calling `text_section' or one
-   of the alternatives for other sections.
-
-   Do not define this macro if you put all read-only variables and constants in
-   the read-only data section (usually the text section).
-
-   Defined in svr4.h.  */
-/* #define SELECT_SECTION(EXP, RELOC, ALIGN) */
-
-/* A C statement or statements to switch to the appropriate section for output
-   of RTX in mode MODE.  You can assume that RTX is some kind of constant in
-   RTL.  The argument MODE is redundant except in the case of a `const_int'
-   rtx.  Select the section by calling `text_section' or one of the
-   alternatives for other sections.
-
-   Do not define this macro if you put all constants in the read-only data
-   section.
-
-   Defined in svr4.h.  */
-/* #define SELECT_RTX_SECTION(MODE, RTX, ALIGN) */
-
 /* Define this macro if jump tables (for `tablejump' insns) should be output in
    the text section, along with the assembler instructions.  Otherwise, the
    readonly data section is used.
 
    This macro is irrelevant if there is no separate readonly data section.  */
 #define JUMP_TABLES_IN_TEXT_SECTION 1
-
-/* Define this macro if references to a symbol must be treated differently
-   depending on something about the variable or function named by the symbol
-   (such as what section it is in).
-
-   The macro definition, if any, is executed immediately after the rtl for DECL
-   has been created and stored in `DECL_RTL (DECL)'.  The value of the rtl will
-   be a `mem' whose address is a `symbol_ref'.
-
-   The usual thing for this macro to do is to record a flag in the `symbol_ref'
-   (such as `SYMBOL_REF_FLAG') or to store a modified name string in the
-   `symbol_ref' (if one bit is not enough information).  */
-#define ENCODE_SECTION_INFO(DECL)  xstormy16_encode_section_info(DECL)
-
-/* Decode SYM_NAME and store the real name part in VAR, sans the characters
-   that encode section info.  Define this macro if `ENCODE_SECTION_INFO' alters
-   the symbol's name string.  */
-/* #define STRIP_NAME_ENCODING(VAR, SYM_NAME) */
-
-/* A C statement to build up a unique section name, expressed as a
-   STRING_CST node, and assign it to `DECL_SECTION_NAME (DECL)'.
-   RELOC indicates whether the initial value of EXP requires
-   link-time relocations.  If you do not define this macro, GNU CC
-   will use the symbol name prefixed by `.' as the section name.
-
-   Defined in svr4.h.  */
-/* #define UNIQUE_SECTION(DECL, RELOC) */
-
 \f
 /* Position Independent Code.  */
 
@@ -2813,30 +2677,6 @@ do {                                                     \
    is treated as a logical line separator.  */
 #define IS_ASM_LOGICAL_LINE_SEPARATOR(C) ((C) == '|')
 
-/* These macros are provided by `real.h' for writing the definitions of
-   `ASM_OUTPUT_DOUBLE' and the like: */
-
-/* These translate X, of type `REAL_VALUE_TYPE', to the target's floating point
-   representation, and store its bit pattern in the array of `long int' whose
-   address is L.  The number of elements in the output array is determined by
-   the size of the desired target floating point data type: 32 bits of it go in
-   each `long int' array element.  Each array element holds 32 bits of the
-   result, even if `long int' is wider than 32 bits on the host machine.
-
-   The array element values are designed so that you can print them out using
-   `fprintf' in the order they should appear in the target machine's memory.  */
-/* #define REAL_VALUE_TO_TARGET_SINGLE(X, L) */
-/* #define REAL_VALUE_TO_TARGET_DOUBLE(X, L) */
-/* #define REAL_VALUE_TO_TARGET_LONG_DOUBLE(X, L) */
-
-/* This macro converts X, of type `REAL_VALUE_TYPE', to a decimal number and
-   stores it as a string into STRING.  You must pass, as STRING, the address of
-   a long enough block of space to hold the result.
-
-   The argument FORMAT is a `printf'-specification that serves as a suggestion
-   for how to format the output string.  */
-/* #define REAL_VALUE_TO_DECIMAL(X, FORMAT, STRING) */
-
 \f
 /* Output of Uninitialized Variables.  */
 
@@ -2942,27 +2782,12 @@ do {                                                    \
 \f
 /* Output and Generation of Labels.  */
 
-/* A C statement (sans semicolon) to output to the stdio stream STREAM the
-   assembler definition of a label named NAME.  Use the expression
-   `assemble_name (STREAM, NAME)' to output the name itself; before and after
-   that, output the additional assembler syntax for defining the name, and a
-   newline.  */
-#define ASM_OUTPUT_LABEL(STREAM, NAME)                                 \
-do {                                                                   \
-  assemble_name (STREAM, NAME);                                                \
-  fputs (":\n", STREAM);                                               \
-} while (0)
-
 /* A C statement to output to the stdio stream STREAM the assembler
    definition of a symbol named SYMBOL.  */
 #define ASM_OUTPUT_SYMBOL_REF(STREAM, SYMBOL)                          \
   do {                                                                 \
     if (SYMBOL_REF_FLAG (SYMBOL))                                      \
-      {                                                                        \
-        fputs ("@fptr(", STREAM);                                      \
-       assemble_name (STREAM, XSTR (SYMBOL, 0));                       \
-       fputc (')', STREAM);                                            \
-      }                                                                        \
+      ASM_OUTPUT_LABEL_REF ((STREAM), XSTR (SYMBOL, 0));               \
     else                                                               \
       assemble_name (STREAM, XSTR (SYMBOL, 0));                                \
   } while (0)
@@ -3023,17 +2848,8 @@ do  {                                            \
    Defined in svr4.h.  */
 /* #define ASM_FINISH_DECLARE_OBJECT(STREAM, DECL, TOPLEVEL, ATEND) */
 
-/* A C statement (sans semicolon) to output to the stdio stream STREAM some
-   commands that will make the label NAME global; that is, available for
-   reference from other files.  Use the expression `assemble_name (STREAM,
-   NAME)' to output the name itself; before and after that, output the
-   additional assembler syntax for making that name global, and a newline.  */
-#define ASM_GLOBALIZE_LABEL(STREAM,NAME)                               \
-do {                                                                   \
-  fputs ("\t.globl ", STREAM);                                         \
-  assemble_name (STREAM, NAME);                                                \
-  fputs ("\n", STREAM);                                                        \
-} while (0)
+/* Globalizing directive for a label.  */
+#define GLOBAL_ASM_OP "\t.globl "
 
 /* A C statement (sans semicolon) to output to the stdio stream STREAM some
    commands that will make the label NAME weak; that is, available for
@@ -3393,14 +3209,7 @@ do {                                                                     \
 
 /* A C compound statement to output to stdio stream STREAM the assembler syntax
    for an instruction operand that is a memory reference whose address is X.  X
-   is an RTL expression.
-
-   On some machines, the syntax for a symbolic address depends on the section
-   that the address refers to.  On these machines, define the macro
-   `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and
-   then check for it here.
-
-   This declaration must be present.  */
+   is an RTL expression.  */
 #define PRINT_OPERAND_ADDRESS(STREAM, X) xstormy16_print_operand_address (STREAM, X)
 
 /* A C statement, to be executed after all slot-filler instructions have been
@@ -3864,10 +3673,6 @@ do {                                                                     \
 \f
 /* Miscellaneous Parameters.  */
 
-/* Define REAL_ARITHMETIC to use a software emulator for the target floating
-   point mode.  Otherwise the host floating point mode is used.  */
-#define REAL_ARITHMETIC
-
 /* Define this if you have defined special-purpose predicates in the file
    `MACHINE.c'.  This macro is called within an initializer of an array of
    structures.  The first field in the structure is the name of a predicate and
@@ -4094,12 +3899,6 @@ do {                                                                     \
    should be used on RISC machines.  */
 /* #define INTEGRATE_THRESHOLD(DECL) */
 
-/* Define this if the preprocessor should ignore `#sccs' directives and print
-   no error message.
-
-   Defined in svr4.h.  */
-/* #define SCCS_DIRECTIVE */
-
 /* Define this macro if the system header files support C++ as well as C.  This
    macro inhibits the usual method of using system header files in C++, which
    is to pretend that the file's contents are enclosed in `extern "C" {...}'.  */