diff options
Diffstat (limited to 'gas/config/tc-a29k.c')
-rw-r--r-- | gas/config/tc-a29k.c | 41 |
1 files changed, 14 insertions, 27 deletions
diff --git a/gas/config/tc-a29k.c b/gas/config/tc-a29k.c index 62b5063..c4165c4 100644 --- a/gas/config/tc-a29k.c +++ b/gas/config/tc-a29k.c @@ -80,7 +80,10 @@ const pseudo_typeS { "reg", s_lsym, 0 }, /* Register equate, same as equ */ { "space", s_ignore, 0 }, /* Listing control */ { "sect", s_ignore, 0 }, /* Creation of coff sections */ +#ifndef OBJ_COFF + /* We can do this right with coff */ { "use", s_use, 0 }, +#endif { "word", cons, 4 }, { NULL, 0, 0 }, }; @@ -365,34 +368,18 @@ char * char *s; expressionS *operandp; { - char *save = input_line_pointer; - char *new; - segT seg; - - input_line_pointer = s; - seg = expr (0, operandp); - new = input_line_pointer; - input_line_pointer = save; + char *save = input_line_pointer; + char *new; + segT seg; - switch (seg) { - case SEG_ABSOLUTE: - case SEG_TEXT: - case SEG_DATA: - case SEG_BSS: - case SEG_UNKNOWN: - case SEG_DIFFERENCE: - case SEG_BIG: - case SEG_REGISTER: - return new; - - case SEG_ABSENT: - as_bad("Missing operand"); - return new; - - default: - as_bad("Don't understand operand of type %s", segment_name (seg)); - return new; - } + input_line_pointer = s; + seg = expr (0, operandp); + new = input_line_pointer; + input_line_pointer = save; + + if (seg == SEG_ABSENT) + as_bad("Missing operand"); + return new; } /* Instruction parsing. Takes a string containing the opcode. |