Commit a88d55d7 authored by Matthias Braun's avatar Matthias Braun
Browse files

amd64: Use smaller store for parameters where possible

parent 5c5c4481
......@@ -21,13 +21,14 @@ enum amd64_arch_irn_flags_t {
amd64_arch_irn_flag_commutative_binop = arch_irn_flag_backend << 0,
};
/** instruction data size. Keep sorted! */
typedef enum {
INSN_MODE_INVALID = 0,
INSN_MODE_128,
INSN_MODE_64,
INSN_MODE_32,
INSN_MODE_8,
INSN_MODE_16,
INSN_MODE_8
INSN_MODE_32,
INSN_MODE_64,
INSN_MODE_128,
} amd64_insn_mode_t;
typedef enum {
......
......@@ -1643,6 +1643,9 @@ no_call_mem:
}
ir_mode *mode = get_type_mode(get_method_param_type(type, p));
amd64_insn_mode_t insn_mode = get_insn_mode_from_mode(mode);
if (insn_mode < INSN_MODE_32)
insn_mode = INSN_MODE_32;
/* we need a store if we're here */
amd64_binop_addr_attr_t attr;
......@@ -1651,7 +1654,7 @@ no_call_mem:
attr.base.addr.immediate.offset = param->offset;
attr.base.addr.base_input = 1;
attr.base.addr.index_input = NO_INPUT;
attr.base.insn_mode = INSN_MODE_64;
attr.base.insn_mode = insn_mode;
ir_node *const nomem = get_irg_no_mem(irg);
ir_node *const in[] = { new_value, callframe, nomem };
ir_node *const store = mode_is_float(mode) ?
......
Supports Markdown
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