As we have added -mtls-size support, there should be four types TLSLE
symbols:

  SYMBOL_TLSLE12
  SYMBOL_TLSLE24
  SYMBOL_TLSLE32
  SYMBOL_TLSLE48

which reflect the maximum address bits needed to address this symbol.

This patch rename SYMBOL_TLSLE to SYMBOL_TLSLE24. Patch [3/3] will add
support for other symbol types.

OK for trunk?

2015-08-19  Jiong Wang  <jiong.w...@arm.com>

gcc/
  * config/aarch64/aarch64-protos.h (aarch64_symbol_type): Rename
  SYMBOL_TLSLE to SYMBOL_TLSLE24.
  * config/aarch64/aarch64.c (aarch64_load_symref_appropriately): Likewise
  (aarch64_expand_mov_immediate): Likewise
  (aarch64_print_operand): Likewise
  (aarch64_classify_symbol): Likewise

From 676fc22d51432b037a2c77ae9de01f934cc77985 Mon Sep 17 00:00:00 2001
From: Jiong Wang <jiong.w...@arm.com>
Date: Wed, 19 Aug 2015 14:12:57 +0100
Subject: [PATCH 2/3] 2

---
 gcc/config/aarch64/aarch64-protos.h |  4 ++--
 gcc/config/aarch64/aarch64.c        | 12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h
index 0b09d49..daa45bf 100644
--- a/gcc/config/aarch64/aarch64-protos.h
+++ b/gcc/config/aarch64/aarch64-protos.h
@@ -74,7 +74,7 @@ enum aarch64_symbol_context
    SYMBOL_SMALL_TLSGD
    SYMBOL_SMALL_TLSDESC
    SYMBOL_SMALL_GOTTPREL
-   SYMBOL_TLSLE
+   SYMBOL_TLSLE24
    Each of these represents a thread-local symbol, and corresponds to the
    thread local storage relocation operator for the symbol being referred to.
 
@@ -111,7 +111,7 @@ enum aarch64_symbol_type
   SYMBOL_SMALL_GOTTPREL,
   SYMBOL_TINY_ABSOLUTE,
   SYMBOL_TINY_GOT,
-  SYMBOL_TLSLE,
+  SYMBOL_TLSLE24,
   SYMBOL_FORCE_TO_MEM
 };
 
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index f55cc38..87f8d96 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -1115,7 +1115,7 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm,
 	return;
       }
 
-    case SYMBOL_TLSLE:
+    case SYMBOL_TLSLE24:
       {
 	rtx tp = aarch64_load_tp (NULL);
 
@@ -1677,7 +1677,7 @@ aarch64_expand_mov_immediate (rtx dest, rtx imm)
 
 	case SYMBOL_SMALL_ABSOLUTE:
 	case SYMBOL_TINY_ABSOLUTE:
-	case SYMBOL_TLSLE:
+	case SYMBOL_TLSLE24:
 	  aarch64_load_symref_appropriately (dest, imm, sty);
 	  return;
 
@@ -4560,7 +4560,7 @@ aarch64_print_operand (FILE *f, rtx x, char code)
 	  asm_fprintf (asm_out_file, ":gottprel:");
 	  break;
 
-	case SYMBOL_TLSLE:
+	case SYMBOL_TLSLE24:
 	  asm_fprintf (asm_out_file, ":tprel:");
 	  break;
 
@@ -4593,7 +4593,7 @@ aarch64_print_operand (FILE *f, rtx x, char code)
 	  asm_fprintf (asm_out_file, ":gottprel_lo12:");
 	  break;
 
-	case SYMBOL_TLSLE:
+	case SYMBOL_TLSLE24:
 	  asm_fprintf (asm_out_file, ":tprel_lo12_nc:");
 	  break;
 
@@ -4611,7 +4611,7 @@ aarch64_print_operand (FILE *f, rtx x, char code)
 
       switch (aarch64_classify_symbolic_expression (x, SYMBOL_CONTEXT_ADR))
 	{
-	case SYMBOL_TLSLE:
+	case SYMBOL_TLSLE24:
 	  asm_fprintf (asm_out_file, ":tprel_hi12:");
 	  break;
 	default:
@@ -8717,7 +8717,7 @@ aarch64_classify_tls_symbol (rtx x)
       return SYMBOL_SMALL_GOTTPREL;
 
     case TLS_MODEL_LOCAL_EXEC:
-      return SYMBOL_TLSLE;
+      return SYMBOL_TLSLE24;
 
     case TLS_MODEL_EMULATED:
     case TLS_MODEL_NONE:
-- 
1.9.1

Reply via email to