diff options
Diffstat (limited to 'meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99301.patch')
-rw-r--r-- | meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99301.patch | 119 |
1 files changed, 59 insertions, 60 deletions
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99301.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99301.patch index 95907eeb87..0943130de6 100644 --- a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99301.patch +++ b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99301.patch | |||
@@ -37,9 +37,11 @@ | |||
37 | gcc/ | 37 | gcc/ |
38 | 38 | ||
39 | === modified file 'gcc/config/arm/arm-modes.def' | 39 | === modified file 'gcc/config/arm/arm-modes.def' |
40 | --- old/gcc/config/arm/arm-modes.def 2009-06-18 11:24:10 +0000 | 40 | Index: gcc-4.5.3/gcc/config/arm/arm-modes.def |
41 | +++ new/gcc/config/arm/arm-modes.def 2010-07-29 16:58:56 +0000 | 41 | =================================================================== |
42 | @@ -35,10 +35,16 @@ | 42 | --- gcc-4.5.3.orig/gcc/config/arm/arm-modes.def |
43 | +++ gcc-4.5.3/gcc/config/arm/arm-modes.def | ||
44 | @@ -35,10 +35,16 @@ ADJUST_FLOAT_FORMAT (HF, ((arm_fp16_form | ||
43 | CC_NOOVmode should be used with SImode integer equalities. | 45 | CC_NOOVmode should be used with SImode integer equalities. |
44 | CC_Zmode should be used if only the Z flag is set correctly | 46 | CC_Zmode should be used if only the Z flag is set correctly |
45 | CC_Nmode should be used if only the N (sign) flag is set correctly | 47 | CC_Nmode should be used if only the N (sign) flag is set correctly |
@@ -56,11 +58,11 @@ | |||
56 | CC_MODE (CC_SWP); | 58 | CC_MODE (CC_SWP); |
57 | CC_MODE (CCFP); | 59 | CC_MODE (CCFP); |
58 | CC_MODE (CCFPE); | 60 | CC_MODE (CCFPE); |
59 | 61 | Index: gcc-4.5.3/gcc/config/arm/arm-protos.h | |
60 | === modified file 'gcc/config/arm/arm-protos.h' | 62 | =================================================================== |
61 | --- old/gcc/config/arm/arm-protos.h 2009-11-11 14:23:03 +0000 | 63 | --- gcc-4.5.3.orig/gcc/config/arm/arm-protos.h |
62 | +++ new/gcc/config/arm/arm-protos.h 2010-07-29 16:58:56 +0000 | 64 | +++ gcc-4.5.3/gcc/config/arm/arm-protos.h |
63 | @@ -49,8 +49,7 @@ | 65 | @@ -49,8 +49,7 @@ extern int arm_hard_regno_mode_ok (unsig |
64 | extern int const_ok_for_arm (HOST_WIDE_INT); | 66 | extern int const_ok_for_arm (HOST_WIDE_INT); |
65 | extern int arm_split_constant (RTX_CODE, enum machine_mode, rtx, | 67 | extern int arm_split_constant (RTX_CODE, enum machine_mode, rtx, |
66 | HOST_WIDE_INT, rtx, rtx, int); | 68 | HOST_WIDE_INT, rtx, rtx, int); |
@@ -70,7 +72,7 @@ | |||
70 | extern int legitimate_pic_operand_p (rtx); | 72 | extern int legitimate_pic_operand_p (rtx); |
71 | extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx); | 73 | extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx); |
72 | extern rtx legitimize_tls_address (rtx, rtx); | 74 | extern rtx legitimize_tls_address (rtx, rtx); |
73 | @@ -116,6 +115,7 @@ | 75 | @@ -116,6 +115,7 @@ extern void arm_reload_in_hi (rtx *); |
74 | extern void arm_reload_out_hi (rtx *); | 76 | extern void arm_reload_out_hi (rtx *); |
75 | extern int arm_const_double_inline_cost (rtx); | 77 | extern int arm_const_double_inline_cost (rtx); |
76 | extern bool arm_const_double_by_parts (rtx); | 78 | extern bool arm_const_double_by_parts (rtx); |
@@ -78,11 +80,11 @@ | |||
78 | extern const char *fp_immediate_constant (rtx); | 80 | extern const char *fp_immediate_constant (rtx); |
79 | extern void arm_emit_call_insn (rtx, rtx); | 81 | extern void arm_emit_call_insn (rtx, rtx); |
80 | extern const char *output_call (rtx *); | 82 | extern const char *output_call (rtx *); |
81 | 83 | Index: gcc-4.5.3/gcc/config/arm/arm.c | |
82 | === modified file 'gcc/config/arm/arm.c' | 84 | =================================================================== |
83 | --- old/gcc/config/arm/arm.c 2010-07-29 15:59:12 +0000 | 85 | --- gcc-4.5.3.orig/gcc/config/arm/arm.c |
84 | +++ new/gcc/config/arm/arm.c 2010-07-29 16:58:56 +0000 | 86 | +++ gcc-4.5.3/gcc/config/arm/arm.c |
85 | @@ -3190,13 +3190,82 @@ | 87 | @@ -3191,13 +3191,82 @@ arm_gen_constant (enum rtx_code code, en |
86 | immediate value easier to load. */ | 88 | immediate value easier to load. */ |
87 | 89 | ||
88 | enum rtx_code | 90 | enum rtx_code |
@@ -169,7 +171,7 @@ | |||
169 | switch (code) | 171 | switch (code) |
170 | { | 172 | { |
171 | case EQ: | 173 | case EQ: |
172 | @@ -9912,6 +9981,55 @@ | 174 | @@ -9913,6 +9982,55 @@ arm_select_cc_mode (enum rtx_code op, rt |
173 | && (rtx_equal_p (XEXP (x, 0), y) || rtx_equal_p (XEXP (x, 1), y))) | 175 | && (rtx_equal_p (XEXP (x, 0), y) || rtx_equal_p (XEXP (x, 1), y))) |
174 | return CC_Cmode; | 176 | return CC_Cmode; |
175 | 177 | ||
@@ -225,18 +227,17 @@ | |||
225 | return CCmode; | 227 | return CCmode; |
226 | } | 228 | } |
227 | 229 | ||
228 | @@ -9921,10 +10039,39 @@ | 230 | @@ -9922,10 +10040,39 @@ arm_select_cc_mode (enum rtx_code op, rt |
229 | rtx | 231 | rtx |
230 | arm_gen_compare_reg (enum rtx_code code, rtx x, rtx y) | 232 | arm_gen_compare_reg (enum rtx_code code, rtx x, rtx y) |
231 | { | 233 | { |
232 | - enum machine_mode mode = SELECT_CC_MODE (code, x, y); | 234 | - enum machine_mode mode = SELECT_CC_MODE (code, x, y); |
233 | - rtx cc_reg = gen_rtx_REG (mode, CC_REGNUM); | 235 | - rtx cc_reg = gen_rtx_REG (mode, CC_REGNUM); |
234 | - | ||
235 | - emit_set_insn (cc_reg, gen_rtx_COMPARE (mode, x, y)); | ||
236 | + enum machine_mode mode; | 236 | + enum machine_mode mode; |
237 | + rtx cc_reg; | 237 | + rtx cc_reg; |
238 | + int dimode_comparison = GET_MODE (x) == DImode || GET_MODE (y) == DImode; | 238 | + int dimode_comparison = GET_MODE (x) == DImode || GET_MODE (y) == DImode; |
239 | + | 239 | |
240 | - emit_set_insn (cc_reg, gen_rtx_COMPARE (mode, x, y)); | ||
240 | + /* We might have X as a constant, Y as a register because of the predicates | 241 | + /* We might have X as a constant, Y as a register because of the predicates |
241 | + used for cmpdi. If so, force X to a register here. */ | 242 | + used for cmpdi. If so, force X to a register here. */ |
242 | + if (dimode_comparison && !REG_P (x)) | 243 | + if (dimode_comparison && !REG_P (x)) |
@@ -269,7 +270,7 @@ | |||
269 | 270 | ||
270 | return cc_reg; | 271 | return cc_reg; |
271 | } | 272 | } |
272 | @@ -11253,6 +11400,34 @@ | 273 | @@ -11254,6 +11401,34 @@ arm_const_double_by_parts (rtx val) |
273 | return false; | 274 | return false; |
274 | } | 275 | } |
275 | 276 | ||
@@ -304,7 +305,7 @@ | |||
304 | /* Scan INSN and note any of its operands that need fixing. | 305 | /* Scan INSN and note any of its operands that need fixing. |
305 | If DO_PUSHES is false we do not actually push any of the fixups | 306 | If DO_PUSHES is false we do not actually push any of the fixups |
306 | needed. The function returns TRUE if any fixups were needed/pushed. | 307 | needed. The function returns TRUE if any fixups were needed/pushed. |
307 | @@ -15097,8 +15272,18 @@ | 308 | @@ -15150,8 +15325,18 @@ arm_print_operand (FILE *stream, rtx x, |
308 | the value being loaded is big-wordian or little-wordian. The | 309 | the value being loaded is big-wordian or little-wordian. The |
309 | order of the two register loads can matter however, if the address | 310 | order of the two register loads can matter however, if the address |
310 | of the memory location is actually held in one of the registers | 311 | of the memory location is actually held in one of the registers |
@@ -324,7 +325,7 @@ | |||
324 | if (GET_CODE (x) != REG || REGNO (x) > LAST_ARM_REGNUM) | 325 | if (GET_CODE (x) != REG || REGNO (x) > LAST_ARM_REGNUM) |
325 | { | 326 | { |
326 | output_operand_lossage ("invalid operand for code '%c'", code); | 327 | output_operand_lossage ("invalid operand for code '%c'", code); |
327 | @@ -15109,6 +15294,18 @@ | 328 | @@ -15162,6 +15347,18 @@ arm_print_operand (FILE *stream, rtx x, |
328 | return; | 329 | return; |
329 | 330 | ||
330 | case 'R': | 331 | case 'R': |
@@ -343,7 +344,7 @@ | |||
343 | if (GET_CODE (x) != REG || REGNO (x) > LAST_ARM_REGNUM) | 344 | if (GET_CODE (x) != REG || REGNO (x) > LAST_ARM_REGNUM) |
344 | { | 345 | { |
345 | output_operand_lossage ("invalid operand for code '%c'", code); | 346 | output_operand_lossage ("invalid operand for code '%c'", code); |
346 | @@ -15801,6 +15998,28 @@ | 347 | @@ -15854,6 +16051,28 @@ get_arm_condition_code (rtx comparison) |
347 | default: gcc_unreachable (); | 348 | default: gcc_unreachable (); |
348 | } | 349 | } |
349 | 350 | ||
@@ -372,11 +373,11 @@ | |||
372 | case CCmode: | 373 | case CCmode: |
373 | switch (comp_code) | 374 | switch (comp_code) |
374 | { | 375 | { |
375 | 376 | Index: gcc-4.5.3/gcc/config/arm/arm.h | |
376 | === modified file 'gcc/config/arm/arm.h' | 377 | =================================================================== |
377 | --- old/gcc/config/arm/arm.h 2009-12-23 16:36:40 +0000 | 378 | --- gcc-4.5.3.orig/gcc/config/arm/arm.h |
378 | +++ new/gcc/config/arm/arm.h 2010-07-29 16:58:56 +0000 | 379 | +++ gcc-4.5.3/gcc/config/arm/arm.h |
379 | @@ -2253,19 +2253,7 @@ | 380 | @@ -2253,19 +2253,7 @@ extern int making_const_table; |
380 | : reverse_condition (code)) | 381 | : reverse_condition (code)) |
381 | 382 | ||
382 | #define CANONICALIZE_COMPARISON(CODE, OP0, OP1) \ | 383 | #define CANONICALIZE_COMPARISON(CODE, OP0, OP1) \ |
@@ -397,10 +398,10 @@ | |||
397 | 398 | ||
398 | /* The arm5 clz instruction returns 32. */ | 399 | /* The arm5 clz instruction returns 32. */ |
399 | #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 32, 1) | 400 | #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 32, 1) |
400 | 401 | Index: gcc-4.5.3/gcc/config/arm/arm.md | |
401 | === modified file 'gcc/config/arm/arm.md' | 402 | =================================================================== |
402 | --- old/gcc/config/arm/arm.md 2010-07-29 15:59:12 +0000 | 403 | --- gcc-4.5.3.orig/gcc/config/arm/arm.md |
403 | +++ new/gcc/config/arm/arm.md 2010-07-29 16:58:56 +0000 | 404 | +++ gcc-4.5.3/gcc/config/arm/arm.md |
404 | @@ -6718,17 +6718,45 @@ | 405 | @@ -6718,17 +6718,45 @@ |
405 | operands[3])); DONE;" | 406 | operands[3])); DONE;" |
406 | ) | 407 | ) |
@@ -506,7 +507,7 @@ | |||
506 | ;; Cirrus SF compare instruction | 507 | ;; Cirrus SF compare instruction |
507 | (define_insn "*cirrus_cmpsf" | 508 | (define_insn "*cirrus_cmpsf" |
508 | [(set (reg:CCFP CC_REGNUM) | 509 | [(set (reg:CCFP CC_REGNUM) |
509 | @@ -8183,18 +8257,45 @@ | 510 | @@ -8183,17 +8257,44 @@ |
510 | operands[2], operands[3])); DONE;" | 511 | operands[2], operands[3])); DONE;" |
511 | ) | 512 | ) |
512 | 513 | ||
@@ -519,13 +520,14 @@ | |||
519 | - "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK" | 520 | - "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK" |
520 | - "emit_insn (gen_cstore_cc (operands[0], operands[1], | 521 | - "emit_insn (gen_cstore_cc (operands[0], operands[1], |
521 | - operands[2], operands[3])); DONE;" | 522 | - operands[2], operands[3])); DONE;" |
523 | -) | ||
522 | + [(match_operand:DI 2 "cmpdi_operand" "") | 524 | + [(match_operand:DI 2 "cmpdi_operand" "") |
523 | + (match_operand:DI 3 "cmpdi_operand" "")]))] | 525 | + (match_operand:DI 3 "cmpdi_operand" "")]))] |
524 | + "TARGET_32BIT" | 526 | + "TARGET_32BIT" |
525 | + "{ | 527 | + "{ |
526 | + rtx swap = NULL_RTX; | 528 | + rtx swap = NULL_RTX; |
527 | + enum rtx_code code = GET_CODE (operands[1]); | 529 | + enum rtx_code code = GET_CODE (operands[1]); |
528 | + | 530 | |
529 | + /* We should not have two constants. */ | 531 | + /* We should not have two constants. */ |
530 | + gcc_assert (GET_MODE (operands[2]) == DImode | 532 | + gcc_assert (GET_MODE (operands[2]) == DImode |
531 | + || GET_MODE (operands[3]) == DImode); | 533 | + || GET_MODE (operands[3]) == DImode); |
@@ -553,16 +555,14 @@ | |||
553 | + operands[3])); | 555 | + operands[3])); |
554 | + DONE; | 556 | + DONE; |
555 | + }" | 557 | + }" |
556 | ) | 558 | +) |
557 | 559 | ||
558 | - | ||
559 | (define_expand "cstoresi_eq0_thumb1" | 560 | (define_expand "cstoresi_eq0_thumb1" |
560 | [(parallel | 561 | [(parallel |
561 | [(set (match_operand:SI 0 "s_register_operand" "") | 562 | Index: gcc-4.5.3/gcc/config/arm/constraints.md |
562 | 563 | =================================================================== | |
563 | === modified file 'gcc/config/arm/constraints.md' | 564 | --- gcc-4.5.3.orig/gcc/config/arm/constraints.md |
564 | --- old/gcc/config/arm/constraints.md 2009-12-07 20:34:53 +0000 | 565 | +++ gcc-4.5.3/gcc/config/arm/constraints.md |
565 | +++ new/gcc/config/arm/constraints.md 2010-07-29 16:58:56 +0000 | ||
566 | @@ -29,7 +29,7 @@ | 566 | @@ -29,7 +29,7 @@ |
567 | ;; in Thumb-1 state: I, J, K, L, M, N, O | 567 | ;; in Thumb-1 state: I, J, K, L, M, N, O |
568 | 568 | ||
@@ -586,11 +586,11 @@ | |||
586 | (define_constraint "Dn" | 586 | (define_constraint "Dn" |
587 | "@internal | 587 | "@internal |
588 | In ARM/Thumb-2 state a const_vector which can be loaded with a Neon vmov | 588 | In ARM/Thumb-2 state a const_vector which can be loaded with a Neon vmov |
589 | 589 | Index: gcc-4.5.3/gcc/config/arm/predicates.md | |
590 | === modified file 'gcc/config/arm/predicates.md' | 590 | =================================================================== |
591 | --- old/gcc/config/arm/predicates.md 2010-07-29 15:59:12 +0000 | 591 | --- gcc-4.5.3.orig/gcc/config/arm/predicates.md |
592 | +++ new/gcc/config/arm/predicates.md 2010-07-29 16:58:56 +0000 | 592 | +++ gcc-4.5.3/gcc/config/arm/predicates.md |
593 | @@ -86,6 +86,12 @@ | 593 | @@ -101,6 +101,12 @@ |
594 | (and (match_code "const_int") | 594 | (and (match_code "const_int") |
595 | (match_test "const_ok_for_arm (INTVAL (op))"))) | 595 | (match_test "const_ok_for_arm (INTVAL (op))"))) |
596 | 596 | ||
@@ -603,7 +603,7 @@ | |||
603 | (define_predicate "arm_neg_immediate_operand" | 603 | (define_predicate "arm_neg_immediate_operand" |
604 | (and (match_code "const_int") | 604 | (and (match_code "const_int") |
605 | (match_test "const_ok_for_arm (-INTVAL (op))"))) | 605 | (match_test "const_ok_for_arm (-INTVAL (op))"))) |
606 | @@ -115,6 +121,10 @@ | 606 | @@ -130,6 +136,10 @@ |
607 | (ior (match_operand 0 "arm_rhs_operand") | 607 | (ior (match_operand 0 "arm_rhs_operand") |
608 | (match_operand 0 "arm_not_immediate_operand"))) | 608 | (match_operand 0 "arm_not_immediate_operand"))) |
609 | 609 | ||
@@ -614,23 +614,23 @@ | |||
614 | ;; True if the operand is a memory reference which contains an | 614 | ;; True if the operand is a memory reference which contains an |
615 | ;; offsettable address. | 615 | ;; offsettable address. |
616 | (define_predicate "offsettable_memory_operand" | 616 | (define_predicate "offsettable_memory_operand" |
617 | @@ -522,4 +532,12 @@ | 617 | @@ -538,3 +548,12 @@ |
618 | (define_predicate "neon_lane_number" | ||
619 | (and (match_code "const_int") | 618 | (and (match_code "const_int") |
620 | (match_test "INTVAL (op) >= 0 && INTVAL (op) <= 7"))) | 619 | (match_test "INTVAL (op) >= 0 && INTVAL (op) <= 15"))) |
620 | |||
621 | +;; Predicates for named expanders that overlap multiple ISAs. | 621 | +;; Predicates for named expanders that overlap multiple ISAs. |
622 | + | 622 | + |
623 | +(define_predicate "cmpdi_operand" | 623 | +(define_predicate "cmpdi_operand" |
624 | + (if_then_else (match_test "TARGET_HARD_FLOAT && TARGET_MAVERICK") | 624 | + (if_then_else (match_test "TARGET_HARD_FLOAT && TARGET_MAVERICK") |
625 | + (and (match_test "TARGET_ARM") | 625 | + (and (match_test "TARGET_ARM") |
626 | + (match_operand 0 "cirrus_fp_register")) | 626 | + (match_operand 0 "cirrus_fp_register")) |
627 | + (and (match_test "TARGET_32BIT") | 627 | + (and (match_test "TARGET_32BIT") |
628 | + (match_operand 0 "arm_di_operand")))) | 628 | + (match_operand 0 "arm_di_operand")))) |
629 | 629 | + | |
630 | 630 | Index: gcc-4.5.3/gcc/testsuite/gcc.c-torture/execute/20100416-1.c | |
631 | === added file 'gcc/testsuite/gcc.c-torture/execute/20100416-1.c' | 631 | =================================================================== |
632 | --- old/gcc/testsuite/gcc.c-torture/execute/20100416-1.c 1970-01-01 00:00:00 +0000 | 632 | --- /dev/null |
633 | +++ new/gcc/testsuite/gcc.c-torture/execute/20100416-1.c 2010-07-29 16:58:56 +0000 | 633 | +++ gcc-4.5.3/gcc/testsuite/gcc.c-torture/execute/20100416-1.c |
634 | @@ -0,0 +1,40 @@ | 634 | @@ -0,0 +1,40 @@ |
635 | +void abort(void); | 635 | +void abort(void); |
636 | + | 636 | + |
@@ -672,4 +672,3 @@ | |||
672 | + } | 672 | + } |
673 | + return 0; | 673 | + return 0; |
674 | +} | 674 | +} |
675 | |||