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
3d771dfd
Commit
3d771dfd
authored
Oct 07, 1994
by
Michael Meissner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not allow SUBREGs as either base or index register.
From-SVN: r8237
parent
45524ce9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
20 deletions
+14
-20
gcc/config/i386/i386.c
+14
-20
No files found.
gcc/config/i386/i386.c
View file @
3d771dfd
...
@@ -1424,21 +1424,18 @@ legitimate_address_p (mode, addr, strict)
...
@@ -1424,21 +1424,18 @@ legitimate_address_p (mode, addr, strict)
}
}
/* Validate base register */
/* Validate base register */
/* Don't allow SUBREG's here, it can lead to spill failures when the base
is one word out of a two word structure, which is represented internally
as a DImode int. */
if
(
base
)
if
(
base
)
{
{
if
(
GET_CODE
(
base
)
==
SUB
REG
)
if
(
GET_CODE
(
base
)
!=
REG
)
{
{
if
(
GET_CODE
(
SUBREG_REG
(
base
))
!=
REG
||
SUBREG_WORD
(
base
)
!=
0
)
ADDR_INVALID
(
"Base is not a register.
\n
"
,
base
);
{
return
FALSE
;
ADDR_INVALID
(
"Base SUBREG is not of a REG.
\n
"
,
base
);
return
FALSE
;
}
base
=
SUBREG_REG
(
base
);
}
}
if
(
GET_CODE
(
base
)
!=
REG
if
((
strict
&&
!
REG_OK_FOR_BASE_STRICT_P
(
base
))
||
(
strict
&&
!
REG_OK_FOR_BASE_STRICT_P
(
base
))
||
(
!
strict
&&
!
REG_OK_FOR_BASE_NONSTRICT_P
(
base
)))
||
(
!
strict
&&
!
REG_OK_FOR_BASE_NONSTRICT_P
(
base
)))
{
{
ADDR_INVALID
(
"Base is not valid.
\n
"
,
base
);
ADDR_INVALID
(
"Base is not valid.
\n
"
,
base
);
...
@@ -1447,21 +1444,18 @@ legitimate_address_p (mode, addr, strict)
...
@@ -1447,21 +1444,18 @@ legitimate_address_p (mode, addr, strict)
}
}
/* Validate index register */
/* Validate index register */
/* Don't allow SUBREG's here, it can lead to spill failures when the index
is one word out of a two word structure, which is represented internally
as a DImode int. */
if
(
indx
)
if
(
indx
)
{
{
if
(
GET_CODE
(
indx
)
==
SUB
REG
)
if
(
GET_CODE
(
indx
)
!=
REG
)
{
{
if
(
GET_CODE
(
SUBREG_REG
(
indx
))
!=
REG
||
SUBREG_WORD
(
indx
)
!=
0
)
ADDR_INVALID
(
"Index is not a register.
\n
"
,
indx
);
{
return
FALSE
;
ADDR_INVALID
(
"Index SUBREG is not of a REG."
,
indx
);
return
FALSE
;
}
indx
=
SUBREG_REG
(
indx
);
}
}
if
(
GET_CODE
(
indx
)
!=
REG
if
((
strict
&&
!
REG_OK_FOR_INDEX_STRICT_P
(
indx
))
||
(
strict
&&
!
REG_OK_FOR_INDEX_STRICT_P
(
indx
))
||
(
!
strict
&&
!
REG_OK_FOR_INDEX_NONSTRICT_P
(
indx
)))
||
(
!
strict
&&
!
REG_OK_FOR_INDEX_NONSTRICT_P
(
indx
)))
{
{
ADDR_INVALID
(
"Index is not valid.
\n
"
,
indx
);
ADDR_INVALID
(
"Index is not valid.
\n
"
,
indx
);
...
...
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