projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
8fbc0db
)
Handle 8Bit and 16bit locations for DecMem, IncMem, NegMem and NotMem.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Tue, 22 Sep 2009 17:27:41 +0000
(17:27 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Tue, 22 Sep 2009 17:27:41 +0000
(17:27 +0000)
[r26613]
ir/be/ia32/ia32_emitter.c
patch
|
blob
|
history
diff --git
a/ir/be/ia32/ia32_emitter.c
b/ir/be/ia32/ia32_emitter.c
index
0c6a908
..
59f31e5
100644
(file)
--- a/
ir/be/ia32/ia32_emitter.c
+++ b/
ir/be/ia32/ia32_emitter.c
@@
-2634,7
+2634,10
@@
static void bemit_unop_reg(const ir_node *node, unsigned char code, int input)
static void bemit_unop_mem(const ir_node *node, unsigned char code, unsigned char ext)
{
static void bemit_unop_mem(const ir_node *node, unsigned char code, unsigned char ext)
{
- bemit8(code);
+ unsigned size = get_mode_size_bits(get_ia32_ls_mode(node));
+ if (size == 16)
+ bemit8(0x66);
+ bemit8(size == 8 ? code : code + 1);
bemit_mod_am(ext, node);
}
bemit_mod_am(ext, node);
}
@@
-2906,10
+2909,10
@@
static void bemit_##op(const ir_node *node) \
bemit_unop_mem(node, code, ext); \
}
bemit_unop_mem(node, code, ext); \
}
-UNOPMEM(notmem, 0xF
7
, 2)
-UNOPMEM(negmem, 0xF
7
, 3)
-UNOPMEM(incmem, 0xF
F
, 0)
-UNOPMEM(decmem, 0xF
F
, 1)
+UNOPMEM(notmem, 0xF
6
, 2)
+UNOPMEM(negmem, 0xF
6
, 3)
+UNOPMEM(incmem, 0xF
E
, 0)
+UNOPMEM(decmem, 0xF
E
, 1)
static void bemit_set(const ir_node *node)
{
static void bemit_set(const ir_node *node)
{