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
cf6fde77
Commit
cf6fde77
authored
Jan 26, 2014
by
Christoph Mallon
Browse files
Simplify printing entity+offset.
parent
556ee881
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/be/amd64/amd64_emitter.c
View file @
cf6fde77
...
...
@@ -187,13 +187,10 @@ static void amd64_emit_immediate(const amd64_movimm_attr_t *const imm)
ir_entity
*
entity
=
imm
->
entity
;
if
(
entity
!=
NULL
)
{
be_gas_emit_entity
(
entity
);
}
if
(
entity
==
NULL
||
imm
->
offset
!=
0
)
{
if
(
entity
!=
NULL
)
{
if
(
imm
->
offset
!=
0
)
be_emit_irprintf
(
"%+ld"
,
imm
->
offset
);
}
else
{
be_emit_irprintf
(
"0x%lX"
,
imm
->
offset
);
}
}
else
{
be_emit_irprintf
(
"0x%lX"
,
imm
->
offset
);
}
}
...
...
ir/be/ia32/ia32_emitter.c
View file @
cf6fde77
...
...
@@ -209,13 +209,11 @@ static void emit_ia32_Immediate_no_prefix(const ir_node *node)
ir_entity
*
const
entity
=
attr
->
entity
;
if
(
entity
!=
NULL
)
{
ia32_emit_entity
(
entity
,
attr
->
no_pic_adjust
);
}
if
(
entity
==
NULL
||
attr
->
offset
!=
0
)
{
if
(
entity
!=
NULL
)
{
if
(
attr
->
offset
!=
0
)
{
be_emit_irprintf
(
"%+d"
,
attr
->
offset
);
}
else
{
be_emit_irprintf
(
"0x%X"
,
attr
->
offset
);
}
}
else
{
be_emit_irprintf
(
"0x%lX"
,
attr
->
offset
);
}
}
...
...
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