[AARCH64]Fix TLS local exec model addressing code generation inconsistency.
authorRenlin Li <renlin.li@arm.com>
Mon, 26 Jan 2015 15:42:15 +0000 (15:42 +0000)
committerRenlin Li <renlin@gcc.gnu.org>
Mon, 26 Jan 2015 15:42:15 +0000 (15:42 +0000)
gcc/

* config/aarch64/aarch64.c (aarch64_load_symref_appropriately): Correct
the comment.
* config/aarch64/aarch64.md * (tlsle_small_<mode>): Add left shift
12-bit for higher part.

From-SVN: r220116

gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/config/aarch64/aarch64.md

index a567617..57fb5f1 100644 (file)
@@ -1,3 +1,10 @@
+2015-01-26  Renlin Li  <renlin.li@arm.com>
+
+       * config/aarch64/aarch64.c (aarch64_load_symref_appropriately): Correct
+       the comment.
+       * config/aarch64/aarch64.md (tlsle_small_<mode>): Add left shift 12-bit
+       for higher part.
+
 2015-01-26  Richard Biener  <rguenther@suse.de>
 
        PR middle-end/64764
index dd49fcd..b923fdb 100644 (file)
@@ -818,8 +818,8 @@ tls_symbolic_operand_type (rtx addr)
 
    Local Exec:
    mrs  tp, tpidr_el0
-   add  t0, tp, #:tprel_hi12:imm
-   add  t0, #:tprel_lo12_nc:imm
+   add  t0, tp, #:tprel_hi12:imm, lsl #12
+   add  t0, t0, #:tprel_lo12_nc:imm
 */
 
 static void
index bc49fbe..b81ecb2 100644 (file)
                    (match_operand 2 "aarch64_tls_le_symref" "S")]
                   UNSPEC_GOTSMALLTLS))]
   ""
-  "add\\t%<w>0, %<w>1, #%G2\;add\\t%<w>0, %<w>0, #%L2"
+  "add\\t%<w>0, %<w>1, #%G2, lsl #12\;add\\t%<w>0, %<w>0, #%L2"
   [(set_attr "type" "alu_sreg")
    (set_attr "length" "8")]
 )