• 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.8.5/870-xtensa-add-mauto-litpools-option.patch
Max FilippovMax Filippov committed 5b84265f1c213 Aug 2015
Raw file
Source viewDiff to previous
+  [(set_attr "type" "move,move,move,load,store,store,move,move,move,move,move,load,load,store,rsr,wsr")
 
1
From 6d852ffb43b111a39162135c95249e749c4e285b Mon Sep 17 00:00:00 2001
2
From: Max Filippov <jcmvbkbc@gmail.com>
3
Date: Thu, 6 Aug 2015 01:16:02 +0300
4
Subject: [PATCH] xtensa: add -mauto-litpools option
5
​
6
With support from assembler this option allows compiling huge functions,
7
where single literal pool at the beginning of a function may not be
8
reachable by L32R instructions at its end.
9
​
10
Currently assembler --auto-litpools option cannot deal with literals
11
used from multiple locations separated by more than 256 KBytes of code.
12
Don't turn constants into literals, instead use MOVI instruction to load
13
them into registers and let the assembler turn them into literals as
14
necessary.
15
​
16
2015-08-12  Max Filippov  <jcmvbkbc@gmail.com>
17
gcc/
18
    * config/xtensa/constraints.md (define_constraint "Y"): New
19
    constraint.
20
    * config/xtensa/elf.h (ASM_SPEC): Add m(no-)auto-litpools.
21
    * config/xtensa/linux.h (ASM_SPEC): Likewise.
22
    * config/xtensa/predicates.md (move_operand): Match constants
23
    and symbols in the presence of TARGET_AUTO_LITPOOLS.
24
    * config/xtensa/xtensa.c (xtensa_valid_move): Don't allow
25
    immediate references to TLS data.
26
    (xtensa_emit_move_sequence): Don't force constants to memory in
27
    the presence of TARGET_AUTO_LITPOOLS.
28
    (print_operand): Add 'y' format, same as default, but capable of
29
    printing SF mode constants as well.
30
    * config/xtensa/xtensa.md (movsi_internal, movhi_internal)
31
    (movsf_internal): Add movi pattern that loads literal.
32
    (movsf, movdf): Don't force constants to memory in the presence
33
    of TARGET_AUTO_LITPOOLS.
34
    (movdf_internal): Add 'Y' constraint.
35
    * config/xtensa/xtensa.opt (mauto-litpools): New option.
36
​
37
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
38
---
39
Backported from: r226828
40
Changes to ChangeLogs and documentation are dropped.
41
​
42
 gcc/config/xtensa/constraints.md |  5 +++++
43
 gcc/config/xtensa/elf.h          |  4 +++-
44
 gcc/config/xtensa/linux.h        |  4 +++-
45
 gcc/config/xtensa/predicates.md  |  3 ++-
46
 gcc/config/xtensa/xtensa.c       | 19 ++++++++++++++++++-
47
 gcc/config/xtensa/xtensa.md      | 35 +++++++++++++++++++----------------
48
 gcc/config/xtensa/xtensa.opt     |  4 ++++
49
 7 files changed, 54 insertions(+), 20 deletions(-)
50
​
51
diff --git a/gcc/config/xtensa/constraints.md b/gcc/config/xtensa/constraints.md
52
index 30f4c1f..773d4f9 100644
53
--- a/gcc/config/xtensa/constraints.md
54
+++ b/gcc/config/xtensa/constraints.md
55
@@ -111,6 +111,11 @@
56
  (and (match_code "const_int")
57
       (match_test "xtensa_mask_immediate (ival)")))
58
 
59
+(define_constraint "Y"
60
+ "A constant that can be used in relaxed MOVI instructions."
61
+ (and (match_code "const_int,const_double,const,symbol_ref,label_ref")
62
+      (match_test "TARGET_AUTO_LITPOOLS")))
63
+
  • 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.