much bloody rewriting required before. There still probably is. */
#include "as.h"
+#include "read.h"
#include "opcode/a29k.h"
expressionS exp;
int pcrel;
int reloc_offset; /* Offset of reloc within insn */
- enum reloc_type reloc;
+
+ int reloc;
+
+
} the_insn;
#if __STDC__ == 1
{ "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 },
};
/* This array holds the chars that always start a comment. If the
pre-processor is disabled, these aren't very useful */
-char comment_chars[] = ";";
+const char comment_chars[] = ";";
/* This array holds the chars that only start a comment at the beginning of
a line. If the line seems to have the form '# 123 filename'
first line of the input file. This is because the compiler outputs
#NO_APP at the beginning of its output. */
/* Also note that comments like this one will always work */
-char line_comment_chars[] = "#";
+const char line_comment_chars[] = "#";
/* We needed an unused char for line separation to work around the
lack of macros, using sed and such. */
-char line_separator_chars[] = "@";
+const char line_separator_chars[] = "@";
/* Chars that can be used to separate mant from exp in floating point nums */
-char EXP_CHARS[] = "eE";
+const char EXP_CHARS[] = "eE";
/* Chars that mean this number is a floating point constant */
/* As in 0f12.456 */
/* or 0d1.2345e12 */
-char FLT_CHARS[] = "rRsSfFdDxXpP";
+const char FLT_CHARS[] = "rRsSfFdDxXpP";
/* Also be aware that MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT may have to be
changed in read.c . Ideally it shouldn't have to know about it at all,
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.
fixS *fixP;
{
- /* FIXME-NOW: relocation type handling is not yet written for
- a29k. */
-
-
switch (fixP->fx_r_type) {
case RELOC_32: return(R_WORD);
case RELOC_8: return(R_BYTE);
case RELOC_CONSTH: return (R_IHIHALF);
case RELOC_JUMPTARG: return (R_IREL);
default: printf("need %o3\n", fixP->fx_r_type);
- abort(0);
+ abort();
} /* switch on type */
return(0);