• 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/binutils/2.25.1/905-Fix-trampolines-search-code-for-conditional-branches.patch
Gustavo ZacariasGustavo Zacarias committed a8fd20b5e6b28 Jul 2015
Raw file
Source viewDiff to previous
 
1
From 415480d6471e67aef97c0241d451ef2423a1da9d Mon Sep 17 00:00:00 2001
2
From: Max Filippov <jcmvbkbc@gmail.com>
3
Date: Tue, 25 Nov 2014 21:33:21 +0300
4
Subject: [PATCH] Fix trampolines search code for conditional branches
5
​
6
For conditional branches that need more than one trampoline to reach its
7
target assembler couldn't always find suitable trampoline because
8
post-loop condition check was placed inside the loop, resulting in
9
premature loop termination. Move check outside the loop.
10
​
11
This fixes the following build errors seen when assembling huge files
12
produced by gcc:
13
    Error: jump target out of range; no usable trampoline found
14
    Error: operand 1 of 'j' has out of range value '307307'
15
​
16
2014-11-25  Max Filippov  <jcmvbkbc@gmail.com>
17
​
18
gas/
19
    * config/tc-xtensa.c (search_trampolines): Move post-loop
20
    condition check outside the search loop.
21
​
22
gas/testsuite/
23
    * gas/xtensa/trampoline.d: Add expected output for branches.
24
    * gas/xtensa/trampoline.s: Add test case for branches.
25
​
26
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
27
---
28
Backported from: d92b6eece424f0ad35d96fdd85bf207295e8c4c3
29
Changes to ChangeLogs are dropped.
30
​
31
 gas/config/tc-xtensa.c                | 8 ++++----
32
 gas/testsuite/gas/xtensa/trampoline.d | 9 +++++++++
33
 gas/testsuite/gas/xtensa/trampoline.s | 7 +++++++
34
 3 files changed, 20 insertions(+), 4 deletions(-)
35
​
36
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
37
index d11b0c7..f23ccf8 100644
38
--- a/gas/config/tc-xtensa.c
39
+++ b/gas/config/tc-xtensa.c
40
@@ -9514,11 +9514,11 @@ search_trampolines (TInsn *tinsn, fragS *fragP, bfd_boolean unreachable_only)
41
          if (next_addr == 0 || addr - next_addr > J_RANGE)
42
        break;
43
        }
44
-     if (abs (addr - this_addr) < J_RANGE)
45
-       return tf;
46
-
47
-     return NULL;
48
    }
49
+      if (abs (addr - this_addr) < J_RANGE)
50
+   return tf;
51
+
52
+      return NULL;
53
     }
54
   for ( ; tf; tf = tf->next)
55
     {
56
diff --git a/gas/testsuite/gas/xtensa/trampoline.d b/gas/testsuite/gas/xtensa/trampoline.d
57
index b4f65dc..5ae32a6 100644
58
--- a/gas/testsuite/gas/xtensa/trampoline.d
59
+++ b/gas/testsuite/gas/xtensa/trampoline.d
60
@@ -24,3 +24,12 @@
61
 .*33462:.*j.0x49407
62
 #...
63
 .*49407:.*j.0x49407
  • 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.