Changeset 677


Ignore:
Timestamp:
Sep 9, 2003, 8:40:31 PM (22 years ago)
Author:
zap
Message:

.

Location:
trunk/src/gcc/gcc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gcc/gcc/config/i386/emx.c

    • Property cvs2svn:cvs-rev changed from 1.25 to 1.26
    r676 r677  
    350350        *no_add_attrs = true;
    351351        break;
    352 
    353352
    354353      /* Types!
  • trunk/src/gcc/gcc/config/i386/i386.c

    • Property cvs2svn:cvs-rev changed from 1.14 to 1.15
    r676 r677  
    24302430                  cum->ec_slots--;
    24312431                }
    2432 #ifdef NOT_WORKING_YET
    2433               else if (TREE_CODE (type) == REAL_TYPE)
     2432              else if (FLOAT_MODE_P (mode))
    24342433                {
    24352434                  /* Fixed-point parameters are passed in FPU registers */
     
    24382437                      cum->fpu_nregs--;
    24392438                      cum->fpu_regno++;
    2440                       regstack_first_undef_reg = FIRST_FLOAT_REG + cum->fpu_regno;
    24412439                      /* Args passed in FPU stack takes one eyecatcher slot */
    24422440                      cum->ec_slots--;
     
    24522450                    return;
    24532451                }
    2454 #endif
    24552452              else
    24562453                {
     
    25442541        break;
    25452542
    2546 #if defined TARGET_OPTLINK_DECL_ATTRIBUTES && defined NOT_WORKING_YET
     2543#if defined TARGET_OPTLINK_DECL_ATTRIBUTES
    25472544        case QFmode:
    25482545        case HFmode:
  • trunk/src/gcc/gcc/reg-stack.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r676 r677  
    232232/* Used to initialize uninitialized registers.  */
    233233static rtx nan;
    234 
    235 /* The first undefined stack register at the beginning of this function.
    236    This variable is set from machine-dependent code when placing certain
    237    function arguments in stack registers at function entry, in this case
    238    the variable is set to first stack register that has undefined contents
    239    at the beginning of function. */
    240 int regstack_first_undef_reg = FIRST_STACK_REG;
    241234
    242235/* Forward declarations */
     
    24122405  int inserted = 0, i;
    24132406  edge e;
     2407  tree parm = DECL_ARGUMENTS (current_function_decl);
     2408  int incoming_arg [REG_STACK_SIZE];
    24142409
    24152410  for (i = n_basic_blocks - 1; i >= 0; --i)
     
    24322427    }
    24332428
     2429  /* Figure out the arguments passed in stack registers.  */
     2430  memset (incoming_arg, 0, sizeof (incoming_arg));
     2431  while (parm)
     2432    {
     2433      rtx x = DECL_INCOMING_RTL (parm);
     2434      if (STACK_REG_P (x))
     2435        incoming_arg[REGNO (x) - FIRST_STACK_REG] = x;
     2436      parm = TREE_CHAIN (parm);
     2437    }
     2438
    24342439  /* Load something into each stack register live at function entry.
    24352440     Such live registers can be caused by uninitialized variables or
     
    24462451      block_info bi = BLOCK_INFO (block);
    24472452      int reg, top = -1;
    2448 
    2449       for (reg = LAST_STACK_REG; reg >= regstack_first_undef_reg; --reg)
    2450         if (TEST_HARD_REG_BIT (bi->stack_in.reg_set, reg))
     2453      int dead_arguments = 0;
     2454
     2455      /* Put the incoming arguments to the stack.  */
     2456      for (i = LAST_STACK_REG; i >= FIRST_STACK_REG; i--)
     2457        if (incoming_arg [i - FIRST_STACK_REG])
     2458          bi->stack_in.reg[++top] = i;
     2459
     2460      for (reg = LAST_STACK_REG; reg >= FIRST_STACK_REG; --reg)
     2461        if (TEST_HARD_REG_BIT (bi->stack_in.reg_set, reg)
     2462            && !incoming_arg [reg - FIRST_STACK_REG])
    24512463          {
    24522464            rtx init;
     
    24542466            bi->stack_in.reg[++top] = reg;
    24552467
    2456             init = gen_rtx_SET (VOIDmode,
    2457                                 FP_MODE_REG (FIRST_STACK_REG, SFmode),
    2458                                 nan);
    2459             insert_insn_on_edge (init, e);
    2460             inserted = 1;
     2468            init = gen_rtx_SET (VOIDmode,
     2469                                FP_MODE_REG (FIRST_STACK_REG, SFmode),
     2470                                nan);
     2471            insert_insn_on_edge (init, e);
     2472            inserted = 1;
    24612473          }
    24622474
    2463       /* All registers that are valid on function entry should be
    2464          marked as such. ??? Possibly we should do it in flow.c ??? */
    2465       for (reg = regstack_first_undef_reg - 1; reg >= FIRST_STACK_REG; --reg)
    2466         {
    2467           bi->stack_in.reg[++top] = reg;
    2468         }
    2469 
    2470       /* At the start of next block we cannot assume anything about
    2471          stack register contents.  */
    2472       regstack_first_undef_reg = FIRST_STACK_REG;
    24732475      bi->stack_in.top = top;
     2476
     2477      /* Check whether there are any dead arguments that needs
     2478         to be popped.  */
     2479      for (i = LAST_STACK_REG; i >= FIRST_STACK_REG; i--)
     2480        if (incoming_arg [i - FIRST_STACK_REG]
     2481            && !TEST_HARD_REG_BIT (bi->stack_in.reg_set, i))
     2482          {
     2483            dead_arguments = 1;
     2484            break;
     2485          }
     2486
     2487      if (dead_arguments)
     2488        {
     2489          rtx seq;
     2490          rtx after;
     2491          start_sequence ();
     2492                 
     2493          /* ??? pop_stack needs some point to emit insns after.
     2494             Also needed to keep gen_sequence from returning a
     2495             pattern as opposed to a sequence, which would lose
     2496             REG_DEAD notes.  */
     2497          after = emit_note (NULL, NOTE_INSN_DELETED);
     2498
     2499          for (i = LAST_STACK_REG; i >= FIRST_STACK_REG; i--)
     2500            if (incoming_arg [i - FIRST_STACK_REG]
     2501                && !TEST_HARD_REG_BIT (bi->stack_in.reg_set,i))
     2502              after = emit_pop_insn (after, &bi->stack_in,
     2503                                     FP_MODE_REG (i, DFmode), EMIT_AFTER);
     2504
     2505          seq = gen_sequence ();
     2506          end_sequence ();
     2507          inserted = 1;
     2508          insert_insn_on_edge (seq, e);
     2509        }
    24742510    }
    24752511
  • trunk/src/gcc/gcc/rtl.h

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r676 r677  
    20072007/* In reg-stack.c */
    20082008#ifdef BUFSIZ
    2009 extern int regstack_first_undef_reg;
    20102009extern void reg_to_stack                PARAMS ((rtx, FILE *));
    20112010#endif
Note: See TracChangeset for help on using the changeset viewer.