GCC with patches for OS216
修订版 | 33427b4642f75e0231a329336430d5dd1924f566 (tree) |
---|---|
时间 | 2016-07-07 17:54:59 |
作者 | Thomas Preud'homme <thomas.preudhomme@arm....> |
Commiter | Thomas Preud'homme |
arm.h (TARGET_USE_MOVT): Check MOVT/MOVW availability with TARGET_HAVE_MOVT.
2016-07-07 Thomas Preud'homme <thomas.preudhomme@arm.com>
From-SVN: r238083
@@ -1,5 +1,21 @@ | ||
1 | 1 | 2016-07-07 Thomas Preud'homme <thomas.preudhomme@arm.com> |
2 | 2 | |
3 | + * config/arm/arm.h (TARGET_USE_MOVT): Check MOVT/MOVW availability | |
4 | + with TARGET_HAVE_MOVT. | |
5 | + (TARGET_HAVE_MOVT): Define. | |
6 | + * config/arm/arm.c (const_ok_for_op): Check MOVT/MOVW | |
7 | + availability with TARGET_HAVE_MOVT. | |
8 | + * config/arm/arm.md (arm_movt): Use TARGET_HAVE_MOVT to check MOVT | |
9 | + availability. | |
10 | + (addsi splitter): Use TARGET_THUMB && TARGET_HAVE_MOVT rather than | |
11 | + TARGET_THUMB2. | |
12 | + (symbol_refs movsi splitter): Remove TARGET_32BIT check. | |
13 | + (arm_movtas_ze): Use TARGET_HAVE_MOVT to check MOVT availability. | |
14 | + * config/arm/constraints.md (define_constraint "j"): Use | |
15 | + TARGET_HAVE_MOVT to check MOVT availability. | |
16 | + | |
17 | +2016-07-07 Thomas Preud'homme <thomas.preudhomme@arm.com> | |
18 | + | |
3 | 19 | * config/arm/arm-protos.h: Reindent FL_FOR_* macro definitions. |
4 | 20 | |
5 | 21 | 2016-07-07 Thomas Preud'homme <thomas.preudhomme@arm.com> |
@@ -3947,7 +3947,7 @@ const_ok_for_op (HOST_WIDE_INT i, enum rtx_code code) | ||
3947 | 3947 | { |
3948 | 3948 | case SET: |
3949 | 3949 | /* See if we can use movw. */ |
3950 | - if (arm_arch_thumb2 && (i & 0xffff0000) == 0) | |
3950 | + if (TARGET_HAVE_MOVT && (i & 0xffff0000) == 0) | |
3951 | 3951 | return 1; |
3952 | 3952 | else |
3953 | 3953 | /* Otherwise, try mvn. */ |
@@ -232,7 +232,7 @@ extern void (*arm_lang_output_object_attributes_hook)(void); | ||
232 | 232 | |
233 | 233 | /* Should MOVW/MOVT be used in preference to a constant pool. */ |
234 | 234 | #define TARGET_USE_MOVT \ |
235 | - (arm_arch_thumb2 \ | |
235 | + (TARGET_HAVE_MOVT \ | |
236 | 236 | && (arm_disable_literal_pool \ |
237 | 237 | || (!optimize_size && !current_tune->prefer_constant_pool))) |
238 | 238 |
@@ -263,6 +263,9 @@ extern void (*arm_lang_output_object_attributes_hook)(void); | ||
263 | 263 | /* Nonzero if this chip supports load-acquire and store-release. */ |
264 | 264 | #define TARGET_HAVE_LDACQ (TARGET_ARM_ARCH >= 8 && arm_arch_notm) |
265 | 265 | |
266 | +/* Nonzero if this chip provides the MOVW and MOVW instructions. */ | |
267 | +#define TARGET_HAVE_MOVT (arm_arch_thumb2) | |
268 | + | |
266 | 269 | /* Nonzero if integer division instructions supported. */ |
267 | 270 | #define TARGET_IDIV ((TARGET_ARM && arm_arch_arm_hwdiv) \ |
268 | 271 | || (TARGET_THUMB2 && arm_arch_thumb_hwdiv)) |
@@ -5702,7 +5702,7 @@ | ||
5702 | 5702 | [(set (match_operand:SI 0 "nonimmediate_operand" "=r") |
5703 | 5703 | (lo_sum:SI (match_operand:SI 1 "nonimmediate_operand" "0") |
5704 | 5704 | (match_operand:SI 2 "general_operand" "i")))] |
5705 | - "arm_arch_thumb2 && arm_valid_symbolic_address_p (operands[2])" | |
5705 | + "TARGET_HAVE_MOVT && arm_valid_symbolic_address_p (operands[2])" | |
5706 | 5706 | "movt%?\t%0, #:upper16:%c2" |
5707 | 5707 | [(set_attr "predicable" "yes") |
5708 | 5708 | (set_attr "predicable_short_it" "no") |
@@ -5762,7 +5762,8 @@ | ||
5762 | 5762 | [(set (match_operand:SI 0 "arm_general_register_operand" "") |
5763 | 5763 | (const:SI (plus:SI (match_operand:SI 1 "general_operand" "") |
5764 | 5764 | (match_operand:SI 2 "const_int_operand" ""))))] |
5765 | - "TARGET_THUMB2 | |
5765 | + "TARGET_THUMB | |
5766 | + && TARGET_HAVE_MOVT | |
5766 | 5767 | && arm_disable_literal_pool |
5767 | 5768 | && reload_completed |
5768 | 5769 | && GET_CODE (operands[1]) == SYMBOL_REF" |
@@ -5793,8 +5794,7 @@ | ||
5793 | 5794 | (define_split |
5794 | 5795 | [(set (match_operand:SI 0 "arm_general_register_operand" "") |
5795 | 5796 | (match_operand:SI 1 "general_operand" ""))] |
5796 | - "TARGET_32BIT | |
5797 | - && TARGET_USE_MOVT && GET_CODE (operands[1]) == SYMBOL_REF | |
5797 | + "TARGET_USE_MOVT && GET_CODE (operands[1]) == SYMBOL_REF | |
5798 | 5798 | && !flag_pic && !target_word_relocations |
5799 | 5799 | && !arm_tls_referenced_p (operands[1])" |
5800 | 5800 | [(clobber (const_int 0))] |
@@ -10975,7 +10975,7 @@ | ||
10975 | 10975 | (const_int 16) |
10976 | 10976 | (const_int 16)) |
10977 | 10977 | (match_operand:SI 1 "const_int_operand" ""))] |
10978 | - "arm_arch_thumb2" | |
10978 | + "TARGET_HAVE_MOVT" | |
10979 | 10979 | "movt%?\t%0, %L1" |
10980 | 10980 | [(set_attr "predicable" "yes") |
10981 | 10981 | (set_attr "predicable_short_it" "no") |
@@ -66,7 +66,7 @@ | ||
66 | 66 | |
67 | 67 | (define_constraint "j" |
68 | 68 | "A constant suitable for a MOVW instruction. (ARM/Thumb-2)" |
69 | - (and (match_test "TARGET_32BIT && arm_arch_thumb2") | |
69 | + (and (match_test "TARGET_HAVE_MOVT") | |
70 | 70 | (ior (and (match_code "high") |
71 | 71 | (match_test "arm_valid_symbolic_address_p (XEXP (op, 0))")) |
72 | 72 | (and (match_code "const_int") |