Commit 01c4df91 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

ia32: Simplify x86_emit_immediate().

parent caa5c983
......@@ -332,16 +332,14 @@ bool x86_match_immediate(x86_imm32_t *immediate, const ir_node *node,
static void x86_emit_immediate(const x86_imm32_t *immediate)
{
const ir_entity *entity = immediate->entity;
if (entity != NULL)
int32_t const offset = immediate->offset;
ir_entity const *const entity = immediate->entity;
if (entity) {
be_gas_emit_entity(entity);
int32_t offset = immediate->offset;
if (entity == NULL || offset != 0) {
if (entity != NULL) {
if (offset != 0)
be_emit_irprintf("%+"PRId32, offset);
} else {
be_emit_irprintf("0x%"PRIX32, (uint32_t)offset);
}
} else {
be_emit_irprintf("0x%"PRIX32, (uint32_t)offset);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment