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
4a39a918
Commit
4a39a918
authored
Jan 04, 1992
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r163
parent
6434da25
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
2 deletions
+48
-2
gcc/machmode.h
+12
-1
gcc/rtl.c
+36
-1
No files found.
gcc/machmode.h
View file @
4a39a918
...
...
@@ -59,7 +59,7 @@ extern char *mode_name[];
#define GET_MODE_NAME(MODE) (mode_name[(int)(MODE)])
enum
mode_class
{
MODE_RANDOM
,
MODE_INT
,
MODE_FLOAT
,
MODE_PARTIAL_INT
,
MODE_CC
,
MODE_COMPLEX_INT
,
MODE_COMPLEX_FLOAT
};
MODE_COMPLEX_INT
,
MODE_COMPLEX_FLOAT
,
MAX_MODE_CLASS
};
/* Get the general kind of object that mode MODE represents
(integer, floating, complex, etc.) */
...
...
@@ -108,4 +108,15 @@ extern enum machine_mode get_best_mode ();
MIN (BIGGEST_ALIGNMENT, \
MAX (1, (GET_MODE_UNIT_SIZE (MODE) * BITS_PER_UNIT)))
/* For each class, get the narrowest mode in that class. */
extern
enum
machine_mode
class_narrowest_mode
[];
#define GET_CLASS_NARROWEST_MODE(CLASS) class_narrowest_mode[(int)(CLASS)]
/* Define the integer modes whose sizes are BITS_PER_UNIT
and BITS_PER_WORD. */
extern
enum
machine_mode
byte_mode
;
extern
enum
machine_mode
word_mode
;
#endif
/* not HAVE_MACHINE_MODES */
gcc/rtl.c
View file @
4a39a918
...
...
@@ -117,6 +117,15 @@ enum machine_mode mode_wider_mode[(int) MAX_MACHINE_MODE] = {
#undef DEF_MACHMODE
/* Indexed by mode class, gives the narrowest mode for each class. */
enum
machine_mode
class_narrowest_mode
[(
int
)
MAX_MODE_CLASS
];
/* Commonly used modes. */
enum
machine_mode
byte_mode
;
/* Mode whose width is BITS_PER_UNIT */
enum
machine_mode
word_mode
;
/* Mode whose width is BITS_PER_WORD */
/* Indexed by rtx code, gives a sequence of operand-types for
rtx's of that code. The sequence is a C string in which
each charcter describes one operand. */
...
...
@@ -774,11 +783,14 @@ read_rtx (infile)
}
/* This is called once per compilation, before any rtx's are constructed.
It initializes the vector `rtx_length' and the extra CC modes, if any. */
It initializes the vector `rtx_length', the extra CC modes, if any,
and computes certain commonly-used modes. */
void
init_rtl
()
{
int
min_class_size
[(
int
)
MAX_MODE_CLASS
];
enum
machine_mode
mode
;
int
i
;
for
(
i
=
0
;
i
<
NUM_RTX_CODE
;
i
++
)
...
...
@@ -816,4 +828,27 @@ init_rtl ()
mode_wider_mode
[
i
]
=
VOIDmode
;
}
#endif
/* Find the narrowest mode for each class and compute the word and byte
modes. */
for
(
i
=
0
;
i
<
(
int
)
MAX_MODE_CLASS
;
i
++
)
min_class_size
[
i
]
=
1000
;
for
(
mode
=
VOIDmode
;
(
int
)
mode
<
(
int
)
MAX_MACHINE_MODE
;
mode
=
(
enum
machine_mode
)
((
int
)
mode
+
1
))
{
if
(
GET_MODE_SIZE
(
mode
)
<
min_class_size
[(
int
)
GET_MODE_CLASS
(
mode
)])
{
class_narrowest_mode
[(
int
)
GET_MODE_CLASS
(
mode
)]
=
mode
;
min_class_size
[(
int
)
GET_MODE_CLASS
(
mode
)]
=
GET_MODE_SIZE
(
mode
);
}
if
(
GET_MODE_CLASS
(
mode
)
==
MODE_INT
&&
GET_MODE_BITSIZE
(
mode
)
==
BITS_PER_UNIT
)
byte_mode
=
mode
;
if
(
GET_MODE_CLASS
(
mode
)
==
MODE_INT
&&
GET_MODE_BITSIZE
(
mode
)
==
BITS_PER_WORD
)
word_mode
=
mode
;
}
}
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