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
7402683f
Commit
7402683f
authored
Jan 15, 1997
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initialize reload_address_{base,index}_reg_class
From-SVN: r13495
parent
1ba61f4e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
0 deletions
+72
-0
gcc/reload1.c
+72
-0
No files found.
gcc/reload1.c
View file @
7402683f
...
@@ -253,6 +253,18 @@ int reload_first_uid;
...
@@ -253,6 +253,18 @@ int reload_first_uid;
int
caller_save_needed
;
int
caller_save_needed
;
/* The register class to use for a base register when reloading an
address. This is normally BASE_REG_CLASS, but it may be different
when using SMALL_REGISTER_CLASSES and passing parameters in
registers. */
enum
reg_class
reload_address_base_reg_class
;
/* The register class to use for an index register when reloading an
address. This is normally INDEX_REG_CLASS, but it may be different
when using SMALL_REGISTER_CLASSES and passing parameters in
registers. */
enum
reg_class
reload_address_index_reg_class
;
/* Set to 1 while reload_as_needed is operating.
/* Set to 1 while reload_as_needed is operating.
Required by some machines to handle any generated moves differently. */
Required by some machines to handle any generated moves differently. */
...
@@ -431,6 +443,66 @@ init_reload ()
...
@@ -431,6 +443,66 @@ init_reload ()
/* Initialize obstack for our rtl allocation. */
/* Initialize obstack for our rtl allocation. */
gcc_obstack_init
(
&
reload_obstack
);
gcc_obstack_init
(
&
reload_obstack
);
reload_firstobj
=
(
char
*
)
obstack_alloc
(
&
reload_obstack
,
0
);
reload_firstobj
=
(
char
*
)
obstack_alloc
(
&
reload_obstack
,
0
);
/* Decide which register class should be used when reloading
addresses. If we are using SMALL_REGISTER_CLASSES, and any
parameters are passed in registers, then we do not want to use
those registers when reloading an address. Otherwise, if a
function argument needs a reload, we may wind up clobbering
another argument to the function which was already computed. If
we find a subset class which simply avoids those registers, we
use it instead. ??? It would be better to only use the
restricted class when we actually are loading function arguments,
but that is hard to determine. */
reload_address_base_reg_class
=
BASE_REG_CLASS
;
reload_address_index_reg_class
=
INDEX_REG_CLASS
;
#ifdef SMALL_REGISTER_CLASSES
if
(
SMALL_REGISTER_CLASSES
)
{
int
regno
;
HARD_REG_SET
base
,
index
;
enum
reg_class
*
p
;
COPY_HARD_REG_SET
(
base
,
reg_class_contents
[
BASE_REG_CLASS
]);
COPY_HARD_REG_SET
(
index
,
reg_class_contents
[
INDEX_REG_CLASS
]);
for
(
regno
=
0
;
regno
<
FIRST_PSEUDO_REGISTER
;
regno
++
)
{
if
(
FUNCTION_ARG_REGNO_P
(
regno
))
{
CLEAR_HARD_REG_BIT
(
base
,
regno
);
CLEAR_HARD_REG_BIT
(
index
,
regno
);
}
}
GO_IF_HARD_REG_EQUAL
(
base
,
reg_class_contents
[
BASE_REG_CLASS
],
baseok
);
for
(
p
=
reg_class_subclasses
[
BASE_REG_CLASS
];
*
p
!=
LIM_REG_CLASSES
;
p
++
)
{
GO_IF_HARD_REG_EQUAL
(
base
,
reg_class_contents
[
*
p
],
usebase
);
continue
;
usebase
:
reload_address_base_reg_class
=
*
p
;
break
;
}
baseok
:
;
GO_IF_HARD_REG_EQUAL
(
index
,
reg_class_contents
[
INDEX_REG_CLASS
],
indexok
);
for
(
p
=
reg_class_subclasses
[
INDEX_REG_CLASS
];
*
p
!=
LIM_REG_CLASSES
;
p
++
)
{
GO_IF_HARD_REG_EQUAL
(
index
,
reg_class_contents
[
*
p
],
useindex
);
continue
;
useindex
:
reload_address_index_reg_class
=
*
p
;
break
;
}
indexok
:
;
}
#endif
/* SMALL_REGISTER_CLASSES */
}
}
/* Main entry point for the reload pass.
/* Main entry point for the reload pass.
...
...
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