This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

reg-stack warning fix



OK, I should not ignore the warnings.  This patch silences some signed/unsigned
comparison warnings around the code.  Not all, since reg-stack uses -1 as
invalid regnum.  I will convert it to INVALID_REGNUM later, but this is
rather non-trivial so for now I must keep certain regnos signed.

Honza
Pá úno 16 19:46:14 CET 2001  Jan Hubicka  <jh@suse.cz>
	* reg-stack.c (stack_def): Make field reg unsigned.
	(remove_regno_note): Unsignetize parameter.

*** /p1/x86-64/x86-64/gcc/gcc/reg-stack.c.old	Fri Feb 16 17:41:33 2001
--- reg-stack.c	Fri Feb 16 19:42:29 2001
*************** typedef struct stack_def
*** 185,191 ****
  {
    int top;			/* index to top stack element */
    HARD_REG_SET reg_set;		/* set of live registers */
!   char reg[REG_STACK_SIZE];	/* register - stack mapping */
  } *stack;
  
  /* This is used to carry information about basic blocks.  It is 
--- 185,191 ----
  {
    int top;			/* index to top stack element */
    HARD_REG_SET reg_set;		/* set of live registers */
!   unsigned char reg[REG_STACK_SIZE];/* register - stack mapping */
  } *stack;
  
  /* This is used to carry information about basic blocks.  It is 
*************** static int check_asm_stack_operands	PARA
*** 239,245 ****
  static int get_asm_operand_n_inputs	PARAMS ((rtx));
  static rtx stack_result			PARAMS ((tree));
  static void replace_reg			PARAMS ((rtx *, int));
! static void remove_regno_note		PARAMS ((rtx, enum reg_note, int));
  static int get_hard_regnum		PARAMS ((stack, rtx));
  static void delete_insn_for_stacker	PARAMS ((rtx));
  static rtx emit_pop_insn		PARAMS ((rtx, stack, rtx,
--- 239,246 ----
  static int get_asm_operand_n_inputs	PARAMS ((rtx));
  static rtx stack_result			PARAMS ((tree));
  static void replace_reg			PARAMS ((rtx *, int));
! static void remove_regno_note		PARAMS ((rtx, enum reg_note,
! 						 unsigned int));
  static int get_hard_regnum		PARAMS ((stack, rtx));
  static void delete_insn_for_stacker	PARAMS ((rtx));
  static rtx emit_pop_insn		PARAMS ((rtx, stack, rtx,
*************** static void
*** 841,847 ****
  remove_regno_note (insn, note, regno)
       rtx insn;
       enum reg_note note;
!      int regno;
  {
    register rtx *note_link, this;
  
--- 838,844 ----
  remove_regno_note (insn, note, regno)
       rtx insn;
       enum reg_note note;
!      unsigned int regno;
  {
    register rtx *note_link, this;
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]