aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2015-10-16 15:08:19 +0200
committerLinaro Code Review <review@review.linaro.org>2015-10-27 11:42:09 +0000
commit31e65c11a4351bebb8416d455a1ea799850770e4 (patch)
tree071beae003e2ad3b9ef03361fce2af64f04cb158
parentb8e9dd1adaea3da79140a281fd7243e8b1157663 (diff)
gcc/
Backport from trunk r225121. 2015-06-29 Jiong Wang <jiong.wang@arm.com> * config/arch64/aarch64.md (UNSPEC_TLSLE): New enumeration. * config/arch64/aarch64.md (tlsle_small): Rename to tlsle and use new unspec name. (tlsle_small_<mode>): Rename to tlsle_<mode> and use new unspec name. * config/arch64/aarch64-protos.h (arch64_symbol_type): Rename SYMBOL_SMALL_TPREL to SYMBOL_TLSLE. (aarch64_symbol_context): Ditto. * config/aarch64/aarch64.c (aarch64_load_symref_appropriately): Ditto and use new pattern name. (aarch64_expand_mov_immediate): Ditto. (aarch64_print_operand): Ditto. (aarch64_classify_tls_symbol): Ditto. Change-Id: I36cc5d9d954d3d596fe88fdfc7bb3aff2e9dd8db
-rw-r--r--gcc/config/aarch64/aarch64-protos.h4
-rw-r--r--gcc/config/aarch64/aarch64.c14
-rw-r--r--gcc/config/aarch64/aarch64.md15
3 files changed, 16 insertions, 17 deletions
diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h
index 72d7a2b3715..fa984150c67 100644
--- a/gcc/config/aarch64/aarch64-protos.h
+++ b/gcc/config/aarch64/aarch64-protos.h
@@ -64,7 +64,7 @@ enum aarch64_symbol_context
SYMBOL_SMALL_TLSGD
SYMBOL_SMALL_TLSDESC
SYMBOL_SMALL_GOTTPREL
- SYMBOL_SMALL_TPREL
+ SYMBOL_TLSLE
Each of of these represents a thread-local symbol, and corresponds to the
thread local storage relocation operator for the symbol being referred to.
@@ -98,9 +98,9 @@ enum aarch64_symbol_type
SYMBOL_SMALL_TLSGD,
SYMBOL_SMALL_TLSDESC,
SYMBOL_SMALL_GOTTPREL,
- SYMBOL_SMALL_TPREL,
SYMBOL_TINY_ABSOLUTE,
SYMBOL_TINY_GOT,
+ SYMBOL_TLSLE,
SYMBOL_FORCE_TO_MEM
};
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 0bb5c536b43..bba131e0a11 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -1011,14 +1011,14 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm,
return;
}
- case SYMBOL_SMALL_TPREL:
+ case SYMBOL_TLSLE:
{
rtx tp = aarch64_load_tp (NULL);
if (GET_MODE (dest) != Pmode)
tp = gen_lowpart (GET_MODE (dest), tp);
- emit_insn (gen_tlsle_small (dest, tp, imm));
+ emit_insn (gen_tlsle (dest, tp, imm));
set_unique_reg_note (get_last_insn (), REG_EQUIV, imm);
return;
}
@@ -1574,9 +1574,9 @@ aarch64_expand_mov_immediate (rtx dest, rtx imm)
}
/* FALLTHRU */
- case SYMBOL_SMALL_TPREL:
case SYMBOL_SMALL_ABSOLUTE:
case SYMBOL_TINY_ABSOLUTE:
+ case SYMBOL_TLSLE:
aarch64_load_symref_appropriately (dest, imm, sty);
return;
@@ -4459,7 +4459,7 @@ aarch64_print_operand (FILE *f, rtx x, char code)
asm_fprintf (asm_out_file, ":gottprel:");
break;
- case SYMBOL_SMALL_TPREL:
+ case SYMBOL_TLSLE:
asm_fprintf (asm_out_file, ":tprel:");
break;
@@ -4492,7 +4492,7 @@ aarch64_print_operand (FILE *f, rtx x, char code)
asm_fprintf (asm_out_file, ":gottprel_lo12:");
break;
- case SYMBOL_SMALL_TPREL:
+ case SYMBOL_TLSLE:
asm_fprintf (asm_out_file, ":tprel_lo12_nc:");
break;
@@ -4510,7 +4510,7 @@ aarch64_print_operand (FILE *f, rtx x, char code)
switch (aarch64_classify_symbolic_expression (x, SYMBOL_CONTEXT_ADR))
{
- case SYMBOL_SMALL_TPREL:
+ case SYMBOL_TLSLE:
asm_fprintf (asm_out_file, ":tprel_hi12:");
break;
default:
@@ -7599,7 +7599,7 @@ aarch64_classify_tls_symbol (rtx x)
return SYMBOL_SMALL_GOTTPREL;
case TLS_MODEL_LOCAL_EXEC:
- return SYMBOL_SMALL_TPREL;
+ return SYMBOL_TLSLE;
case TLS_MODEL_EMULATED:
case TLS_MODEL_NONE:
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index a9ee0587349..bd5f40846cd 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -116,6 +116,7 @@
UNSPEC_ST4_LANE
UNSPEC_TLS
UNSPEC_TLSDESC
+ UNSPEC_TLSLE
UNSPEC_USHL_2S
UNSPEC_VSTRUCTDUMMY
UNSPEC_SP_SET
@@ -4433,27 +4434,25 @@
(set_attr "length" "8")]
)
-(define_expand "tlsle_small"
+(define_expand "tlsle"
[(set (match_operand 0 "register_operand" "=r")
(unspec [(match_operand 1 "register_operand" "r")
(match_operand 2 "aarch64_tls_le_symref" "S")]
- UNSPEC_GOTSMALLTLS))]
+ UNSPEC_TLSLE))]
""
{
machine_mode mode = GET_MODE (operands[0]);
emit_insn ((mode == DImode
- ? gen_tlsle_small_di
- : gen_tlsle_small_si) (operands[0],
- operands[1],
- operands[2]));
+ ? gen_tlsle_di
+ : gen_tlsle_si) (operands[0], operands[1], operands[2]));
DONE;
})
-(define_insn "tlsle_small_<mode>"
+(define_insn "tlsle_<mode>"
[(set (match_operand:P 0 "register_operand" "=r")
(unspec:P [(match_operand:P 1 "register_operand" "r")
(match_operand 2 "aarch64_tls_le_symref" "S")]
- UNSPEC_GOTSMALLTLS))]
+ UNSPEC_TLSLE))]
""
"add\\t%<w>0, %<w>1, #%G2, lsl #12\;add\\t%<w>0, %<w>0, #%L2"
[(set_attr "type" "alu_sreg")