📄 arm-linux.patch
字号:
- output_addr_const(STREAM, XEXP (XEXP (XEXP (X, 0), 1), 0)); \- fputs(")", STREAM); \- } \- else output_addr_const(STREAM, X); \+ output_addr_const(STREAM, X); \ \ /* Mark symbols as position independent. We only do this in the \ .text segment, not in the .data segment. */ \@@ -2170,8 +2181,7 @@ int arm_return_in_memory PROTO ((Tree)); int legitimate_pic_operand_p PROTO ((Rtx)); Rtx legitimize_pic_address PROTO ((Rtx, Mmode, Rtx));-int is_pic PROTO ((Rtx));-void arm_finalize_pic PROTO ((void));+void arm_finalize_pic PROTO ((int)); int arm_rtx_costs RTX_CODE_PROTO ((Rtx, Rcode)); int arm_adjust_cost PROTO ((Rtx, Rtx, Rtx, int)); int const_double_rtx_ok_for_fpu PROTO ((Rtx));diff -urN gcc-2.95.3-orig/gcc/config/arm/arm.md gcc-2.95.3/gcc/config/arm/arm.md--- gcc-2.95.3-orig/gcc/config/arm/arm.md Thu Jan 25 15:03:27 2001+++ gcc-2.95.3/gcc/config/arm/arm.md Fri Jul 20 19:39:11 2001@@ -2629,7 +2629,8 @@ : preserve_subexpressions_p ())); DONE; }- if (CONSTANT_P (operands[1]) && flag_pic)+ if ((CONSTANT_P (operands[1]) || symbol_mentioned_p (operands[1])+ || label_mentioned_p (operands[1])) && flag_pic) operands[1] = legitimize_pic_address (operands[1], SImode, ((reload_in_progress || reload_completed)@@ -2721,6 +2722,15 @@ return \"add%?\\t%0, %|pc, %0\"; ") +(define_expand "builtin_setjmp_receiver"+ [(label_ref (match_operand 0 "" ""))]+ "flag_pic"+ "+{+ arm_finalize_pic (0);+ DONE;+}")+ ;; If copying one reg to another we can set the condition codes according to ;; its value. Such a move is common after a return from subroutine and the ;; result is being tested against zero.@@ -6184,15 +6194,20 @@ abort (); return \"\"; }- strcpy (pattern, \"stmfd\\t%m0!, {%1\");- for (i = 1; i < XVECLEN (operands[2], 0); i++)+ if (XVECLEN (operands[2], 0) > 1) {- strcat (pattern, \", %|\");- strcat (pattern, reg_names[REGNO (XEXP (XVECEXP (operands[2], 0, i),+ strcpy (pattern, \"stmfd\\t%m0!, {%1\");+ for (i = 1; i < XVECLEN (operands[2], 0); i++)+ {+ strcat (pattern, \", %|\");+ strcat (pattern, reg_names[REGNO (XEXP (XVECEXP (operands[2], 0, i), 0))]);+ }+ strcat (pattern, \"}\");+ output_asm_insn (pattern, operands); }- strcat (pattern, \"}\");- output_asm_insn (pattern, operands);+ else+ output_asm_insn (\"str\\t%1, [%m0, #-4]!\", operands); return \"\"; }" [(set_attr "type" "store4")])diff -urN gcc-2.95.3-orig/gcc/config/arm/elf.h gcc-2.95.3/gcc/config/arm/elf.h--- gcc-2.95.3-orig/gcc/config/arm/elf.h Mon May 31 10:21:53 1999+++ gcc-2.95.3/gcc/config/arm/elf.h Fri Jul 20 19:39:11 2001@@ -167,15 +167,6 @@ #define MULTILIB_DEFAULTS { "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" } #endif -/* Setting this to 32 produces more efficient code, but the value set in previous- versions of this toolchain was 8, which produces more compact structures. The- command line option -mstructure_size_boundary=<n> can be used to change this- value. */-#undef STRUCTURE_SIZE_BOUNDARY-#define STRUCTURE_SIZE_BOUNDARY arm_structure_size_boundary--extern int arm_structure_size_boundary;- /* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS is a valid machine specific attribute for DECL. The attributes in ATTRIBUTES have previously been assigned to DECL. */diff -urN gcc-2.95.3-orig/gcc/config/arm/linux-gas.h gcc-2.95.3/gcc/config/arm/linux-gas.h--- gcc-2.95.3-orig/gcc/config/arm/linux-gas.h Mon Feb 22 17:47:57 1999+++ gcc-2.95.3/gcc/config/arm/linux-gas.h Fri Jul 20 19:39:11 2001@@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler. ARM Linux-based GNU systems version.- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.+ Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Contributed by Russell King <rmk92@ecs.soton.ac.uk>. This file is part of GNU CC.@@ -79,5 +79,7 @@ register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ register unsigned long _end __asm ("a2") = (unsigned long) (END); \ register unsigned long _flg __asm ("a3") = 0; \- __asm __volatile ("swi 0x9f0002"); \+ __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \+ : "=r" (_beg) \+ : "0" (_beg), "r" (_end), "r" (_flg)); \ }diff -urN gcc-2.95.3-orig/gcc/config/arm/t-linux gcc-2.95.3/gcc/config/arm/t-linux--- gcc-2.95.3-orig/gcc/config/arm/t-linux Fri Mar 26 16:30:20 1999+++ gcc-2.95.3/gcc/config/arm/t-linux Fri Jul 20 20:46:19 2001@@ -1,6 +1,6 @@ # Just for these, we omit the frame pointer since it makes such a big # difference. It is then pointless adding debugging.-TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC+TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC LIBGCC2_DEBUG_CFLAGS = -g0 # Don't build enquirediff -urN gcc-2.95.3-orig/gcc/final.c gcc-2.95.3/gcc/final.c--- gcc-2.95.3-orig/gcc/final.c Mon Mar 12 13:07:59 2001+++ gcc-2.95.3/gcc/final.c Fri Jul 20 19:39:11 2001@@ -3652,8 +3652,9 @@ output_addr_const (file, XEXP (x, 0)); fprintf (file, "-");- if (GET_CODE (XEXP (x, 1)) == CONST_INT- && INTVAL (XEXP (x, 1)) < 0)+ if ((GET_CODE (XEXP (x, 1)) == CONST_INT+ && INTVAL (XEXP (x, 1)) < 0)+ || GET_CODE (XEXP (x, 1)) != CONST_INT) { fprintf (file, ASM_OPEN_PAREN); output_addr_const (file, XEXP (x, 1));diff -urN gcc-2.95.3-orig/gcc/function.c gcc-2.95.3/gcc/function.c--- gcc-2.95.3-orig/gcc/function.c Thu Jan 25 15:03:15 2001+++ gcc-2.95.3/gcc/function.c Fri Jul 20 19:39:10 2001@@ -3053,6 +3053,105 @@ extracted by usage MEM with narrower mode. */ static rtx purge_addressof_replacements; +/* Return 1 if X and Y are identical-looking rtx's.+ This is the Lisp function EQUAL for rtx arguments. */++int+rtx_equal_for_addressof_p (x, y)+ rtx x, y;+{+ register int i;+ register int j;+ register enum rtx_code code;+ register char *fmt;++ if (x == y)+ return 1;+ if (x == 0 || y == 0)+ return 0;++ code = GET_CODE (x);+ /* Rtx's of different codes cannot be equal. */+ if (code != GET_CODE (y))+ return 0;++ /* (MULT:SI x y) and (MULT:HI x y) are NOT equivalent.+ (REG:SI x) and (REG:HI x) are NOT equivalent. + But (MEM:SI x) and (MEM:HI x) are equivalent for our purposes. */++ if (code != MEM && (GET_MODE (x) != GET_MODE (y)))+ return 0;++ /* REG, LABEL_REF, and SYMBOL_REF can be compared nonrecursively. */++ if (code == REG)+ return REGNO (x) == REGNO (y);+ else if (code == LABEL_REF)+ return XEXP (x, 0) == XEXP (y, 0);+ else if (code == SYMBOL_REF)+ return XSTR (x, 0) == XSTR (y, 0);+ else if (code == SCRATCH || code == CONST_DOUBLE)+ return 0;++ /* Compare the elements. If any pair of corresponding elements+ fail to match, return 0 for the whole things. */++ fmt = GET_RTX_FORMAT (code);+ for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)+ {+ switch (fmt[i])+ {+ case 'w':+ if (XWINT (x, i) != XWINT (y, i))+ return 0;+ break;++ case 'n':+ case 'i':+ if (XINT (x, i) != XINT (y, i))+ return 0;+ break;++ case 'V':+ case 'E':+ /* Two vectors must have the same length. */+ if (XVECLEN (x, i) != XVECLEN (y, i))+ return 0;++ /* And the corresponding elements must match. */+ for (j = 0; j < XVECLEN (x, i); j++)+ if (rtx_equal_p (XVECEXP (x, i, j), XVECEXP (y, i, j)) == 0)+ return 0;+ break;++ case 'e':+ if (rtx_equal_p (XEXP (x, i), XEXP (y, i)) == 0)+ return 0;+ break;++ case 'S':+ case 's':+ if (strcmp (XSTR (x, i), XSTR (y, i)))+ return 0;+ break;++ case 'u':+ /* These are just backpointers, so they don't matter. */+ break;++ case '0':+ break;++ /* It is believed that rtx's at this level will never+ contain anything but integers and other rtx's,+ except for within LABEL_REFs and SYMBOL_REFs. */+ default:+ abort ();+ }+ }+ return 1;+}+ /* Helper function for purge_addressof. See if the rtx expression at *LOC in INSN needs to be changed. If FORCE, always put any ADDRESSOFs into the stack. */@@ -3133,7 +3232,7 @@ for (tem = purge_bitfield_addressof_replacements; tem != NULL_RTX; tem = XEXP (XEXP (tem, 1), 1))- if (rtx_equal_p (x, XEXP (tem, 0)))+ if (rtx_equal_for_addressof_p (x, XEXP (tem, 0))) { *loc = XEXP (XEXP (tem, 1), 0); return;@@ -3143,7 +3242,7 @@ for (tem = purge_addressof_replacements; tem != NULL_RTX; tem = XEXP (XEXP (tem, 1), 1))- if (rtx_equal_p (XEXP (x, 0), XEXP (tem, 0)))+ if (rtx_equal_for_addressof_p (XEXP (x, 0), XEXP (tem, 0))) { rtx z = XEXP (XEXP (tem, 1), 0); diff -urN gcc-2.95.3-orig/gcc/jump.c gcc-2.95.3/gcc/jump.c--- gcc-2.95.3-orig/gcc/jump.c Thu Oct 21 08:24:03 1999+++ gcc-2.95.3/gcc/jump.c Fri Jul 20 19:39:10 2001@@ -115,7 +115,7 @@ static rtx delete_unreferenced_labels PROTO((rtx)); static void delete_noop_moves PROTO((rtx)); static int calculate_can_reach_end PROTO((rtx, int, int));-static int duplicate_loop_exit_test PROTO((rtx));+static int duplicate_loop_exit_test PROTO((rtx, int)); static void find_cross_jump PROTO((rtx, rtx, int, rtx *, rtx *)); static void do_cross_jump PROTO((rtx, rtx, rtx)); static int jump_back_p PROTO((rtx, rtx));@@ -338,7 +338,7 @@ && simplejump_p (temp1)) { temp = PREV_INSN (insn);- if (duplicate_loop_exit_test (insn))+ if (duplicate_loop_exit_test (insn, after_regscan)) { changed = 1; next = NEXT_INSN (temp);@@ -2548,8 +2548,9 @@ values of regno_first_uid and regno_last_uid. */ static int-duplicate_loop_exit_test (loop_start)+duplicate_loop_exit_test (loop_start, after_regscan) rtx loop_start;+ int after_regscan; { rtx insn, set, reg, p, link; rtx copy = 0, first_copy = 0;@@ -2662,6 +2663,9 @@ reg_map[REGNO (reg)] = gen_reg_rtx (GET_MODE (reg)); } }++ if (after_regscan)+ reg_scan_update (exitcode, lastexit, max_reg); /* Now copy each insn. */ for (insn = exitcode; insn != lastexit; insn = NEXT_INSN (insn))diff -urN gcc-2.95.3-orig/gcc/varasm.c gcc-2.95.3/gcc/varasm.c--- gcc-2.95.3-orig/gcc/varasm.c Mon Feb 19 15:02:02 2001+++ gcc-2.95.3/gcc/varasm.c Fri Jul 20 19:39:11 2001@@ -3286,7 +3286,10 @@ value->un.addr.offset = - INTVAL (XEXP (x, 1)); } else- abort ();+ {+ value->un.addr.base = x;+ value->un.addr.offset = 0;+ } break; default:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -