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
4fa52007
Commit
4fa52007
authored
Jun 28, 1992
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r1320
parent
7d8d3e32
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
1 deletions
+60
-1
gcc/expr.c
+59
-1
gcc/toplev.c
+1
-0
No files found.
gcc/expr.c
View file @
4fa52007
...
@@ -102,6 +102,13 @@ static void do_jump_by_parts_equality ();
...
@@ -102,6 +102,13 @@ static void do_jump_by_parts_equality ();
static
void
do_jump_by_parts_equality_rtx
();
static
void
do_jump_by_parts_equality_rtx
();
static
void
do_jump_by_parts_greater
();
static
void
do_jump_by_parts_greater
();
/* Record for each mode whether we can move a register directly to or
from an object of that mode in memory. If we can't, we won't try
to use that mode directly when accessing a field of that mode. */
static
char
direct_load
[
NUM_MACHINE_MODES
];
static
char
direct_store
[
NUM_MACHINE_MODES
];
/* MOVE_RATIO is the number of move instructions that is better than
/* MOVE_RATIO is the number of move instructions that is better than
a block move. */
a block move. */
...
@@ -121,6 +128,52 @@ static void do_jump_by_parts_greater ();
...
@@ -121,6 +128,52 @@ static void do_jump_by_parts_greater ();
#define SLOW_UNALIGNED_ACCESS 0
#define SLOW_UNALIGNED_ACCESS 0
#endif
#endif
/* This is run once per compilation to set up which modes can be used
directly in memory. */
void
init_expr_once
()
{
rtx
insn
,
pat
;
enum
machine_mode
mode
;
rtx
mem
=
gen_rtx
(
MEM
,
VOIDmode
,
stack_pointer_rtx
);
start_sequence
();
insn
=
emit_insn
(
gen_rtx
(
SET
,
0
,
0
));
pat
=
PATTERN
(
insn
);
for
(
mode
=
VOIDmode
;
(
int
)
mode
<
NUM_MACHINE_MODES
;
mode
=
(
enum
machine_mode
)
((
int
)
mode
+
1
))
{
int
regno
;
rtx
reg
;
int
num_clobbers
;
direct_load
[(
int
)
mode
]
=
direct_store
[(
int
)
mode
]
=
0
;
PUT_MODE
(
mem
,
mode
);
/* Find a register that can be used in this mode, if any. */
for
(
regno
=
0
;
regno
<
FIRST_PSEUDO_REGISTER
;
regno
++
)
if
(
HARD_REGNO_MODE_OK
(
regno
,
mode
))
break
;
if
(
regno
==
FIRST_PSEUDO_REGISTER
)
continue
;
reg
=
gen_rtx
(
REG
,
mode
,
regno
);
SET_SRC
(
pat
)
=
mem
;
SET_DEST
(
pat
)
=
reg
;
direct_load
[(
int
)
mode
]
=
(
recog
(
pat
,
insn
,
&
num_clobbers
))
>=
0
;
SET_SRC
(
pat
)
=
reg
;
SET_DEST
(
pat
)
=
mem
;
direct_store
[(
int
)
mode
]
=
(
recog
(
pat
,
insn
,
&
num_clobbers
))
>=
0
;
}
end_sequence
();
}
/* This is run at the start of compiling a function. */
/* This is run at the start of compiling a function. */
void
void
...
@@ -635,6 +688,7 @@ convert_move (to, from, unsignedp)
...
@@ -635,6 +688,7 @@ convert_move (to, from, unsignedp)
GET_MODE_BITSIZE
(
from_mode
))
GET_MODE_BITSIZE
(
from_mode
))
&&
((
GET_CODE
(
from
)
==
MEM
&&
((
GET_CODE
(
from
)
==
MEM
&&
!
MEM_VOLATILE_P
(
from
)
&&
!
MEM_VOLATILE_P
(
from
)
&&
direct_load
[(
int
)
to_mode
]
&&
!
mode_dependent_address_p
(
XEXP
(
from
,
0
)))
&&
!
mode_dependent_address_p
(
XEXP
(
from
,
0
)))
||
GET_CODE
(
from
)
==
REG
||
GET_CODE
(
from
)
==
REG
||
GET_CODE
(
from
)
==
SUBREG
))
||
GET_CODE
(
from
)
==
SUBREG
))
...
@@ -811,6 +865,7 @@ convert_to_mode (mode, x, unsignedp)
...
@@ -811,6 +865,7 @@ convert_to_mode (mode, x, unsignedp)
&&
(
GET_CODE
(
x
)
==
CONST_DOUBLE
&&
(
GET_CODE
(
x
)
==
CONST_DOUBLE
||
(
GET_MODE_SIZE
(
mode
)
<=
GET_MODE_SIZE
(
GET_MODE
(
x
))
||
(
GET_MODE_SIZE
(
mode
)
<=
GET_MODE_SIZE
(
GET_MODE
(
x
))
&&
((
GET_CODE
(
x
)
==
MEM
&&
!
MEM_VOLATILE_P
(
x
))
&&
((
GET_CODE
(
x
)
==
MEM
&&
!
MEM_VOLATILE_P
(
x
))
&&
direct_load
[(
int
)
mode
]
||
GET_CODE
(
x
)
==
REG
)))))
||
GET_CODE
(
x
)
==
REG
)))))
return
gen_lowpart
(
mode
,
x
);
return
gen_lowpart
(
mode
,
x
);
...
@@ -2496,7 +2551,9 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode,
...
@@ -2496,7 +2551,9 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode,
is a bit field, we cannot use addressing to access it.
is a bit field, we cannot use addressing to access it.
Use bit-field techniques or SUBREG to store in it. */
Use bit-field techniques or SUBREG to store in it. */
if
(
mode
==
VOIDmode
||
GET_CODE
(
target
)
==
REG
if
(
mode
==
VOIDmode
||
(
mode
!=
BLKmode
&&
!
direct_store
[(
int
)
mode
])
||
GET_CODE
(
target
)
==
REG
||
GET_CODE
(
target
)
==
SUBREG
)
||
GET_CODE
(
target
)
==
SUBREG
)
{
{
rtx
temp
=
expand_expr
(
exp
,
0
,
VOIDmode
,
0
);
rtx
temp
=
expand_expr
(
exp
,
0
,
VOIDmode
,
0
);
...
@@ -3587,6 +3644,7 @@ expand_expr (exp, target, tmode, modifier)
...
@@ -3587,6 +3644,7 @@ expand_expr (exp, target, tmode, modifier)
}
}
if
(
mode1
==
VOIDmode
if
(
mode1
==
VOIDmode
||
(
mode1
!=
BLKmode
&&
!
direct_load
[(
int
)
mode1
])
||
GET_CODE
(
op0
)
==
REG
||
GET_CODE
(
op0
)
==
SUBREG
)
||
GET_CODE
(
op0
)
==
REG
||
GET_CODE
(
op0
)
==
SUBREG
)
{
{
/* In cases where an aligned union has an unaligned object
/* In cases where an aligned union has an unaligned object
...
...
gcc/toplev.c
View file @
4fa52007
...
@@ -1380,6 +1380,7 @@ compile_file (name)
...
@@ -1380,6 +1380,7 @@ compile_file (name)
init_optabs
();
init_optabs
();
init_stmt
();
init_stmt
();
init_expmed
();
init_expmed
();
init_expr_once
();
init_loop
();
init_loop
();
init_reload
();
init_reload
();
...
...
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