Subject: Yet another bug for ns32k
To: Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
From: Matthias Pfaller <leo@marco.de>
List: port-pc532
Date: 09/05/1994 11:00:26
Hi Richard,

my last fix introduced a new bug :-(. Here comes a fix.

	Matthias

Mon Sep  5 10:55:34 1994  Matthias Pfaller  (leo@marco.de)
	* ns32k.md (stackadjust/push peepholes): For the adjust/push/push
	pattern one offset was wrong. Don't use addr for register and
	and MEM refs.

*** 1.3	1994/09/04 15:59:26
--- ns32k.md	1994/09/04 09:32:03
***************
*** 2702,2708 ****
    if (GET_CODE (operands[1]) == CONST_INT)
  	output_asm_insn (output_move_dconst (INTVAL (operands[1]), \"%$%1,0(sp)\"),
  			 operands);
!   else if (address_operand (operands[1], SImode))
  	output_asm_insn (\"addr %a1,0(sp)\", operands);
    else
  	output_asm_insn (\"movd %1,0(sp)\", operands);
--- 2702,2710 ----
    if (GET_CODE (operands[1]) == CONST_INT)
  	output_asm_insn (output_move_dconst (INTVAL (operands[1]), \"%$%1,0(sp)\"),
  			 operands);
!   else if (GET_CODE (operands[1]) != REG
! 	   && GET_CODE (operands[1]) != MEM
! 	   && address_operand (operands[1], SImode))
  	output_asm_insn (\"addr %a1,0(sp)\", operands);
    else
  	output_asm_insn (\"movd %1,0(sp)\", operands);
***************
*** 2724,2738 ****
    if (GET_CODE (operands[1]) == CONST_INT)
  	output_asm_insn (output_move_dconst (INTVAL (operands[1]), \"%$%1,4(sp)\"),
  			 operands);
!   else if (address_operand (operands[1], SImode))
! 	output_asm_insn (\"addr %a1,0(sp)\", operands);
    else
  	output_asm_insn (\"movd %1,4(sp)\", operands);
  
    if (GET_CODE (operands[3]) == CONST_INT)
  	output_asm_insn (output_move_dconst (INTVAL (operands[3]), \"%$%3,0(sp)\"),
  			 operands);
!   else if (address_operand (operands[3], SImode))
  	output_asm_insn (\"addr %a3,0(sp)\", operands);
    else
  	output_asm_insn (\"movd %3,0(sp)\", operands);
--- 2726,2744 ----
    if (GET_CODE (operands[1]) == CONST_INT)
  	output_asm_insn (output_move_dconst (INTVAL (operands[1]), \"%$%1,4(sp)\"),
  			 operands);
!   else if (GET_CODE (operands[1]) != REG
! 	   && GET_CODE (operands[1]) != MEM
! 	   && address_operand (operands[1], SImode))
! 	output_asm_insn (\"addr %a1,4(sp)\", operands);
    else
  	output_asm_insn (\"movd %1,4(sp)\", operands);
  
    if (GET_CODE (operands[3]) == CONST_INT)
  	output_asm_insn (output_move_dconst (INTVAL (operands[3]), \"%$%3,0(sp)\"),
  			 operands);
!   else if (GET_CODE (operands[3]) != REG
! 	   && GET_CODE (operands[3]) != MEM
! 	   && address_operand (operands[3], SImode))
  	output_asm_insn (\"addr %a3,0(sp)\", operands);
    else
  	output_asm_insn (\"movd %3,0(sp)\", operands);


------------------------------------------------------------------------------