• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GCC with patches for OS216


Commit MetaInfo

修订版33427b4642f75e0231a329336430d5dd1924f566 (tree)
时间2016-07-07 17:54:59
作者Thomas Preud'homme <thomas.preudhomme@arm....>
CommiterThomas Preud'homme

Log Message

arm.h (TARGET_USE_MOVT): Check MOVT/MOVW availability with TARGET_HAVE_MOVT.

2016-07-07 Thomas Preud'homme <thomas.preudhomme@arm.com>

gcc/
    • config/arm/arm.h (TARGET_USE_MOVT): Check MOVT/MOVW availability
      with TARGET_HAVE_MOVT.
      (TARGET_HAVE_MOVT): Define.
    • config/arm/arm.c (const_ok_for_op): Check MOVT/MOVW
      availability with TARGET_HAVE_MOVT.
    • config/arm/arm.md (arm_movt): Use TARGET_HAVE_MOVT to check MOVT
      availability.
      (addsi splitter): Use TARGET_THUMB && TARGET_HAVE_MOVT rather than
      TARGET_THUMB2.
      (symbol_refs movsi splitter): Remove TARGET_32BIT check.
      (arm_movtas_ze): Use TARGET_HAVE_MOVT to check MOVT availability.
    • config/arm/constraints.md (define_constraint "j"): Use
      TARGET_HAVE_MOVT to check MOVT availability.

From-SVN: r238083

更改概述

差异

--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,21 @@
11 2016-07-07 Thomas Preud'homme <thomas.preudhomme@arm.com>
22
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+
319 * config/arm/arm-protos.h: Reindent FL_FOR_* macro definitions.
420
521 2016-07-07 Thomas Preud'homme <thomas.preudhomme@arm.com>
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -3947,7 +3947,7 @@ const_ok_for_op (HOST_WIDE_INT i, enum rtx_code code)
39473947 {
39483948 case SET:
39493949 /* See if we can use movw. */
3950- if (arm_arch_thumb2 && (i & 0xffff0000) == 0)
3950+ if (TARGET_HAVE_MOVT && (i & 0xffff0000) == 0)
39513951 return 1;
39523952 else
39533953 /* Otherwise, try mvn. */
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -232,7 +232,7 @@ extern void (*arm_lang_output_object_attributes_hook)(void);
232232
233233 /* Should MOVW/MOVT be used in preference to a constant pool. */
234234 #define TARGET_USE_MOVT \
235- (arm_arch_thumb2 \
235+ (TARGET_HAVE_MOVT \
236236 && (arm_disable_literal_pool \
237237 || (!optimize_size && !current_tune->prefer_constant_pool)))
238238
@@ -263,6 +263,9 @@ extern void (*arm_lang_output_object_attributes_hook)(void);
263263 /* Nonzero if this chip supports load-acquire and store-release. */
264264 #define TARGET_HAVE_LDACQ (TARGET_ARM_ARCH >= 8 && arm_arch_notm)
265265
266+/* Nonzero if this chip provides the MOVW and MOVW instructions. */
267+#define TARGET_HAVE_MOVT (arm_arch_thumb2)
268+
266269 /* Nonzero if integer division instructions supported. */
267270 #define TARGET_IDIV ((TARGET_ARM && arm_arch_arm_hwdiv) \
268271 || (TARGET_THUMB2 && arm_arch_thumb_hwdiv))
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -5702,7 +5702,7 @@
57025702 [(set (match_operand:SI 0 "nonimmediate_operand" "=r")
57035703 (lo_sum:SI (match_operand:SI 1 "nonimmediate_operand" "0")
57045704 (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])"
57065706 "movt%?\t%0, #:upper16:%c2"
57075707 [(set_attr "predicable" "yes")
57085708 (set_attr "predicable_short_it" "no")
@@ -5762,7 +5762,8 @@
57625762 [(set (match_operand:SI 0 "arm_general_register_operand" "")
57635763 (const:SI (plus:SI (match_operand:SI 1 "general_operand" "")
57645764 (match_operand:SI 2 "const_int_operand" ""))))]
5765- "TARGET_THUMB2
5765+ "TARGET_THUMB
5766+ && TARGET_HAVE_MOVT
57665767 && arm_disable_literal_pool
57675768 && reload_completed
57685769 && GET_CODE (operands[1]) == SYMBOL_REF"
@@ -5793,8 +5794,7 @@
57935794 (define_split
57945795 [(set (match_operand:SI 0 "arm_general_register_operand" "")
57955796 (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
57985798 && !flag_pic && !target_word_relocations
57995799 && !arm_tls_referenced_p (operands[1])"
58005800 [(clobber (const_int 0))]
@@ -10975,7 +10975,7 @@
1097510975 (const_int 16)
1097610976 (const_int 16))
1097710977 (match_operand:SI 1 "const_int_operand" ""))]
10978- "arm_arch_thumb2"
10978+ "TARGET_HAVE_MOVT"
1097910979 "movt%?\t%0, %L1"
1098010980 [(set_attr "predicable" "yes")
1098110981 (set_attr "predicable_short_it" "no")
--- a/gcc/config/arm/constraints.md
+++ b/gcc/config/arm/constraints.md
@@ -66,7 +66,7 @@
6666
6767 (define_constraint "j"
6868 "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")
7070 (ior (and (match_code "high")
7171 (match_test "arm_valid_symbolic_address_p (XEXP (op, 0))"))
7272 (and (match_code "const_int")