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
22619c3f
Commit
22619c3f
authored
Oct 06, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(store_expr): Don't clobber TEMP with address.
From-SVN: r8227
parent
ce15adaa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
gcc/expr.c
+9
-8
No files found.
gcc/expr.c
View file @
22619c3f
...
@@ -2743,6 +2743,7 @@ store_expr (exp, target, want_value)
...
@@ -2743,6 +2743,7 @@ store_expr (exp, target, want_value)
The string constant may be shorter than the array.
The string constant may be shorter than the array.
So copy just the string's actual length, and clear the rest. */
So copy just the string's actual length, and clear the rest. */
rtx
size
;
rtx
size
;
rtx
addr
;
/* Get the size of the data type of the string,
/* Get the size of the data type of the string,
which is actually the size of the target. */
which is actually the size of the target. */
...
@@ -2771,17 +2772,16 @@ store_expr (exp, target, want_value)
...
@@ -2771,17 +2772,16 @@ store_expr (exp, target, want_value)
that we have to clear. */
that we have to clear. */
if
(
GET_CODE
(
copy_size_rtx
)
==
CONST_INT
)
if
(
GET_CODE
(
copy_size_rtx
)
==
CONST_INT
)
{
{
temp
=
plus_constant
(
XEXP
(
target
,
0
),
addr
=
plus_constant
(
XEXP
(
target
,
0
),
TREE_STRING_LENGTH
(
exp
));
TREE_STRING_LENGTH
(
exp
));
size
=
plus_constant
(
size
,
size
=
plus_constant
(
size
,
-
TREE_STRING_LENGTH
(
exp
));
-
TREE_STRING_LENGTH
(
exp
));
}
}
else
else
{
{
enum
machine_mode
size_mode
=
Pmode
;
enum
machine_mode
size_mode
=
Pmode
;
temp
=
force_reg
(
Pmode
,
XEXP
(
target
,
0
));
addr
=
force_reg
(
Pmode
,
XEXP
(
target
,
0
));
temp
=
expand_binop
(
size_mode
,
add_optab
,
temp
,
addr
=
expand_binop
(
size_mode
,
add_optab
,
addr
,
copy_size_rtx
,
NULL_RTX
,
0
,
copy_size_rtx
,
NULL_RTX
,
0
,
OPTAB_LIB_WIDEN
);
OPTAB_LIB_WIDEN
);
...
@@ -2798,13 +2798,14 @@ store_expr (exp, target, want_value)
...
@@ -2798,13 +2798,14 @@ store_expr (exp, target, want_value)
if
(
size
!=
const0_rtx
)
if
(
size
!=
const0_rtx
)
{
{
#ifdef TARGET_MEM_FUNCTIONS
#ifdef TARGET_MEM_FUNCTIONS
emit_library_call
(
memset_libfunc
,
0
,
VOIDmode
,
3
,
emit_library_call
(
memset_libfunc
,
0
,
VOIDmode
,
3
,
addr
,
temp
,
Pmode
,
const0_rtx
,
Pmode
,
size
,
Pmode
);
Pmode
,
const0_rtx
,
Pmode
,
size
,
Pmode
);
#else
#else
emit_library_call
(
bzero_libfunc
,
0
,
VOIDmode
,
2
,
emit_library_call
(
bzero_libfunc
,
0
,
VOIDmode
,
2
,
temp
,
Pmode
,
size
,
Pmode
);
addr
,
Pmode
,
size
,
Pmode
);
#endif
#endif
}
}
if
(
label
)
if
(
label
)
emit_label
(
label
);
emit_label
(
label
);
}
}
...
...
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