Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Holger Teutsch
Thu, 07 Jan 1993 17:50
gcc 2.3.3's combine.c and BYTE_LOADS_SIGN_EXTEND
Author: 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
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