aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-a29k.c
AgeCommit message (Collapse)AuthorFilesLines
1995-12-11 * read.c (read_a_source_file): If tc_unrecognized_line is defined,Ian Lance Taylor1-1/+67
call it. * config/tc-a29k.h (tc_unrecognized_line): Define. * config/tc-a29k.c (a29k_unrecognized_line): New function. (md_operand): Handle a29k style local dollar labels.
1995-11-09 * config/tc-a29k.c (md_apply_fix): Warn if an attempt is made toIan Lance Taylor1-3/+13
generate a reloc which the linker will not handle correctly. Fix overflow checking--R_IREL is 18 bits, not 17.
1995-11-09 * config/tc-a29k.c (line_separator_chars): Restore '@'. ExistingIan Lance Taylor1-1/+1
code depends upon it.
1995-11-09 * config/tc-a29k.c (md_operand): Handle $float, $double, andIan Lance Taylor1-0/+71
$extend. Based on code from Eric Freudenthal <freudenthal@nyu.edu>. * config/tc-a29k.h (LEX_DOLLAR): Define. * read.c (LEX_DOLLAR): Define if not defined. (lex_type): Use LEX_DOLLAR.
1995-11-03 * as.c (main): On TC_A29K, call macro_init with macro_alternateIan Lance Taylor1-1/+1
set to 1. * macro.c (get_any_string): Don't keep quotes if macro_strip_at is set, even if macro_alternate is set. (get_apost_token): If macro_strip_at, only skip kind if it is '@'. (sub_actual): If macro_strip_at, and kind is '@', don't look up the token unless it ended in '@'. * config/tc-a29k.c (line_separator_chars): Remove '@'. * doc/c-a29k.texi: Document macro usage on A29K.
1995-07-19 * config/tc-sh.c (sh_relax): Rename from relax, and make global.Ian Lance Taylor1-1/+2
Renamed all uses. (insert): Pass a size of 2, not 4. (build_relax): Remove unused len variable. (md_show_usage): Mention -little option. (md_convert_frag): Add segT argument. Rewrite to generate relocs rather than to generate complete instructions here. (md_apply_fix): Adjust and clarify R_SH_PCRELIMM8BY4 case for changes in insert and md_pcrel_from. Add cases for R_SH_PCDISP and R_SH_PCDISP8BY2. (md_pcrel_from): Don't subtract 1, add 2. (tc_coff_fix2rtype): Remove. (sh_coff_reloc_mangle): New function. * config/tc-sh.h (TC_COFF_FIX2RTYPE): Just return fx_r_type. (sh_relax): Declare. (TC_COUNT_RELOC): If relaxing, count PC relative relocs. (TC_RELOC_MANGLE): Define. (sh_coff_reloc_mangle): Declare. (tc_coff_sizemachdep): Declare. * tc.h (md_convert_frag): Add segT parameter to non BFD_ASSEMBLER declaration. * write.c (cvt_frag_to_fill): Add sec argument to non BFD_ASSEMBLER version. Pass it to md_convert_frag. (write_object_file): Pass SEG_TEXT to cvs_frag_to_fill. * config/obj-coff.c (do_relocs_for): Pass segment info to TC_RELOC_MANGLE. (fixup_mdeps): Pass segment type to md_convert_frag. * config/tc-a29k.c (md_convert_frag): Add segT argument. * config/tc-h8300.c (md_convert_frag): Likewise. * config/tc-h8500.c (md_convert_frag): Likewise. * config/tc-i386.c (md_convert_frag): Likewise. * config/tc-i860.c (md_convert_frag): Likewise. * config/tc-i960.c (md_convert_frag): Likewise. * config/tc-m68k.c (md_convert_frag): Likewise. * config/tc-m88k.h (md_convert_frag): Likewise. * config/tc-ns32k.c (md_convert_frag): Likewise. * config/tc-rce.c (md_convert_frag): Likewise. * config/tc-tahoe.c (md_convert_frag): Likewise. * config/tc-vax.c (md_convert_frag): Likewise. * config/tc-w65.c (md_convert_frag): Likewise. * config/tc-z8k.c (md_convert_frag): Likewise. * config/tc-h8300.h (TC_RELOC_MANGLE): Add segment argument. * config/tc-h8500.h (TC_RELOC_MANGLE): Likewise. * config/tc-rce.h (TC_RELOC_MANGLE): Likewise. * config/tc-w65.h (TC_RELOC_MANGLE): Likewise. * config/tc-z8k.h (TC_RELOC_MANGLE): Likewise.
1995-07-06fsf address updateKen Raeburn1-1/+1
1995-04-11write.c: Complain about .space or .org moving backwards.Ken Raeburn1-5/+0
Do generic rs_machine_dependent relaxation only if TC_GENERIC_RELAX_TABLE is defined. Use its value as the base of the table, so the actual declaration can be cpu-specific (and const or not as appropriate). For other cpus where this isn't done (the majority), delete md_relax_table altogether. For machines with WORKING_DOT_WORD, delete md_{short,long}_jump_size.
1994-11-07tc-a29k.c: some cleanup; range-checking on JUMPTARG relocsKen Raeburn1-22/+20
1994-10-19 * config/tc-a29k.c: Include ctype.h with angle brackets.Ian Lance Taylor1-12/+47
(define_some_regs): Add new special register names defined on the 29040. (parse_operand): Add argument opt. If non-zero, don't warn about a missing operand. (machine_ip): If handling argument type 'I', pass opt as non-zero to parse_operand. Handle new optional operand type 'I'. (md_undefined_symbol): Handle special register names (srNN).
1994-06-03 * as.c (show_usage): Remove target specific messages;David MacKenzie1-5/+15
instead, call md_show_usage. (parse_args): Use getopt_long_only. Take pointers to argc and argv. (main): Pass parse_args pointers. * as.h: Remove 3 variables that are redundant with flagseen. * as.c, messages.c: Change their users to use flagseen. Define getopt stuff. * tc.h: Update md_parse_option decl. Add md_show_usage decl. * config/tc-*.c: Add md_shortopts, md_longopts, md_longopts_size, md_show_usage. Change calling convention for md_parse_option. Remove md_parse_long_option. * config/tc-ns32k.c: Rename `struct option' to `struct ns32k_option'. * config/tc-i386.h: Don't define md_parse_option.
1993-12-20* as.c (main): Only invoke md_end if it's defined as a macro.Ken Raeburn1-5/+0
* tc.h (md_end): Don't declare it. * config/tc-*.[ch] (md_end): Deleted, in cases where it doesn't do anything. * config/tc-vax.c (vip_end): Deleted null function. * config/tc-mips.c (md_mips_end): Renamed from md_end. * config/tc-mips.h (md_mips_end): Declare. (md_end): New macro, calls md_mips_end. * write.c (write_object_file): Don't close output file. * as.c (main): Close output file (if needed) after calling listing_print, which should be after calling write_object_file, which sets the frag addresses.
1993-12-16* config/tc-vax.c (tc_aout_fix_to_chars): Local variable NBYTES_R_LENGTH nowKen Raeburn1-5/+0
const. * config/obj-*.c, config/tc-*.c: Omit superfluous "return" statements at ends of functions. Don't check for null return from hash_new, since it won't return at all if there's no memory available. Also, check for null return from hash_insert, rather than zero-length string, as success indicator.
1993-12-03Lots of changes for:Ken Raeburn1-17/+1
- sparc[lite]-coff as well as sparc-lynx - producing coff (including debug info) under BFD_ASSEMBLER option - cleanup of cpu-specific code in non-cpu-specific files (especially write.c) - providing common code to avoid duplication in cpu-specific files (specifically, md_number_to_chars) - stylistic changes & misc cleanup ================ * config/tc-sparc.c (tc_gen_reloc): Make adjustment to addend be dependent on howto fields, not on format flavour. * struc-symbol.h (struct symbol): New fields sy_obj and sy_tc, defined as types OBJ_SYMFIELD_TYPE and TC_SYMFIELD_TYPE, if those macros are defined. * config/obj-coff.h (TC_SYMFIELD_TYPE, OBJ_SYMFIELD_TYPE): Define. (TARGET_SYMBOL_FIELDS, I960_SYM_FIELDS): Don't define. (sy_tc, sy_obj): Define so that the fields look like they used to, until all references get changed. * write.c (fixup_segment): Lots of variables no longer register. Reordered some code for easier reading. * config/obj-coff.c (obj_coff_dim): dim_index no longer register. Deleted superfluous return statement. (obj_coff_line, obj_coff_size, obj_coff_scl, obj_coff_type, obj_coff_val, tag_init, tag_insert): Deleted superfluous return statement. (align, obj_coff_section): Deleted debugging printfs. * config/tc-i386.c (md_assemble): Discard some register decls. Use assignment rather than memcpy to copy template. (op_hash, reg_hash, prefix_hash): Default C initialization of statics is sufficient. * config/tc-sparc.c (print_insn): Array Reloc is now const, and points to const. * config/obj-coff.h (TARGET_FORMAT): Only use coff-sparc-lynx if TE_LYNX; use coff-sparc otherwise. [USE_NATIVE_HEADERS]: Delete this code; it isn't used. * write.c (fixup_segment): Call TC_VALIDATE_FIX, if defined, before processing a fixup. Call TC_ADJUST_RELOC_COUNT just before returning. Remove some i960-coff-specific code. (TC_ADJUST_RELOC_COUNT): Default to doing nothing. * config/tc-i960.h (TC_ADJUST_RELOC_COUNT) [OBJ_COFF]: Define. (i960_validate_fix): Declare. (TC_VALIDATE_FIX): Define. * config/tc-i960.c (i960_validate_fix): New function. * write.c (number_to_chars_littleendian): New function. Write out bytes in little endian order, doing size and range checking. (number_to_chars_bigendian): New function, similar. * write.h: Declare them. * config/tc-*.c (md_number_to_chars): Use them. * config/tc-vax.c (md_apply_fix): Ditto. * config/tc-i386.c (md_apply_fix): Ditto. * config/obj-coff.c: Rearranged code for handling line number data. (line_fsym): Renamed from function_lineoff in BFD_ASSEMBLER case, since the usage is different from non-BFD_ASSEMBLER case. (in_function, clear_function, set_function): New macros, to combine some of the functionality implemented in differnet ways in BFD_ASSEMBLER and non-... code. Used in other functions that used to check function_lineoff &c. (obj_emit_lineno): Split into two copies, one for BFD_ASSEMBLER, one for not. Non-BFD_ASSEMBLER version now has temporary variable to contain char* pointer pointed to by char** argument. Always follow CROSS_COMPILE code; easier to read that way. (obj_coff_ln): Don't call add_lineno or c_line_new if appline is set. (obj_coff_endef) [BFD_ASSEMBLER]: Don't do anything special for ".bf", it's been done elsewhere. (coff_frob_symbol): If ilne number data is pending, call add_linesym to flush it. (coff_frob_file): Don't do that here. * config/obj-coff.h (coff_frob_file): Declare. (obj_frob_file): Define, to call it. * config/tc-sparc.h (md_create_short_jump, md_create_long_jump, md_estimate_size_before_relax: Define them as macros calling as_fatal. * config/tc-sparc.c: Don't define them as functions.
1993-10-28 * config/tc-a29k.c (md_begin): When opcodes are mashed together inIan Lance Taylor1-14/+12
the table, require that the one without bit 0x1000000 set come first. Require further that it be case 'b' or 'P'. The a29k opcode table already meets these constraints. (machine_ip): When handling case 'i' or 'A', make sure that the appropriate opcode really exists by looking at the next entry in the opcode table.
1993-10-12more null/empty string fixupsKen Raeburn1-1/+1
1993-09-28Whitespace/comment cleanup. Use PARAMS in tc-vax.c.Ken Raeburn1-1/+1
Make various routines return null pointer instead of empty string for success indication.
1993-09-21Whitespace/comment fixups.Ken Raeburn1-65/+45
Mention a29k, not sparc, in error messages and comments.
1993-09-14Some more gcc lint, and:Ian Lance Taylor1-4/+7
* read.c (change_to_section): Removed. This is now done by subseg_new. (get_stab_string_offset): Rearranged somewhat. Create the section using subseg_new. Store the string index in seg_info, rather than in a static variable. Force the first string to be empty. Use frag_more rather than FRAG_APPEND_1_CHAR. (s_stab_generic): Rewrote. * subsegs.h (segment_info_type): Added stabu union. * subsegs.c (subseg_new): Initialize stab_string_size to 0. * config/obj-aout.c: Don't include aout/stab_gnu.h. (obj_aout_stab, obj_aout_desc): Removed. (obj_pseudo_table): Removed desc and stabX entries. * config/obj-bout.c: Same changes as config/obj-aout.c. * config/obj-bout.h (S_SET_TYPE): Define. (tc_bout_fix_to_chars): Declare. * config/obj-coff.c (obj_coff_stab): Removed. (obj_pseudo_table): Removed desc and stabX entries. * config/obj-coff.h (SEPARATE_STAB_SECTIONS): Define. * config/obj-coffbfd.c (current_stab_symbol): Removed. * config/obj-coffbfd.h (obj_symbol_type): Removed n_strx, n_type, n_other, n_desc and n_value fields. (S_{S,G}ET_{OFFSET,OTHER,TYPE,DESC}): Removed. (MAKE_STAB_SYMBOL): Removed. * config/obj-ecoff.c (obj_ecoff_stab): Renamed to ecoff_stab. Changed arguments and removed parsing code. (obj_pseudo_table): Removed stabX entries. * config/obj-ecoff.h (ecoff_stab): Declare. (OBJ_PROCESS_STAB): Define. * config/obj-elf.c: Don't include aout/stab_gnu.h. (obj_elf_stab, obj_elf_xstab, obj_elf_desc, elf_stab_symbol_string, elf_stab_symbol, obj_elf_stab_generic): Removed. (obj_pseudo_table): Removed desc, stabX and xstabs entries. (obj_elf_version): Use subseg_new, not bfd_make_section. Don't set SEC_LOAD for .note section. (adjust_stab_sections): Get frag pointer from seg_info, rather than looking through frags. * config/obj-elf.h (S_{S,G}ET_{OTHER,TYPE,DESC}): Removed. (SEPARATE_STAB_SECTIONS, INIT_STAB_SECTION, OBJ_PROCESS_STAB): Define. * config/obj-vms.c (obj_aout_stab): Removed. (obj_pseudo_table): Removed stabX entries. * config/obj-vms.h (S_SET_TYPE): Define.
1993-09-13 * subsegs.c: Renamed non-BFD_ASSEMBLER subseg_new to subseg_set.Ian Lance Taylor1-11/+20
Wrote non-BFD_ASSEMBLER subseg_new. Now subseg_new always takes a section name, and subseg_set always takes a segT. Changed all callers as appropriate. * config/obj-coffbfd.c (change_to_section): Renamed to obj_coff_add_segment. Corrected. Made callers use subseg_new. * config/obj-coffbfd.h (obj_segment_name, obj_add_segment): Define. Also some more gcc warning removal.
1993-09-11More gcc lint with harsher warning options.Ian Lance Taylor1-19/+6
1993-07-23Fix stupid bugs inserted during expression conversion.Ian Lance Taylor1-1/+2
1993-07-21 * Extensive changes to permit symbols to contain any expressionIan Lance Taylor1-44/+37
type and to delay the computation of the expression until the value is actually needed. This permits setting symbols to values calculated based on object code size. Expressions were changed to no longer be in a section, to stop the overloading of segment and expression type that previously occurred. * as.c (big_section, pass1_section, diff_section, absent_section): Removed. (expr_section): Added (used for dummy symbols which hold intermediate expression values). (perform_an_assembly_pass): Create expr_section, do not create the sections now removed. * as.h (segT): Removed SEG_ABSENT, SEG_PASS1, SEG_BIG, and SEG_DIFFERENCE. Added SEG_EXPR. (SEG_NORMAL): Corresponding changes. * subsegs.c (seg_name, subsegs_begin): Changed accordingly. * write.c (write_object_file): Ditto. * config/obj-aout.c (seg_N_TYPE): Ditto. * config/obj-bout.c (seg_N_TYPE): Ditto. * config/obj-coff.c (seg_N_TYPE): Ditto. * config/obj-coffbfd.c (seg_N_TYPE): Ditto. * config/obj-vms.c (seg_N_TYPE): Ditto. * expr.h (operatorT): Moved in from expr.c, added some values. (expressionS): Added X_op field, removed X_seg field; renamed X_subtract_symbol to X_op_symbol. * expr.c: Extensive changes to assign expression types rather than sections and to simplify the parsing. * write.c (fix_new_internal): New static function. (fix_new): Removed sub_symbol argument. (fix_new_exp): New function, takes expression argument. * write.h: Prototype changes for fix_new and fix_new_exp. * cond.c (s_if): Changed accordingly. * read.c (s_lsym, pseudo_set, emit_expr, parse_bitfield_cons, parse_repeat_cons, get_segmented_expression, get_known_segmented_expression, get_absolute_expression): Ditto. * symbols.c (resolve_symbol_value, S_GET_VALUE, S_SET_VALUE): Ditto. * write.c (write_object_file): Ditto. * config/obj-coff.c (obj_coff_def, obj_coff_val): Ditto. * config/obj-coffbfd.c (obj_coff_def, obj_coff_val, obj_coff_endef, yank_symbols): Ditto. * config/obj-elf.c (obj_elf_stab_generic, obj_elf_size): Ditto. * config/tc-a29k.c (md_assemble, parse_operand, machine_ip, print_insn, md_operand): Ditto. * config/tc-h8300.c (parse_exp, colonmod24, check_operand, do_a_fix_imm, build_bytes): Ditto. * config/tc-h8500.c (parse_exp, skip_colonthing, parse_reglist, get_specific, check, insert, md_convert_frag): Ditto. * config/tc-hppa.c (the_insn, fix_new_hppa, cons_fix_new_hppa, md_assemble, pa_ip, getExpression, getAbsoluteExpression, evaluateAbsolute, pa_build_unwind_subspace, pa_entry, process_exit): Ditto. * config/tc-hppa.h (STAB_FIXUP, is_DP_relative, is_PC_relative, is_complex): Ditto. * config/tc-i386.c (pe, md_assemble, i386_operand, md_estimate_size_before_relax, md_create_long_jump): Ditto. * config/tc-i860.c (md_assemble, getExpression, print_insn): Ditto. * config/tc-i960.c (parse_expr, subs, segs, md_convert_frag, get_cdisp, mem_fmt, parse_ldconst, relax_cobr, s_sysproc, i960_handle_align): Ditto. * config/tc-m68k.c (struct m68k_exp, struct m68k_it, seg, op, subs, add_fix, isvar, m68k_ip, md_assemble, md_convert_frag_1, md_estimate_size_before_relax, md_create_long_jump, get_num): Ditto. * config/tc-m88k.c (md_assemble, get_imm16, get_pcr, md_create_short_jump, md_create_long_jump): Ditto. * config/tc-mips.c (md_assemble, append_insn, gp_reference, macro_build, macro, my_getExpression): Ditto. Also removed get_optional_absolute_expression; just use get_absolute_expression instead. * config/tc-ns32k.c (get_addr_mode, evaluate_expr, convert_iif, fix_new_ns32k, fix_new_ns32k_exp, cons_fix_new_ns32k): Ditto. * config/tc-ns32k.h (fix_new_ns32k prototype): Ditto. * config/tc-sh.c (parse_exp, check, insert, md_convert_frag): Ditto. * config/tc-sparc.c (md_assemble, sparc_ip, getExpression, print_insn): Ditto. * config/tc-tahoe.c (struct top, md_estimate_size_before_relax, tip_op, md_assemble): Ditto. * config/tc-vax.c (seg_of_operand, md_assemble, md_estimate_size_before_relax, md_create_long_jump): Ditto. * config/tc-z8k.c (parse_exp, check_operand, newfix): Ditto.
1993-07-12update use of valueT and addressTMark Eichin1-6/+6
1993-06-01don't bother checking return value from hash_newKen Raeburn1-2/+0
1993-05-27read.c (s_align_bytes): Properly record alignment.Ken Raeburn1-3/+3
expr.c (__): Undefine before defining. as.c (got_sig): Don't return anything; return type might be void. Whitespace/comment cleanup in frags.c. Some patches for `-pedantic' or `-fno-common' compilation. (Some of these changes are from Michael Meissner; see change log.)
1993-04-28include ctype.h, and some special-purpose regs for 29050Ken Raeburn1-0/+15
1992-12-30A bunch of changes to COFF support. See the ChangeLog.Ian Lance Taylor1-1/+0
1992-11-23Ran "indent", for GNU coding style; some code & comments still need fixup.Ken Raeburn1-813/+889
Removed some unneeded files. obj-coff.c (obj_coff_endef): Use as_warn, not fprintf. tc-m68k.c (md_assemble): 68000+68881 is okay -- could be emulating.
1992-11-10These changes clean things up a bit, and improve Solaris crossIan Lance Taylor1-5/+6
support when using /opt/SUNWspro/SC2.0/acc. Tue Nov 10 09:50:25 1992 Ian Lance Taylor (ian@cygnus.com) * obj-coffbfd.c (fill_section): set STYP_NOLOAD bit for .bss section. * atof-ieee.c, atof-ns32k.c, tc-*.c: made EXP_CHARS, FLT_CHARS, comment_chars, line_comment_chars and line_seperator_chars consistently const, and always initialized them. Included read.h.
1992-05-26Fixes from Andrew SmithSteve Chamberlain1-1/+1
1992-05-05 * obj-coffbfd.c: use is a synonym for section, (do_relocs_for):Steve Chamberlain1-27/+14
calc the base of relocs correctly. * tc-a29k.c (parse_operand): allow expressions to be in any section.
1992-02-22 * app.c: MRI compatibility - allow single quote to start a string.Steve Chamberlain1-5/+4
* as.c: fix typo recently introduced. * as.h : Don't include aout/reloc.h - it's not right for COFF! * expr.c: Much rewriting, to accomodate MRI syntax for expressions. Also easier to read now. * listing.c: Put back defuns * read.c: modified to accept MRI syntax, put back listing pseudo ops so that an assembler built with NO_LISTING ignores list ops rather than pukes. * write.c, write.h: fixs - only keep a reloc type in a fix if the target machine is a SPARC or a 29K. * config/obj-aout.c: added s_sect pseudo op * config/obj-coffbfd.c: lints, set the filehdr flags right and fill in the timestamp. * config/obj-coffbfd.h: Since we don't include aout/reloc.h anymore, define all the relocs which the tc-<x> bit will use so we can translate from them to the coff types. * config/tc-a29k.c: reloc_type isn't ane enum any more * config/tc-m68k.c: Added NO_RELOC definition. Now compiles for sparc aout, 68k aout (MRI and MIT syntax), 29k coff. So far works as replacement for sparc and 68k /bin/as.
1992-02-17fighting bitrot in a major wayK. Richard Pixley1-14/+13
1992-02-15White space and comment changes, and #ifdef __STDC__ becomes #ifK. Richard Pixley1-3/+3
__STDC__ == 1.
1992-02-13All files over ~5 lines get copylefted. All copylefted files getK. Richard Pixley1-1/+1
copylefted 1992.
1992-02-13remove all rcs keywordsK. Richard Pixley1-2/+0
1992-02-13White space and comments only. The devo tree prior to this delta isK. Richard Pixley1-767/+767
tagged as "vanilla" for your convenience. There are also some comment changes.
1991-12-04Don't ignore .line directivesSteve Chamberlain1-1/+0
1991-12-04Don't ignore .file pseudos!Steve Chamberlain1-1/+0
1991-12-01More filename renaming.Steve Chamberlain1-1/+1
1991-11-29Massive changes to generalize coff-bfd support enough to get 29kSteve Chamberlain1-21/+0
working as well as it did before. This means that 29k now supports multiple sections
1991-10-21 * configure.in: added ebmon entry.Steve Chamberlain1-3/+15
* output-file.c (output_file_create, output_file_close) added stuff to use bfd. * write.c: more bfd support * config/obj-coff.c config/obj-coff.h use bfd for swapping header info. * tc-a29k: added the reloc types we support now.
1991-08-27Error out on unrecognized options.K. Richard Pixley1-1/+1
1991-08-15Abort()'s become as_fatal()'s.K. Richard Pixley1-13/+8
1991-08-14* no more relocation_info structures. We now squirt directly fromK. Richard Pixley1-61/+35
fixS's. * i960-bout and i960-coff "tested" against their predecessors.
1991-07-27Polishing m68k support.K. Richard Pixley1-1/+2
1991-06-14Version 2 GPL.K. Richard Pixley1-1/+1
1991-04-04Initial revisionK. Richard Pixley1-0/+1157