Commit 16b8134f authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Handle 16bit memory locations for xxxMem.

[r26610]
parent 5b7cbf36
...@@ -2732,11 +2732,13 @@ BINOP(test, 0x85, 0xA9, 0xF7, 0) ...@@ -2732,11 +2732,13 @@ BINOP(test, 0x85, 0xA9, 0xF7, 0)
#define BINOPMEM(op, ext) \ #define BINOPMEM(op, ext) \
static void bemit_##op(const ir_node *node) \ static void bemit_##op(const ir_node *node) \
{ \ { \
if (get_mode_size_bits(get_ia32_ls_mode(node)) == 16) \
bemit8(0x66); \
ir_node *val = get_irn_n(node, n_ia32_unary_op); \ ir_node *val = get_irn_n(node, n_ia32_unary_op); \
if (is_ia32_Immediate(val)) { \ if (is_ia32_Immediate(val)) { \
const ia32_immediate_attr_t *attr = get_ia32_immediate_attr_const(val); \ const ia32_immediate_attr_t *attr = get_ia32_immediate_attr_const(val); \
int offset = attr->offset; \ int offset = attr->offset; \
if (attr->symconst == 0 && get_signed_imm_size(offset) == 1) { \ if (attr->symconst == NULL && get_signed_imm_size(offset) == 1) { \
bemit8(0x83); \ bemit8(0x83); \
bemit_mod_am(ext, node); \ bemit_mod_am(ext, node); \
bemit8(offset); \ bemit8(offset); \
......
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