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
84f414bc
Commit
84f414bc
authored
Jul 23, 1996
by
Michael Meissner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix -fpic problems
From-SVN: r12547
parent
b6d1177a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
53 deletions
+47
-53
gcc/config/rs6000/rs6000.c
+1
-1
gcc/config/rs6000/rs6000.md
+2
-38
gcc/config/rs6000/sysv4.h
+34
-5
gcc/config/rs6000/t-ppcgas
+10
-9
No files found.
gcc/config/rs6000/rs6000.c
View file @
84f414bc
...
...
@@ -2118,7 +2118,7 @@ rs6000_replace_regno (x, from, reg)
if
(
REGNO
(
x
)
==
from
)
{
if
(
!
*
reg
)
*
reg
=
gen_reg_rtx
(
Pmode
);
*
reg
=
pic_offset_table_rtx
=
gen_reg_rtx
(
Pmode
);
return
*
reg
;
}
...
...
gcc/config/rs6000/rs6000.md
View file @
84f414bc
...
...
@@ -5037,14 +5037,9 @@
"
{
operands
[
2
]
= rs6000_got_register (operands
[
1
]
);
if (flag_pic > 1)
{
emit_insn (gen_movsi_got_large (operands
[
0
]
, operands
[
1
]
, operands
[
2
]
));
DONE;
}
}")
(define_insn "
*
movsi_got_internal
1
"
(define_insn "
*
movsi_got_internal"
[
(set (match_operand:SI 0 "register_operand" "=r")
(unspec
[
(match_operand:SI 1 "got_operand" "")
(match_operand:SI 2 "register_operand" "b")] 8))]
...
...
@@ -5052,37 +5047,6 @@
"{l|lwz} %0,%a1@got(%2)"
[
(set_attr "type" "load")
]
)
(define_expand "movsi_got_large"
[
(set (match_dup 3)
(unspec
[
(match_operand:SI 1 "got_operand" "")
]
9))
(set (match_dup 3)
(unspec
[
(match_dup 1)
(match_dup 3)] 10))
(set (match_operand:SI 0 "register_operand" "")
(mem:SI (plus:SI (match_dup 3)
(match_operand:SI 2 "register_operand" ""))))]
"(DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS) && flag_pic > 1"
"
{
if (reload_completed || reload_in_progress)
abort ();
operands
[
3
]
= gen_reg_rtx (SImode);
}")
(define_insn "
*
movsi_got_internal2_high"
[
(set (match_operand:SI 0 "register_operand" "=b")
(unspec
[
(match_operand:SI 1 "got_operand" "")
]
9))]
"(DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS) && flag_pic > 1"
"{cau|addis} %0,0,%1@got@ha")
(define_insn "
*
movsi_got_internal2_losum"
[
(set (match_operand:SI 0 "register_operand" "=r")
(unspec
[
(match_operand:SI 1 "got_operand" "")
(match_operand:SI 2 "register_operand" "b")] 10))]
"(DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS) && flag_pic > 1"
"{cal %0,%a1@got@l(%2)|addi %0,%2,%a1@got@l}")
;; For SI, we special-case integers that can't be loaded in one insn. We
;; do the load 16-bits at a time. We could do this by loading from memory,
;; and this is even supposed to be faster, but it is simpler not to get
...
...
@@ -5111,7 +5075,7 @@
}
if ((DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS)
&& flag_pic && got_operand (operands
[
1
]
, SImode))
&& flag_pic
== 1
&& got_operand (operands
[
1
]
, SImode))
{
emit_insn (gen_movsi_got (operands
[
0
]
, operands
[
1
]
));
DONE;
...
...
gcc/config/rs6000/sysv4.h
View file @
84f414bc
...
...
@@ -185,25 +185,46 @@ do { \
else \
error ("Bad value for -msdata=%s", rs6000_sdata_name); \
} \
else if (TARGET_SDATA && TARGET_EABI) \
{ \
rs6000_sdata = SDATA_EABI; \
rs6000_sdata_name = "eabi"; \
} \
else if (TARGET_SDATA) \
rs6000_sdata = (TARGET_EABI) ? SDATA_EABI : SDATA_SYSV; \
{ \
rs6000_sdata = SDATA_SYSV; \
rs6000_sdata_name = "sysv"; \
} \
else if (DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS) \
{ \
rs6000_sdata = SDATA_DATA; \
rs6000_sdata_name = "data"; \
target_flags |= MASK_SDATA; \
} \
else \
rs6000_sdata = SDATA_NONE; \
{ \
rs6000_sdata = SDATA_NONE; \
rs6000_sdata_name = "none"; \
} \
\
if (TARGET_RELOCATABLE && \
(rs6000_sdata == SDATA_EABI || rs6000_sdata == SDATA_SYSV)) \
{ \
rs6000_sdata = SDATA_DATA; \
error ("-mrelocatable and -msdata are incompatible."); \
error ("-mrelocatable and -msdata=%s are incompatible.", \
rs6000_sdata_name); \
} \
\
if (TARGET_SDATA && DEFAULT_ABI != ABI_V4 \
&& DEFAULT_ABI != ABI_SOLARIS) \
else if (flag_pic && \
(rs6000_sdata == SDATA_EABI || rs6000_sdata == SDATA_SYSV)) \
{ \
rs6000_sdata = SDATA_DATA; \
error ("-f%s and -msdata=%s are incompatible.", \
(flag_pic > 1) ? "PIC" : "pic", \
rs6000_sdata_name); \
} \
\
if (TARGET_SDATA && DEFAULT_ABI != ABI_V4 && DEFAULT_ABI != ABI_SOLARIS) \
{ \
target_flags &= ~MASK_SDATA; \
error ("-msdata and -mcall-%s are incompatible.", rs6000_abi_name); \
...
...
@@ -234,6 +255,14 @@ do { \
target_flags |= MASK_LITTLE_ENDIAN; \
error ("-mcall-nt must be little endian"); \
} \
\
/* Treat -fPIC the same as -mrelocatable */
\
if (flag_pic > 1) \
target_flags |= MASK_RELOCATABLE; \
\
else if (TARGET_RELOCATABLE) \
flag_pic = 2; \
\
} while (0)
/* Default ABI to compile code for */
...
...
gcc/config/rs6000/t-ppcgas
View file @
84f414bc
...
...
@@ -24,16 +24,17 @@ eabi-ctors.c: $(srcdir)/config/rs6000/eabi-ctors.c
# Build libgcc.a with different options.
MULTILIB_OPTIONS = msoft-float \
mrelocatable \
mrelocatable
-lib
\
mlittle/mbig \
mcall-sysv-noeabi/mcall-sysv-eabi/mcall-aix
/mcall-solaris
mcall-sysv-noeabi/mcall-sysv-eabi/mcall-aix
MULTILIB_DIRNAMES = nof \
rel \
le be \
cs ce ca
sol
cs ce ca
MULTILIB_MATCHES = mlittle=mlittle-endian \
mlittle=mcall-solaris \
mbig=mbig-endian \
mbig=mcall-linux \
msoft-float=mcpu?403 \
...
...
@@ -41,12 +42,12 @@ MULTILIB_MATCHES = mlittle=mlittle-endian \
msoft-float=mcpu?860 \
mcall-sysv-noeabi=mcall-linux \
mcall-sysv-eabi=meabi \
mcall-sysv-noeabi=mno-eabi
MULTILIB_EXCEPTIONS = *mrelocatable*/*mcall-sysv-noeabi*
\
*mrelocatable*/*mcall-solaris*
\
*mbig*/*mcall-solaris*
\
*mlittle*/*mcall-solaris*
mcall-sysv-noeabi=mno-eabi
\
mcall-sysv-noeabi=mcall-solaris \
mrelocatable-lib=mrelocatable
\
mrelocatable-lib=fpic
\
mrelocatable-lib=fPIC
\
mrelocatable-lib=shared
LIBGCC = stmp-multilib stmp-crt
INSTALL_LIBGCC = install-multilib install-crt
...
...
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