public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] Fix minor CC0 removal fallout on cr16
@ 2021-05-05 13:52 Jeff Law
  2021-05-21 20:31 ` H.J. Lu
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Law @ 2021-05-05 13:52 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 177 bytes --]


cr16 failed to build due to remnants of CC0 support (NOTICE_UPDATE_CC).  
This removes the macro and obvious bits necessary to support it.  
Committed to the trunk.


Jeff



[-- Attachment #2: cr16.patch --]
[-- Type: text/plain, Size: 2542 bytes --]

commit 14cf6aab8578132ec89ccb46e69899ae6008ff63
Author: Jeff Law <jlaw@tachyum.com>
Date:   Wed May 5 07:49:28 2021 -0600

    Remove NOTICE_UPDATE_CC remnants on cr16
    
    gcc
            * config/cr16/cr16.h (NOTICE_UPDATE_CC): Remove.
            * config/cr16/cr16.c (notice_update_cc): Remove.
            * config/cr16/cr16-protos.h (notice_update_cc): Remove.

diff --git a/gcc/config/cr16/cr16-protos.h b/gcc/config/cr16/cr16-protos.h
index 32f54e0936e..8580dfef716 100644
--- a/gcc/config/cr16/cr16-protos.h
+++ b/gcc/config/cr16/cr16-protos.h
@@ -67,7 +67,6 @@ enum cr16_addrtype
   CR16_ABSOLUTE
 };
 
-extern void notice_update_cc (rtx);
 extern int cr16_operand_bit_pos (int val, int bitval);
 extern void cr16_decompose_const (rtx x, int *code,
 				  enum data_model_type *data,
diff --git a/gcc/config/cr16/cr16.c b/gcc/config/cr16/cr16.c
index 079706f7a91..6c81c399f70 100644
--- a/gcc/config/cr16/cr16.c
+++ b/gcc/config/cr16/cr16.c
@@ -2095,37 +2095,6 @@ cr16_legitimate_constant_p (machine_mode mode ATTRIBUTE_UNUSED,
   return 1;
 }
 
-void
-notice_update_cc (rtx exp)
-{
-  if (GET_CODE (exp) == SET)
-    {
-      /* Jumps do not alter the cc's.  */
-      if (SET_DEST (exp) == pc_rtx)
-	return;
-
-      /* Moving register or memory into a register:
-         it doesn't alter the cc's, but it might invalidate
-         the RTX's which we remember the cc's came from.
-         (Note that moving a constant 0 or 1 MAY set the cc's).  */
-      if (REG_P (SET_DEST (exp))
-	  && (REG_P (SET_SRC (exp)) || GET_CODE (SET_SRC (exp)) == MEM))
-	{
-	  return;
-	}
-
-      /* Moving register into memory doesn't alter the cc's.
-         It may invalidate the RTX's which we remember the cc's came from.  */
-      if (GET_CODE (SET_DEST (exp)) == MEM && REG_P (SET_SRC (exp)))
-	{
-	  return;
-	}
-    }
-
-  CC_STATUS_INIT;
-  return;
-}
-
 static scalar_int_mode
 cr16_unwind_word_mode (void)
 {
diff --git a/gcc/config/cr16/cr16.h b/gcc/config/cr16/cr16.h
index ae90610ad80..4ce9e81b0e3 100644
--- a/gcc/config/cr16/cr16.h
+++ b/gcc/config/cr16/cr16.h
@@ -195,9 +195,6 @@ while (0)
   (targetm.hard_regno_nregs (REGNO,                                          \
 			     GET_MODE_WIDER_MODE (word_mode).require ()) == 1)
 
-#define NOTICE_UPDATE_CC(EXP, INSN) \
-   notice_update_cc ((EXP))
-
 /* Interrupt functions can only use registers that have already been 
    saved by the prologue, even if they would normally be call-clobbered 
    Check if sizes are same and then check if it is possible to rename.  */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [committed] Fix minor CC0 removal fallout on cr16
  2021-05-05 13:52 [committed] Fix minor CC0 removal fallout on cr16 Jeff Law
@ 2021-05-21 20:31 ` H.J. Lu
  0 siblings, 0 replies; 2+ messages in thread
From: H.J. Lu @ 2021-05-21 20:31 UTC (permalink / raw)
  To: Jeff Law; +Cc: GCC Patches

On Wed, May 5, 2021 at 8:17 AM Jeff Law via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
>
> cr16 failed to build due to remnants of CC0 support (NOTICE_UPDATE_CC).
> This removes the macro and obvious bits necessary to support it.
> Committed to the trunk.
>

cr16-elf won't build:

/export/gnu/import/git/sources/gcc/gcc/config/cr16/cr16.md:797:16:
error: unknown rtx code `cc0'
/export/gnu/import/git/sources/gcc/gcc/config/cr16/cr16.md:797:19:
note: following context is `))]'
make[2]: *** [Makefile:2547: s-preds] Error 1

-- 
H.J.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-21 20:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-05 13:52 [committed] Fix minor CC0 removal fallout on cr16 Jeff Law
2021-05-21 20:31 ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).