• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/gcc/4.7.4/843-gcc-4.7.3-Fix-PR-target-58595.patch
Gustavo ZacariasGustavo Zacarias committed 2c6ca668b8612 Jun 2014
Raw file
Source viewDiff to previous
 
1
commit 4fa1f8926227d4e79975b674dc4292b9bec4b137
2
Author: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
3
Date:   Thu Mar 6 12:07:07 2014 +0000
4
​
5
        PR target/58595
6
        * config/arm/arm.c (arm_tls_symbol_p): Remove.
7
        (arm_legitimize_address): Call legitimize_tls_address for any
8
        arm_tls_referenced_p expression, handle constant addend.  Call it
9
        before testing for !TARGET_ARM.
10
        (thumb_legitimize_address): Don't handle arm_tls_symbol_p here.
11
    
12
        * gcc.dg/tls/pr58595.c: New test.
13
    
14
    
15
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208380 138bc75d-0d04-0410-961f-82ee72b054a4
16
​
17
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
18
index ce24bfe..af5666b 100644
19
--- a/gcc/config/arm/arm.c
20
+++ b/gcc/config/arm/arm.c
21
@@ -235,7 +235,6 @@ static tree arm_gimplify_va_arg_expr (tree, tree, gimple_seq *, gimple_seq *);
22
 static void arm_option_override (void);
23
 static unsigned HOST_WIDE_INT arm_shift_truncation_mask (enum machine_mode);
24
 static bool arm_cannot_copy_insn_p (rtx);
25
-static bool arm_tls_symbol_p (rtx x);
26
 static int arm_issue_rate (void);
27
 static void arm_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED;
28
 static bool arm_output_addr_const_extra (FILE *, rtx);
29
@@ -7336,6 +7335,32 @@ legitimize_tls_address (rtx x, rtx reg)
30
 rtx
31
 arm_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode)
32
 {
33
+  if (arm_tls_referenced_p (x))
34
+    {
35
+      rtx addend = NULL;
36
+
37
+      if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == PLUS)
38
+   {
39
+     addend = XEXP (XEXP (x, 0), 1);
40
+     x = XEXP (XEXP (x, 0), 0);
41
+   }
42
+
43
+      if (GET_CODE (x) != SYMBOL_REF)
44
+   return x;
45
+
46
+      gcc_assert (SYMBOL_REF_TLS_MODEL (x) != 0);
47
+
48
+      x = legitimize_tls_address (x, NULL_RTX);
49
+
50
+      if (addend)
51
+   {
52
+     x = gen_rtx_PLUS (SImode, x, addend);
53
+     orig_x = x;
54
+   }
55
+      else
56
+   return x;
57
+    }
58
+
59
   if (!TARGET_ARM)
60
     {
61
       /* TODO: legitimize_address for Thumb2.  */
62
@@ -7344,9 +7369,6 @@ arm_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode)
63
       return thumb_legitimize_address (x, orig_x, mode);
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.