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
973714c2
Commit
973714c2
authored
Jul 06, 2014
by
Christoph Mallon
Browse files
amd64: Lea alters neither flags nor memory.
parent
bd1e59e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/be/amd64/amd64_spec.pl
View file @
973714c2
...
...
@@ -402,12 +402,13 @@ Cmp => {
Lea
=>
{
irn_flags
=>
[
"
rematerializable
"
],
arity
=>
"
variable
",
outs
=>
[
"
res
"
,
"
flags
",
"
M
"
],
reg_req
=>
{
out
=>
[
"
gp
"
,
"
flags
",
"
none
"
]
},
outs
=>
[
"
res
"
],
reg_req
=>
{
out
=>
[
"
gp
"
]
},
attr_type
=>
"
amd64_addr_attr_t
",
attr
=>
"
amd64_insn_mode_t insn_mode, amd64_addr_t addr
",
fixed
=>
"
amd64_op_mode_t op_mode = AMD64_OP_ADDR;
\n
",
emit
=>
"
lea%M %A, %D0
",
mode
=>
$mode_gp
,
},
Jcc
=>
{
...
...
ir/be/amd64/amd64_transform.c
View file @
973714c2
...
...
@@ -354,8 +354,7 @@ static ir_node *gen_Address(ir_node *node)
if
(
mode
==
REFERENCE_IP_RELATIVE
)
{
addr
.
immediate
.
entity
=
entity
;
ir_node
*
lea
=
new_bd_amd64_Lea
(
dbgi
,
block
,
0
,
NULL
,
INSN_MODE_64
,
addr
);
return
new_r_Proj
(
lea
,
mode_gp
,
pn_amd64_Lea_res
);
return
new_bd_amd64_Lea
(
dbgi
,
block
,
0
,
NULL
,
INSN_MODE_64
,
addr
);
}
else
{
assert
(
mode
==
REFERENCE_GOT
);
addr
.
immediate
.
entity
=
new_got_entry_entity
(
entity
);
...
...
@@ -836,7 +835,7 @@ static ir_node *create_Lea_as_Add(ir_node *node, ir_node *op1, ir_node *op2)
ir_node
*
res
=
new_bd_amd64_Lea
(
dbgi
,
new_block
,
arity
,
in
,
insn_mode
,
addr
);
arch_set_irn_register_reqs_in
(
res
,
reqs
);
return
new_r_Proj
(
res
,
mode_gp
,
pn_amd64_Lea_res
)
;
return
res
;
}
static
ir_node
*
gen_Add
(
ir_node
*
const
node
)
...
...
@@ -1179,7 +1178,7 @@ static ir_node *gen_Member(ir_node *const node)
ir_node
*
res
=
new_bd_amd64_Lea
(
dbgi
,
new_block
,
ARRAY_SIZE
(
in
),
in
,
INSN_MODE_64
,
addr
);
arch_set_irn_register_reqs_in
(
res
,
reg_reqs
);
return
new_r_Proj
(
res
,
mode_gp
,
pn_amd64_Lea_res
)
;
return
res
;
}
static
ir_node
*
gen_IJmp
(
ir_node
*
node
)
...
...
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