Commit Graph

109 Commits

Author SHA1 Message Date
Richard Henderson
08ce71f5c4 * read.c (get_line_sb): Accept any eol marker while scanning macros. 1997-10-15 03:56:30 +00:00
Nick Clifton
d72d8c59f9 Make the NUL character be considered to be a line terminator. 1997-08-22 18:14:35 +00:00
Richard Henderson
96e0ff4665 * as.c (show_usage): Add -am.
* input-scrub.c (input_scrub_include_sb): Don't add leading \n
        if we've already got one.
        * listing.c (struct list_info_struct): Add line_contents.
        (listing_newline): Put unused argument to work: if non-null, save it...
        (listing_listing): ... and regurgitate during listing instead of line
        from file.
        * listing.h (LISTING_MACEXP): New define.
        (LISTING_NEWLINE): Argument is NULL.
        * read.c (read_a_source_file): If expanding macros, break up input
        lines and pass them to listing_newline.
        * doc/as.texinfo: Document -ac and -am.

        * cond.c (s_ifc): Add missing demand_empty_rest_of_line.
1997-08-19 03:45:56 +00:00
Ian Lance Taylor
cd92403305 * as.h (enum debug_info_type): Define.
(debug_type): Declare.
	* as.c (debug_type): New global variable.
	(show_usage): Add --gstabs.
	(parse_args): Handle --gstabs.
	* read.c (generate_asm_lineno): Remove.
	(read_a_source_file): Output stabs debugging if appropriate.
	Change checks of generate_asm_lineno to check debug_type.  Only
	generate ECOFF debugging if ECOFF_DEBUGGING is defined.
	* read.h (generate_asm_lineno): Don't declare.
	(stabs_generate_asm_lineno): Declare.
	* stabs.c (stabs_generate_asm_lineno): New function.
	* ecoff.c (add_file): Use debug_type, not generate_asm_lineno.
	Don't turn off debugging.
	(add_file): Remove old #if 0 code.
	(ecoff_new_file): Set debug_type, not generate_asm_lineno.
	(ecoff_directive_end): Don't generate stabs line symbols.
	(ecoff_generate_asm_lineno): Don't check stabs_seen.  Don't set
	generate_asm_lineno.
	(line_label_cnt): Remove.
	(ecoff_generate_asm_line_stab): Remove.
	* ecoff.h (ecoff_generate_asm_line_stab): Don't declare.
	* doc/as.texinfo, doc/as.1: Document --gstabs.
1997-08-15 18:19:27 +00:00
Ian Lance Taylor
7cd06f4400 Tue Mar 18 15:50:13 1997 H.J. Lu <hjl@lucon.org>
* Many files: Add function prototypes.
	* as.c (show_usage, parse_args): Make static.
	* frags.h (frag_alloc): Declare.
	* subsegs.c (subseg_set_rest): Don't declare frag_alloc.
	* symbols.c (dollar_label_instance): Change return type to long.
	* symbols.h (print_symbol_value): Declare.
	(print_expr, print_expr_1, print_symbol_value_1): Declare.
	* write.c (fix_new_exp): Don't declare make_expr_symbol.
	(remove_subsegs, relax_frag): Make static.
	* config/atof-vax.c (atof_vax_sizeof): Change letter to int.
	(what_kind_of_float): Likewise.
	(atof_vax): Make static.  Change what_kind to int.
	(md_atof): Change what_statement_type to int.
	* config/obj-ecoff.h (obj_ecoff_set_ext): Declare.
	* config/tc-alpha.c (vax_md_atof): Declare.
	(md_atof): Don't declare atof_ieee and vax_md_atof.
	* config/tc-i386.c (set_16bit_code_flag): Make static.
	* config/tc-i386.h (tc_i386_fix_adjustable): Declare.
	* config/tc-m68k.c (add_fix): Change width to int.
	(insert_reg): Change regname to const.
	(md_atof): Don't declare atof_ieee.
	(demand_empty_rest_of_line): Don't declare.
	* config/tc-m88k.c (md_atof): Don't declare atof_ieee.
	* config/tc-sparc.c (cmp_reg_entry): Change args to const PTR.
	(parse_keyword_arg): Change lookup_fn to take const arg.
	(md_atof): Don't declare atof_ieee.
	* config/tc-sparc.h: Add ifdef for multiple inclusion.
	(tc_aout_pre_write_hook): Don't declare.
1997-03-18 21:04:18 +00:00
Ian Lance Taylor
d428c89fdf * read.c (read_a_source_file): Call LISTING_NEWLINE before
HANDLE_CONDITIONAL_ASSEMBLY when handling an MRI line label.
PR 11746.
1997-03-13 20:19:43 +00:00
Ian Lance Taylor
151c3ec043 Thu Feb 13 14:48:03 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* config/tc-m68k.c (LEX_TILDE): Define if TE_DELTA.
	* read.c (LEX_TILDE): Define if not defined.
	(lex_type): Use LEX_TILDE.
	* expr.c (get_symbol_end): Check first char with is_name_beginner,
	not is_part_of_name.
1997-02-13 19:50:01 +00:00
Ian Lance Taylor
a75abb6f0a * write.c (relax_segment): Give an error if a .space symbol is
common or undefined.

	* read.c (read_a_source_file): Don't handle mri_pending_align if
	the handler is s_globl or s_ignore.
1997-01-31 15:47:41 +00:00
Ian Lance Taylor
a6b200da04 Ideas from Srinivas Addagarla <srinivas@cdotd.ernet.in>:
* read.c (read_a_source_file): After doing an mri_pending_align,
	adjust the line_label if there is one.
	(s_space): Set mri_pending_align if an odd number of bytes were
	output.
1997-01-30 17:10:28 +00:00
Ian Lance Taylor
6468dabdec * read.c (emit_expr): Check for overflow of a negative value
correctly.
	* write.c (fixup_segment): Likewise.
	* config/obj-coff.c (fixup_segment): Likewise.
PR 11411.
1997-01-09 19:13:42 +00:00
Ian Lance Taylor
8ff750011b * read.c (read_a_source_file): When defining a macro in MRI mode,
don't add the symbol to the symbol table.
PR 11423.
1997-01-09 17:10:09 +00:00
Ian Lance Taylor
a986926b11 Based on patch from Ronald F. Guilmette <rfg@monkeys.com>:
* read.c (read_a_source_file): Check for conditional operators
	before doing an MRI pending alignment.
	* config/tc-m68k.h (m68k_conditional_pseudoop): Declare.
	(tc_conditional_pseudop): Define.
	* config/tc-m68k.c (m68k_conditional_pseudop): New function.
	* doc/internals.texi (CPU backend): Describe
	tc_conditional_pseudoop.
1997-01-03 03:07:01 +00:00
Ian Lance Taylor
20868ec647 * read.c (read_a_source_file): Check mri_pending_align after
checking for a macro.  From Ronald F. Guilmette
	<rfg@monkeys.com>.
1996-12-31 22:11:23 +00:00
Ian Lance Taylor
a69e5977e2 * read.c (s_macro): Warn if a macro has the same name as a
pseudo-op.
	(s_space): In m68k MRI mode, align to a word boundary.
	* macro.c (define_macro): Add namep parameter.  Change all
	callers.
	* macro.h (define_macro): Update declaration.
1996-10-01 21:51:15 +00:00
Ian Lance Taylor
b95bee134d * read.c (s_lcomm): Set section flags for .sbss section. 1996-05-30 23:04:52 +00:00
Michael Meissner
adeab39b20 Add .skip as a synonym for .space 1996-05-23 21:58:22 +00:00
Ian Lance Taylor
7d3741edcb * read.h (enum linkonce_type): Define.
(s_linkonce): Declare.
	* read.c (potable): Add "linkonce".
	(s_linkonce): New function.
	* subsegs.h (segment_info_type): Add linkonce field to
	MANY_SEGMENTS && ! BFD_ASSEMBLER section.
	* config/obj-coff.h (obj_handle_link_once): Define if TE_PE.
	(obj_coff_pe_handle_link_once): Declare if TE_PE.
	* config/obj-coff.c: If TE_PE and not BFD_ASSEMBLER, #include
	"coff/pe.h".
	(obj_coff_pe_handle_link_once): New function, defined if TE_PE.
	(c_section_symbol): If TE_PE, set the x_comdat field in the aux
	entry based on the linkonce field in segment_info.
	* doc/as.texinfo: Document .linkonce.
1996-03-29 21:35:44 +00:00
Ian Lance Taylor
c7a89bde9b * as.h (strdup): Don't declare.
* stabs.c: Include libiberty.h
	(get_stab_string_offset): Use xstrdup rather than strdup.
	(s_stab_generic): Likewise.
	* as.c (parse_args): Likewise.
	* read.c (s_mri_sect): Likewise.
1996-03-22 16:44:21 +00:00
Ian Lance Taylor
20710f1c0c * read.c (potable): Add "mri" and ".mri".
(s_mri): New function.
	* read.h (s_mri): Declare.
	* app.c (scrub_m68k_mri): New static variable.
	(mri_pseudo): New static variable.
	(do_scrub_begin): Add m68k_mri parameter.  Use it rather than
	flag_m68k_mri.  Initialize scrub_m68k_mri.
	(mri_state, mri_last_ch): New static variables.
	(struct app_save): Add scrub_m68k_mri, mri_state, and mri_last_ch
	fields.
	(app_push): Save new fields.
	(app_pop): Restore new fields.
	(do_scrub_chars): Check scrub_m68k_mri rather than flag_mri_mri.
	If TC_M68K, use a trivial state machine to look for occurrences of
	the .mri pseudo-op, and change the mode appropriately.
	* as.h (do_scrub_begin): Update prototype.
	* input-scrub.c (input_scrub_begin): Pass flag_m68k_mri to
	do_scrub_begin.
	* config/tc-m68k.c (reg_prefix_optional_seen): New static
	variable.
	(m68k_mri_mode_change): New function.
	(md_parse_option): Set reg_prefix_optional_seen.
	* config/tc-m68k.h (m68k_mri_mode_change): Declare.
	(MRI_MODE_CHANGE): Define.
	* doc/as.texinfo: Document .mri pseudo-op.
1996-02-13 00:20:13 +00:00
Ian Lance Taylor
4080c27065 * read.c (potable): Pass negative numbers for new .balign[wl] and
.p2align[wl] pseudo-ops.
	(s_align_bytes): Treat a negative argument as specifying the fill
	length.
	(s_align_ptwo): Likewise.
1996-02-09 01:04:21 +00:00
Ian Lance Taylor
71dd3c40ca * read.c (potable): Add balignw, balignl, p2alignw, and p2alignl.
(do_align): Take new len parameter.  Change all callers.  Pass it
	to md_do_align.
	(s_align_bytes): Arg now indicates the length of the fill pattern.
	(s_align_ptwo): Likewise.
	* config/obj-coff.c (write_object_file): Pass length to
	md_do_align.
	* config/tc-i386.h (md_do_align): Take new len parameter.
	* config/tc-m88k.h (md_do_align): Likewise.
	* config/tc-m88k.c (m88k_do_align): Likewise.
	* config/tc-sh.h (md_do_align): Likewise.
	* config/tc-sh.c (sh_do_align): Likewise.
	* doc/as.texinfo: Document new pseudo-ops.

	* config/obj-coff.c (fixup_mdeps): Divide offset by fr_var, as is
	done in cvt_frag_to_fill.
PR 8974.
1996-02-08 00:22:02 +00:00
Ian Lance Taylor
cef72a9279 * as.c (main): Call parse_args before read_begin.
* app.c (do_scrub_chars): If flag_m68k_mri, don't put a dot in
	front of generated pseudo-ops.
	* read.c (potable): Ignore "name".
	(s_app_file): Permit a single quote after the string, since one
	may appear in m68k MRI mode.
1996-02-07 19:34:29 +00:00
Ken Raeburn
624c91d1e7 * read.c (s_fill): If md_flush_pending_output is defined, call it. 1995-12-05 22:28:25 +00:00
Ken Raeburn
6594d6b9c2 Clean up hash code, parameterize some actions, tweak some parameters. Hash
table entries, table allocation and control structure are larger now, but
collisions are reduced and string compares even further reduced.

Dump lots more statistics, especially hash code data, for --statistics.  Dump
statistics even in error cases.

Details in ChangeLog.
1995-11-28 19:21:09 +00:00
Ian Lance Taylor
42ac8fa83d * cond.c (s_endif): Call demand_empty_rest_of_line. In MRI mode,
skip characters after the pseudo-op.
	(s_else): Likewise.
	* read.c (get_line_sb): Don't look past buffer_limit.
	(s_include): In MRI mode, skip characters after the file name.
1995-10-03 16:43:45 +00:00
Ian Lance Taylor
18c9057f2b * config/tc-ppc.h (OBJ_XCOFF): Define if OBJ_COFF and not TE_PE.
Change OBJ_COFF checks to check OBJ_XCOFF instead.
	(TARGET_FORMAT): Fully parenthesize.
	(LEX_QM): Define if TE_PE.
	* config/tc-ppc.c: Replace OBJ_COFF by OBJ_XCOFF throughout.
	Remove checks of TE_PE within #ifdef OBJ_XCOFF sections.
	(init_regtable): Make i unsigned.
	(ppc_set_current_section): Rename from setCurrentSection.  Change
	all callers.
	(ppc_arch): Return after as_fatal to avoid gcc warning.
	(md_assemble): Only declare reloc if OBJ_ELF.  Add default to
	switch on fixups[i].reloc to avoid gcc warning.
	(IMAGE_SGN_LNK_OTHER): Fix nested comment.
	(ppc_pe_function): Don't call ppc_canonicalize_symbol_name.
	(ppc_frob_symbol): Remove TE_PE section checks.
	(md_estimate_size_before_relax): Return after abort to avoid gcc
	warning.
	(md_apply_fix3): Add BFD_RELOC_16_GOT_PCREL to switch.
	* read.c (LEX_QM): Define as 0 if not defined.
	(lex_type): Use LEX_QM for '?'.
1995-09-27 19:02:16 +00:00
Ian Lance Taylor
3dce804d95 * expr.c (operand): Handle 08 and 09 in MRI mode.
* macro.c (ISSEP): Remove duplicated `"' character.
 	(get_any_string): Copy some characters for which ISSEP is true:
	';', '>', '(', ')'.  Otherwise we can get in an infinite loop.
	* read.c (s_space): In MRI mode, the expressions stop at the first
	unquoted space.
	(cons_worker): In MRI mode, restore the terminating character at
	the end of the function.
1995-09-07 21:54:13 +00:00
Ian Lance Taylor
94a7312289 * read.c (cons_worker): Don't use #elif; old compilers don't
support it.
1995-09-07 16:35:37 +00:00
Ian Lance Taylor
86038ada17 * app.c (do_scrub_chars): In MRI mode, silently end quoted strings
at newline characters.  In MRI mode, always keep spaces in the
	operands field.  In MRI mode, treat a line comment character as a
	regular comment character following a space.
	* cond.c (ignore_input): Use strncasecmp rather than strncmp when
	looking for special pseudo-ops.
	* read.c (cons_worker): In MRI mode, the expressions stop at the
	first unquoted space.
	(equals): Likewise.
1995-09-07 01:17:16 +00:00
Ian Lance Taylor
4026c1222f * read.c (read_a_source_file): In MRI mode, don't end the
statement inside a quotation.
	(s_space): Don't warn about a zero repeat count in MRI mode.
	* config/tc-m68k.c (crack_operand): In MRI mode, don't count
	parentheses inside quotes.
	(md_assemble): In MRI mode, anything after the operands field is a
	comment.
	(parse_mri_control_operand): Adjust start and stop to remove
	spaces.
	(s_mri_for): Likewise.
1995-08-21 21:05:06 +00:00
Ian Lance Taylor
7e047ac2c1 Add support for macros.
* 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-21 18:35:11 +00:00
Ian Lance Taylor
ca2329727e * read.c (s_include): In MRI mode, don't expect quotes around the
file name.
	* listing.c (listing_title): Don't require the title to be quoted.
1995-08-18 15:15:28 +00:00
Ian Lance Taylor
e14994d980 * read.c (potable): Add spc, ttl, xcom, xref.
(s_mri_sect): New function.
	* read.h (s_mri_sect): Declare.
	* config/obj-coff.c (obj_coff_section) (both versions): In MRI
	mode, call s_mri_sect.
	(obj_pseudo_table): Add sect.s and section.s.  Move sect outside
	of ifndef BFD_ASSEMBLER.
	* config/obj-elf.c (elf_pseudo_table): Add section.s, sect,
	sect.s.
	(obj_elf_section): In MRI mode, call s_mri_sect.
	* config/tc-m68k.c (md_pseudo_table): Add restore, save.
	(struct save_opts): Define.
	(save_stack): New static variable.
	(s_save, s_restore): New static functions.
1995-08-10 16:19:34 +00:00
Ian Lance Taylor
a920b69312 * read.c (s_set): Remove unused local ptr.
(hex_float): Check target_big_endian.
	(equals): Remove unused local p.
	* config/tc-a29k.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-h8500.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-hppa.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-i860.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-m68k.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-m88k.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-tahoe.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-sh.c (little): Set target_big_endian.
	(md_begin): Likewise.
	(md_parse_option): Likewise.
	(build_relax): Check target_big_endian rather than shl.
	(build_Mytes, md_atof): Likewise.
	(md_convert_frag, md_apply_fix): Likewise.
	(md_number_to_chars): Likewise.
1995-08-10 04:44:59 +00:00
Ian Lance Taylor
69e077f3c7 * read.c (mri_line_label): Make non-static.
(potable): Add nopage, page, plen.
	(s_org): Error if in MRI mode.
	* read.h (mri_line_label): Declare.
	* listing.c (listing_nopage): New function.
	* listing.h (listing_nopage): Declare.
1995-08-09 23:16:06 +00:00
Ian Lance Taylor
e28c40d725 * read.c (abs_section_offset): New global variable.
(potable): Add offset, struct.
	(do_org): New static function; handle changing the origin in the
	absolute section.
	(s_org): Use do_org.
	(s_set): Likewise.
	(equals): Likewise.
	(s_space): In absolute_section, just increase abs_section_offset.
	(s_struct): New function.
	(emit_expr): Handle absolute_section specially.
	* read.h (abs_section_offset): Declare.
	(s_struct): Declare.

	* read.c (potable): Add ifeq, ifge, ifgt, ifle, iflt, ifne.
	Change if to pass O_ne to s_if.
	(read_a_source_file): Don't define an label without a colon if
	ignore_input returns true.

	* read.c (potable): Add dcb, dcb.b, dcb.d, dcb.l, dcb.s, dcb.w,
	dcb.x, ds.d, ds.p, ds.s, ds.x, elsec, endc, fail, format, llen,
	noformat.
	(read_a_source_file): If pseudo-op handler is s_end, quit
	immediately.
	(s_end): New function.
	(s_fail): New function.
	(s_float_space): New function.
	(hex_float): New static function.
	(float_cons): Use hex_float.
	* read.h (s_fail): Declare.
	(s_float_space): Declare.
1995-08-09 19:36:25 +00:00
Ian Lance Taylor
286cb27aac * configure.in: Move random special target handling before
possible break.
	* configure: Rebuild.
1995-08-09 14:53:21 +00:00
Ian Lance Taylor
1356d77df3 * struc-symbol.h (struct symbol): Add sy_mri_common bit.
* read.h (mri_comon_symbol): Declare.
	(s_mri_common): Declare.
	* read.c (mri_line_label): New static variable.
	(mri_common_symbol): New global variable.
	(potable): Add "common" and "common.s".
	(read_a_source_file): In MRI mode, set mri_line_label for a label
	at the start of a line.
	(s_mri_common): New function.
	(s_space): Handle mri_common_symbol.
	* symbols.c (colon): Change return value from void to symbolS *,
	and return new symbol.  If mri_common_symbol is set, attach the
	new symbol to it.
	(resolve_symbol_value): Handle an sy_mri_common symbol.
	* symbols.h (colon): Change return value in declaration.
	* subsegs.c (subseg_set_rest): Clear mri_common_symbol.
	(subseg_set (both versions)): Likewise.
	* frags.c (frag_more): Warn if mri_common_symbol is not NULL.
	* write.c (adjust_reloc_syms): Skip sy_mri_common symbols.
	(write_object_file): Discard sy_mri_common symbols.
	(fixup_segment): Change relocations against sy_mri_common symbols
	to be against the common symbol itself.
	* config/obj-coff.c (yank_symbols): Discard sy_mri_common symbols.
	(fixup_segment): Change relocations against sy_mri_common symbols
	to be against the common symbol itself.
	* config/obj-aout.c (obj_crawl_symbol_chain): Discard
	sy_mri_common symbols.
1995-08-08 21:41:30 +00:00
Ian Lance Taylor
c71a604ae1 * read.c (s_lcomm): For .lcomm 1, set align to 0, not 1.
PR 5167.
1995-07-07 22:42:13 +00:00
Ian Lance Taylor
6be977fb57 * app.c (do_scrub_next_char): Always accept \v. Don't make it
conditional on BACKSLASH_V.
	* read.c (next_char_of_string): Likewise.
	* config/obj-bout.h (BACKSLASH_V): Don't define.
	* config/tc-mips.h (BACKSLASH_V): Don't define.
PR 5604.
1995-07-07 20:10:27 +00:00
Ken Raeburn
a2a5a4fa41 fsf address update 1995-07-06 21:18:08 +00:00
Ken Raeburn
9777b772c8 * as.h (LOCAL_LABELS_DOLLAR, LOCAL_LABELS_FB): If not already defined, define
them to zero.
* config/tc-*.h, config/te-*.h: If defining them, define them to be 1 instead
of empty.
* expr.c (integer_constant, operand): Test them at run time instead of compile
time.
* read.c (read_a_source_file): Ditto.
* symbols.c (colon): Ditto.
(dollar_*, define_dollar_label, fb_*): Define unconditionally.
* symbols.h (dollar_*, define_dollar_label, fb_*): Declare unconditionally.
1995-05-04 01:56:40 +00:00
Ken Raeburn
2209b19c4e (pop_insert): New function.
(pop_override_ok, pop_table_name): New variables.
(md_pop_insert, obj_pop_insert): New macros.
(pobegin): Use them.

(target_big_endian): If TARGET_BYTES_BIG_ENDIAN is defined, initialize to 1.
1995-05-02 19:30:17 +00:00
Ken Raeburn
931a8fab1b Support for more portable alignment handling in assembly code, based on patches
from Bryan Ford <baford@schirf.cs.utah.edu>:
* read.c (potable): Added balign and p2align, for aligning by bytes or powers
of two independent of what ".align" does for a given target.
* doc/as.texinfo: Document them.
1995-04-26 20:02:18 +00:00
Ken Raeburn
cd3b81bd4c Handle .space directive with non-constant operand:
* read.c (s_space): Rewrite to handle general expressions.  Generate rs_space
frags for non-constant values.
* write.c (cvt_frag_to_fill): Treat rs_align_code and rs_space like rs_align
and rs_org.  Verify that fr_offset is non-negative, and force frag type to
rs_fill only after assertion checks.
(relax_segment): Treat rs_align_code like rs_align.  Treat rs_space like rs_org
in the first switch; in the second, force the operand to a constant, and use it
for the growth size.
1994-12-31 00:08:40 +00:00
Ken Raeburn
f28891108c Changes from net 2.5.2 release branch:
* configure.in: Put AC_DEFINE(sparcv9) on its own line, so that the shell
variable settings associated with it are permanent.  For CPUs requiring
bfd_gas=yes, select it based on CPU only, not individual target names.  Handle
m68k-hp-hpux*, not just -hpux.

* config/tc-z8k.c (tc_coff_symbol_emit_hook): Add dummy argument to match
prototype in obj-coff.h.

* configure.in: Skip tests for defining WANT_FOPEN_BIN and IBM_COMPILER_SUX.
* acconfig.h: Deleted them.
* configure, conf.in: Rebuild with autoconf 2.0.
* config/go32.cfg, config/vms-conf.h: Updated.

* config/tc-m68k.c (md_apply_fix_2, md_convert_frag_1): Always use
IBM_COMPILER_SUX version of code, with comments indicating why.

* listing.c (file_info): Use text mode when opening file for read.  Use "r"
directly, no macro.
* input-file.c (input_file_open): Don't use FOPEN_RT, just use "r".
* read.c (s_include): Ditto.
* output-file.c (output_file_create): Try both "wb" and "w", don't bother with
FOPEN_* macros.
* as.h: Don't include fopen-*.h.

* config/alpha-opcode.h: Make "ret" with no operands equivalent to "ret
zero,(ra)", to match OSF1 and to be consistent with both one-operand forms.

Patches from DJ Delorie:
* as.h (alloca): undef alloca before defining it just in case
* config/go32.cfg: new file for autoconf values
* config/te-go32.h: new file
* configure.bat: new for autoconf

* config/tc-i386.c (md_assemble): Fix typo in GOTPC check; had = for ==.

* configure.in: If target_frag doesn't exist, use /dev/null.

* as.c (parse_args): For non-VMS systems, re-add `v' to std_shortopts.  Add
"verbose" to list of long options.

* write.c (adjust_reloc_syms): When generating an absolute section symbol as a
placeholder, don't mark it as used in a relocation entry, here.

* Makefile.in (comparison): Compare using makefile code from gcc, stripped down
to discard subdir stuff and adapted to give a non-zero exit status if either
file differs.
1994-11-03 23:15:54 +00:00
Ian Lance Taylor
f10a96cbec * read.c (read_a_source_file): The second argument to as_where is
unsigned int *, not int *.
1994-10-17 22:07:16 +00:00
Ken Raeburn
ef19887066 Combine two existing mechanisms for copying symbol attributes, and fix a bug:
* symbols.c (copy_symbol_attributes): New function.  Copies BFD symbol flags
and calls OBJ_COPY_SYMBOL_ATTRIBUTES.
(resolve_symbol_value, case O_symbol): Call it, if X_add_number is zero.  Don't
call obj_frob_forward_symbol.
* read.c (pseudo_set): Call copy_symbol_attributes, but only if X_add_number is
zero.
* config/obj-elf.h (obj_frob_forward_symbol): Deleted.
1994-09-21 22:21:25 +00:00
Ken Raeburn
80d80c640a * read.c (pseudo_set, case O_symbol): If OBJ_COPY_SYMBOL_ATTRIBUTES is defined,
invoke it.
[BFD_ASSEMBLER]: Copy BSF_FUNCTION setting too.
* config/obj-elf.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Define.

Also minor VMS support from Pat Rankin.
1994-09-19 16:40:00 +00:00
Ian Lance Taylor
1b434ced73 * read.c (read_a_source_file): The second argument to as_where is
unsigned int *, not int *.
1994-09-12 21:52:43 +00:00