Commit 80e5e685 authored by Matthias Braun's avatar Matthias Braun
Browse files

ia32: More address variant fixes

parent be7e4d7f
...@@ -1440,10 +1440,13 @@ static ir_node *create_lea_from_address(dbg_info *dbgi, ir_node *block, ...@@ -1440,10 +1440,13 @@ static ir_node *create_lea_from_address(dbg_info *dbgi, ir_node *block,
if (addr->tls_segment) { if (addr->tls_segment) {
ir_node *tls_base = new_bd_ia32_LdTls(NULL, block); ir_node *tls_base = new_bd_ia32_LdTls(NULL, block);
assert(addr->imm.entity != NULL); assert(addr->imm.entity != NULL);
if (base == noreg_GP) if (base == noreg_GP) {
base = tls_base; base = tls_base;
else addr->variant = addr->variant == X86_ADDR_INDEX
? X86_ADDR_BASE_INDEX : X86_ADDR_BASE;
} else {
base = create_lea_add(dbgi, block, tls_base, base); base = create_lea_add(dbgi, block, tls_base, base);
}
addr->tls_segment = false; addr->tls_segment = false;
} }
...@@ -3702,7 +3705,8 @@ static ir_node *gen_Mux(ir_node *node) ...@@ -3702,7 +3705,8 @@ static ir_node *gen_Mux(ir_node *node)
.kind = lconst_imm_kind, .kind = lconst_imm_kind,
.entity = array, .entity = array,
}, },
.variant = lconst_variant, .variant = be_options.pic_style != BE_PIC_NONE
? X86_ADDR_BASE_INDEX : X86_ADDR_INDEX,
.base = get_global_base(irg), .base = get_global_base(irg),
.index = new_node, .index = new_node,
.mem = nomem, .mem = nomem,
......
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