Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
49185aca
Commit
49185aca
authored
Apr 24, 2014
by
Christoph Mallon
Browse files
ia32: Simplify ClimbFrame to not use ProduceVal.
parent
d5b9138d
Changes
3
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_emitter.c
View file @
49185aca
...
...
@@ -1340,12 +1340,11 @@ static void emit_ia32_ClimbFrame(const ir_node *node)
{
const
ia32_climbframe_attr_t
*
attr
=
get_ia32_climbframe_attr_const
(
node
);
ia32_emitf
(
node
,
"movl %S0, %D0"
);
ia32_emitf
(
node
,
"movl $%u, %S1"
,
attr
->
count
);
ia32_emitf
(
node
,
"movl $%u, %D1"
,
attr
->
count
);
be_emit_cstring
(
"0:
\n
"
);
be_emit_write_line
();
ia32_emitf
(
node
,
"movl (%D0), %D0"
);
ia32_emitf
(
node
,
"dec %
S
1"
);
ia32_emitf
(
node
,
"dec %
D
1"
);
ia32_emitf
(
node
,
"jnz 0b"
);
}
...
...
ir/be/ia32/ia32_spec.pl
View file @
49185aca
...
...
@@ -1223,13 +1223,13 @@ Call => {
# PS: try gcc __builtin_frame_address(100000) :-)
#
ClimbFrame
=>
{
reg_req
=>
{
in
=>
[
"
gp
"
,
"
gp
",
"
gp
"
],
out
=>
[
"
in_r
3
"
]
},
ins
=>
[
"
frame
"
,
"
cnt
",
"
tmp
"
],
outs
=>
[
"
res
"
],
reg_req
=>
{
in
=>
[
"
gp
"
],
out
=>
[
"
in_r
1
",
"
!in_r1
"
]
},
ins
=>
[
"
frame
"
],
outs
=>
[
"
res
"
,
"
cnt
"
],
latency
=>
4
,
# random number
attr_type
=>
"
ia32_climbframe_attr_t
",
attr
=>
"
unsigned count
",
mod
e
=>
$mode_gp
mod
ified_flags
=>
$status_flags
},
#
...
...
ir/be/ia32/ia32_transform.c
View file @
49185aca
...
...
@@ -4728,9 +4728,8 @@ static ir_node *gen_return_address(ir_node *node)
ir_tarval
*
tv
=
get_Const_tarval
(
param
);
unsigned
long
value
=
get_tarval_long
(
tv
);
if
(
value
>
0
)
{
ir_node
*
cnt
=
new_bd_ia32_ProduceVal
(
dbgi
,
block
);
ir_node
*
res
=
new_bd_ia32_ProduceVal
(
dbgi
,
block
);
ptr
=
new_bd_ia32_ClimbFrame
(
dbgi
,
block
,
ptr
,
cnt
,
res
,
value
);
ir_node
*
const
cfr
=
new_bd_ia32_ClimbFrame
(
dbgi
,
block
,
ptr
,
value
);
ptr
=
new_r_Proj
(
cfr
,
ia32_mode_gp
,
pn_ia32_ClimbFrame_res
);
}
/* load the return address from this frame */
...
...
@@ -4768,9 +4767,8 @@ static ir_node *gen_frame_address(ir_node *node)
ir_node
*
ptr
=
get_irg_frame
(
irg
);
unsigned
long
value
=
get_tarval_long
(
tv
);
if
(
value
>
0
)
{
ir_node
*
cnt
=
new_bd_ia32_ProduceVal
(
dbgi
,
block
);
ir_node
*
res
=
new_bd_ia32_ProduceVal
(
dbgi
,
block
);
ptr
=
new_bd_ia32_ClimbFrame
(
dbgi
,
block
,
ptr
,
cnt
,
res
,
value
);
ir_node
*
const
cfr
=
new_bd_ia32_ClimbFrame
(
dbgi
,
block
,
ptr
,
value
);
ptr
=
new_r_Proj
(
cfr
,
ia32_mode_gp
,
pn_ia32_ClimbFrame_res
);
}
/* load the frame address from this frame */
...
...
Write
Preview
Supports
Markdown
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