#include "obstack.h"
#include "listing.h"
#include "ecoff.h"
+#include "dw2gencfi.h"
#ifndef TC_START_LABEL
#define TC_START_LABEL(x,y) (x == ':')
internals manual. */
int target_big_endian = TARGET_BYTES_BIG_ENDIAN;
-static char *old_buffer; /* JF a hack. */
-static char *old_input;
-static char *old_limit;
-
/* Variables for handling include file directory table. */
/* Table of pointers to directories to search for .include's. */
#define obj_pop_insert() pop_insert(obj_pseudo_table)
#endif
+#ifndef cfi_pop_insert
+#define cfi_pop_insert() pop_insert(cfi_pseudo_table)
+#endif
+
static void
pobegin ()
{
/* Now portable ones. Skip any that we've seen already. */
pop_table_name = "standard";
pop_insert (potable);
+
+#ifdef TARGET_USE_CFIPOP
+ pop_table_name = "cfi";
+ pop_override_ok = 1;
+ cfi_pop_insert ();
+#endif
}
\f
#define HANDLE_CONDITIONAL_ASSEMBLY() \
while ((buffer_limit = input_scrub_next_buffer (&input_line_pointer)) != 0)
{ /* We have another line to parse. */
know (buffer_limit[-1] == '\n'); /* Must have a sentinel. */
- contin: /* JF this goto is my fault I admit it.
- Someone brave please re-write the whole
- input section here? Pleeze??? */
+
while (input_line_pointer < buffer_limit)
{
/* We have more of this buffer to parse. */
line_label = colon (s); /* User-defined label. */
/* Put ':' back for error messages' sake. */
*input_line_pointer++ = ':';
+#ifdef tc_check_label
+ tc_check_label (line_label);
+#endif
/* Input_line_pointer->after ':'. */
SKIP_WHITESPACE ();
}
if (c && strchr (line_comment_chars, c))
{ /* Its a comment. Better say APP or NO_APP. */
+ sb sbuf;
char *ends;
char *new_buf;
char *new_tmp;
continue; /* We ignore it */
s += 4;
+ sb_new (&sbuf);
ends = strstr (s, "#NO_APP\n");
if (!ends)
if (size < space)
{
- new_tmp += size;
+ new_tmp[size] = 0;
break;
}
if (tmp_buf)
free (tmp_buf);
- old_buffer = buffer;
- old_input = input_line_pointer;
- old_limit = buffer_limit;
- buffer = new_buf;
- input_line_pointer = new_buf;
- buffer_limit = new_tmp;
+ /* We've "scrubbed" input to the preferred format. In the
+ process we may have consumed the whole of the remaining
+ file (and included files). We handle this formatted
+ input similar to that of macro expansion, letting
+ actual macro expansion (possibly nested) and other
+ input expansion work. Beware that in messages, line
+ numbers and possibly file names will be incorrect. */
+ sb_add_string (&sbuf, new_buf);
+ input_scrub_include_sb (&sbuf, input_line_pointer, 0);
+ sb_kill (&sbuf);
+ buffer_limit = input_scrub_next_buffer (&input_line_pointer);
+ free (new_buf);
continue;
}
#ifdef md_after_pass_hook
md_after_pass_hook ();
#endif
-
- if (old_buffer)
- {
- free (buffer);
- bump_line_counters ();
- if (old_input != 0)
- {
- buffer = old_buffer;
- input_line_pointer = old_input;
- buffer_limit = old_limit;
- old_buffer = 0;
- goto contin;
- }
- }
}
quit:
if ((temp = get_absolute_expression ()) < 0)
{
- as_warn (_(".COMMon length (%ld) < 0 ignored"), (long) temp);
+ as_warn (_(".COMMon length (%lu) out of range ignored"),
+ (unsigned long) temp);
ignore_rest_of_line ();
if (flag_mri)
mri_comment_end (stop, stopc);
bytes = repeat;
if (repeat <= 0)
{
- if (!flag_mri)
- as_warn (_(".space repeat count is zero, ignored"));
- else if (repeat < 0)
+ if (repeat < 0)
as_warn (_(".space repeat count is negative, ignored"));
goto getout;
}
#endif
#endif
+void
+do_parse_cons_expression (expressionS *exp,
+ int nbytes ATTRIBUTE_UNUSED)
+{
+ TC_PARSE_CONS_EXPRESSION (exp, nbytes);
+}
+
+
/* Worker to do .byte etc statements.
Clobbers input_line_pointer and checks end-of-line. */
if (need_pass_2)
return;
+ dot_value = frag_now_fix ();
+
#ifndef NO_LISTING
#ifdef OBJ_ELF
/* When gcc emits DWARF 1 debugging pseudo-ops, a line number will