OSDN Git Service

Revert:
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / i386.c
index 3e887f8..b722c4d 100644 (file)
@@ -1880,6 +1880,7 @@ static bool ext_80387_constants_init = 0;
 \f
 static struct machine_function * ix86_init_machine_status (void);
 static rtx ix86_function_value (const_tree, const_tree, bool);
+static bool ix86_function_value_regno_p (const unsigned int);
 static rtx ix86_static_chain (const_tree, bool);
 static int ix86_function_regparm (const_tree, const_tree);
 static void ix86_compute_frame_layout (struct ix86_frame *);
@@ -6331,8 +6332,8 @@ ix86_function_arg_boundary (enum machine_mode mode, tree type)
 
 /* Return true if N is a possible register number of function value.  */
 
-bool
-ix86_function_value_regno_p (int regno)
+static bool
+ix86_function_value_regno_p (const unsigned int regno)
 {
   switch (regno)
     {
@@ -8010,6 +8011,7 @@ ix86_compute_frame_layout (struct ix86_frame *frame)
       && cfun->machine->use_fast_prologue_epilogue_nregs != frame->nregs)
     {
       int count = frame->nregs;
+      struct cgraph_node *node = cgraph_node (current_function_decl);
 
       cfun->machine->use_fast_prologue_epilogue_nregs = count;
       /* The fast prologue uses move instead of push to save registers.  This
@@ -8024,9 +8026,9 @@ ix86_compute_frame_layout (struct ix86_frame *frame)
         slow to use many of them.  */
       if (count)
        count = (count - 1) * FAST_PROLOGUE_INSN_COUNT;
-      if (cfun->function_frequency < FUNCTION_FREQUENCY_NORMAL
+      if (node->frequency < NODE_FREQUENCY_NORMAL
          || (flag_branch_probabilities
-             && cfun->function_frequency < FUNCTION_FREQUENCY_HOT))
+             && node->frequency < NODE_FREQUENCY_HOT))
         cfun->machine->use_fast_prologue_epilogue = false;
       else
         cfun->machine->use_fast_prologue_epilogue
@@ -10841,7 +10843,7 @@ output_pic_addr_const (FILE *file, rtx x, int code)
        {
          /* We can use %d if the number is <32 bits and positive.  */
          if (CONST_DOUBLE_HIGH (x) || CONST_DOUBLE_LOW (x) < 0)
-           fprintf (file, "%#lx%08lx",
+           fprintf (file, "0x%lx%08lx",
                     (unsigned long) CONST_DOUBLE_HIGH (x),
                     (unsigned long) CONST_DOUBLE_LOW (x));
          else
@@ -11419,7 +11421,7 @@ get_some_local_dynamic_name (void)
     return cfun->machine->some_ld_name;
 
   for (insn = get_insns (); insn ; insn = NEXT_INSN (insn))
-    if (INSN_P (insn)
+    if (NONDEBUG_INSN_P (insn)
        && for_each_rtx (&PATTERN (insn), get_some_local_dynamic_name_1, 0))
       return cfun->machine->some_ld_name;
 
@@ -13665,7 +13667,7 @@ distance_non_agu_define (unsigned int regno1, unsigned int regno2,
       rtx prev = PREV_INSN (insn);
       while (prev && distance < LEA_SEARCH_THRESHOLD)
        {
-         if (INSN_P (prev))
+         if (NONDEBUG_INSN_P (prev))
            {
              distance++;
               for (def_rec = DF_INSN_DEFS (prev); *def_rec; def_rec++)
@@ -13705,7 +13707,7 @@ distance_non_agu_define (unsigned int regno1, unsigned int regno2,
                 && prev != insn
                 && distance < LEA_SEARCH_THRESHOLD)
            {
-             if (INSN_P (prev))
+             if (NONDEBUG_INSN_P (prev))
                {
                  distance++;
                  for (def_rec = DF_INSN_DEFS (prev); *def_rec; def_rec++)
@@ -13751,7 +13753,7 @@ distance_agu_use (unsigned int regno0, rtx insn)
       rtx next = NEXT_INSN (insn);
       while (next && distance < LEA_SEARCH_THRESHOLD)
        {
-         if (INSN_P (next))
+         if (NONDEBUG_INSN_P (next))
            {
              distance++;
 
@@ -13800,7 +13802,7 @@ distance_agu_use (unsigned int regno0, rtx insn)
                 && next != insn
                 && distance < LEA_SEARCH_THRESHOLD)
            {
-             if (INSN_P (next))
+             if (NONDEBUG_INSN_P (next))
                {
                  distance++;
 
@@ -26706,7 +26708,7 @@ ix86_pad_returns (void)
            replace = true;
          /* Empty functions get branch mispredict even when the jump destination
             is not visible to us.  */
-         if (!prev && cfun->function_frequency > FUNCTION_FREQUENCY_UNLIKELY_EXECUTED)
+         if (!prev && !optimize_function_for_size_p (cfun))
            replace = true;
        }
       if (replace)
@@ -30655,6 +30657,9 @@ ix86_enum_va_list (int idx, const char **pname, tree *ptree)
 #undef TARGET_FUNCTION_VALUE
 #define TARGET_FUNCTION_VALUE ix86_function_value
 
+#undef TARGET_FUNCTION_VALUE_REGNO_P
+#define TARGET_FUNCTION_VALUE_REGNO_P ix86_function_value_regno_p
+
 #undef TARGET_SECONDARY_RELOAD
 #define TARGET_SECONDARY_RELOAD ix86_secondary_reload