+2004-07-13 Thomas Nystrom <thn@saeab.se>
+
+ * config/tc-i386.c (T_SHIFTOP): New constant.
+ (intel_e05_1): Handle '&', '|' and T_SHIFTOP.
+ (intel_el1): Handle '~'.
+ (intel_get_token): Handle '<>', '&', '|' and '~'.
+
+2004-07-13 Nick Clifton <nickc@redhat.com>
+
+ (md_assemble): Remove spurious newline from end of as_bad error
+ message.
+ (intel_e05_1): Likewise.
+ (intel_e11): Likewise.
+ (intel_match_token): Likewise.
+
2004-07-11 Andreas Schwab <schwab@suse.de>
* config/tc-m68k.c: Convert to C90. Remove redundant
{
/* In case it is "hi" register, give up. */
if (i.op[x].regs->reg_num > 3)
- as_bad (_("can't encode register '%%%s' in an instruction requiring REX prefix.\n"),
+ as_bad (_("can't encode register '%%%s' in an instruction requiring REX prefix."),
i.op[x].regs->reg_name);
/* Otherwise it is equivalent to the extended register.
Initial production is 'expr'.
- addOp + | -
+ addOp + | - | & | \| | << | >>
alpha [a-zA-Z]
| id
| $
| register
+ | ~
=> expr SHORT e05
| e05
| $
| register
| id
+ | ~
| constant */
/* Parsing structure for the intel syntax parser. Used to implement the
#define T_OFFSET 9
#define T_PTR 10
#define T_ID 11
+#define T_SHIFTOP 12
/* Prototypes for intel parser functions. */
static int intel_match_token PARAMS ((int code));
intel_e05_1 ()
{
/* e05' addOp e06 e05' */
- if (cur_token.code == '+' || cur_token.code == '-')
+ if (cur_token.code == '+' || cur_token.code == '-'
+ || cur_token.code == '&' || cur_token.code == '|'
+ || cur_token.code == T_SHIFTOP)
{
strcat (intel_parser.disp, cur_token.str);
intel_match_token (cur_token.code);
else
{
- as_bad (_("Unknown operand modifier `%s'\n"), prev_token.str);
+ as_bad (_("Unknown operand modifier `%s'"), prev_token.str);
return 0;
}
| .
| register
| id
+ | ~
| constant */
static int
intel_e11 ()
return 0;
}
+ /* e11 ~ expr */
+ else if (cur_token.code == '~')
+ {
+ strcat (intel_parser.disp, "~");
+ intel_match_token ('~');
+
+ return (intel_e11 ());
+ }
+
/* e11 [ expr ] */
else if (cur_token.code == '[')
{
{
if (i.base_reg && i.index_reg)
{
- as_bad (_("Too many register references in memory operand.\n"));
+ as_bad (_("Too many register references in memory operand."));
return 0;
}
intel_match_token (cur_token.code);
if (cur_token.code != T_CONST)
{
- as_bad (_("Syntax error. Expecting a constant. Got `%s'.\n"),
+ as_bad (_("Syntax error. Expecting a constant. Got `%s'."),
cur_token.str);
return 0;
}
}
else
{
- as_bad (_("Unexpected token `%s'\n"), cur_token.str);
+ as_bad (_("Unexpected token `%s'"), cur_token.str);
return 0;
}
}
new_token.code = T_ID;
}
- else if (strchr ("+-/*:[]()", *intel_parser.op_string))
+ else if (strchr ("<>", *intel_parser.op_string)
+ && *intel_parser.op_string == *(intel_parser.op_string + 1))
+ {
+ new_token.code = T_SHIFTOP;
+ new_token.str[0] = *intel_parser.op_string;
+ new_token.str[1] = *intel_parser.op_string;
+ new_token.str[2] = '\0';
+ }
+
+ else if (strchr ("+-/*&|:[]()~", *intel_parser.op_string))
{
new_token.code = *intel_parser.op_string;
new_token.str[0] = *intel_parser.op_string;
}
else
- as_bad (_("Unrecognized token `%s'\n"), intel_parser.op_string);
+ as_bad (_("Unrecognized token `%s'"), intel_parser.op_string);
intel_parser.op_string += strlen (new_token.str);
cur_token = new_token;
a6a: ff 20 [ ]*jmp \*\(%eax\)
a6c: ff 25 d2 09 00 00 [ ]*jmp \*0x9d2
a72: e9 5b ff ff ff [ ]*jmp 9d2 <bar>
+ a77: b8 12 00 00 00 [ ]*mov \$0x12,%eax
+ a7c: 25 ff ff fb ff [ ]*and \$0xfffbffff,%eax
+ a81: 25 ff ff fb ff [ ]*and \$0xfffbffff,%eax
+ a86: b0 11 [ ]*mov \$0x11,%al
+ a88: b0 11 [ ]*mov \$0x11,%al
+ a8a: b3 47 [ ]*mov \$0x47,%bl
+ a8c: b3 47 [ ]*mov \$0x47,%bl
[ ]*...