]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/config/vax/vax.c
Merge from trunk.
[thirdparty/gcc.git] / gcc / config / vax / vax.c
index aa848108cf7ce0234ae59b97da2fe28521d0b561..90da3b9c2b8b709d2da6a4870237622a88f640c5 100644 (file)
@@ -1,7 +1,5 @@
 /* Subroutines for insn-output.c for VAX.
-   Copyright (C) 1987, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002,
-   2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 1987-2013 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -26,6 +24,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "rtl.h"
 #include "df.h"
 #include "tree.h"
+#include "calls.h"
+#include "varasm.h"
 #include "regs.h"
 #include "hard-reg-set.h"
 #include "insn-config.h"
@@ -45,6 +45,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "target.h"
 #include "target-def.h"
+#include "wide-int.h"
 
 static void vax_option_override (void);
 static bool vax_legitimate_address_p (enum machine_mode, rtx, bool);
@@ -53,7 +54,7 @@ static void vax_init_libfuncs (void);
 static void vax_output_mi_thunk (FILE *, tree, HOST_WIDE_INT,
                                 HOST_WIDE_INT, tree);
 static int vax_address_cost_1 (rtx);
-static int vax_address_cost (rtx, bool);
+static int vax_address_cost (rtx, enum machine_mode, addr_space_t, bool);
 static bool vax_rtx_costs (rtx, int, int, int, int *, bool);
 static rtx vax_function_arg (cumulative_args_t, enum machine_mode,
                             const_tree, bool);
@@ -64,7 +65,7 @@ static rtx vax_builtin_setjmp_frame_value (void);
 static void vax_asm_trampoline_template (FILE *);
 static void vax_trampoline_init (rtx, tree, rtx);
 static int vax_return_pops_args (tree, tree, int);
-static bool vax_mode_dependent_address_p (const_rtx);
+static bool vax_mode_dependent_address_p (const_rtx, addr_space_t);
 \f
 /* Initialize the GCC target structure.  */
 #undef TARGET_ASM_ALIGNED_HI_OP
@@ -645,7 +646,7 @@ vax_float_literal (rtx c)
     {
       int x = 1 << i;
       bool ok;
-      REAL_VALUE_FROM_INT (s, x, 0, mode);
+      real_from_integer (&s, mode, x, SIGNED);
 
       if (REAL_VALUES_EQUAL (r, s))
        return true;
@@ -738,7 +739,9 @@ vax_address_cost_1 (rtx addr)
 }
 
 static int
-vax_address_cost (rtx x, bool speed ATTRIBUTE_UNUSED)
+vax_address_cost (rtx x, enum machine_mode mode ATTRIBUTE_UNUSED,
+                 addr_space_t as ATTRIBUTE_UNUSED,
+                 bool speed ATTRIBUTE_UNUSED)
 {
   return (1 + (REG_P (x) ? 0 : vax_address_cost_1 (x)));
 }
@@ -1187,7 +1190,7 @@ vax_output_int_move (rtx insn ATTRIBUTE_UNUSED, rtx *operands,
                {
                  operands[1] = GEN_INT (lval);
                  operands[2] = GEN_INT (n);
-                 return "ashq %2,%1,%0";
+                 return "ashq %2,%D1,%0";
                }
 #if HOST_BITS_PER_WIDE_INT == 32
            }
@@ -1199,7 +1202,7 @@ vax_output_int_move (rtx insn ATTRIBUTE_UNUSED, rtx *operands,
            {
              operands[1] = GEN_INT (hval >> n);
              operands[2] = GEN_INT (n + 32);
-             return "ashq %2,%1,%0";
+             return "ashq %2,%D1,%0";
 #endif
            }
        }
@@ -1837,7 +1840,7 @@ vax_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
    thus (because the index scale factor is the length of the operand).  */
 
 static bool
-vax_mode_dependent_address_p (const_rtx x)
+vax_mode_dependent_address_p (const_rtx x, addr_space_t as ATTRIBUTE_UNUSED)
 {
   rtx xfoo0, xfoo1;