Patch to print the names of the virtual registers in debug dumps

Michael Meissner meissner@cygnus.com
Wed Jul 21 09:40:00 GMT 1999


I noticed that we don't print the virtual registers in the debug
dumps.  This patch fixes that.

1999-07-21  Michael Meissner  <meissner@cygnus.com>

	* print-rtl.c (print_rtx): Print the names of the virtual
	registers.

*** gcc/print-rtl.c.~1~	Fri Apr 23 05:44:28 1999
--- gcc/print-rtl.c	Wed Jul 21 12:34:07 1999
***************
*** 1,5 ****
  /* Print RTL for GNU C Compiler.
!    Copyright (C) 1987, 1988, 1992, 1997, 1998 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,5 ----
  /* Print RTL for GNU C Compiler.
!    Copyright (C) 1987, 1988, 1992, 1997, 1998, 1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** print_rtx (in_rtx)
*** 244,249 ****
--- 244,265 ----
  	    {
  	      fputc (' ', outfile);
  	      DEBUG_PRINT_REG (in_rtx, 0, outfile);
+ 	    }
+ 	  else if (GET_CODE (in_rtx) == REG && value <= LAST_VIRTUAL_REGISTER)
+ 	    {
+ 	      if (value == VIRTUAL_INCOMING_ARGS_REGNUM)
+ 		fprintf (outfile, " %d virtual-incoming-args", value);
+ 	      else if (value == VIRTUAL_STACK_VARS_REGNUM)
+ 		fprintf (outfile, " %d virtual-stack-vars", value);
+ 	      else if (value == VIRTUAL_STACK_DYNAMIC_REGNUM)
+ 		fprintf (outfile, " %d virtual-stack-dynamic", value);
+ 	      else if (value == VIRTUAL_OUTGOING_ARGS_REGNUM)
+ 		fprintf (outfile, " %d virtual-outgoing-args", value);
+ 	      else if (value == VIRTUAL_CFA_REGNUM)
+ 		fprintf (outfile, " %d virtual-cfa", value);
+ 	      else
+ 		fprintf (outfile, " %d virtual-reg-%d", value,
+ 			 value-FIRST_VIRTUAL_REGISTER);
  	    }
  	  else if (flag_dump_unnumbered
  		   && (is_insn || GET_CODE (in_rtx) == NOTE))

-- 
Michael Meissner, Cygnus Solutions
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886
email: meissner@cygnus.com	phone: 978-486-9304	fax: 978-692-4482


More information about the Gcc-patches mailing list