Article View: gnu.gcc.bug
Article #1698find_reloads forces consts to mem with wrong mode
From: Rob McMahon
Date: Sun, 25 Sep 1988 18:32
Date: Sun, 25 Sep 1988 18:32
37 lines
1739 bytes
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
Technical Details
Message-ID:
<53@titania.warwick.ac.uk>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!uunet!axion!ist!icdoc!ukc!warwick!cudcvShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!uunet!axion!ist!icdoc!ukc!warwick!cudcv From: cudcv@warwick.ac.uk (Rob McMahon) Newsgroups: gnu.gcc.bug Subject: find_reloads forces consts to mem with wrong mode Message-ID: <53@titania.warwick.ac.uk> Date: 25 Sep 88 18:32:17 GMT Reply-To: cudcv@warwick.ac.uk (Rob McMahon) Organization: Computing Services, Warwick University, UK Lines: 37