projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1bc218e
)
When using only %esp in AM, which must use a SIB byte, set the index to esp, too...
author
Christoph Mallon
<christoph.mallon@gmx.de>
Mon, 21 Sep 2009 13:24:29 +0000
(13:24 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Mon, 21 Sep 2009 13:24:29 +0000
(13:24 +0000)
[r26565]
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
3551137
..
8909df2
100644
(file)
--- a/
ir/be/ia32/ia32_emitter.c
+++ b/
ir/be/ia32/ia32_emitter.c
@@
-2493,9
+2493,10
@@
static void bemit_mod_am(unsigned reg, const ir_node *node)
} else if (has_base) {
const arch_register_t *reg = arch_get_irn_register(base);
if (reg->index == REG_ESP) {
} else if (has_base) {
const arch_register_t *reg = arch_get_irn_register(base);
if (reg->index == REG_ESP) {
- /* for the above reason we are forced to emit a sib
- when base is ESP. Only the base is used */
- sib = ENC_BASE(0x04);
+ /* for the above reason we are forced to emit a sib when base is
+ * ESP. Only the base is used, index must be ESP too, which means no
+ * index. */
+ sib = ENC_BASE(0x04) | ENC_INDEX(0x04);
emitsib = true;
/* we are forced to emit a 8bit offset as EBP base without
emitsib = true;
/* we are forced to emit a 8bit offset as EBP base without