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
508a48d1
Commit
508a48d1
authored
31 years ago
by
Jim Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(pic_address_needs_scratch): New function.
(override_options): Set flag_pic when TARGET_ABICALLS. From-SVN: r6848
parent
bc0989e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletions
+27
-1
gcc/config/mips/mips.c
+27
-1
No files found.
gcc/config/mips/mips.c
View file @
508a48d1
...
...
@@ -1655,6 +1655,22 @@ mips_address_cost (addr)
return
4
;
}
/* Return true if X is an address which needs a temporary register when
reloaded while generating PIC code. */
int
pic_address_needs_scratch
(
x
)
rtx
x
;
{
/* An address which is a symbolic plus a non SMALL_INT needs a temp reg. */
if
(
GET_CODE
(
x
)
==
CONST
&&
GET_CODE
(
XEXP
(
x
,
0
))
==
PLUS
&&
GET_CODE
(
XEXP
(
XEXP
(
x
,
0
),
0
))
==
SYMBOL_REF
&&
GET_CODE
(
XEXP
(
XEXP
(
x
,
0
),
1
))
==
CONST_INT
&&
!
SMALL_INT
(
XEXP
(
XEXP
(
x
,
0
),
1
)))
return
1
;
return
0
;
}
/* Make normal rtx_code into something we can index from an array */
...
...
@@ -3245,8 +3261,18 @@ override_options ()
if
(
TARGET_HALF_PIC
)
HALF_PIC_INIT
();
/* -fpic (-KPIC) is the default when TARGET_ABICALLS is defined. We need
to set flag_pic so that the LEGITIMATE_PIC_OPERAND_P macro will work. */
/* ??? -non_shared turns off pic code generation, but this is not
implemented. */
if
(
TARGET_ABICALLS
)
mips_abicalls
=
MIPS_ABICALLS_YES
;
{
mips_abicalls
=
MIPS_ABICALLS_YES
;
flag_pic
=
1
;
/* ??? Is this sufficient? */
if
(
mips_section_threshold
>
0
)
warning
(
"-G is incompatible with PIC code which is the default"
);
}
else
mips_abicalls
=
MIPS_ABICALLS_NO
;
...
...
This diff is collapsed.
Click to expand it.
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