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]
Other format: [Raw text]

Re: assertify pdp11


Ok -- thanks.  

*************** print_operand_address (FILE *file, regis
*** 995,1001 ****
  	}
        if (offset != 0)
  	{
! 	  if (addr != 0) abort ();
  	  addr = offset;
  	}
        if (reg1 != 0 && GET_CODE (reg1) == MULT)
--- 987,993 ----
  	}
        if (offset != 0)
  	{
! 	  gcc_assert (!addr);
  	  addr = offset;
  	}
        if (reg1 != 0 && GET_CODE (reg1) == MULT)

Is (!addr) what the coding conventions call for?  I really dislike
treating non-bool items as if they were bool, so I always write 
(addr != 0) as in the original.

*************** print_operand_address (FILE *file, regis
*** 1022,1038 ****
  	output_address (addr);
        if (breg != 0)
  	{
! 	  if (GET_CODE (breg) != REG)
! 	    abort ();
  	  fprintf (file, "(%s)", reg_names[REGNO (breg)]);
  	}
        if (ireg != 0)
  	{
  	  if (GET_CODE (ireg) == MULT)
  	    ireg = XEXP (ireg, 0);
! 	  if (GET_CODE (ireg) != REG)
! 	    abort ();
! 	  abort();
  	  fprintf (file, "[%s]", reg_names[REGNO (ireg)]);
  	}
        break;
--- 1014,1028 ----
  	output_address (addr);
        if (breg != 0)
  	{
! 	  gcc_assert (GET_CODE (breg) == REG);
  	  fprintf (file, "(%s)", reg_names[REGNO (breg)]);
  	}
        if (ireg != 0)
  	{
  	  if (GET_CODE (ireg) == MULT)
  	    ireg = XEXP (ireg, 0);
! 	  gcc_assert (GET_CODE (ireg) == REG);
! 	  gcc_unreachable(); /* ??? */
  	  fprintf (file, "[%s]", reg_names[REGNO (ireg)]);
  	}
        break;

That "unreachable" looks like a not-yet-implemented case.  Will try to
check that out...

      paul


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