+2000-02-25 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * config/tc-i386.c (md_assemble): Swap segments too for intel mode
+ string instructions.
+ (i386_operand_modifier): Set i.suffix = WORD_MNEM_SUFFIX for SHORT.
+ (i386_intel_memory_operand): After finding a segment override,
+ check again for no `[' before looking for a displacement. Bomb if
+ more than one displacement rather than silently discarding the
+ second and subsequent ones. Free strings malloc'd by
+ build_displacement_string.
+
2000-02-24 Catherine Moore <clm@cygnus.com>
* config/obj-som.c (obj_pseudo_table): Add "weak".
temp_op = i.op[xchg2];
i.op[xchg2] = i.op[xchg1];
i.op[xchg1] = temp_op;
+
+ if (i.mem_operands == 2)
+ {
+ const seg_entry *temp_seg;
+ temp_seg = i.seg[0];
+ i.seg[0] = i.seg[1];
+ i.seg[1] = temp_seg;
+ }
}
overlap0 = 0;
overlap1 = 0;
else if (!strncasecmp (*op_string, "SHORT", 5))
{
+ i.suffix = WORD_MNEM_SUFFIX;
*op_string += 5;
return SHORT;
}
temp_string[0] = '\0';
tc = end_of_operand_string = strchr (op_string, '[');
- if ( initial_disp && !end_of_operand_string)
+ if (initial_disp && !end_of_operand_string)
{
strcpy (temp_string, op_string);
- return (temp_string);
+ return temp_string;
}
/* Build the whole displacement string */
return 0;
}
- /* Look for displacement preceding open bracket */
+ /* First check for a segment override. */
if (*op_string != '[')
{
char *end_seg;
- char *temp_string;
end_seg = strchr (op_string, ':');
if (end_seg)
return 0;
op_string = end_seg + 1;
}
+ }
- temp_string = build_displacement_string (true, op_string);
+ /* Look for displacement preceding open bracket */
+ if (*op_string != '[')
+ {
+ char *temp_string;
- if (i.disp_operands == 0 &&
- !i386_displacement (temp_string, temp_string + strlen (temp_string)))
+ if (i.disp_operands)
return 0;
+ temp_string = build_displacement_string (true, op_string);
+
+ if (!i386_displacement (temp_string, temp_string + strlen (temp_string)))
+ {
+ free (temp_string);
+ return 0;
+ }
+ free (temp_string);
+
end_of_operand_string = strchr (op_string, '[');
if (!end_of_operand_string)
end_of_operand_string = op_string + strlen (op_string);
else if (is_digit_char (*op_string)
|| *op_string == '+' || *op_string == '-')
{
+ char *temp_str;
+
+ if (i.disp_operands != 0)
+ return 0;
+
temp_string = build_displacement_string (false, op_string);
- if (*temp_string == '+')
- ++temp_string;
+ temp_str = temp_string;
+ if (*temp_str == '+')
+ ++temp_str;
- if (i.disp_operands == 0 &&
- !i386_displacement (temp_string, temp_string + strlen (temp_string)))
- return 0;
+ if (!i386_displacement (temp_str, temp_str + strlen (temp_str)))
+ {
+ free (temp_string);
+ return 0;
+ }
+ free (temp_string);
++op_string;
end_of_operand_string = op_string;