Please, approve the patch for better code generation on H8/300H

Jeffrey A Law law@hurl.cygnus.com
Sun Feb 28 01:12:00 GMT 1999


[ Note, I cc'd egcs-patches on this message so that the patch & approval
  is properly archived. ]

  
  
  In message <199902262053.PAA17238@to.cygnus.com>you write:
  > 
  > 
  >   Jeff, please approve the patch for more compact code for H8/300h.
  > This patch generates more compact code when we place data more one
  > byte size in 8-bit area.  In this case, we will use 16-bit addressing
  > instead of 24-bit addressing.
  > 
  > Vlad
  > 
  > 
  > Fri Feb 26 15:45:25 1999  Vladimir N. Makarov  <vmakarov@cygnus.com>
  > 
  > 	* config/h8300/h8300.c (print_operand):  Use 16 bit addressing
  > 	when the data in 8-bit area and can not be addressed by 8-bit.
This is fine.  Thanks!



  > Index: config/h8300/h8300.c
  > ===================================================================
  > RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/h8300/h8300.c,v
  > retrieving revision 1.12
  > diff -p -c -r1.12 h8300.c
  > *** h8300.c	1999/01/19 12:08:34	1.12
  > --- h8300.c	1999/02/26 20:49:36
  > *************** print_operand (file, x, code)
  > *** 1414,1426 ****
  >   	  fprintf (file, "@");
  >   	  output_address (XEXP (x, 0));
  >   
  > ! 	  /* If this is an 'R' operand (reference into the 8-bit area),
  > ! 	     then specify a symbolic address as "foo:8".  */
  > !  	  if (code == 'R'
  > ! 	      && GET_CODE (XEXP (x, 0)) == SYMBOL_REF
  >   	      && SYMBOL_REF_FLAG (XEXP (x, 0)))
  > ! 	    fprintf (file, ":8");
  > ! 	  if (GET_CODE (XEXP (x, 0)) == SYMBOL_REF
  >   	      && TINY_DATA_NAME_P (XSTR (XEXP (x, 0), 0)))
  >   	    fprintf (file, ":16");
  >   	  break;
  > --- 1414,1427 ----
  >   	  fprintf (file, "@");
  >   	  output_address (XEXP (x, 0));
  >   
  > ! 	  /* If this is an 'R' operand (reference into the 8-bit
  > ! 	     area), then specify a symbolic address as "foo:8",
  > ! 	     otherwise if operand is still in eight bit section, use
  > ! 	     "foo:16".  */
  > !  	  if (GET_CODE (XEXP (x, 0)) == SYMBOL_REF
  >   	      && SYMBOL_REF_FLAG (XEXP (x, 0)))
  > ! 	    fprintf (file, (code == 'R' ? ":8" : ":16"));
  > ! 	  else if (GET_CODE (XEXP (x, 0)) == SYMBOL_REF
  >   	      && TINY_DATA_NAME_P (XSTR (XEXP (x, 0), 0)))
  >   	    fprintf (file, ":16");
  >   	  break;


More information about the Gcc-patches mailing list