+2000-02-23 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-i386.c (md_assemble): When swapping operands for
+ intel_syntax, assume everything that's not Imm or Disp is a
+ register.
+
2000-02-23 Linas Vepstas <linas@linas.org>
* config/tc-i370.c, config/tc-i370.h: New files.
if (i.operands > 1)
{
temp_type = i.types[xchg2];
- if (temp_type & (Reg | FloatReg))
- temp_reg = i.regs[xchg2];
- else if (temp_type & Imm)
+ if (temp_type & Imm)
temp_imm = i.imms[xchg2];
else if (temp_type & Disp)
temp_disp = i.disps[xchg2];
+ else
+ temp_reg = i.regs[xchg2];
i.types[xchg2] = i.types[xchg1];
- if (i.types[xchg1] & (Reg | FloatReg))
- {
- i.regs[xchg2] = i.regs[xchg1];
- i.regs[xchg1] = NULL;
- }
- else if (i.types[xchg2] & Imm)
+ if (i.types[xchg2] & Imm)
{
i.imms[xchg2] = i.imms[xchg1];
i.imms[xchg1] = NULL;
i.disps[xchg2] = i.disps[xchg1];
i.disps[xchg1] = NULL;
}
-
- if (temp_type & (Reg | FloatReg))
+ else
{
- i.regs[xchg1] = temp_reg;
- if (! (i.types[xchg1] & (Reg | FloatReg)))
- i.regs[xchg2] = NULL;
+ i.regs[xchg2] = i.regs[xchg1];
+ i.regs[xchg1] = NULL;
}
- else if (temp_type & Imm)
+
+ if (temp_type & Imm)
{
i.imms[xchg1] = temp_imm;
if (! (i.types[xchg1] & Imm))
if (! (i.types[xchg1] & Disp))
i.disps[xchg2] = NULL;
}
+ else
+ {
+ i.regs[xchg1] = temp_reg;
+ if (i.types[xchg1] & (Imm | Disp))
+ i.regs[xchg2] = NULL;
+ }
i.types[xchg1] = temp_type;
}