🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Rob McMahon Sun, 25 Sep 1988 18:32
find_reloads forces consts to mem with wrong mode
#1698
Author: Rob McMahon
Date: Sun, 25 Sep 1988 18:32
37 lines
1739 bytes
GCC 1.28, Gould PN6000

When find_reloads calls force_const_mem to change an integer constant into a
memory reference, it uses the mode of the constant, which is usually VOIDmode,
rather than the mode the instruction wants.  As a result the memory reference
points to the wrong part of the constant.

This seems to fix the problem:

RCS file: reload.c,v
retrieving revision 1.9.1.2
diff -c -r1.9.1.2 reload.c
*** /tmp/,RCSt1a03369	Sun Sep 25 19:28:12 1988
--- reload.c	Sun Sep 25 00:55:19 1988
***************
*** 1539,1545 ****
  				    (enum reg_class) goal_alternative[i])
  	    == NO_REGS))
        {
! 	enum machine_mode mode = GET_MODE (recog_operand[i]);
  	*recog_operand_loc[i] = recog_operand[i]
  	  = (GET_CODE (recog_operand[i]) == CONST_DOUBLE
  	     ? force_const_double_mem (recog_operand[i])
--- 1539,1545 ----
  				    (enum reg_class) goal_alternative[i])
  	    == NO_REGS))
        {
! 	enum machine_mode mode = operand_mode[i];
  	*recog_operand_loc[i] = recog_operand[i]
  	  = (GET_CODE (recog_operand[i]) == CONST_DOUBLE
  	     ? force_const_double_mem (recog_operand[i])

Rob
-- 
UUCP:   ...!mcvax!ukc!warwick!cudcv	PHONE:  +44 203 523037
JANET:  cudcv@uk.ac.warwick             ARPA:   cudcv@warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads