🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #680

inline function problems?

#680
From: Michael Tiemann
Date: Tue, 05 Dec 1989 18:33
79 lines
2989 bytes
Here are diffs against the 1.36.2- version of integrate.c on
interviews.  They fix problems compiling painter.cc on m68k, and
probably the MIPS machine.  There is also one patch which applies to
all machines.

arkesden% diff -c2 old-g++/integrate.c src-g++/integrate.c
*** old-g++/integrate.c	Mon Nov 27 10:55:14 1989
--- src-g++/integrate.c	Tue Dec  5 10:24:52 1989
***************
*** 142,146 ****
  
    /* If its not even close, don't even look.  */
!   if (get_max_uid () > 3 * max_insns)
      return "function too large to be inline";
  
--- 142,146 ----
  
    /* If its not even close, don't even look.  */
!   if (get_max_uid () > 4 * max_insns)
      return "function too large to be inline";
  
***************
*** 1606,1610 ****
  			  copy_rtx_and_substitute (XEXP (orig, 0)),
  			  copy_rtx_and_substitute (XEXP (orig, 1)));
! 	  if (memory_address_p (mode, orig))
  	    temp = memory_address (mode, temp);
  	}
--- 1606,1620 ----
  			  copy_rtx_and_substitute (XEXP (orig, 0)),
  			  copy_rtx_and_substitute (XEXP (orig, 1)));
! 
! 	  if (used_const_equiv)
! 	    {
! 	      if (GET_CODE (XEXP (temp, 0)) == CONST_INT)
! 		temp = plus_constant (XEXP (temp, 1), INTVAL (XEXP (temp, 0)));
! 	      else if (GET_CODE (XEXP (temp, 1)) == CONST_INT)
! 		temp = plus_constant (XEXP (temp, 0), INTVAL (XEXP (temp, 1)));
! 	      else if (memory_address_p (mode, orig))
! 		temp = gen_rtx (CONST, mode, temp);
! 	    }
! 	  else if (memory_address_p (mode, orig))
  	    temp = memory_address (mode, temp);
  	}
***************
*** 1611,1614 ****
--- 1621,1638 ----
        return temp;
  
+     case MULT:
+       temp = gen_rtx (MULT, GET_MODE (orig),
+ 		      copy_rtx_and_substitute (XEXP (orig, 0)),
+ 		      copy_rtx_and_substitute (XEXP (orig, 1)));
+ 
+       if (used_const_equiv)
+ 	{
+ 	  if (GET_CODE (XEXP (temp, 0)) == CONST_INT
+ 	      && GET_CODE (XEXP (temp, 1)) == CONST_INT)
+ 	    temp = gen_rtx (CONST_INT, VOIDmode,
+ 			    INTVAL (XEXP (temp, 0)) * INTVAL (XEXP (temp, 1)));
+ 	}
+       return temp;
+ 
      case MEM:
        /* Take care of easiest case here.  */
***************
*** 2048,2052 ****
  			 followed by a BARRIER, so that jump optimization
  			 will know what to do.  */
! 		      emit_jump (copy);
  		      return NEXT_INSN (insn);
  		    }
--- 2072,2076 ----
  			 followed by a BARRIER, so that jump optimization
  			 will know what to do.  */
! 		      emit_jump (XEXP (copy, 0));
  		      return NEXT_INSN (insn);
  		    }
arkesden% 
Technical Details
Message-ID: <8912051833.AA02340@arkesden.sun.com>
Path: arc1-ca.pugleaf.net!utzoo!telly!philmtl!uunet!tut.cis.ohio-state.edu!arkesden.eng.sun.com!tiemann

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!philmtl!uunet!tut.cis.ohio-state.edu!arkesden.eng.sun.com!tiemann
From: tiemann@arkesden.eng.sun.com (Michael Tiemann)
Newsgroups: gnu.g++.bug
Subject: inline function problems?
Message-ID: <8912051833.AA02340@arkesden.sun.com>
Date: 5 Dec 89 18:33:00 GMT
Sender: sheu-m@tut.cis.ohio-state.edu
Reply-To: tiemann@sun.com
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 79