Commit 6ea2b35b authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Reduce code duplication by jumping to the appropriate case.

[r27008]
parent a222aee7
......@@ -704,20 +704,20 @@ end_of_mods:
case 'A': {
switch (*fmt++) {
emit_AM:
case 'M':
if (mod & EMIT_ALTERNATE_AM)
be_emit_char('*');
ia32_emit_am(node);
break;
case 'R': {
const arch_register_t *reg = va_arg(ap, const arch_register_t*);
if (mod & EMIT_ALTERNATE_AM)
be_emit_char('*');
if (get_ia32_op_type(node) == ia32_AddrModeS) {
ia32_emit_am(node);
goto emit_AM;
} else {
const arch_register_t *reg = va_arg(ap, const arch_register_t*);
if (mod & EMIT_ALTERNATE_AM)
be_emit_char('*');
emit_register(reg, NULL);
}
break;
......@@ -725,10 +725,8 @@ end_of_mods:
case 'S':
if (get_ia32_op_type(node) == ia32_AddrModeS) {
if (mod & EMIT_ALTERNATE_AM)
be_emit_char('*');
ia32_emit_am(node);
++fmt;
goto emit_AM;
} else {
assert(get_ia32_op_type(node) == ia32_Normal);
goto emit_S;
......
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