~ubuntu-branches/ubuntu/maverick/ghdl/maverick

« back to all changes in this revision

Viewing changes to gcc/gcc/config/pa/pa.c

  • Committer: Bazaar Package Importer
  • Author(s): Wesley J. Landaker
  • Date: 2009-04-02 21:23:07 UTC
  • mfrom: (1.1.11 upstream) (3.2.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090402212307-01pkh97q9b3u1vea
Tags: 0.27+svn110+gcc4.3.3+dfsg-1
* Now using gcc-4.3.3
* Updated copyright information
* Added Vcs-Git information
* Updated to policy 3.8.1 

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
static void load_reg (int, HOST_WIDE_INT, int);
104
104
static void set_reg_plus_d (int, int, HOST_WIDE_INT, int);
105
105
static void pa_output_function_prologue (FILE *, HOST_WIDE_INT);
106
 
static void update_total_code_bytes (int);
 
106
static void update_total_code_bytes (unsigned int);
107
107
static void pa_output_function_epilogue (FILE *, HOST_WIDE_INT);
108
108
static int pa_adjust_cost (rtx, rtx, rtx, int);
109
109
static int pa_adjust_priority (rtx, int);
191
191
/* The last address of the previous function plus the number of bytes in
192
192
   associated thunks that have been output.  This is used to determine if
193
193
   a thunk can use an IA-relative branch to reach its target function.  */
194
 
static int last_address;
 
194
static unsigned int last_address;
195
195
 
196
196
/* Variables to handle plabels that we discover are necessary at assembly
197
197
   output time.  They are output after the current function.  */
715
715
 
716
716
      if (function_label_operand (orig, mode))
717
717
        {
718
 
          /* Force function label into memory.  */
719
 
          orig = XEXP (force_const_mem (mode, orig), 0);
 
718
          /* Force function label into memory in word mode.  */
 
719
          orig = XEXP (force_const_mem (word_mode, orig), 0);
720
720
          /* Load plabel address from DLT.  */
721
721
          emit_move_insn (tmp_reg,
722
722
                          gen_rtx_PLUS (word_mode, pic_offset_table_rtx,
3987
3987
/* Update the total code bytes output to the text section.  */
3988
3988
 
3989
3989
static void
3990
 
update_total_code_bytes (int nbytes)
 
3990
update_total_code_bytes (unsigned int nbytes)
3991
3991
{
3992
3992
  if ((TARGET_PORTABLE_RUNTIME || !TARGET_GAS || !TARGET_SOM)
3993
3993
      && !IN_NAMED_SECTION_P (cfun->decl))
3994
3994
    {
3995
 
      if (INSN_ADDRESSES_SET_P ())
3996
 
        {
3997
 
          unsigned long old_total = total_code_bytes;
3998
 
 
3999
 
          total_code_bytes += nbytes;
4000
 
 
4001
 
          /* Be prepared to handle overflows.  */
4002
 
          if (old_total > total_code_bytes)
4003
 
            total_code_bytes = -1;
4004
 
        }
4005
 
      else
4006
 
        total_code_bytes = -1;
 
3995
      unsigned int old_total = total_code_bytes;
 
3996
 
 
3997
      total_code_bytes += nbytes;
 
3998
 
 
3999
      /* Be prepared to handle overflows.  */
 
4000
      if (old_total > total_code_bytes)
 
4001
        total_code_bytes = UINT_MAX;
4007
4002
    }
4008
4003
}
4009
4004
 
4067
4062
      last_address = ((last_address + FUNCTION_BOUNDARY / BITS_PER_UNIT - 1)
4068
4063
                      & ~(FUNCTION_BOUNDARY / BITS_PER_UNIT - 1));
4069
4064
    }
 
4065
  else
 
4066
    last_address = UINT_MAX;
4070
4067
 
4071
4068
  /* Finally, update the total number of code bytes output so far.  */
4072
4069
  update_total_code_bytes (last_address);
7537
7534
          if (seq_length != 0
7538
7535
              && GET_CODE (NEXT_INSN (insn)) != JUMP_INSN
7539
7536
              && !sibcall
7540
 
              && (!TARGET_PA_20 || indirect_call))
 
7537
              && (!TARGET_PA_20
 
7538
                  || indirect_call
 
7539
                  || ((TARGET_LONG_ABS_CALL || local_call) && !flag_pic)))
7541
7540
            {
7542
7541
              /* A non-jump insn in the delay slot.  By definition we can
7543
7542
                 emit this insn before the call (and in fact before argument
7933
7932
{
7934
7933
  static unsigned int current_thunk_number;
7935
7934
  int val_14 = VAL_14_BITS_P (delta);
7936
 
  int nbytes = 0;
 
7935
  unsigned int old_last_address = last_address, nbytes = 0;
7937
7936
  char label[16];
7938
7937
  rtx xoperands[4];
7939
7938
 
7972
7971
                   || ((DECL_SECTION_NAME (thunk_fndecl)
7973
7972
                        == DECL_SECTION_NAME (function))
7974
7973
                       && last_address < 262132)))
 
7974
              || (targetm.have_named_sections
 
7975
                  && DECL_SECTION_NAME (thunk_fndecl) == NULL
 
7976
                  && DECL_SECTION_NAME (function) == NULL
 
7977
                  && last_address < 262132)
7975
7978
              || (!targetm.have_named_sections && last_address < 262132))))
7976
7979
    {
7977
7980
      if (!val_14)
8166
8169
  nbytes = ((nbytes + FUNCTION_BOUNDARY / BITS_PER_UNIT - 1)
8167
8170
            & ~(FUNCTION_BOUNDARY / BITS_PER_UNIT - 1));
8168
8171
  last_address += nbytes;
 
8172
  if (old_last_address > last_address)
 
8173
    last_address = UINT_MAX;
8169
8174
  update_total_code_bytes (nbytes);
8170
8175
}
8171
8176