s390.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Second parameter of ASM_OUTPUT_SKIP must...
[gcc.git] / gcc / config / s390 / s390.h
index 066f2cf36706cdcf08cd2a072e3900a099b27dac..47998d407c260fdae278e21a6633ebac39760d10 100644 (file)
@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA.  */
 
 /* Override the __fixdfdi etc. routines when building libgcc2.
    ??? This should be done in a cleaner way ...  */
-#ifdef IN_LIBGCC2
+#if defined (IN_LIBGCC2) && !defined (__s390x__)
 #include <s390/fixdfdi.h>
 #endif
 
@@ -100,7 +100,7 @@ extern int target_flags;
   { "soft-float",   -1, N_("Don't use hardware fp")},                  \
   { "backchain",     2, N_("Set backchain")},                          \
   { "no-backchain", -2, N_("Don't set backchain (faster, but debug harder")}, \
-  { "small-exec",    4, N_("Use bras for execucable < 64k")},          \
+  { "small-exec",    4, N_("Use bras for executable < 64k")},          \
   { "no-small-exec",-4, N_("Don't use bras")},                         \
   { "debug",         8, N_("Additional debug prints")},                \
   { "no-debug",     -8, N_("Don't print additional debug prints")},    \
@@ -114,9 +114,9 @@ extern int target_flags;
 
 #define TARGET_OPTIONS                                          \
 { { "tune=",            &s390_tune_string,                      \
-    N_("Schedule code for given CPU")},                         \
+    N_("Schedule code for given CPU"), 0},                      \
   { "arch=",            &s390_arch_string,                      \
-    N_("Generate code for given CPU")},                         \
+    N_("Generate code for given CPU"), 0},                      \
 }
 
 /* Target version string.  Overridden by the OS header.  */
@@ -134,6 +134,17 @@ extern int target_flags;
 #define CAN_DEBUG_WITHOUT_FP
 
 
+/* In libgcc2, determine target settings as compile-time constants.  */
+#ifdef IN_LIBGCC2
+#undef TARGET_64BIT
+#ifdef __s390x__
+#define TARGET_64BIT 1
+#else
+#define TARGET_64BIT 0
+#endif
+#endif
+
+
 /* Target machine storage layout.  */
 
 /* Everything is big-endian.  */
@@ -143,7 +154,9 @@ extern int target_flags;
 
 /* Width of a word, in units (bytes).  */
 #define UNITS_PER_WORD (TARGET_64BIT ? 8 : 4)
+#ifndef IN_LIBGCC2
 #define MIN_UNITS_PER_WORD 4
+#endif
 #define MAX_BITS_PER_WORD 64
 
 /* Function arguments and return values are promoted to word size.  */
@@ -374,8 +387,9 @@ do                                                          \
 /* If a 4-byte value is loaded into a FPR, it is placed into the
    *upper* half of the register, not the lower.  Therefore, we
    cannot use SUBREGs to switch between modes in FP registers.  */
-#define CANNOT_CHANGE_MODE_CLASS(FROM, TO)             \
-  (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO) ? FP_REGS : NO_REGS)
+#define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS)              \
+  (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO)                  \
+   ? reg_classes_intersect_p (FP_REGS, CLASS) : 0)
 
 /* Register classes.  */
  
@@ -536,7 +550,6 @@ extern int current_function_outgoing_args_size;
 
 /* Describe how we implement __builtin_eh_return.  */
 #define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + 6 : INVALID_REGNUM)
-#define EH_RETURN_STACKADJ_RTX  gen_rtx_REG (Pmode, 10)
 #define EH_RETURN_HANDLER_RTX \
   gen_rtx_MEM (Pmode, plus_constant (arg_pointer_rtx, \
                                      TARGET_64BIT? -48 : -40))
@@ -812,11 +825,6 @@ extern struct rtx_def *s390_compare_op0, *s390_compare_op1;
 
 /* Relative costs of operations.  */
 
-/* An expression giving the cost of an addressing mode that contains
-   ADDRESS.  If not defined, the cost is computed from the ADDRESS
-   expression and the `CONST_COSTS' values.  */
-#define ADDRESS_COST(RTX) s390_address_cost ((RTX))
-
 /* On s390, copy between fprs and gprs is expensive.  */
 #define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2)                        \
   ((   (   reg_classes_intersect_p ((CLASS1), GENERAL_REGS)            \
@@ -906,19 +914,11 @@ extern int flag_pic;
 
 /* Advance the location counter by SIZE bytes.  */
 #define ASM_OUTPUT_SKIP(FILE, SIZE) \
-  fprintf ((FILE), "\t.set\t.,.+%u\n", (SIZE))
-
-/* Output a reference to a user-level label named NAME.  */
-#define ASM_OUTPUT_LABELREF(FILE, NAME) \
-  asm_fprintf ((FILE), "%U%s", (*targetm.strip_name_encoding) (NAME))
+  fprintf ((FILE), "\t.set\t.,.+"HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE))
 
 /* The LOCAL_LABEL_PREFIX variable is used by dbxelf.h.  */
 #define LOCAL_LABEL_PREFIX "."
 
-/* Either simplify a location expression, or return the original.  */
-#define ASM_SIMPLIFY_DWARF_ADDR(X) \
-  s390_simplify_dwarf_addr (X)
-
 /* How to refer to registers in assembler output.  This sequence is
    indexed by compiler's hard-register-number (see above).  */
 #define REGISTER_NAMES                                                 \
@@ -929,6 +929,13 @@ extern int flag_pic;
   "%ap",  "%cc",  "%fp"                                                        \
 }
 
+/* Emit a dtp-relative reference to a TLS variable.  */
+
+#ifdef HAVE_AS_TLS
+#define ASM_OUTPUT_DWARF_DTPREL(FILE, SIZE, X) \
+  s390_output_dwarf_dtprel (FILE, SIZE, X)
+#endif
+
 /* Print operand X (an rtx) in assembler syntax to file FILE.  */
 #define PRINT_OPERAND(FILE, X, CODE) print_operand (FILE, X, CODE)
 #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR)
@@ -1005,7 +1012,7 @@ extern int s390_nr_constants;
        {                                                                   \
          assemble_integer (EXP, GET_MODE_SIZE (MODE), ALIGN, 1);           \
          if (GET_MODE_SIZE (MODE) == 1)                                    \
-           ASM_OUTPUT_SKIP ((FILE), 1);                                    \
+           ASM_OUTPUT_SKIP ((FILE), (unsigned HOST_WIDE_INT)1);            \
        }                                                                   \
       break;                                                               \
                                                                            \