Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
d75171f3
Commit
d75171f3
authored
Sep 10, 2012
by
Richard Henderson
Committed by
Richard Henderson
Sep 10, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* config/alpha/predicates.md (small_symbolic_operand): Disallow large offsets.
From-SVN: r191138
parent
30d32ae6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
6 deletions
+35
-6
gcc/ChangeLog
+5
-0
gcc/config/alpha/predicates.md
+30
-6
No files found.
gcc/ChangeLog
View file @
d75171f3
2012-09-10 Richard Henderson <rth@redhat.com>
* config/alpha/predicates.md (small_symbolic_operand): Disallow
large offsets.
2012-09-10 Georg-Johann Lay <avr@gjlay.de>
PR target/54536
...
...
gcc/config/alpha/predicates.md
View file @
d75171f3
...
...
@@ -328,26 +328,50 @@
(define_predicate "small_symbolic_operand"
(match_code "const,symbol_ref")
{
HOST_WIDE_INT ofs = 0, max_ofs = 0;
if (! TARGET_SMALL_DATA)
return
0
;
return
false
;
if (GET_CODE (op) == CONST
&& GET_CODE (XEXP (op, 0)) == PLUS
&& CONST_INT_P (XEXP (XEXP (op, 0), 1)))
{
ofs = INTVAL (XEXP (XEXP (op, 0), 1));
op = XEXP (XEXP (op, 0), 0);
}
if (GET_CODE (op) != SYMBOL_REF)
return
0
;
return
false
;
/
*
??? There's no encode_section_info equivalent for the rtl
constant pool, so SYMBOL_FLAG_SMALL never gets set.
*
/
if (CONSTANT_POOL_ADDRESS_P (op))
return GET_MODE_SIZE (get_pool_mode (op)) <= g_switch_value;
return (SYMBOL_REF_LOCAL_P (op)
{
max_ofs = GET_MODE_SIZE (get_pool_mode (op));
if (max_ofs > g_switch_value)
return false;
}
else if (SYMBOL_REF_LOCAL_P (op)
&& SYMBOL_REF_SMALL_P (op)
&& !SYMBOL_REF_WEAK (op)
&& !SYMBOL_REF_TLS_MODEL (op));
&& !SYMBOL_REF_TLS_MODEL (op))
{
if (SYMBOL_REF_DECL (op))
max_ofs = tree_low_cst (DECL_SIZE_UNIT (SYMBOL_REF_DECL (op)), 1);
}
else
return false;
/
*
Given that we know that the GP is always 8 byte aligned, we can
always adjust by 7 without overflowing.
*
/
if (max_ofs < 8)
max_ofs = 8;
/
*
Since we know this is an object in a small data section, we know the
entire section is addressable via GP. We don't know where the section
boundaries are, but we know the entire object is within.
*
/
return IN_RANGE (ofs, 0, max_ofs - 1);
})
;; Return true if OP is a SYMBOL_REF or CONST referencing a variable
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment