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
c399861d
Commit
c399861d
authored
Oct 05, 1994
by
Michael Meissner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Supprt LABEL_REFs when using -fpic.
From-SVN: r8222
parent
8ad4abfc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
gcc/config/i386/i386.c
+11
-9
gcc/config/i386/i386.md
+2
-4
No files found.
gcc/config/i386/i386.c
View file @
c399861d
...
...
@@ -1572,7 +1572,8 @@ legitimize_pic_address (orig, reg)
if
(
reg
==
0
)
reg
=
gen_reg_rtx
(
Pmode
);
if
(
GET_CODE
(
addr
)
==
SYMBOL_REF
&&
SYMBOL_REF_FLAG
(
addr
))
if
((
GET_CODE
(
addr
)
==
SYMBOL_REF
&&
SYMBOL_REF_FLAG
(
addr
))
||
GET_CODE
(
addr
)
==
LABEL_REF
)
new
=
gen_rtx
(
PLUS
,
Pmode
,
pic_offset_table_rtx
,
orig
);
else
new
=
gen_rtx
(
MEM
,
Pmode
,
...
...
@@ -1854,7 +1855,9 @@ output_pic_addr_const (file, x, code)
fprintf
(
file
,
"@GOTOFF(%%ebx)"
);
else
if
(
code
==
'P'
)
fprintf
(
file
,
"@PLT"
);
else
if
(
GET_CODE
(
x
)
==
LABEL_REF
||
!
SYMBOL_REF_FLAG
(
x
))
else
if
(
GET_CODE
(
x
)
==
LABEL_REF
)
fprintf
(
file
,
"@GOTOFF"
);
else
if
(
!
SYMBOL_REF_FLAG
(
x
))
fprintf
(
file
,
"@GOT"
);
else
fprintf
(
file
,
"@GOTOFF"
);
...
...
@@ -2176,15 +2179,14 @@ print_operand_address (file, addr)
if
(
addr
!=
0
)
{
if
(
GET_CODE
(
addr
)
==
LABEL_REF
)
if
(
flag_pic
)
output_pic_addr_const
(
file
,
addr
,
0
);
else
if
(
GET_CODE
(
addr
)
==
LABEL_REF
)
output_asm_label
(
addr
);
else
{
if
(
flag_pic
)
output_pic_addr_const
(
file
,
addr
,
0
);
else
output_addr_const
(
file
,
addr
);
}
output_addr_const
(
file
,
addr
);
}
if
(
ireg
!=
0
&&
GET_CODE
(
ireg
)
==
MULT
)
...
...
gcc/config/i386/i386.md
View file @
c399861d
...
...
@@ -808,9 +808,7 @@
/
* Fastest way to change a 0 to a 1. *
/
return AS1 (inc%L0,%0);
if (flag_pic
&& GET_CODE (operands
[
1
]
) == SYMBOL_REF
&& CONSTANT_POOL_ADDRESS_P (operands
[
1
]
))
if (flag_pic && SYMBOLIC_CONST (operands
[
1
]
))
return AS2 (lea%L0,%a1,%0);
return AS2 (mov%L0,%1,%0);
...
...
@@ -2538,7 +2536,7 @@
;; addsi3 is faster, so put this after.
(define_insn ""
(define_insn "
movsi_lea
"
[
(set (match_operand:SI 0 "register_operand" "=r")
(match_operand:QI 1 "address_operand" "p"))]
""
...
...
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