diff options
Diffstat (limited to 'meta-oe/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106872.patch')
| -rw-r--r-- | meta-oe/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106872.patch | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106872.patch b/meta-oe/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106872.patch new file mode 100644 index 0000000000..9bfd969df6 --- /dev/null +++ b/meta-oe/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106872.patch | |||
| @@ -0,0 +1,126 @@ | |||
| 1 | 2012-02-24 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org> | ||
| 2 | |||
| 3 | Backport from mainline. | ||
| 4 | 2011-12-05 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org> | ||
| 5 | |||
| 6 | gcc/ | ||
| 7 | * config/arm/arm.c (vfp3_const_double_for_fract_bits): Define. | ||
| 8 | * config/arm/arm-protos.h (vfp3_const_double_for_fract_bits): Declare. | ||
| 9 | * config/arm/constraints.md ("Dt"): New constraint. | ||
| 10 | * config/arm/predicates.md (const_double_vcvt_power_of_two_reciprocal): | ||
| 11 | New. | ||
| 12 | * config/arm/vfp.md (*arm_combine_vcvt_f32_s32): New. | ||
| 13 | (*arm_combine_vcvt_f32_u32): New. | ||
| 14 | |||
| 15 | LP:#900426 | ||
| 16 | |||
| 17 | 2011-12-06 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org> | ||
| 18 | * config/arm/vfp.md (*combine_vcvt_f64_<FCVTI32typename>): Fix | ||
| 19 | formatting character for vmov.f64 case. | ||
| 20 | |||
| 21 | 2012-02-24 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org> | ||
| 22 | |||
| 23 | gcc/ | ||
| 24 | * config/arm/arm.c (arm_print_operand): Remove wrongly merged code. | ||
| 25 | (vfp3_const_double_for_fract_bits): Likewise. | ||
| 26 | |||
| 27 | === modified file 'gcc/config/arm/arm-protos.h' | ||
| 28 | --- old/gcc/config/arm/arm-protos.h 2011-12-06 10:42:29 +0000 | ||
| 29 | +++ new/gcc/config/arm/arm-protos.h 2012-02-22 13:31:54 +0000 | ||
| 30 | @@ -238,6 +238,7 @@ | ||
| 31 | }; | ||
| 32 | |||
| 33 | extern const struct tune_params *current_tune; | ||
| 34 | +extern int vfp3_const_double_for_fract_bits (rtx); | ||
| 35 | #endif /* RTX_CODE */ | ||
| 36 | |||
| 37 | #endif /* ! GCC_ARM_PROTOS_H */ | ||
| 38 | |||
| 39 | === modified file 'gcc/config/arm/constraints.md' | ||
| 40 | --- old/gcc/config/arm/constraints.md 2011-12-06 10:42:29 +0000 | ||
| 41 | +++ new/gcc/config/arm/constraints.md 2012-02-22 13:31:54 +0000 | ||
| 42 | @@ -29,7 +29,7 @@ | ||
| 43 | ;; in Thumb-1 state: I, J, K, L, M, N, O | ||
| 44 | |||
| 45 | ;; The following multi-letter normal constraints have been used: | ||
| 46 | -;; in ARM/Thumb-2 state: Da, Db, Dc, Dn, Dl, DL, Dv, Dy, Di, Dz | ||
| 47 | +;; in ARM/Thumb-2 state: Da, Db, Dc, Dn, Dl, DL, Dv, Dy, Di, Dt, Dz | ||
| 48 | ;; in Thumb-1 state: Pa, Pb, Pc, Pd | ||
| 49 | ;; in Thumb-2 state: Pj, PJ, Ps, Pt, Pu, Pv, Pw, Px, Py | ||
| 50 | |||
| 51 | @@ -291,6 +291,12 @@ | ||
| 52 | (and (match_code "const_double") | ||
| 53 | (match_test "TARGET_32BIT && TARGET_VFP_DOUBLE && vfp3_const_double_rtx (op)"))) | ||
| 54 | |||
| 55 | +(define_constraint "Dt" | ||
| 56 | + "@internal | ||
| 57 | + In ARM/ Thumb2 a const_double which can be used with a vcvt.f32.s32 with fract bits operation" | ||
| 58 | + (and (match_code "const_double") | ||
| 59 | + (match_test "TARGET_32BIT && TARGET_VFP && vfp3_const_double_for_fract_bits (op)"))) | ||
| 60 | + | ||
| 61 | (define_memory_constraint "Ut" | ||
| 62 | "@internal | ||
| 63 | In ARM/Thumb-2 state an address valid for loading/storing opaque structure | ||
| 64 | |||
| 65 | === modified file 'gcc/config/arm/predicates.md' | ||
| 66 | --- old/gcc/config/arm/predicates.md 2011-12-06 10:42:29 +0000 | ||
| 67 | +++ new/gcc/config/arm/predicates.md 2012-02-22 13:31:54 +0000 | ||
| 68 | @@ -725,6 +725,11 @@ | ||
| 69 | return true; | ||
| 70 | }) | ||
| 71 | |||
| 72 | +(define_predicate "const_double_vcvt_power_of_two_reciprocal" | ||
| 73 | + (and (match_code "const_double") | ||
| 74 | + (match_test "TARGET_32BIT && TARGET_VFP | ||
| 75 | + && vfp3_const_double_for_fract_bits (op)"))) | ||
| 76 | + | ||
| 77 | (define_special_predicate "neon_struct_operand" | ||
| 78 | (and (match_code "mem") | ||
| 79 | (match_test "TARGET_32BIT && neon_vector_mem_operand (op, 2)"))) | ||
| 80 | |||
| 81 | === modified file 'gcc/config/arm/vfp.md' | ||
| 82 | --- old/gcc/config/arm/vfp.md 2011-12-06 10:42:29 +0000 | ||
| 83 | +++ new/gcc/config/arm/vfp.md 2012-02-22 13:31:54 +0000 | ||
| 84 | @@ -1131,9 +1131,40 @@ | ||
| 85 | (set_attr "type" "fcmpd")] | ||
| 86 | ) | ||
| 87 | |||
| 88 | +;; Fixed point to floating point conversions. | ||
| 89 | +(define_code_iterator FCVT [unsigned_float float]) | ||
| 90 | +(define_code_attr FCVTI32typename [(unsigned_float "u32") (float "s32")]) | ||
| 91 | + | ||
| 92 | +(define_insn "*combine_vcvt_f32_<FCVTI32typename>" | ||
| 93 | + [(set (match_operand:SF 0 "s_register_operand" "=t") | ||
| 94 | + (mult:SF (FCVT:SF (match_operand:SI 1 "s_register_operand" "0")) | ||
| 95 | + (match_operand 2 | ||
| 96 | + "const_double_vcvt_power_of_two_reciprocal" "Dt")))] | ||
| 97 | + "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP3 && !flag_rounding_math" | ||
| 98 | + "vcvt.f32.<FCVTI32typename>\\t%0, %1, %v2" | ||
| 99 | + [(set_attr "predicable" "no") | ||
| 100 | + (set_attr "type" "f_cvt")] | ||
| 101 | +) | ||
| 102 | + | ||
| 103 | +;; Not the ideal way of implementing this. Ideally we would be able to split | ||
| 104 | +;; this into a move to a DP register and then a vcvt.f64.i32 | ||
| 105 | +(define_insn "*combine_vcvt_f64_<FCVTI32typename>" | ||
| 106 | + [(set (match_operand:DF 0 "s_register_operand" "=x,x,w") | ||
| 107 | + (mult:DF (FCVT:DF (match_operand:SI 1 "s_register_operand" "r,t,r")) | ||
| 108 | + (match_operand 2 | ||
| 109 | + "const_double_vcvt_power_of_two_reciprocal" "Dt,Dt,Dt")))] | ||
| 110 | + "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP3 && !flag_rounding_math | ||
| 111 | + && !TARGET_VFP_SINGLE" | ||
| 112 | + "@ | ||
| 113 | + vmov.f32\\t%0, %1\;vcvt.f64.<FCVTI32typename>\\t%P0, %P0, %v2 | ||
| 114 | + vmov.f32\\t%0, %1\;vcvt.f64.<FCVTI32typename>\\t%P0, %P0, %v2 | ||
| 115 | + vmov.f64\\t%P0, %1, %1\; vcvt.f64.<FCVTI32typename>\\t%P0, %P0, %v2" | ||
| 116 | + [(set_attr "predicable" "no") | ||
| 117 | + (set_attr "type" "f_cvt") | ||
| 118 | + (set_attr "length" "8")] | ||
| 119 | +) | ||
| 120 | |||
| 121 | ;; Store multiple insn used in function prologue. | ||
| 122 | - | ||
| 123 | (define_insn "*push_multi_vfp" | ||
| 124 | [(match_parallel 2 "multi_register_push" | ||
| 125 | [(set (match_operand:BLK 0 "memory_operand" "=m") | ||
| 126 | |||
