summaryrefslogtreecommitdiff
path: root/gas/app.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove trailing white spaces on gasH.J. Lu2013-01-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * app.c: Remove trailing white spaces. * as.c: Likewise. * as.h: Likewise. * cond.c: Likewise. * dw2gencfi.c: Likewise. * dwarf2dbg.h: Likewise. * ecoff.c: Likewise. * input-file.c: Likewise. * itbl-lex.h: Likewise. * output-file.c: Likewise. * read.c: Likewise. * sb.c: Likewise. * subsegs.c: Likewise. * symbols.c: Likewise. * write.c: Likewise. * config/tc-i386.c: Likewise. * doc/Makefile.am: Likewise. * doc/Makefile.in: Likewise. * doc/c-aarch64.texi: Likewise. * doc/c-alpha.texi: Likewise. * doc/c-arc.texi: Likewise. * doc/c-arm.texi: Likewise. * doc/c-avr.texi: Likewise. * doc/c-bfin.texi: Likewise. * doc/c-cr16.texi: Likewise. * doc/c-d10v.texi: Likewise. * doc/c-d30v.texi: Likewise. * doc/c-h8300.texi: Likewise. * doc/c-hppa.texi: Likewise. * doc/c-i370.texi: Likewise. * doc/c-i386.texi: Likewise. * doc/c-i860.texi: Likewise. * doc/c-m32c.texi: Likewise. * doc/c-m32r.texi: Likewise. * doc/c-m68hc11.texi: Likewise. * doc/c-m68k.texi: Likewise. * doc/c-microblaze.texi: Likewise. * doc/c-mips.texi: Likewise. * doc/c-msp430.texi: Likewise. * doc/c-mt.texi: Likewise. * doc/c-s390.texi: Likewise. * doc/c-score.texi: Likewise. * doc/c-sh.texi: Likewise. * doc/c-sh64.texi: Likewise. * doc/c-tic54x.texi: Likewise. * doc/c-tic6x.texi: Likewise. * doc/c-v850.texi: Likewise. * doc/c-xc16x.texi: Likewise. * doc/c-xgate.texi: Likewise. * doc/c-xtensa.texi: Likewise. * doc/c-z80.texi: Likewise. * doc/internals.texi: Likewise.
* PR gas/14201Alan Modra2012-06-071-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | * sb.h (sb_max_power_two): Delete. (struct sb): Delete "item" and "pot". Make "len" a size_t. Add "max". (sb_element): Delete. (sb_add_char, sb_add_buffer, sb_skip_comma, sb_skip_write): Update prototypes. * sb.c (string_count, free_list): Delete. (sb_build, sb_kill, sb_check): Rewrite. (scrub_from_sb, sb_add_char, sb_add_string, sb_add_buffer, sb_skip_white, sb_skip_comma): Replace assorted int params, vars and return types with size_t. * input-scrub.c: Likewise. * macro.c: Likewise. * macro.h: Likewise. * as.c: Likewise. * as.h: Likewise. * input-file.h: Likewise. * input-file.c: Likewise. * read.c: Likewise. * app.c: ..or ptrdiff_t. * input-file.c (input_file_get): Use ferror. (input_file_give_next_buffer): Use input_file_get.
* PR gas/14082Nick Clifton2012-05-161-1/+1
| | | | | * app.c (do_scrub_chars): Prevent possible out of bounds access to lex[] array.
* PR gas/13624Nick Clifton2012-01-261-0/+1
| | | | * app.c (app_push): Set 'add_newlines' to zero after saving.
* bfd:Joseph Myers2010-03-251-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.am (ALL_MACHINES): Add cpu-tic6x.lo. (ALL_MACHINES_CFILES): Add cpu-tic6x.c. (BFD32_BACKENDS): Add elf32-tic6x.lo. (BFD32_BACKENDS_CFILES): Add elf32-tic6x.c. * Makefile.in: Regenerate. * archures.c (bfd_arch_tic6x, bfd_tic6x_arch): New. (bfd_archures_list): Update. * config.bfd (tic6x-*-elf): New. * configure.in (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec): New. * configure: Regenerate. * cpu-tic6x.c, elf32-tic6x.c: New. * reloc.c (BFD_RELOC_C6000_PCR_S21, BFD_RELOC_C6000_PCR_S12, BFD_RELOC_C6000_PCR_S10, BFD_RELOC_C6000_PCR_S7, BFD_RELOC_C6000_ABS_S16, BFD_RELOC_C6000_ABS_L16, BFD_RELOC_C6000_ABS_H16, BFD_RELOC_C6000_SBR_U15_B, BFD_RELOC_C6000_SBR_U15_H, BFD_RELOC_C6000_SBR_U15_W, BFD_RELOC_C6000_SBR_S16, BFD_RELOC_C6000_SBR_L16_B, BFD_RELOC_C6000_SBR_L16_H, BFD_RELOC_C6000_SBR_L16_W, BFD_RELOC_C6000_SBR_H16_B, BFD_RELOC_C6000_SBR_H16_H, BFD_RELOC_C6000_SBR_H16_W, BFD_RELOC_C6000_SBR_GOT_U15_W, BFD_RELOC_C6000_SBR_GOT_L16_W, BFD_RELOC_C6000_SBR_GOT_H16_W, BFD_RELOC_C6000_DSBT_INDEX, BFD_RELOC_C6000_PREL31, BFD_RELOC_C6000_COPY, BFD_RELOC_C6000_ALIGN, BFD_RELOC_C6000_FPHEAD, BFD_RELOC_C6000_NOCMP): New. * targets.c (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec): New. (_bfd_target_vector): Update. * bfd-in2.h, libbfd.h: Regenerate. binutils: * MAINTAINERS: Add self as TI C6X maintainer. * NEWS: Add news entry for TI C6X support. * readelf.c: Include elf/tic6x.h. (guess_is_rela): Handle EM_TI_C6000. (dump_relocations): Likewise. (get_tic6x_dynamic_type): New. (get_dynamic_type): Call it. (get_machine_flags): Handle EF_C6000_REL. (get_osabi_name): Handle machine-specific values only for relevant machines. Handle C6X values. (get_tic6x_segment_type): New. (get_segment_type): Call it. (get_tic6x_section_type_name): New. (get_section_type_name): Call it. (is_32bit_abs_reloc, is_16bit_abs_reloc, is_none_reloc): Handle EM_TI_C6000. gas: * Makefile.am (TARGET_CPU_CFILES): Add config/tc-tic6x.c. (TARGET_CPU_HFILES): Add config/tc-tic6x.h. * Makefile.in: Regenerate. * NEWS: Add news entry for TI C6X support. * app.c (do_scrub_chars): Handle "||^" for TI C6X. Handle TC_PREDICATE_START_CHAR and TC_PREDICATE_END_CHAR. Keep spaces in operands if TC_KEEP_OPERAND_SPACES. * configure.tgt (tic6x-*-*): New. * config/tc-ia64.h (TC_PREDICATE_START_CHAR, TC_PREDICATE_END_CHAR): Define. * config/tc-tic6x.c, config/tc-tic6x.h: New. * doc/Makefile.am (CPU_DOCS): Add c-tic6x.texi. * doc/Makefile.in: Regenerate. * doc/all.texi (TIC6X): Define. * doc/as.texinfo: Add TI C6X documentation. Include c-tic6x.texi. * doc/c-tic6x.texi: New. gas/testsuite: * gas/tic6x: New directory and testcases. include: * dis-asm.h (print_insn_tic6x): Declare. include/elf: * common.h (ELFOSABI_C6000_ELFABI, ELFOSABI_C6000_LINUX): Define. * tic6x.h: New. include/opcode: * tic6x-control-registers.h, tic6x-insn-formats.h, tic6x-opcode-table.h, tic6x.h: New. ld: * Makefile.am (ALL_EMULATIONS): Add eelf32_tic6x_be.o and eelf32_tic6x_le.o. (eelf32_tic6x_be.c, eelf32_tic6x_le.c): New. * NEWS: Add news entry for TI C6X support. * configure.tgt (tic6x-*-*): New. * emulparams/elf32_tic6x_be.sh, emulparams/elf32_tic6x_le.sh: New. ld/testsuite: * ld-elf/flags1.d, ld-elf/merge.d: XFAIL for tic6x-*-*. * ld-elf/sec-to-seg.exp: Set B_test_same_seg to 0 for tic6x-*-*. * ld-tic6x: New directory and testcases. opcodes: * Makefile.am (TARGET_LIBOPCODES_CFILES): Add tic6x-dis.c. * Makefile.in: Regenerate. * configure.in (bfd_tic6x_arch): New. * configure: Regenerate. * disassemble.c (ARCH_tic6x): Define if ARCH_all. (disassembler): Handle TI C6X. * tic6x-dis.c: New.
* * po/bfd.pot: Updated by the Translation project.Nick Clifton2009-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * po/binutils.pot: Updated by the Translation project. * po/gold.pot: Updated by the Translation project. * po/gold.pot: Updated by the Translation project. * po/gprof.pot: Updated by the Translation project. * po/sv.po: Updated Swedish translation. * po/ld.pot: Updated by the Translation project. * po/fi.po: Updated Finnish translation. * po/ld.pot: Updated by the Translation project. * po/fi.po: Updated Finnish translation. Updated sources to compile cleanly with -Wc++-compat: * basic_blocks.c: Add casts. * cg_dfn.c: Add cast. * corefile.c: Add casts. * gmon_io.c: Add casts. * hist.c: Add cast. * source.c: Add cast. * sym_ids.c (struct match): Moved to top level. Updated soruces in ld/* to compile cleanly with -Wc++-compat: * ld.h (enum endian_enum,enum symbolic_enum,enum dynamic_list_enum): Move to top level. * ldcref.c: Add casts. * ldctor.c: Add casts. * ldexp.c * ldexp.h (enum node_tree_enum,enum phase_enum): Move to top level. * ldlang.c: Add casts. (lang_insert_orphan): Use enum name instead of integer. * ldlang.h (enum statement_enum): Move to top level. * ldmain.c: Add casts. * ldwrite.c: Add casts. * lexsup.c: Add casts. (enum control_enum): Move to top level. * mri.c: Add casts. (mri_draw_tree): Use enum name instead of integer. Updated sources to compile cleanly with -Wc++-compat: * basic_blocks.c: Add casts. * cg_dfn.c: Add cast. * corefile.c: Add casts. * gmon_io.c: Add casts. * hist.c: Add cast. * source.c: Add cast. * sym_ids.c (struct match): Moved to top level. * as.c (main): Call dwarf2_init. * config/obj-elf.c (struct group_list): New field. (build_group_lists): Use hash lookup. (free_section_idx): New function. (elf_frob_file): Adjust. * dwarf2dbg.c (all_segs_hash, last_seg_ptr): New variables. (get_line_subseg): Adjust. (dwarf2_init): New function. * dwarf2dbg.h (dwarf2_init): New declaration.
* update copyright datesAlan Modra2009-09-021-1/+1
|
* * gas/app, gas/as.c, gas/as.h, gas/atof-generic.c, gas/cgen.c,Nick Clifton2009-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | gas/config/atof-ieee.c, gas/config/obj-aout.c, gas/config/obj-coff.c, gas/config/obj-ecoff.c, gas/config/obj-elf.c, gas/config/obj-som.c, gas/config/tc-alpha.c, gas/config/tc-arc.c, gas/config/tc-arm.c, gas/config/tc-cr16.c, gas/config/tc-cris.c, gas/config/tc-crx.c, gas/config/tc-d30v.c, gas/config/tc-dlx.c, gas/config/tc-hppa.c, gas/config/tc-i370.c, gas/config/tc-i386-intel.c, gas/config/tc-i386.c, gas/config/tc-i860.c, gas/config/tc-i960.c, gas/config/tc-ia64.c, gas/config/tc-iq2000.c, gas/config/tc-m32c.c, gas/config/tc-m32r.c, gas/config/tc-m68hc11.c, gas/config/tc-m68k.c, gas/config/tc-maxq.c, gas/config/tc-mcore.c, gas/config/tc-mep.c, gas/config/tc-mips.c, gas/config/tc-mmix.c, gas/config/tc-mn10300.c, gas/config/tc-moxie.c, gas/config/tc-ns32k.c, gas/config/tc-pj.c, gas/config/tc-ppc.c, gas/config/tc-s390.c, gas/config/tc-score.c, gas/config/tc-score7.c, gas/config/tc-sh.c, gas/config/tc-sparc.c, gas/config/tc-spu.c, gas/config/tc-tic30.c, gas/config/tc-vax.c, gas/config/tc-xtensa.c, gas/config/xtensa-relax.c, gas/dw2gencfi.c, gas/dwarf2dbg.c, gas/ehopt.c, gas/expr.c, gas/frags.c, gas/input-file.c, gas/read.c, gas/sb.c, gas/subsegs.c, gas/symbols.c, gas/write.c: Change the name of the gas macro `assert' to `gas_assert'.
* PR 6878Nick Clifton2008-09-291-1/+3
| | | | | * app.c (do_scrub_chars): Only issue warnings about tick characters detected in symbol strings if hex ticks are supported.
* * config/tc-m32c.h (H_TICK_HEX): Define.DJ Delorie2008-07-181-0/+43
| | | | | | | | | | | | | | | | | * config/tc-m32c.c (OPTION_H_TICK_HEX): Define. (md_longopts): Add support for it. (md_parse_option): Likewise. * doc/as.texinfo (Overview): Add new m32c options. * doc/c-m32c.texi (M32C-Modifiers): Likewise * as.h: (enable_h_tick_hex): New. * app.c (enable_h_tick_hex): New. (LEX_IS_H): New. (do_scrub_begin): Mark 'H' and 'h' as special if enable_h_tick_hex. (do_scrub_chars): If enable_h_tick_hex and 'h', check for H'00 style hex constants and convert the input stream to 0x00 style. (do_scrub_chars): If a 'X style character constant is found after a symbol character (like you're or X'00), warn the user.
* * app.c (do_scrub_chars): Do not UNGET an EOF value.Nick Clifton2008-06-171-4/+5
| | | | | | | | | | * ti.h (GET_SCNHDR_NLNNO): Provide an alternative version of this macro which does not trigger an array bounds warning in gcc. (PUT_SCNHDR_NLNNO): Likewise. (GET_SCNHDR_FLAGS): Likewise. (PUT_SCNHDR_FLAGS): Likewise. (GET_SCNHDR_PAGE): Likewise. (PUT_SCNHDR_PAGE): Likewise.
* * app.c (do_scrub_chars): Do not UNGET an EOF value.Nick Clifton2008-06-041-2/+4
|
* * app.c (do_scrub_chars): Provide a one character buffer to hold aNick Clifton2007-07-201-0/+6
| | | | pushed back newline at the end of an unterminated quoted string.
* Switch to GPLv3Nick Clifton2007-07-031-5/+5
|
* PR 4722Alan Modra2007-07-031-0/+2
| | | | | * app.c (do_scrub_chars <state 5>): Check for output buffer full after memcpy.
* * app.c (do_scrub_chars): Cope with \ at end of buffer.xNathan Sidwell2007-05-281-1/+9
|
* gas/Mark Shinwell2007-05-151-0/+9
| | | | | | | | * app.c (do_scrub_chars): Don't damage \@ pseudo-variables. gas/testsuite/ * gas/arm/backslash-at.d: New. * gas/arm/backslash-at.s: New.
* 2007-03-15 Alexandre Oliva <aoliva@redhat.com>H.J. Lu2007-03-151-2/+1
| | | | | PR gas/4184 * app.c (do_scrub_chars): PUT after setting states.
* * app.c (do_scrub_chars): Recognize comments after # line "file".Alexandre Oliva2007-03-091-12/+2
| | | | | * read.c (get_linefile_number): New. (s_app_line): Accept ill-formed .linefile lines as comments.
* * app.c (do_scrub_chars): Turn #<line>"file"flags into .linefile.Alexandre Oliva2007-03-091-30/+19
| | | | | | | | | * as.h (new_logical_line_flags): New. * input-scrub.c (new_logical_line): Turned into wrapper for... (new_logical_line_flags): this. Handle flags. * read.c (potable): Add linefile. Adjust appline argument. (s_app_file): Fake .appfiles no more. (s_app_line): For .linefile, accept file name and flags.
* remove some duplicate #include's.Alan Modra2006-06-071-3/+2
|
* * expr.c (operand): Remove `if (0 && ..)' statement andBen Elliston2006-05-091-3/+0
| | | | | | | subsequently unused target_op label. Collapse `if (1 || ..)' statement. * app.c (do_scrub_chars): Remove unused case 0, as it is handled separately above the switch.
* * app.c (do_scrub_chars): Simplify string handling.Ben Elliston2006-03-101-20/+3
|
* Add support for the Z80 processor familyNick Clifton2005-10-251-0/+54
|
* * app.c (do_scrub_chars): Match open and close quote of strings.Alan Modra2005-09-291-11/+10
| | | | Remove redundant EOF test in case 7.
* * app.c (do_scrub_chars <LEX_IS_SYMBOL_COMPONENT>): Check for fullAlan Modra2005-09-281-0/+2
| | | | buffer after copying string.
* Update the address and phone number of the FSFNick Clifton2005-05-051-2/+2
|
* update copyright datesAlan Modra2005-03-031-1/+1
|
* * app.c (do_scrub_chars): Add PUT (ch) and ch = GET ()Jakub Jelinek2003-11-241-1/+5
| | | | when transitioning from states 14 or 15 to 0 or 1.
* * app.c (do_scrub_chars): Revert 2003-04-23 and 2003-04-22.Alan Modra2003-11-221-4/+2
|
* * app.c: Convert to ISO-C.Kazu Hirata2003-11-211-12/+6
| | | | | | | | | | * as.h: Likewise. * atof-generic.c: Likewise. * bignum-copy.c: Likewise. * bignum.h: Likewise. * cgen.c: Likewise. * cgen.h: Likewise. * cond.c: Likewise.
* 2003-06-07 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2003-06-071-0/+25
| | | | | * app.c (do_scrub_chars): Add states 14 and 15 to handle predicate for ia64.
* Add support for h8300hn and h8300snNick Clifton2003-04-241-1/+1
|
* More checks for valid labelsNick Clifton2003-04-231-45/+37
|
* 2003-04-22 H.J. Lu <hjl@gnu.org>H.J. Lu2003-04-221-2/+3
| | | | * app.c (do_scrub_chars): Check for valid label.
* * app.c (do_scrub_chars): Handle '||' in two states.Alan Modra2003-02-191-30/+45
|
* * app.c (do_scrub_chars): Don't test IGNORE_NONSTANDARD_ESCAPES. Tidy.Alan Modra2002-08-271-12/+9
|
* * app.c: Fix formatting.Kazu Hirata2002-05-181-7/+7
| | | | | | | | | | | * as.c: Likewise. * ehopt.c: Likewise. * expr.c: Likewise. * input-file.c: Likewise. * listing.c: Likewise. * macro.h: Likewise. * stabs.c: Likewise. * symbols.c: Likewise.
* * app.c (mri_pseudo): Only declare for TC_M68K.Alan Modra2002-05-021-3/+3
|
* * app.c: Fix comment typos.Kazu Hirata2001-10-111-1/+1
| | | | | | * bit_fix.h: Likewise. * expr.c: Likewise. * itbl-ops.c: Likewise.
* * read.c: Standardize error/warning messages - don't capitalise, noAlan Modra2001-08-011-5/+5
| | | | | | | | | | | | | | | | | | | | | final period or newline, don't say "ignored" or "zero assumed" for as_bad messages. In some cases, change the wording to that used elsewhere for similar messages. * app.c, as.c, atof-generic.c, cgen.c, cond.c, depend.c, dwarf2dbg.c, ecoff.c, expr.c, frags.c, input-file.c, input-scrub.c, listing.c, output-file.c, stabs.c, subsegs.c, symbols.c, write.c: Likewise. * ecoff.c (ecoff_directive_end): Test for missing name by comparing input line pointers rather than reading string. (ecoff_directive_ent): Likewise. * read.c (s_set): Likewise. (s_align): Report a warning rather than an error for alignment too large. (s_comm): Check for missing symbol name. (s_lcomm_internal): Likewise. (s_lsym): Likewise. (s_globl): Use is_end_of_line instead of looking for '\n'. (s_lcomm_internal): Likewise. (ignore_rest_of_line): Report a warning rather than an error.
* 2001-07-25 Dave Brolley <brolley@redhat.com>Dave Brolley2001-07-251-1/+18
| | | | | | | | | | * app.c (LEX_IS_PARALLEL_SEPARATOR): New macro. (IS_PARALLEL_SEPARATOR): New macro. (do_scrub_begin): Set up characters in tc_parallel_separator_chars as LEX_IS_PARALLEL_SEPARATOR, if it is defined. (do_scrub_chars): Handle LEX_PARALLEL_SEPARATOR chars like LEX_LINE_SEPARATOR except that we go to state 1 (as if the label has been seen).
* Fix copyright noticesNick Clifton2001-03-081-1/+2
|
* 2000-10-12 Kazu Hirata <kazu@hxi.com>Kazu Hirata2000-10-111-38/+40
| | | | | | | | | | * app.c: Fix formatting. * as.c: Likewise. * as.h: Likewise. * bit_fix.h: Likewise. * cgen.c: Likewise. * cgen.h: Likewise. * cond.c: Likewise.
* 2000-08-29 Kazu Hirata <kazu@hxi.com>Kazu Hirata2000-08-301-13/+13
| | | | * app.c: Fix a comment typo. Fix formatting.
* comment-finding hack for hppa-linux.Alan Modra2000-07-281-0/+4
|
* Don't treat `;' as a line separator by default.Alan Modra2000-06-091-1/+0
| | | | Explicitly mention `;' in line_separator_chars in each backend.
* IA-64 ELF support.Jim Wilson2000-04-211-0/+15
|
* * app.c: Add ATTRIBUTE_UNUSED as needed.Ian Lance Taylor2000-04-021-1/+1
| | | | | | * config/tc-ppc.c: Likewise. (ppc_size): Make unsigned long. (ppc_insert_operand): Add casts to avoid warnings.
* Remove dead code when not TC_M68K.Alan Modra2000-02-241-8/+18
|