home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / gnu / gcc / bug / 3134 < prev    next >
Encoding:
Text File  |  1993-01-08  |  2.4 KB  |  61 lines

  1. Newsgroups: gnu.gcc.bug
  2. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!sirius.ffm-iw.DEgussa.DE!teutsch
  3. From: teutsch@sirius.ffm-iw.DEgussa.DE (Holger Teutsch)
  4. Subject: gcc 2.3.3's combine.c and BYTE_LOADS_SIGN_EXTEND
  5. Message-ID: <00966434.4AD8D640.3935@sirius.ffm-iw.Degussa.DE>
  6. Sender: gnulists@ai.mit.edu
  7. Reply-To: teutsch@star.ffm-iw.degussa.de
  8. Organization: GNUs Not Usenet
  9. Distribution: gnu
  10. Date: Thu, 7 Jan 1993 17:50:26 GMT
  11. Approved: bug-gcc@prep.ai.mit.edu
  12. Lines: 47
  13.  
  14. Im currently working on a port of gcc 2.3.3 to Intergraph's clipper
  15. processor. This processors uses BYTE_LOADS_SIGN_EXTEND.
  16. Combine.c replaces 'subregs' by 'zero_extend' for BYTE_LOADS_ZERO_EXTEND.
  17. I think 'parallel' code for BYTE_LOADS_SIGN_EXTEND must be added to combine.c.
  18.  
  19.  
  20. #ifdef BYTE_LOADS_ZERO_EXTEND
  21.       /* If we have (set FOO (subreg:M (mem:N BAR) 0)) with
  22.      M wider than N, this would require a paradoxical subreg.
  23.      Replace the subreg with a zero_extend to avoid the reload that
  24.      would otherwise be required. */
  25.       if (GET_CODE (SET_SRC (x)) == SUBREG
  26.       && subreg_lowpart_p (SET_SRC (x))
  27.       && SUBREG_WORD (SET_SRC (x)) == 0
  28.       && (GET_MODE_SIZE (GET_MODE (SET_SRC (x)))
  29.           > GET_MODE_SIZE (GET_MODE (SUBREG_REG (SET_SRC (x)))))
  30.       && GET_CODE (SUBREG_REG (SET_SRC (x))) == MEM)
  31.     SUBST (SET_SRC (x), gen_rtx_combine (ZERO_EXTEND,
  32.                          GET_MODE (SET_SRC (x)),
  33.                          XEXP (SET_SRC (x), 0)));
  34. #endif
  35.  
  36. /*** added by me ***/
  37. #ifdef BYTE_LOADS_SIGN_EXTEND
  38.       /* If we have (set FOO (subreg:M (mem:N BAR) 0)) with
  39.      M wider than N, this would require a paradoxical subreg.
  40.      Replace the subreg with a sign_extend to avoid the reload that
  41.      would otherwise be required. */
  42.       if (GET_CODE (SET_SRC (x)) == SUBREG
  43.       && subreg_lowpart_p (SET_SRC (x))
  44.       && SUBREG_WORD (SET_SRC (x)) == 0
  45.       && (GET_MODE_SIZE (GET_MODE (SET_SRC (x)))
  46.           > GET_MODE_SIZE (GET_MODE (SUBREG_REG (SET_SRC (x)))))
  47.       && GET_CODE (SUBREG_REG (SET_SRC (x))) == MEM)
  48.     SUBST (SET_SRC (x), gen_rtx_combine (SIGN_EXTEND,
  49.                          GET_MODE (SET_SRC (x)),
  50.                          XEXP (SET_SRC (x), 0)));
  51. #endif
  52.  
  53. - Holger
  54.  
  55. --------------------------------------------------------------------------------
  56. Holger Teutsch, Degussa AG, Abt. IW-AC, Weissfrauenstr.9, D-6000 Frankfurt 11
  57.  
  58. Tel: +4969218-2316                E-Mail       : teutsch@ffm-iw.Degussa.DE
  59. Fax:         -2616                VMS PSI-Mail : 4569002366::TEUTSCH
  60.  
  61.