Commit beebace5 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Simplify generating the extend suffix for ia32_Load.

[r24879]
parent e4a0993e
......@@ -416,11 +416,13 @@ void ia32_emit_xmm_mode_suffix_s(const ir_node *node)
be_emit_char(get_xmm_mode_suffix(mode));
}
void ia32_emit_extend_suffix(const ir_mode *mode)
void ia32_emit_extend_suffix(const ir_node *node)
{
ir_mode *mode = get_ia32_ls_mode(node);
if (get_mode_size_bits(mode) == 32)
return;
be_emit_char(mode_is_signed(mode) ? 's' : 'z');
ia32_emit_mode_suffix_mode(mode);
}
void ia32_emit_source_register_or_immediate(const ir_node *node, int pos)
......
......@@ -42,7 +42,7 @@ void ia32_emit_mode_suffix(const ir_node *node);
void ia32_emit_x87_mode_suffix(const ir_node *node);
void ia32_emit_xmm_mode_suffix(const ir_node *node);
void ia32_emit_xmm_mode_suffix_s(const ir_node *node);
void ia32_emit_extend_suffix(const ir_mode *mode);
void ia32_emit_extend_suffix(const ir_node *node);
void ia32_emit_cmp_suffix_node(const ir_node *node, int flags_pos);
void ia32_emit_binop(const ir_node *node);
void ia32_emit_unop(const ir_node *node, int pos);
......
......@@ -207,9 +207,7 @@ $arch = "ia32";
DB0 => "${arch}_emit_8bit_dest_register(node, 0);",
X0 => "${arch}_emit_x87_register(node, 0);",
X1 => "${arch}_emit_x87_register(node, 1);",
SE => "${arch}_emit_extend_suffix(get_ia32_ls_mode(node));",
ME => "if (get_mode_size_bits(get_ia32_ls_mode(node)) != 32)
ia32_emit_mode_suffix(node);",
EX => "${arch}_emit_extend_suffix(node);",
M => "${arch}_emit_mode_suffix(node);",
XM => "${arch}_emit_x87_mode_suffix(node);",
XXM => "${arch}_emit_xmm_mode_suffix(node);",
......@@ -1337,7 +1335,7 @@ Load => {
ins => [ "base", "index", "mem" ],
outs => [ "res", "M", "X_exc" ],
latency => 0,
emit => ". mov%SE%ME%.l %AM, %D0",
emit => ". mov%EX%.l %AM, %D0",
units => [ "GP" ],
},
......
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