projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
80cebec
)
Simplify emit_CopyB_prolog() and remove an unnecessary bit filter before calling it.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 8 Oct 2008 08:54:21 +0000
(08:54 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 8 Oct 2008 08:54:21 +0000
(08:54 +0000)
[r22598]
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
c4eabd8
..
af53e41
100644
(file)
--- a/
ir/be/ia32/ia32_emitter.c
+++ b/
ir/be/ia32/ia32_emitter.c
@@
-1373,21
+1373,13
@@
static void emit_CopyB_prolog(unsigned size)
be_emit_cstring("\tcld");
be_emit_finish_line_gas(NULL);
be_emit_cstring("\tcld");
be_emit_finish_line_gas(NULL);
- switch (size) {
- case 1:
- be_emit_cstring("\tmovsb");
- be_emit_finish_line_gas(NULL);
- break;
- case 2:
- be_emit_cstring("\tmovsw");
- be_emit_finish_line_gas(NULL);
- break;
- case 3:
+ if (size & 1) {
be_emit_cstring("\tmovsb");
be_emit_finish_line_gas(NULL);
be_emit_cstring("\tmovsb");
be_emit_finish_line_gas(NULL);
+ }
+ if (size & 2) {
be_emit_cstring("\tmovsw");
be_emit_finish_line_gas(NULL);
be_emit_cstring("\tmovsw");
be_emit_finish_line_gas(NULL);
- break;
}
}
}
}
@@
-1411,7
+1403,7
@@
static void emit_ia32_CopyB_i(const ir_node *node)
{
unsigned size = get_ia32_copyb_size(node);
{
unsigned size = get_ia32_copyb_size(node);
- emit_CopyB_prolog(size
& 0x3
);
+ emit_CopyB_prolog(size);
size >>= 2;
while (size--) {
size >>= 2;
while (size--) {