Another movdf_hardfloat32 patch

Jeffrey A Law law@cygnus.com
Tue Jun 22 01:02:00 GMT 1999


A LO_SUM is not an offsettable address, however, it is also not an indexed
address, so using the indexed loads/stores is the wrong and the assembler
will complain.

This patch fixes the problem.  libg++ builds & checks on ppc-linux again.

	* rs6000.md (movdf_hardfloat32): Use %X instead of always emitting
	'x' when handling non-offsettable addresses.

Index: rs6000.md
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.55.4.3
diff -c -3 -p -r1.55.4.3 rs6000.md
*** rs6000.md	1999/06/21 21:20:52	1.55.4.3
--- rs6000.md	1999/06/22 07:57:28
***************
*** 6353,6367 ****
  				 operands[1], 0))
  	    {
  	      output_asm_insn (\"{cal|la} %0,4(%0)\", &addreg);
! 	      output_asm_insn (\"{lx|lwzx} %L0,%1\", operands);
  	      output_asm_insn (\"{cal|la} %0,-4(%0)\", &addreg);
! 	      return \"{lx|lwzx} %0,%1\";
  	    }
  	  else
  	    {
! 	      output_asm_insn (\"{lx|lwzx} %0,%1\", operands);
  	      output_asm_insn (\"{cal|la} %0,4(%0)\", &addreg);
! 	      output_asm_insn (\"{lx|lwzx} %L0,%1\", operands);
  	      output_asm_insn (\"{cal|la} %0,-4(%0)\", &addreg);
  	      return \"\";
  	    }
--- 6353,6367 ----
  				 operands[1], 0))
  	    {
  	      output_asm_insn (\"{cal|la} %0,4(%0)\", &addreg);
! 	      output_asm_insn (\"{l%X1|lwz%X1} %L0,%1\", operands);
  	      output_asm_insn (\"{cal|la} %0,-4(%0)\", &addreg);
! 	      return \"{l%X1|lwz%X1} %0,%1\";
  	    }
  	  else
  	    {
! 	      output_asm_insn (\"{l%X1|lwz%X1} %0,%1\", operands);
  	      output_asm_insn (\"{cal|la} %0,4(%0)\", &addreg);
! 	      output_asm_insn (\"{l%X1|lwz%X1} %L0,%1\", operands);
  	      output_asm_insn (\"{cal|la} %0,-4(%0)\", &addreg);
  	      return \"\";
  	    }
***************
*** 6378,6386 ****
  	    abort ();
  
  	  addreg = find_addr_reg (XEXP (operands[0], 0));
! 	  output_asm_insn (\"{stx|stwx} %1,%0\", operands);
  	  output_asm_insn (\"{cal|la} %0,4(%0)\", &addreg);
! 	  output_asm_insn (\"{stx|stwx} %L1,%0\", operands);
  	  output_asm_insn (\"{cal|la} %0,-4(%0)\", &addreg);
  	  return \"\";
  	}
--- 6378,6386 ----
  	    abort ();
  
  	  addreg = find_addr_reg (XEXP (operands[0], 0));
! 	  output_asm_insn (\"{st%X0|stw%X0} %1,%0\", operands);
  	  output_asm_insn (\"{cal|la} %0,4(%0)\", &addreg);
! 	  output_asm_insn (\"{st%X0|stw%X0} %L1,%0\", operands);
  	  output_asm_insn (\"{cal|la} %0,-4(%0)\", &addreg);
  	  return \"\";
  	}







More information about the Gcc-patches mailing list