⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 999-cvs-updates.patch

📁 這是一個實時嵌入式作業系統 實作了MCS51 ARM等MCU
💻 PATCH
📖 第 1 页 / 共 5 页
字号:
+    subregs_of_mode = htab_create (100, som_hash, som_eq, free);+}++void+record_subregs_of_mode (subreg)+     rtx subreg;+{+  struct subregs_of_mode_node dummy, *node;+  enum machine_mode mode;+  unsigned int regno;+  void **slot;++  if (!REG_P (SUBREG_REG (subreg)))+    return;++  regno = REGNO (SUBREG_REG (subreg));+  mode = GET_MODE (subreg);++  if (regno < FIRST_PSEUDO_REGISTER)+    return;++  dummy.block = regno & -8;+  slot = htab_find_slot_with_hash (subregs_of_mode, &dummy,+				   dummy.block, INSERT);+  node = *slot;+  if (node == NULL)+    {+      node = xcalloc (1, sizeof (*node));+      node->block = regno & -8;+      *slot = node;+    }++  node->modes[mode] |= 1 << (regno & 7);+}+ /* Set bits in *USED which correspond to registers which can't change    their mode from FROM to any mode in which REGNO was encountered.  */ @@ -2623,42 +2705,50 @@      enum machine_mode from;      unsigned int regno; {+  struct subregs_of_mode_node dummy, *node;   enum machine_mode to;-  int n, i;-  int start = regno * MAX_MACHINE_MODE;+  unsigned char mask;+  unsigned int i; -  EXECUTE_IF_SET_IN_BITMAP (&subregs_of_mode, start, n,-    if (n >= MAX_MACHINE_MODE + start)-      return;-    to = n - start;-    for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)-      if (! TEST_HARD_REG_BIT (*used, i)-	  && REG_CANNOT_CHANGE_MODE_P (i, from, to))-	SET_HARD_REG_BIT (*used, i);-  );+  dummy.block = regno & -8;+  node = htab_find_with_hash (subregs_of_mode, &dummy, dummy.block);+  if (node == NULL)+    return;++  mask = 1 << (regno & 7);+  for (to = VOIDmode; to < NUM_MACHINE_MODES; to++)+    if (node->modes[to] & mask)+      for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)+	if (!TEST_HARD_REG_BIT (*used, i)+	    && REG_CANNOT_CHANGE_MODE_P (i, from, to))+	  SET_HARD_REG_BIT (*used, i); }  /* Return 1 if REGNO has had an invalid mode change in CLASS from FROM    mode.  */  bool-invalid_mode_change_p (regno, class, from_mode)+invalid_mode_change_p (regno, class, from)      unsigned int regno;-      enum reg_class class;-     enum machine_mode from_mode;+     enum reg_class class;+     enum machine_mode from; {-  enum machine_mode to_mode;-  int n;-  int start = regno * MAX_MACHINE_MODE;--  EXECUTE_IF_SET_IN_BITMAP (&subregs_of_mode, start, n,-    if (n >= MAX_MACHINE_MODE + start)-      return 0;-    to_mode = n - start;-    if (CANNOT_CHANGE_MODE_CLASS (from_mode, to_mode, class))-      return 1;-  );-  return 0;+  struct subregs_of_mode_node dummy, *node;+  enum machine_mode to;+  unsigned char mask;++  dummy.block = regno & -8;+  node = htab_find_with_hash (subregs_of_mode, &dummy, dummy.block);+  if (node == NULL)+    return false;++  mask = 1 << (regno & 7);+  for (to = VOIDmode; to < NUM_MACHINE_MODES; to++)+    if (node->modes[to] & mask)+      if (CANNOT_CHANGE_MODE_CLASS (from, to, class))+	return true;++  return false; } #endif /* CANNOT_CHANGE_MODE_CLASS */ Index: gcc/regs.h===================================================================RCS file: /cvs/gcc/gcc/gcc/regs.h,vretrieving revision 1.26.4.1retrieving revision 1.26.4.3diff -u -r1.26.4.1 -r1.26.4.3--- gcc/gcc/regs.h	3 Mar 2003 11:00:15 -0000	1.26.4.1+++ gcc/gcc/regs.h	4 Dec 2004 00:36:38 -0000	1.26.4.3@@ -49,6 +49,9 @@   int first_uid;		/* UID of first insn to use (REG n) */   int last_uid;			/* UID of last insn to use (REG n) */   int last_note_uid;		/* UID of last note to use (REG n) */+				/* See the comment in reg_scan_mark_refs on+				   the relationship between last_uid and+				   last_note_uid.  */  				/* fields set by reg_scan & flow_analysis */   int sets;			/* # of times (REG n) is set */@@ -66,8 +69,6 @@  extern varray_type reg_n_info; -extern bitmap_head subregs_of_mode;- /* Indexed by n, gives number of times (REG n) is used or set.  */  #define REG_N_REFS(N) (VARRAY_REG (reg_n_info, N)->refs)Index: gcc/reload1.c===================================================================RCS file: /cvs/gcc/gcc/gcc/reload1.c,vretrieving revision 1.366.2.11retrieving revision 1.366.2.12diff -u -r1.366.2.11 -r1.366.2.12--- gcc/gcc/reload1.c	13 Sep 2004 08:54:35 -0000	1.366.2.11+++ gcc/gcc/reload1.c	26 Nov 2004 05:08:45 -0000	1.366.2.12@@ -3389,6 +3389,16 @@   num_not_at_initial_offset = 0; } +/* Subroutine of set_initial_label_offsets called via for_each_eh_label.  */++static void set_initial_eh_label_offset PARAMS ((rtx));+static void+set_initial_eh_label_offset (label)+     rtx label;+{+  set_label_offsets (label, NULL_RTX, 1);+}+ /* Initialize the known label offsets.    Set a known offset for each forced label to be at the initial offset    of each elimination.  We do this because we assume that all@@ -3405,6 +3415,8 @@   for (x = forced_labels; x; x = XEXP (x, 1))     if (XEXP (x, 0))       set_label_offsets (XEXP (x, 0), NULL_RTX, 1);++  for_each_eh_label (set_initial_eh_label_offset); }  /* Set all elimination offsets to the known values for the code label givenIndex: gcc/rtl.h===================================================================RCS file: /cvs/gcc/gcc/gcc/rtl.h,vretrieving revision 1.375.2.8retrieving revision 1.375.2.9diff -u -r1.375.2.8 -r1.375.2.9--- gcc/gcc/rtl.h	24 Apr 2004 19:40:45 -0000	1.375.2.8+++ gcc/gcc/rtl.h	4 Dec 2004 00:36:38 -0000	1.375.2.9@@ -2120,6 +2120,8 @@ extern void reg_scan			PARAMS ((rtx, unsigned int, int)); extern void reg_scan_update		PARAMS ((rtx, rtx, unsigned int)); extern void fix_register		PARAMS ((const char *, int, int));+extern void init_subregs_of_mode	PARAMS ((void));+extern void record_subregs_of_mode	PARAMS ((rtx)); #ifdef HARD_CONST extern void cannot_change_mode_set_regs PARAMS ((HARD_REG_SET *, 						 enum machine_mode,Index: gcc/tree-inline.c===================================================================RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,vretrieving revision 1.38.2.12retrieving revision 1.38.2.13diff -u -r1.38.2.12 -r1.38.2.13--- gcc/gcc/tree-inline.c	12 Mar 2004 22:43:29 -0000	1.38.2.12+++ gcc/gcc/tree-inline.c	21 Jan 2005 10:02:12 -0000	1.38.2.13@@ -1173,7 +1173,8 @@   if (!inlinable_function_p (fn, id))     {       if (warn_inline && DECL_INLINE (fn) && !DID_INLINE_FUNC (fn)-	  && !DECL_IN_SYSTEM_HEADER (fn))+	  && !DECL_IN_SYSTEM_HEADER (fn)+	  && !lookup_attribute ("noinline", DECL_ATTRIBUTES (fn))) 	{ 	  warning_with_decl (fn, "inlining failed in call to `%s'"); 	  warning ("called from here");Index: gcc/unroll.c===================================================================RCS file: /cvs/gcc/gcc/gcc/Attic/unroll.c,vretrieving revision 1.184.2.9retrieving revision 1.184.2.10diff -u -r1.184.2.9 -r1.184.2.10--- gcc/gcc/unroll.c	17 May 2004 21:05:48 -0000	1.184.2.9+++ gcc/gcc/unroll.c	27 Nov 2004 16:59:15 -0000	1.184.2.10@@ -794,6 +794,10 @@       for (r = FIRST_PSEUDO_REGISTER; r < max_reg_before_loop; ++r) 	if (REGNO_FIRST_UID (r) > 0 && REGNO_FIRST_UID (r) < max_uid_for_loop 	    && REGNO_FIRST_LUID (r) >= copy_start_luid+	    /* See the comment in reg_scan_mark_refs on the relationship between+	       last_uid and last_note_uid.  */+	    && REGNO_LAST_UID (r) > 0 && REGNO_LAST_UID (r) < max_uid_for_loop+	    && REGNO_LAST_LUID (r) <= copy_end_luid 	    && REGNO_LAST_NOTE_UID (r) > 0 && REGNO_LAST_NOTE_UID (r) < max_uid_for_loop 	    && REGNO_LAST_NOTE_LUID (r) <= copy_end_luid) 	  {Index: gcc/unwind-dw2.c===================================================================RCS file: /cvs/gcc/gcc/gcc/unwind-dw2.c,vretrieving revision 1.22.2.9retrieving revision 1.22.2.11diff -u -r1.22.2.9 -r1.22.2.11--- gcc/gcc/unwind-dw2.c	8 May 2004 21:52:42 -0000	1.22.2.9+++ gcc/gcc/unwind-dw2.c	29 Jan 2005 11:54:24 -0000	1.22.2.11@@ -1,5 +1,5 @@ /* DWARF2 exception handling and frame unwind runtime interface routines.-   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003+   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005    Free Software Foundation, Inc.     This file is part of GCC.@@ -165,6 +165,11 @@ inline _Unwind_Word _Unwind_GetGR (struct _Unwind_Context *context, int index) {+#ifdef DWARF_ZERO_REG+  if (index == DWARF_ZERO_REG)+    return 0;+#endif+   /* This will segfault if the register hasn't been saved.  */   return * (_Unwind_Word *) context->reg[index]; }@@ -604,6 +609,10 @@ 	case DW_OP_mul: 	case DW_OP_or: 	case DW_OP_plus:+	case DW_OP_shl:+	case DW_OP_shr:+	case DW_OP_shra:+	case DW_OP_xor: 	case DW_OP_le: 	case DW_OP_ge: 	case DW_OP_eq:Index: gcc/config/freebsd-spec.h===================================================================RCS file: /cvs/gcc/gcc/gcc/config/freebsd-spec.h,vretrieving revision 1.2.4.1retrieving revision 1.2.4.2diff -u -r1.2.4.1 -r1.2.4.2--- gcc/gcc/config/freebsd-spec.h	12 Mar 2003 02:38:01 -0000	1.2.4.1+++ gcc/gcc/config/freebsd-spec.h	14 Jan 2005 02:06:26 -0000	1.2.4.2@@ -130,13 +130,7 @@     %{pg:  -lc_p}							\   }" #else-#if FBSD_MAJOR >= 5-#define FBSD_LIB_SPEC "							\-  %{!shared:								\-    %{!pg: %{pthread:-lc_r} -lc}					\-    %{pg:  %{pthread:-lc_r_p} -lc_p}					\-  }"-#else+#if FBSD_MAJOR < 5 #define FBSD_LIB_SPEC "							\   %{!shared:								\     %{!pg:								\@@ -146,5 +140,11 @@       %{!pthread:-lc_p}							\       %{pthread:-lc_r_p}}						\   }"+#else+#define FBSD_LIB_SPEC "							\+  %{!shared:								\+    %{!pg: %{pthread:-lpthread} -lc}					\+    %{pg:  %{pthread:-lpthread_p} -lc_p}				\+  }" #endif #endifIndex: gcc/config/alpha/alpha.c===================================================================RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.c,vretrieving revision 1.282.4.11retrieving revision 1.282.4.12diff -u -r1.282.4.11 -r1.282.4.12--- gcc/gcc/config/alpha/alpha.c	8 Mar 2004 03:21:46 -0000	1.282.4.11+++ gcc/gcc/config/alpha/alpha.c	30 Sep 2004 19:36:26 -0000	1.282.4.12@@ -6766,11 +6766,6 @@ 	    break; 	  imask |= 1L << regno; 	}--      /* Glibc likes to use $31 as an unwind stopper for crt0.  To-	 avoid hackery in unwind-dw2.c, we need to actively store a-	 zero in the prologue of _Unwind_RaiseException et al.  */-      imask |= 1UL << 31;     }    /* If any register spilled, then spill the return address also.  */@@ -7236,24 +7231,6 @@ 	    reg_offset += 8; 	  } -      /* Store a zero if requested for unwinding.  */-      if (imask & (1UL << 31))- 	{- 	  rtx insn, t;- - 	  mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, reg_offset));- 	  set_mem_alias_set (mem, alpha_sr_alias_set);- 	  insn = emit_move_insn (mem, const0_rtx);- - 	  RTX_FRAME_RELATED_P (insn) = 1;- 	  t = gen_rtx_REG (Pmode, 31);- 	  t = gen_rtx_SET (VOIDmode, mem, t);- 	  t = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, t, REG_NOTES (insn));- 	  REG_NOTES (insn) = t;- - 	  reg_offset += 8;- 	}-        for (i = 0; i < 31; i++) 	if (fmask & (1L << i)) 	  {@@ -7674,9 +7651,6 @@ 	    reg_offset += 8; 	  } -      if (imask & (1UL << 31))-	reg_offset += 8;-       for (i = 0; i < 31; ++i) 	if (fmask & (1L << i)) 	  {Index: gcc/config/alpha/alpha.h===================================================================RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.h,vretrieving revision 1.185.4.6retrieving revision 1.185.4.7diff -u -r1.185.4.6 -r1.185.4.7--- gcc/gcc/config/alpha/alpha.h	27 Aug 2004 00:01:15 -0000	1.185.4.6+++ gcc/gcc/config/alpha/alpha.h	30 Sep 2004 19:36:28 -0000	1.185.4.7@@ -1299,6 +1299,7 @@ #define INCOMING_RETURN_ADDR_RTX  gen_rtx_REG (Pmode, 26) #define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (26) #define DWARF_ALT_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (64)+#define DWARF_ZERO_REG 31  /* Describe how we implement __builtin_eh_return.  */ #define EH_RETURN_DATA_REGNO(N)	((N) < 4 ? (N) + 16 : INVALID_REGNUM)Index: gcc/config/alpha/alpha.md===================================================================RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.md,vretrieving revision 1.199.4.6retrieving revision 1.199.4.7diff -u -r1.199.4.6 -r1.199.4.7--- gcc/gcc/config/alpha/alpha.md	28 May 2004 00:02:03 -0000	1.199.4.6+++ gcc/gcc/config/alpha/alpha.md	5 Dec 2004 19:58:42 -0000	1.199.4.7@@ -80,6 +80,7 @@    (UNSPECV_PLDGP2	11)	; prologue ldgp

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -