This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
more enable-checking patches
- To: gcc-patches at gcc dot gnu dot org
- Subject: more enable-checking patches
- From: Alasdair Baird <alasdair at wildcat dot demon dot co dot uk>
- Date: Sat, 4 Sep 1999 11:59:18 +0100 (BST)
These patches fix up a couple of uses of SET_DEST and SUBREG_REG where
the more appropriate thing to do, considering their arguments, is to
use XEXP. This showed up trying to bootstrap using --enable-checking.
It also fixes up a usage comment in sched_analyze_1 which used to
indicate it only got passed SET and CLOBBER; looking at the code it
is apparent that it also gets passed PRE/POST_INC/DEC rtx too.
Alasdair.
Sat Sep 4 11:52:34 BST 1999 Alasdair Baird <alasdair@wildcat.demon.co.uk>
* flow.c (insn_dead_p): Use XEXP rather than SUBREG_REG.
* haifa-sched.c (sched_analyze_1): Use XEXP rather than SUBREG_REG
and SET_DEST. Update comment.
*** flow.c-orig Sat Sep 4 01:37:42 1999
--- flow.c Sat Sep 4 11:21:09 1999
*************** insn_dead_p (x, needed, call_ok, notes)
*** 2966,2972 ****
while (GET_CODE (r) == SUBREG || GET_CODE (r) == STRICT_LOW_PART
|| GET_CODE (r) == ZERO_EXTRACT)
! r = SUBREG_REG (r);
if (GET_CODE (r) == REG)
{
--- 2966,2972 ----
while (GET_CODE (r) == SUBREG || GET_CODE (r) == STRICT_LOW_PART
|| GET_CODE (r) == ZERO_EXTRACT)
! r = XEXP (r, 0);
if (GET_CODE (r) == REG)
{
*** haifa-sched.c-orig Sat Sep 4 01:37:42 1999
--- haifa-sched.c Sat Sep 4 11:19:26 1999
*************** flush_pending_lists (insn, only_write)
*** 3230,3237 ****
last_pending_memory_flush = alloc_INSN_LIST (insn, NULL_RTX);
}
! /* Analyze a single SET or CLOBBER rtx, X, creating all dependencies generated
! by the write to the destination of X, and reads of everything mentioned. */
static void
sched_analyze_1 (x, insn)
--- 3230,3238 ----
last_pending_memory_flush = alloc_INSN_LIST (insn, NULL_RTX);
}
! /* Analyze a single SET, CLOBBER, PRE_DEC, POST_DEC, PRE_INC or POST_INC
! rtx, X, creating all dependencies generated by the write to the
! destination of X, and reads of everything mentioned. */
static void
sched_analyze_1 (x, insn)
*************** sched_analyze_1 (x, insn)
*** 3239,3245 ****
rtx insn;
{
register int regno;
! register rtx dest = SET_DEST (x);
enum rtx_code code = GET_CODE (x);
if (dest == 0)
--- 3240,3246 ----
rtx insn;
{
register int regno;
! register rtx dest = XEXP (x, 0);
enum rtx_code code = GET_CODE (x);
if (dest == 0)
*************** sched_analyze_1 (x, insn)
*** 3265,3271 ****
sched_analyze_2 (XEXP (dest, 1), insn);
sched_analyze_2 (XEXP (dest, 2), insn);
}
! dest = SUBREG_REG (dest);
}
if (GET_CODE (dest) == REG)
--- 3266,3272 ----
sched_analyze_2 (XEXP (dest, 1), insn);
sched_analyze_2 (XEXP (dest, 2), insn);
}
! dest = XEXP (dest, 0);
}
if (GET_CODE (dest) == REG)