Article View: gnu.gcc.bug
Article #1602gcc 2.3.3's combine.c and BYTE_LOADS_SIGN_EXTEND
From: Holger Teutsch
Date: Thu, 07 Jan 1993 17:50
Date: Thu, 07 Jan 1993 17:50
46 lines
2484 bytes
2484 bytes
Im currently working on a port of gcc 2.3.3 to Intergraph's clipper
processor. This processors uses BYTE_LOADS_SIGN_EXTEND.
Combine.c replaces 'subregs' by 'zero_extend' for BYTE_LOADS_ZERO_EXTEND.
I think 'parallel' code for BYTE_LOADS_SIGN_EXTEND must be added to combine.c.
#ifdef BYTE_LOADS_ZERO_EXTEND
/* If we have (set FOO (subreg:M (mem:N BAR) 0)) with
M wider than N, this would require a paradoxical subreg.
Replace the subreg with a zero_extend to avoid the reload that
would otherwise be required. */
if (GET_CODE (SET_SRC (x)) == SUBREG
&& subreg_lowpart_p (SET_SRC (x))
&& SUBREG_WORD (SET_SRC (x)) == 0
&& (GET_MODE_SIZE (GET_MODE (SET_SRC (x)))
> GET_MODE_SIZE (GET_MODE (SUBREG_REG (SET_SRC (x)))))
&& GET_CODE (SUBREG_REG (SET_SRC (x))) == MEM)
SUBST (SET_SRC (x), gen_rtx_combine (ZERO_EXTEND,
GET_MODE (SET_SRC (x)),
XEXP (SET_SRC (x), 0)));
#endif
/*** added by me ***/
#ifdef BYTE_LOADS_SIGN_EXTEND
/* If we have (set FOO (subreg:M (mem:N BAR) 0)) with
M wider than N, this would require a paradoxical subreg.
Replace the subreg with a sign_extend to avoid the reload that
would otherwise be required. */
if (GET_CODE (SET_SRC (x)) == SUBREG
&& subreg_lowpart_p (SET_SRC (x))
&& SUBREG_WORD (SET_SRC (x)) == 0
&& (GET_MODE_SIZE (GET_MODE (SET_SRC (x)))
> GET_MODE_SIZE (GET_MODE (SUBREG_REG (SET_SRC (x)))))
&& GET_CODE (SUBREG_REG (SET_SRC (x))) == MEM)
SUBST (SET_SRC (x), gen_rtx_combine (SIGN_EXTEND,
GET_MODE (SET_SRC (x)),
XEXP (SET_SRC (x), 0)));
#endif
- Holger
--------------------------------------------------------------------------------
Holger Teutsch, Degussa AG, Abt. IW-AC, Weissfrauenstr.9, D-6000 Frankfurt 11
Tel: +4969218-2316 E-Mail : teutsch@ffm-iw.Degussa.DE
Fax: -2616 VMS PSI-Mail : 4569002366::TEUTSCH
Technical Details
Message-ID:
<00966434.4AD8D640.3935@sirius.ffm-iw.Degussa.DE>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!sirius.ffm-iw.DEgussa.DE!teutschShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!sirius.ffm-iw.DEgussa.DE!teutsch From: teutsch@sirius.ffm-iw.DEgussa.DE (Holger Teutsch) Subject: gcc 2.3.3's combine.c and BYTE_LOADS_SIGN_EXTEND Message-ID: <00966434.4AD8D640.3935@sirius.ffm-iw.Degussa.DE> Sender: gnulists@ai.mit.edu Reply-To: teutsch@star.ffm-iw.degussa.de Organization: GNUs Not Usenet Distribution: gnu Date: Thu, 7 Jan 1993 17:50:26 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 47