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
b089937a
Commit
b089937a
authored
Apr 16, 1996
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(expand_builtin, case BUILT_IN_LONGJMP): Make a decl for __dummy, so
we can call make_function_rtl on it. From-SVN: r11805
parent
b35cd3c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
gcc/expr.c
+11
-4
No files found.
gcc/expr.c
View file @
b089937a
...
@@ -8672,6 +8672,9 @@ expand_builtin (exp, target, subtarget, mode, ignore)
...
@@ -8672,6 +8672,9 @@ expand_builtin (exp, target, subtarget, mode, ignore)
break
;
break
;
{
{
tree
dummy_id
=
get_identifier
(
"__dummy"
);
tree
dummy_type
=
build_function_type
(
void_type_node
,
NULL_TREE
);
tree
dummy_decl
=
build_decl
(
FUNCTION_DECL
,
dummy_id
,
dummy_type
);
rtx
buf_addr
rtx
buf_addr
=
force_reg
(
Pmode
,
expand_expr
(
TREE_VALUE
(
arglist
),
NULL_RTX
,
=
force_reg
(
Pmode
,
expand_expr
(
TREE_VALUE
(
arglist
),
NULL_RTX
,
VOIDmode
,
0
));
VOIDmode
,
0
));
...
@@ -8689,19 +8692,23 @@ expand_builtin (exp, target, subtarget, mode, ignore)
...
@@ -8689,19 +8692,23 @@ expand_builtin (exp, target, subtarget, mode, ignore)
rtx
stack
=
gen_rtx
(
MEM
,
sa_mode
,
rtx
stack
=
gen_rtx
(
MEM
,
sa_mode
,
plus_constant
(
buf_addr
,
plus_constant
(
buf_addr
,
2
*
GET_MODE_SIZE
(
Pmode
)));
2
*
GET_MODE_SIZE
(
Pmode
)));
rtx
value
=
gen_rtx
(
SYMBOL_REF
,
Pmode
,
"__dummy"
);
DECL_EXTERNAL
(
dummy_decl
)
=
1
;
TREE_PUBLIC
(
dummy_decl
)
=
1
;
make_decl_rtl
(
dummy_decl
,
NULL_PTR
,
1
);
/* Expand the second expression just for side-effects. */
/* Expand the second expression just for side-effects. */
expand_expr
(
TREE_VALUE
(
TREE_CHAIN
(
arglist
)),
expand_expr
(
TREE_VALUE
(
TREE_CHAIN
(
arglist
)),
const0_rtx
,
VOIDmode
,
0
);
const0_rtx
,
VOIDmode
,
0
);
assemble_external
_libcall
(
value
);
assemble_external
(
dummy_decl
);
/* Pick up FP, label, and SP from the block and jump. This code is
/* Pick up FP, label, and SP from the block and jump. This code is
from expand_goto in stmt.c; see there for detailed comments. */
from expand_goto in stmt.c; see there for detailed comments. */
#if HAVE_nonlocal_goto
#if HAVE_nonlocal_goto
if
(
HAVE_nonlocal_goto
)
if
(
HAVE_nonlocal_goto
)
emit_insn
(
gen_nonlocal_goto
(
fp
,
lab
,
stack
,
value
));
emit_insn
(
gen_nonlocal_goto
(
fp
,
lab
,
stack
,
XEXP
(
DECL_RTL
(
dummy_decl
),
0
)));
else
else
#endif
#endif
{
{
...
@@ -8711,7 +8718,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
...
@@ -8711,7 +8718,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
/* Put in the static chain register the address of the dummy
/* Put in the static chain register the address of the dummy
function. */
function. */
emit_move_insn
(
static_chain_rtx
,
value
);
emit_move_insn
(
static_chain_rtx
,
XEXP
(
DECL_RTL
(
dummy_decl
),
0
)
);
emit_insn
(
gen_rtx
(
USE
,
VOIDmode
,
hard_frame_pointer_rtx
));
emit_insn
(
gen_rtx
(
USE
,
VOIDmode
,
hard_frame_pointer_rtx
));
emit_insn
(
gen_rtx
(
USE
,
VOIDmode
,
stack_pointer_rtx
));
emit_insn
(
gen_rtx
(
USE
,
VOIDmode
,
stack_pointer_rtx
));
emit_insn
(
gen_rtx
(
USE
,
VOIDmode
,
static_chain_rtx
));
emit_insn
(
gen_rtx
(
USE
,
VOIDmode
,
static_chain_rtx
));
...
...
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