aboutsummaryrefslogtreecommitdiff
path: root/gas/gasp.c
AgeCommit message (Collapse)AuthorFilesLines
1995-09-06 * config/tc-mips.c: Remove CYGNUS LOCAL comments.Stan Shebs1-1/+2
(md_begin): Use 0/1 instead of TRUE/FALSE. (md_show_usage): Break up long format string for the benefit of lame compilers. * config/tc-m68k.c (md_show_usage): Ditto. * gasp.c (show_usage): Ditto. * macro.c (check_macro): Cast result of hash_find.
1995-08-25 * gasp.c (as_abort): New function.Ian Lance Taylor1-0/+15
* sb.c (sb_build): Revert yesterday's patch.
1995-08-21 Add support for macros.Ian Lance Taylor1-1053/+47
* as.c: Include sb.h and macro.h. (max_macro_next): New global variable. (main): Call macro_init. (macro_expr): New static function. * as.h (max_macro_nest): Declare. * read.c (line_label): Rename from mri_line_label. Change all uses. (potable): Add exitm, irp, irpc, macro, mexit, rept. (read_a_source_file): Always clear line_label at the start of a line, not just when flag_mri or LABELS_WITHOUT_COLONS. Fixup MRI/LABELS_WITHOUT_COLONS handling. In MRI mode, permit label: equ val. Set line_label when calling colon. In MRI mode, a leading '.' does not imply a pseudo-op. Check for macro expansion before calling md_assemble. (s_irp): New function. (get_line_sb): New static function. (s_macro): New function. (s_mexit): New function. (s_rept): New function. * read.h (line_label): Rename from mri_line_label. (s_irp, s_rept): Declare. (s_macro, s_mexit): Declare. * input-scrub.c: Include sb.h. (sb_index, from_sb): New static variables. (macro_nest): New static variable. (struct input_save): Add sb_index and from_sb fields. Change next_saved_file field to be struct input_save *. (next_saved_file): Changed to be struct input_save *. (input_scrub_push): Change to return type struct input_save *. Save sb_index and from_sb. (input_scrub_pop): Change parameter type to struct input_save *. Restore sb_index and from_sb. (input_scrub_include_sb): New function. (input_scrub_next_buffer): Handle reading from from_sb. (bump_line_counters): Only increment lines if not using from_sb. * config/tc-m68k.c (opt_table): Add nest. (opt_nest): New static function. * gasp.c: Include sb.h and macro.h. Move all sb related functions and definitions to sb.h and sb.c. Move all macro related functions and definitions to macro.h and macro.c. * sb.h, sb.c: New files, extracted from gasp.c. * macro.h, macro.c: Likewise. * Makefile.in (OBJS): Add sb.o and macro.o (GASPOBJS): Define. (gasp.new): Depend upon $(GASPOBJS). Use $(GASPOBJS) to link. (TARG_CPU_DEP_m68k): Depend upon subsegs.h. (gasp.o): Depend upon sb.h and macro.h. (sb.o): New target. (macro.o): New target. (as.o): Depend upon sb.h and macro.h. (input-scrub.o): Depend upon sb.h. (read.o): Depend upon sb.h and macro.h.
1995-08-18 * gasp.c (include_print_where_line): Always subtract 1 fromIan Lance Taylor1-6/+34
linecount before printing it. (process_file): In MRI mode, lines beginning with '*' or '!' are comments. (do_reg): In MRI mode, don't require parentheses. (do_include): In MRI mode, don't requires quotes. If the file can not be found in the include path, try opening it in the current directory. Print the file name correctly in the error message. (chartype_init): In MRI mode, set FIRSTBIT for '.'. (main): Set comment_char to ';' when entering MRI mode.
1995-08-15 * config/tc-m68k.c (md_pseudo_table): Add MRI structured controlIan Lance Taylor1-1/+0
directives: if, if.b, if.w, if.l, else, else.s, else.l, endi, break, break.s, break.l, next, next.s, next.l, for, for.b, for.w, for.l, endf, repeat, until, until.b, until.w, until.l, while, while.b, while.w, while.l, endw. (enum mri_control_type): Define. (struct mri_control_info): Define. (mri_control_stack): New static variable. (mri_control_index): New static variable. (mri_control_label): New static function. (push_mri_control, pop_mri_control): New static functions. (parse_mri_condition): New static function. (parse_mri_control_operand): New static function. (swap_mri_condition, reverse_mri_condition): New static functions. (build_mri_control_operand): New static function. (parse_mri_control_expression): New static function. (s_mri_if, s_mri_else, s_mri_endi): New static functions. (s_mri_break, s_mri_next): New static functions. (s_mri_for, s_mri_endf): New static functions. (s_mri_repeat, s_mri_until): New static functions. (s_mri_while, s_mri_endw): New static functions. * gasp.c (mrikinfo): Remove IF. * expr.c (get_symbol_end): Accept \001 as part of a name.
1995-08-14 * gasp.c (do_align, get_any_string): Mark as static.Ian Lance Taylor1-5/+5
(do_assigna, do_assignc, new_file): Likewise.
1995-08-14 * gasp.c (strip_comments): Comment out; it's not used.Ian Lance Taylor1-207/+336
(do_end): Add parameter. In MRI mode, print it out. (do_irp): New static function. (sub_actual): Change parameter m to formal_hash, changing type from macro_entryh * to hash_table *. (macro_expand_body): New static function, broken out of macro_expand. (macro_expand): Call macro_expand_body. (K_*): Fully parenthesize. (K_IRP, K_IRPC): Define. (mrikinfo): Add IRP and IRPC. (process_pseudo_op): In MRI mode, print out END pseudo-op. Pass line to do_end. Handle K_IRP and K_IRPC.
1995-08-11 * gasp.c (change_base): Don't treat ' specially in MRI mode.Ian Lance Taylor1-114/+586
(process_file): Don't warn about missing END in MRI mode. (do_if): New static function. (get_mri_string, do_ifc): New static functions. (buffer_and_nest): Treat MRI mode like alternate syntax mode. (do_aendr): Change error message in MRI mode. (do_arepeat): Use REPT/ENDR in MRI mode. (do_formals): In MRI mode, add special NARG formal. (macro_expand): Various changes for MRI mode: permit a qualifier on the macro name; set special NARG formal; permit unnamed positional arguments; use && to concatenate named parameters; permit \d to specify an unnamed parameter; permit named parameters to not start with \; use == to see if a parameter exists. (getstring): In MRI mode, allow <> to quote a string. (K_IFEQ, K_IFNE, K_IFLT, K_IFLE, K_IFGE, K_IFGT): Define. (K_IFC, K_IFNC): Define. (struct keyword): Name structure used in kinfo array. (mrikinfo): New static array. (process_pseudo_op): Don't require leading '.' in MRI mode. Handle new MRI pseudo-op definitions. (add_keyword): New static function, broken out of process_init. (process_init): Use add_keyword. In MRI mode, add mrikinfo table. (long_options): Add "mri". (show_usage): Mention -M/--mri. (main): Call process_init after processing arguments. Handle -M. * doc/gasp.texi: Document -M/--mri.
1995-08-01 * gasp.c (main): Parse -I option.Steve Chamberlain1-3/+47
(do_include): Look through include list. * gasp.c (change_base): Don't modify numbers in strings. (pr7583) * testsuite/gasp/*: New. * testsuite/Makefile.in: Use gasp tests. * testsuite/config/default.exp: Add gasp stuff.
1995-08-01 * gasp.c (change_base): Don't modify numbers in strings. (pr7583)Steve Chamberlain1-0/+12
* testsuite/gas/gasp/*: New.
1995-07-19 * gasp.c (process_assigns): Use toupper before comparing againstIan Lance Taylor1-29/+38
upper case letter. (whatcond): Likewise. PR 7281.
1995-07-06fsf address updateKen Raeburn1-1/+1
1995-06-21 * gasp.c (do_print, do_form, buffer_and_nest): Use case insensitiveSteve Chamberlain1-6/+6
string compares. gas/7274.
1995-05-19From Richard Earnshaw (rearnsha@armltd.co.uk):Ken Raeburn1-1/+1
* gasp.c (istrue): Correctly test for string inequality.
1995-01-19gcc lintKen Raeburn1-1/+4
1995-01-06* gasp.c: Include string.h. Put config.h before other includes.Ken Raeburn1-1/+2
1994-08-28Conversion to autoconf:Ken Raeburn1-1/+9
* acconfig.h, aclocal.m4: New files. * configure.in: Rewritten (except for some target-specific code) for autoconf. * conf.in, configure: New files, generated from the above. * Makefile.in: Changed magic sequence indicating insertion of makefile fragments. (VPATH, srcdir, CC, LIBS, OBJS dependencies): Use @-substitutions from configure. (LINKED_HEADERS): Deleted a.out.gnu.h, a.out.h, and host.h. (config.status, configure): Rewrite rules. (config-stamp): Depend on conf. Skip variables that configure is now substituting itself. (*.o dependencies): Deleted host.h. (distclean, realclean): Don't delete host.h. * as.c: Don't include stdio.h, string.h, sys/types.h. Include signal.h after as.h. * as.h: Include alloca-conf.h first. Include ctype.h, string.h, strings.h, stdlib.h, unistd.h, sys/types.h, fopen-bin.h, fopen-same.h, as suggested by autoconf test results. [BROKEN_ASSERT]: Don't include assert.h. (strdup): Declare. (volatile, const): Define if not __STDC__ and not already defined. (malloc, realloc) [NEED_MALLOC_DECLARATION]: Declare. (free) [NEED_FREE_DECLARATION]: Declare. * gasp.c: Include config.h, stdlib.h (if HAVE_STDLIB_H). Don't include host.h. (malloc) [NEED_MALLOC_DECLARATION]: Declare. * messages.c: Include as.h first. Include errno.h only if HAVE_ERRNO_H. If HAVE_VARARGS_H and not __STDC__, undefine HAVE_STDARG_H. Set NO_STDARG and NO_VARARGS as appropriate. * doc/Makefile.in (srcdir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf @-substitutions.
1994-08-24gcc lint.Ian Lance Taylor1-1/+1
* as.c (main): Move a inside the #if 0 block which uses it. * ecoff.c (current_stabs_filename): Make const. * frags.h (frag_align_pattern): Declare. * gasp.c (new_file): Cast isp to long, and use %ld to print it. * config/tc-alpha.h (md_operand): Add cast to void. (alpha_do_align): Declare argument types. (tc_get_register): Declare. (alpha_frob_ecoff_data): Declare. * config/tc-alpha.c: Include <ctype.h>. (s_mask): Don't declare; does not exist. (line_comment_chars): Remove /* from descriptive comment. (tc_get_register): Remove unused local reg. (tc_gen_reloc): Don't bother to compare unsigned to zero. (s_base): Correct warning to actually print register number. (md_begin): Remove unused locals retval, lose, and i. (alpha_fix_adjustable): Move default case inside switch to avoid warning. (load_symbol_address): Remove unused locals reloc_addr, p, sym, and addend. (emit_byte_manip_r): Declare types for all arguments. (emit_extract_r, emit_insert_r, emit_mask_r): Likewise. (emit_sign_extend, emit_bis_r, s_proc): Likewise. (alpha_ip): Use sprint_value to print offsetT value. Remove unused local size. Remove unused label get_macro. (alpha_do_align): Make fill const. (md_apply_fix): Remove unused label check_zov.
1994-07-08 * (process_pseudo_op): Pass right are do do_aif.Steve Chamberlain1-10/+21
(get_any_string): New arg 'pretend_quote'. (get_and_process, do_formals, macro_expand, do_sdata, process_pseudo_op): Use new arg.
1994-07-08 * gasp.c (get_any_string): Cope with getting a string with anSteve Chamberlain1-18/+33
alternate base specifier. (do_aif, do_aelse): Only enable output if expression is true and previous level was on. (chartype_init): Add BASEBIT chartype. (process_pseudo_op): Notice nesteed AIFs.
1994-06-28 * configure.in (i386-go32): When it's a host setSteve Chamberlain1-13/+18
host_makefile_frag. * gasp.c (get_any_string): Fix handling of % when in PharLap mode.
1994-06-02oops, left out var declKen Raeburn1-0/+1
1994-06-02(hash_new_table): Clear newly allocated table.Ken Raeburn1-0/+3
1994-05-06 * gasp.c: Include libiberty.h.Ian Lance Taylor1-1/+1
(main): Remove unused variable i.
1994-04-27 * configure.in (i386-*-go32): Uses coff now.Steve Chamberlain1-177/+571
* gasp.c (main): Now takes -D on command line. (show_usage): Describe new options.
1994-04-20* gasp.c: Include ctype.h.Ken Raeburn1-0/+1
1994-02-02 * gasp.c (kinfo): Fully bracket initializer.Ian Lance Taylor1-38/+38
1994-02-02* gasp.c (malloc): Don't declare, since host.h or system header files mayKen Raeburn1-2/+0
declare it differently. (Actually, the only use is in xmalloc; if xmalloc didn't also zero out the region of memory, I'd delete the function altogether and use the libiberty version...)
1994-02-01 * gasp.c: Include host.h.Steve Chamberlain1-1/+1
1994-01-31New file.Steve Chamberlain1-0/+3519
1994-01-31New file.Steve Chamberlain1-0/+0