Fix ICE in assembler when passed a bogus input file.
PR gas/20904 * as.h (SKIP_ALL_WHITESPACE): New macro. * expr.c (operand): Use it.
This commit is contained in:
parent
fa6631b4ee
commit
14c1428b29
3 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2016-12-05 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR gas/20904
|
||||||
|
* as.h (SKIP_ALL_WHITESPACE): New macro.
|
||||||
|
* expr.c (operand): Use it.
|
||||||
|
|
||||||
2016-12-05 Szabolcs Nagy <szabolcs.nagy@arm.com>
|
2016-12-05 Szabolcs Nagy <szabolcs.nagy@arm.com>
|
||||||
|
|
||||||
* config/tc-arm.c (do_vcmla, do_vcadd): Define.
|
* config/tc-arm.c (do_vcmla, do_vcadd): Define.
|
||||||
|
|
|
@ -1371,7 +1371,7 @@ operand (expressionS *expressionP, enum expr_mode mode)
|
||||||
/* It is more 'efficient' to clean up the expressionS when they are
|
/* It is more 'efficient' to clean up the expressionS when they are
|
||||||
created. Doing it here saves lines of code. */
|
created. Doing it here saves lines of code. */
|
||||||
clean_up_expression (expressionP);
|
clean_up_expression (expressionP);
|
||||||
SKIP_WHITESPACE (); /* -> 1st char after operand. */
|
SKIP_ALL_WHITESPACE (); /* -> 1st char after operand. */
|
||||||
know (*input_line_pointer != ' ');
|
know (*input_line_pointer != ' ');
|
||||||
|
|
||||||
/* The PA port needs this information. */
|
/* The PA port needs this information. */
|
||||||
|
|
|
@ -29,8 +29,11 @@ extern char *input_line_pointer; /* -> char we are parsing now. */
|
||||||
#ifdef PERMIT_WHITESPACE
|
#ifdef PERMIT_WHITESPACE
|
||||||
#define SKIP_WHITESPACE() \
|
#define SKIP_WHITESPACE() \
|
||||||
((*input_line_pointer == ' ') ? ++input_line_pointer : 0)
|
((*input_line_pointer == ' ') ? ++input_line_pointer : 0)
|
||||||
|
#define SKIP_ALL_WHITESPACE() \
|
||||||
|
while (*input_line_pointer == ' ') ++input_line_pointer
|
||||||
#else
|
#else
|
||||||
#define SKIP_WHITESPACE() know(*input_line_pointer != ' ' )
|
#define SKIP_WHITESPACE() know (*input_line_pointer != ' ' )
|
||||||
|
#define SKIP_ALL_WHITESPACE() SKIP_WHITESPACE()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SKIP_WHITESPACE_AFTER_NAME() \
|
#define SKIP_WHITESPACE_AFTER_NAME() \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue