* config/tc-arm.c (my_get_expression): Detect missing expressions.
testsuite/ * gas/arm/missing.s: New. * gas/arm/missing.d: New. * gas/arm/missing.l: New.
This commit is contained in:
parent
07088e9587
commit
f86adc0752
6 changed files with 22 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
2009-08-04 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* config/tc-arm.c (my_get_expression): Detect missing expressions.
|
||||
|
||||
2009-08-02 Eric B. Weddington <eric.weddington@atmel.com>
|
||||
|
||||
* config/tc-avr.c (mcu_types): Add atmega8m1, atmega8c1, atmega16c1.
|
||||
|
|
|
@ -913,13 +913,14 @@ my_get_expression (expressionS * ep, char ** str, int prefix_mode)
|
|||
seg = expression (ep);
|
||||
in_my_get_expression = 0;
|
||||
|
||||
if (ep->X_op == O_illegal)
|
||||
if (ep->X_op == O_illegal || ep->X_op == O_absent)
|
||||
{
|
||||
/* We found a bad expression in md_operand(). */
|
||||
/* We found a bad or missing expression in md_operand(). */
|
||||
*str = input_line_pointer;
|
||||
input_line_pointer = save_in;
|
||||
if (inst.error == NULL)
|
||||
inst.error = _("bad expression");
|
||||
inst.error = (ep->X_op == O_absent
|
||||
? _("missing expression") :_("bad expression"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2009-08-04 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* gas/arm/missing.s: New.
|
||||
* gas/arm/missing.d: New.
|
||||
* gas/arm/missing.l: New.
|
||||
|
||||
2009-07-15 Daniel Gutson <dgutson@codesourcery.com>
|
||||
Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
|
|
3
gas/testsuite/gas/arm/missing.d
Normal file
3
gas/testsuite/gas/arm/missing.d
Normal file
|
@ -0,0 +1,3 @@
|
|||
#name: missing operands
|
||||
#as: -march=armv5
|
||||
#error-output: missing.l
|
3
gas/testsuite/gas/arm/missing.l
Normal file
3
gas/testsuite/gas/arm/missing.l
Normal file
|
@ -0,0 +1,3 @@
|
|||
[^:]*: Assembler messages:
|
||||
[^:]*:1: Error: missing expression -- `bl'
|
||||
[^:]*:2: Error: missing expression -- `blx'
|
2
gas/testsuite/gas/arm/missing.s
Normal file
2
gas/testsuite/gas/arm/missing.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
bl
|
||||
blx
|
Loading…
Reference in a new issue