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
130e13ee
Commit
130e13ee
authored
Jul 29, 2015
by
Matthias Braun
Browse files
amd64: more immediate kind asserts, remove entity after frame offset is decided
parent
55772c88
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/be/amd64/amd64_emitter.c
View file @
130e13ee
...
...
@@ -260,6 +260,7 @@ static void amd64_emit_addr(const ir_node *const node,
{
ir_entity
*
entity
=
addr
->
immediate
.
entity
;
if
(
entity
!=
NULL
)
{
assert
(
addr
->
immediate
.
kind
!=
X86_IMM_VALUE
);
if
(
is_fp_relative
(
entity
))
{
entity
=
NULL
;
/* only emit offset for frame entities */
}
else
{
...
...
@@ -275,6 +276,7 @@ static void amd64_emit_addr(const ir_node *const node,
if
(
entity
!=
NULL
)
{
be_emit_irprintf
(
"%+"
PRId32
,
offset
);
}
else
{
assert
(
addr
->
immediate
.
kind
==
X86_IMM_VALUE
);
be_emit_irprintf
(
"%"
PRId32
,
offset
);
}
}
...
...
ir/be/amd64/bearch_amd64.c
View file @
130e13ee
...
...
@@ -92,6 +92,8 @@ static void amd64_set_frame_offset(ir_node *node, int offset)
if
(
layout
->
sp_relative
)
attr
->
addr
.
immediate
.
offset
-=
get_insn_mode_bytes
(
attr
->
insn_mode
);
}
attr
->
addr
.
immediate
.
kind
=
X86_IMM_VALUE
;
attr
->
addr
.
immediate
.
entity
=
NULL
;
}
static
int
amd64_get_sp_bias
(
const
ir_node
*
node
)
...
...
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