From e16bddab0c20b30bbf23d829c42abb91898457da Mon Sep 17 00:00:00 2001 From: kazu Date: Mon, 28 Nov 2005 17:01:21 +0000 Subject: * config/m68k/m68k.c (notice_update_cc): Use SET_DEST and SET_SRC instead of XEXP where appropriate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107605 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/m68k/m68k.c | 17 ++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1dd5299619c..2cd58cfe299 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-11-28 Kazu Hirata + + * config/m68k/m68k.c (notice_update_cc): Use SET_DEST and + SET_SRC instead of XEXP where appropriate. + 2005-11-28 Joseph S. Myers * config/fp-bit.c (isnan, isinf, pack_d, unpack_d): Use diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index b4b276f3a06..2462bb15dc2 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -2367,23 +2367,26 @@ notice_update_cc (rtx exp, rtx insn) || GET_CODE (SET_SRC (exp)) == MEM || GET_CODE (SET_SRC (exp)) == CONST_DOUBLE)) CC_STATUS_INIT; - else if (XEXP (exp, 0) != pc_rtx) + else if (SET_DEST (exp) != pc_rtx) { cc_status.flags = 0; - cc_status.value1 = XEXP (exp, 0); - cc_status.value2 = XEXP (exp, 1); + cc_status.value1 = SET_DEST (exp); + cc_status.value2 = SET_SRC (exp); } } else if (GET_CODE (exp) == PARALLEL && GET_CODE (XVECEXP (exp, 0, 0)) == SET) { - if (ADDRESS_REG_P (XEXP (XVECEXP (exp, 0, 0), 0))) + rtx dest = SET_DEST (XVECEXP (exp, 0, 0)); + rtx src = SET_SRC (XVECEXP (exp, 0, 0)); + + if (ADDRESS_REG_P (dest)) CC_STATUS_INIT; - else if (XEXP (XVECEXP (exp, 0, 0), 0) != pc_rtx) + else if (dest != pc_rtx) { cc_status.flags = 0; - cc_status.value1 = XEXP (XVECEXP (exp, 0, 0), 0); - cc_status.value2 = XEXP (XVECEXP (exp, 0, 0), 1); + cc_status.value1 = dest; + cc_status.value2 = src; } } else -- cgit v1.2.1