Commit graph

509 commits

Author SHA1 Message Date
Alexandre Oliva
8f36cd18af * write.c (TC_FIX_ADJUSTABLE): Define to 1, if not defined.
(fixup_segment) Use it instead of TC_DONT_FIX_NON_ADJUSTABLE.
* config/tc-i386.h (TC_DONT_FIX_NON_ADJUSTABLE): Remove.
<OBJ_ELF, OBJ_COFF, TE_PE> (TC_FIX_ADJUSTABLE): Define.
* config/tc-arm.h (TC_DONT_FIX_NON_ADJUSTABLE): Remove.
<OBJ_ELF> (TC_FIX_ADJUSTABLE): Define.
* config/tc-i960.h, config/tc-m68k.h, config/tc-v850.h:
Likewise.
2000-08-22 04:52:40 +00:00
Eric Christopher
58a77e418b 2000-08-22 Eric Christopher <echristo@cygnus.com>
* config/tc-mn10300.c: (md_apply_fix): New function.
	(mn10300_force_relocation): New function.
	(mn10300_fix_adjustable): New function.

	* config/tc-mn10300.h: (TC_FORCE_RELOCATION): Define.
	(TC_HANDLES_FX_DONE): Define.
	(obj_fix_adjustable): Define.
	(MD_APPLY_FIX3): Define.
	(TC_LINKRELAX_FIXUP): Define.

	* write.c: (TC_LINKRELAX_FIXUP):  Define if not
	previously defined.
	(fixup_segment): Use TC_LINKRELAX_FIXUP.

	* doc/internals.texi: Document TC_LINKRELAX_FIXUP.
2000-08-22 01:20:41 +00:00
Jason Eckhardt
ded0649cd5 2000-08-21 Jason Eckhardt <jle@cygnus.com>
bfd:
	* elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
	field with the newly relocated value instead of adding it to the
	existing immediate field.
	(elf32_i860_relocate_splitn): Likewise.
	(elf32_i860_relocate_highadj): Likewise.

gas:
	* config/tc-i860.c (md_apply_fix3): Do not insert the immediate
	if the fixup resulted in a relocation.
2000-08-21 23:26:19 +00:00
Nick Clifton
66102fe268 Replace as_tsktsk with as_warn.
Make reference to first element of shift_names explicit.
2000-08-18 19:27:30 +00:00
Alexandre Oliva
021986386e * write.c (fixup_segment) [TC_DONT_FIX_NON_ADJUSTABLE]: Use
obj_fix_adjustable() and tc_fix_adjustable() to tell whether to
add a symbol's address.  Removed all target-specific #ifdefs that
used to accomplished the same.
* config/tc-v850.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
* config/tc-m68k.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
* config/tc-arm.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
* config/tc-i960.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
* config/tc-i386.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
2000-08-18 18:45:05 +00:00
Nick Clifton
004af544ae Minor formatting changes 2000-08-17 23:57:52 +00:00
Nick Clifton
4fb7971f4b Allow illegal shifts by zero to be recorded as logical shift lefts by zero. 2000-08-17 23:46:43 +00:00
Jim Wilson
50b81f1903 Fix 3 DV bugs, and a few minor cleanups.
gas/
	* config/tc-ia64.c (specify_resource, case IA64_RS_GR): Handle
	postincrement modified registers.  Handle IA64_OPND_R3_2 addl
	source registers.
	(note_register_values): Handle IA64_OPND_R3_2 operands.
gas/testsuite/
	* gas/ia64/dv-raw-err.s: Add new tests for addl and postinc.
	* gas/ia64/dv-raw-err.l: Likewise.
	* gas/ia64/dv-waw-err.l: Update sed pattern.
	* gas/ia64/opc-f.pl: Delete fpsub, and fpadd comment.
	* gas/ia64/opc-f.s, gas/ia64/opc-f.d: Regenerate.
include/opcode/
	* ia64.h (IA64_OPCODE_POSTINC): New.
opcodes/
	* ia64-ic.tbl (pr-readers-nobr-nomovpr): Add addl, adds.  Delete
	break, mov-immediate, nop.
	* ia64-opc-f.c: Delete fpsub instructions.
	* ia64-opc-m.c: Add POSTINC to all instructions with postincrement
	address operand.  Rewrite using macros to avoid long lines.
	* ia64-opc.h (POSTINC): Define.
	* ia64-asmtab.c: Regenerate.
2000-08-16 23:20:15 +00:00
Jason Eckhardt
f869cfc65e 2000-08-16 Jason Eckhardt <jle@cygnus.com>
* config/tc-i860.c (md_operand): Silly typo fixed.
2000-08-16 21:34:45 +00:00
Nick Clifton
8cb8bcbabb Tidy up decoding of shift based addressing modes.
Add extra tests for these addressing modes
2000-08-16 19:02:00 +00:00
Jakub Jelinek
c2158c2433 * config/tc-sparc.c: Kill all warnings.
(md_parse_option): Set -32/-64 for -xarch=, allow all -A archs
	in -xarch= as well.
	(md_show_usage): Update usage text.
2000-08-16 17:52:37 +00:00
Nick Clifton
70485b5c18 Warn abouyt "bx pc" not being very useful. 2000-08-16 17:48:50 +00:00
Jeff Law
0d10e18267 * config/tc-sh.h (DWARF2_LINE_MIN_INSN_LENGTH): Defined.
* config/tc-sh.c (md_assemble): Changed so debug_type
	test performed for ppi_assemble
	* config/tc-sh.c: Included dwarf2dbg.h.
	(debug_line): Defined.
	(md_assemble): Generates dwarf2 line info.
	(sh_finalize): New function.  Finalize dwarf2 info.
	(assemble_ppi): Returns size of code generated.
	(build_Mytes): Returns size of code generated.
	(md_pseudo_table): Added "file" and "loc" psuedo ops.
	* config/tc-sh.h (md_end): Defined.
	(sh_finalize): Declared.
2000-08-15 20:47:19 +00:00
Alexandre Oliva
1db77c8ec9 * config/tc-sh.c (md_apply_fix) [BFD_RELOC_32, BFD_RELOC_16]: Use
md_number_to_chars.
2000-08-15 16:04:37 +00:00
Nick Clifton
046b3b54ee Allow "bx pc" in ARM mode. 2000-08-14 21:20:03 +00:00
Diego Novillo
fa2255cb6b * tc-i386.c (md_assemble): Skip suffix check if the opcode modifier
has the IgnoreSize bit set.
2000-08-14 21:12:47 +00:00
Jim Wilson
c43c2cc5fa Add support for IA-64 specific elf header flags.
bfd/
2000-08-14  Jim Wilson  <wilson@cygnus.com>
	* elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
	EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
	(elf64_ia64_print_private_bfd_data): Likewise.  Also handle
	EF_IA_64_ABSOLUTE.
gas/
2000-08-14  Jim Wilson  <wilson@cygnus.com>
	* config/tc-ia64.c (md_longopts): Add -mconstant-gp and -mauto-pic.
	(md_parse_option):  Add OPTION_MCONSTANT_GP and OPTION_MAUTO_PIC.
	(md_begin): Change assignment to md.flag to OR in the new bit.
include/elf/
2000-08-14  Jim Wilson  <wilson@cygnus.com>
	* elf/ia64.h (EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP,
	EF_IA_64_NOFUNCDESC_CONS_GP, EF_IA_64_ABSOLUTE): Define.
2000-08-14 20:13:39 +00:00
Nick Clifton
d1d8ba2284 Set the debug flag for storage types C_ARG, C_REGPARM, C_FIELD, C_MOS, C_MOE,
C_MOU, and C_EOS.
2000-08-14 19:41:40 +00:00
Jeff Law
c0bd0db285 * config/tc-mn10300.h (DWARF2_LINE_MIN_INSN_LENGTH): Define. 2000-08-14 17:49:55 +00:00
Kazu Hirata
351aa9f657 2000-08-11 Kazu Hirata <kazu@hxi.com>
* config/obj-bout.c: Fix formatting.
2000-08-11 18:28:04 +00:00
Jason Eckhardt
305d537e30 gas:
2000-08-08  Jason Eckhardt  <jle@cygnus.com>

	* config/tc-i860.h: Rework completely for BFD_ASSEMBLER.
	(i860_fix_info): New enum.
	(MD_APPLY_FIX3): Define.
	(WORKING_DOT_WORD): Define.
	(TC_HANDLES_FX_DONE): Define.
	(DIFF_EXPR_OK): Define.
	(LISTING_HEADER): Define.
	(TARGET_FORMAT): Select target format based on endian flag.
	(TARGET_BYTES_BIG_ENDIAN): Default to little endian.
	(target_big_endian): Add external declaration.

	* config/tc-i860.c: All existing code reworked completely. Other
	new code shown below.
	(SYNTAX_SVR4): Define.
	(target_warn_expand): New variable.
	(md_shortopts): Declare and define (-Qy, -Qn, and -V options).
	(md_longopts): Declare and define with new options (-EL, -EB,
	and -mwarn-expand).
	(md_show_usage): New function.
	(md_operand): New function.
	(obtain_reloc_for_imm16): New function.
	(md_apply_fix3): New function.
	(tc_gen_reloc): New function.

include:
2000-08-08  Jason Eckhardt  <jle@cygnus.com>

	* opcode/i860.h: Small formatting adjustments.

opcode:
2000-08-08  Jason Eckhardt  <jle@cygnus.com>

	* i860-dis.c (print_br_address): Change third argument from int
	to long.

bfd:
2000-08-08  Jason Eckhardt  <jle@cygnus.com>
	* elf32-i860.c (elf32_i860_howto_table): Updated some fields.
2000-08-09 03:33:42 +00:00
Nick Clifton
df86943d1e Make sure the 2 bytes of the jump address are in the same frag.
Accept 68hc12 register indirect modes.

Mention 68HC11 & 68HC12 support in NEWS.
2000-08-08 21:40:33 +00:00
Richard Henderson
30d2525955 * config/tc-ia64.c (unwind): Add prologue_mask member.
(dot_vframe): Elide psp_gr record if it overlaps prologue_gr.
        (dot_save): Likewise for pfs_gr, rp_gr, and preds_gr.
        (dot_body): Clear unwind.prologue_mask.
        (dot_prologue): Set it.  Accept a register second argument.
2000-08-07 21:50:08 +00:00
Kazu Hirata
2d484c7fa2 2000-08-05 Kazu Hirata <kazu@hxi.com>
* config/atof-ieee.c: Fix formatting.
	* config/atof-tahoe.c: Likewise.
2000-08-07 19:54:34 +00:00
Denis Chertykov
65b1d096bc * config/tc-avr.c: Use PARAMS macro in function declarations.
Don't declare md_pcrel_from_section (already in tc-avr.h).
	(avr_operands): Use AVR_UNDEF_P and AVR_SKIP_P macros.
	(avr_operand): Don't set (unsigned) op_mask to -1.
2000-08-06 14:03:58 +00:00
Nick Clifton
3d4ae3c0c6 Fix typo 2000-08-04 22:23:32 +00:00
Kazu Hirata
47926f603c 2000-08-05 Kazu Hirata <kazu@hxi.com>
* config/tc-cris.c: Fix formatting.
	* config/tc-i386.c: Likewise.
	* config/tc-sparc.c (sparc_ip): Simplify the code.
2000-08-04 18:43:45 +00:00
Kazu Hirata
ab3e48dc5d 2000-08-04 Kazu Hirata <kazu@hxi.com>
* config/tc-cris.c: Rearrange code for readability.
	* config/tc-d10v.c: Fix formatting.
	* config/tc-m32r.c: Likewise.
	* config/tc-sparc.c: Likewise.
2000-08-04 01:01:32 +00:00
Jim Wilson
3d56ab850c Fix memory leaks for IA-64 opcode idescs.
gas/
	* config/tc-ia64.c (emit_one_bundle): Call ia64_free_opcode
	before ia64_find_opcode.
	(md_assemble): Likewise.
opcodes/
	* ia64-dis.c (print_insn_ia64): Call ia64_free_opcode at end.
2000-08-02 21:24:54 +00:00
Nick Clifton
d78c7dcade Undo some formatting fixes 2000-08-02 01:00:15 +00:00
Nick Clifton
3f9dfb2cd9 Fix skip of 'cpsr_all' flag 2000-08-01 23:10:02 +00:00
Kazu Hirata
28e4f854cf 2000-08-01 Kazu Hirata <kazu@hxi.com>
* config/obj-som.c: Fix formatting.
	* config/obj-ieee.c: Likewise.
	* config/tc-arm.c: Likewise.
	* config/tc-v850.c: Likewise.
2000-08-01 19:02:49 +00:00
Nick Clifton
2fd5405afb Fix formatting. 2000-07-31 22:46:36 +00:00
Nick Clifton
28e7409f62 Add --pcrel option to m68k port 2000-07-31 22:08:14 +00:00
Jason Eckhardt
aa8c34c313 2000-07-28 Jason Eckhardt <jle@cygnus.com>
* configure.in: Add bits for i860-stardent-{sysv4, elf}*.
	* configure: Regenerated.
	* config/obj-elf.c (obj_elf_type): Recognize a fifth type
	of operand to the .type directive (.e.g, "type").
2000-07-29 03:20:54 +00:00
Alan Modra
4c400d5ea7 comment-finding hack for hppa-linux. 2000-07-28 05:05:20 +00:00
Andrew Cagney
0aa529cb6b Fix GCC warnings.
Abort if code falls off end of md_estimate_size_before_relax().
2000-07-28 03:33:32 +00:00
Nick Clifton
c6a7ab1f75 Fix formatting 2000-07-28 00:42:18 +00:00
Alan Modra
e0c6ed95b5 Kazu Hirata's formatting fixes. 2000-07-27 04:05:05 +00:00
DJ Delorie
39da812840 * config/obj-coff.c (obj_frob_symbol): Don't merge
labels. Don't merge if the symbol isn't constant. Return
immediately if a symbol is merged.
2000-07-24 17:50:35 +00:00
DJ Delorie
5e0d736c33 * config/obj-coff.c (obj_frob_symbol): revert previous change,
it breaks linking against DLLs.
2000-07-20 23:38:05 +00:00
Hans-Peter Nilsson
3bcbcc3dcf * configure.in: Add CRIS support.
* configure: Regenerate.
	* Makefile.am: (CPU_TYPES): Add cris.
	(CPU_OBJ_VALID) [aout]: Add cris.
	(MULTI_CPU_TYPES): Add cris.
	(MULTI_CPU_OBJ_VALID) [aout]: Add cris.
 	[coff]: Only i386 and mips are valid.
	(TARGET_CPU_CFILES): Add config/tc-cris.c.
	(TARGET_CPU_HFILES): Add config/tc-cris.h.
	(MULTI_CFILES): Add config/e-crisaout.c and config/e-criself.c.
	Regenerate dependencies.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* as.c: Declare crisaout, criself.
	* config/tc-cris.h, config/tc-cris.c: New.
	* config/e-criself.c, config/e-crisaout.c: New.
	* po/POTFILES.in, po/gas.pot: Regenerate.
2000-07-20 17:45:28 +00:00
Alan Modra
25a8b2508d #ifdef OBJ_SOM, not #ifdef SOM 2000-07-19 06:30:49 +00:00
Nick Clifton
7a9aaf929a Don't merge labels. Don't merge if the symbol isn't constant. Don't call
S_SET_EXTERNAL if the storage class is already set.
2000-07-17 23:27:31 +00:00
Nick Clifton
fafb6d1700 Fix formatting. 2000-07-17 21:37:02 +00:00
Nick Clifton
a2429eb555 Fix formatting. 2000-07-17 21:24:35 +00:00
Nick Clifton
87271fa61d Fix formatting. 2000-07-17 21:06:14 +00:00
Nick Clifton
8098403c53 Fix formatting 2000-07-17 20:59:47 +00:00
Alan Modra
1cd1c99be6 (hppa_fix_adjustable): Don't reduce certain symbols to section syms. 2000-07-15 12:57:14 +00:00
Nick Clifton
d547a75e6b *** empty log message *** 2000-07-14 22:28:24 +00:00
Nick Clifton
119d663aa4 Add new command line switch --no-construct-floats 2000-07-14 22:23:33 +00:00
Nick Clifton
7f7888218f Add padding to the last section when aligning it increases its size. 2000-07-12 16:45:46 +00:00
Nick Clifton
9a736b6b4d Fix formatting. 2000-07-11 18:48:17 +00:00
Nick Clifton
1aea3bb851 Fix formatting 2000-07-10 19:09:51 +00:00
Nick Clifton
3dd5103bb4 Fix formatting. 2000-07-10 18:59:26 +00:00
Alan Modra
46b85d4287 More warning fixes, and a tweak in tc-hppa.c to check constant
branch offsets a little more thoroughly.
2000-07-10 15:15:01 +00:00
Alan Modra
ad1079af05 Add linux-elf flavour to pseudos in tc-hppa.c and some tidying
and bug fixes.  Handle wide mode relocs.  Don't select target
size based on BFD64.
2000-07-09 08:16:21 +00:00
Nick Clifton
d0313fb7a7 Fix formating 2000-07-08 18:56:38 +00:00
Nick Clifton
c4aa876b91 Fix formatting 2000-07-08 18:13:58 +00:00
Nick Clifton
bc0d738a8d Fix comments. 2000-07-07 16:58:25 +00:00
Nick Clifton
d67b5d6d0e fixed another comment formatting problem. 2000-07-07 16:52:31 +00:00
Nick Clifton
6b31947e84 Fix formatting. 2000-07-07 16:45:46 +00:00
Nick Clifton
1ad5eac08e oops - omitted frpom previous delta 2000-07-06 17:21:00 +00:00
Nick Clifton
b8a9dcabf3 Applied Mark Elbrecht <snowball3@bigfoot.com>'s patch to implement
TC_COFF_SECTION_DEFAULT_ATTRIBUTES.
2000-07-06 17:18:10 +00:00
Andrew Cagney
24ddb29628 Tue Jul 4 14:08:28 2000 Andrew Cagney <cagney@b1.cygnus.com>
* config/tc-d30v.h: Include "write.h" for fixS.
      (d30v_start_line, md_pcrel_from_section): Add function prototypes.
2000-07-06 07:01:38 +00:00
Nick Clifton
bcc74d77db Further changes to warning messages 2000-07-05 21:55:13 +00:00
Alexandre Oliva
8de8f17e3d * config/tc-arm.c (psrs): Accept combinations of flags. 2000-07-04 05:49:04 +00:00
Nick Clifton
00d2865b83 Tidy up formatting.
Add  -mall-opcodes, -mno-skip-bug, -mno-wrap.
2000-07-03 22:25:33 +00:00
Ulf Carlsson
8614eeee67 2000-07-01 Koundinya K <kk@ddeorg.soft.net>
* configure.in: Add entry for mips-*-sysv4*MP*
        * configure: Rebuild
        * config/tc-mips.c (mips_target_format): Return elf32-tradbigmips or
        elf32-tradlittlemips for traditional mips targets.
        * config/tc-mips.c (md_estimate_size_before_relax): Duplicate the
        test for Link Once sections as in adjust_reloc_syms.
        * config/te-tmips.h: New file for traditional mips targets. Define
        TE_TMIPS.
2000-07-02 01:18:49 +00:00
Nick Clifton
c99004323d Do not change an existing section's attributes if a flags argument isn't
present.  Warn if the new attributes don't match the section's current
attributes.
2000-06-29 23:54:13 +00:00
Hans-Peter Nilsson
9d87310aac * config/obj-aout.c (obj_aout_type): Do not ignore for undefined
symbols; create them.
2000-06-29 23:04:29 +00:00
Aldy Hernandez
2ae7e77be8 16 bit immediate expr support for mips 2000-06-28 19:06:25 +00:00
Nick Clifton
6b2539e3e6 Do not allow EITHER_BUT_PREFER_MU opcodes to be packed into reverse
sequential buckets, and warn if the user does so.
2000-06-27 18:21:39 +00:00
Nick Clifton
65aa24b6e8 Applied Marek Michalkiewicz <marekm@linux.org.pl>'s patch to ehance the AVR port. 2000-06-27 01:45:30 +00:00
Nick Clifton
1994a7c76c Fix spelling typos.
Remove use of DEFUN().
2000-06-25 17:59:22 +00:00
Nick Clifton
f0c56b9036 Assemble ldmac correctly. 2000-06-25 16:49:47 +00:00
DJ Delorie
6d249963bc 386.c (md_estimate_size_before_relax): Revert
more changes from Sept 1999
(tc_i386_fix_adjustable): ditto
(md_apply_fix3): ditto
2000-06-25 01:33:31 +00:00
Alan Modra
c0fecd35a1 Blow away DEFUN. 2000-06-24 11:51:53 +00:00
Alan Modra
e7b305a27f Fix comment typos. 2000-06-24 08:07:01 +00:00
Alan Modra
70d6ecf3bf Kazu Hirata's formatting and comment typo fixes. 2000-06-23 05:44:30 +00:00
Timothy Wall
e9718fe12e Move premature QP notation clearing to it's appropriate location. 2000-06-23 03:31:06 +00:00
Alan Modra
45288df104 Fix a problem with 32-bit displacements in .code16gcc mode. 2000-06-22 10:49:13 +00:00
Jeff Law
40f09f82cc * config/tc-h8300.c (parse_reg): Make the function static.
(parse_exp): Likewise.
2000-06-21 21:31:24 +00:00
DJ Delorie
78295804c3 * config/tc-i386.c (tc_i386_fix_adjustable): Revert change from
Sept 1999; RVA relocs need to be treated more like DIR32 relocs
for cygwin import libraries to work properly.
2000-06-21 02:18:17 +00:00
Timothy Wall
39bec121fb TI C54x target. 2000-06-20 13:52:32 +00:00
Nick Clifton
60bcf0fa8c Applied Stephane Carrez <Stephane.Carrez@worldnet.fr> patches to add support
for m68hc11 and m68hc12 processors.
2000-06-19 01:22:44 +00:00
Nick Clifton
5480ccf375 Fix compile time warnings 2000-06-19 00:59:43 +00:00
Nick Clifton
607723e496 Typo fix: Change BFD_ASSEMLER to BFD_ASSEMBLER. 2000-06-17 22:00:30 +00:00
Nick Clifton
b946ec34e6 Add -mcpu=rmXXXX switch. 2000-06-16 19:11:27 +00:00
Ulf Carlsson
37ce37b139 * config/tc-mips.h: Remove definition of ONLY_STANDARD_ESCAPES. 2000-06-15 09:30:30 +00:00
Jeff Law
20348649cc * config/tc-hppa.c (pa_export): Weak symbols can be global. 2000-06-14 02:58:49 +00:00
Alan Modra
63a0b638d4 Don't treat `;' as a line separator by default.
Explicitly mention `;' in line_separator_chars in each backend.
2000-06-09 00:00:04 +00:00
Nick Clifton
9bab93495a Assign correct reloc value to size 1 constant valued fixes. 2000-06-08 19:19:23 +00:00
David O'Brien
6480b79a19 * config/tc-alpha.c (md_undefined_symbol): Properly understand that $at
is the integer register $r28, vs. both $r28 and the floating point
register $f28.

This quiets a bogus warning about needing ".set noat".

Approved by:	Nick Clifton <nickc@cygnus.com>
		Message-Id: <200006081749.KAA12558@elmo.cygnus.com>
2000-06-08 18:34:06 +00:00
Jim Wilson
10850f29fe unwind bug fixes needed for today's gcc patch.
* config/tc-ia64.c (generate_unwind_image): Call ia64_flush_insns.
	(dot_endp): Don't call ia64_flush_insns.
	(emit_one_bundle): Don't delete prologue/body records from
	unwind_record list in first loop.  Rewrite second loop to account for
	this.
2000-06-08 17:07:48 +00:00
Jim Wilson
150f24a284 Patch from David Mosberger, cleanups to improve 32b-x-64b cross support.
* config/tc-ia64.c: Add missing prototypes.
	(generate_unwind_image): Cast argument to output_unw_records call.
2000-06-07 23:14:22 +00:00
Denis Chertykov
e38c9cc203 * config/tc-avr.c (avr_operand): fix the fomratting of the comment. 2000-06-07 18:56:15 +00:00
Denis Chertykov
1188e08253 * config/tc-avr.c (AVR_ISA_???): moved to include/opcode/avr.h
(REGISTER_P): likewise.
	(avr_opcodes): uses include/opcode/avr.h
	(avr_operand): enable ld r,Z or st r,Z for at90s1200.
2000-06-07 17:42:44 +00:00
Alan Modra
65172ab8f7 Update md_shortopts to what we actually handle. 2000-06-03 13:06:33 +00:00
Alan Modra
b75c0c920f is_end_of_line fixes. 2000-06-02 02:52:10 +00:00
Scott Bambrough
a6836251f6 The ARM assembler is not assembling the following instruction
correctly.

	mrs	lr, spsr

The string pointer is advanced to far before the check to set
the SPSR bit.

Thu Jun 01 2000  Scott Bambrough <scottb@netwinder.org>

	* config/tc-arm.c (do_mrs): Allow SPSR_BIT to be set correctly.
2000-06-01 19:07:54 +00:00
Nick Clifton
43841e9116 Fix compile time warning messages. 2000-05-29 22:05:27 +00:00
Alexandre Oliva
3c07fb76e6 * config/tc-mn10300.c (md_assemble): Copy size to real_size before
it is modified, and use the real_size to compute the frag address
for dwarf2 line info.
2000-05-27 21:40:22 +00:00
Jakub Jelinek
6faf3d667f * config/tc-sparc.c (sparc_relax): New.
(md_longopts): Add -relax and -no-relax options.
	(md_parse_options, md_show_usage): Likewise.
	(md_apply_fix3): Optimize tail call into branch always if possible.
2000-05-26 06:45:55 +00:00
Donald Lindsay
0a44c2b16f New short-conditional-branch packing rules for D10V. 2000-05-25 22:35:05 +00:00
Jim Wilson
e0c9811a90 IA-64 unwind info changes, fix errors, add missing pieces, and some cleanup.
* config/tc-ia64.c (dot_restorereg_p): New function.
	(md_pseudo_table): Add restorereg.p.
	...
2000-05-25 02:00:14 +00:00
Alan Modra
ee7fcc42b1 Pass jump reloc in fr_var so it can be used in
md_estimate_size_before_relax, replacing old kludge.
2000-05-23 04:48:21 +00:00
Richard Henderson
c67e42c950 * config/tc-ia64.c (FUNC_PC_RELATIVE): New.
(pseudo_func): Add pcrel.
        (operand_match):  Handle IA64_OPND_TGT64.
        (build_insn): Likewise.
        (md_begin): Initialize pseudo_func[FUNC_PC_RELATIVE].
        (ia64_gen_real_reloc_type): Handle FUNC_PC_RELATIVE.
        (fix_insn): Handle all three 64-bit relocation types.
2000-05-23 01:48:04 +00:00
Hans-Peter Nilsson
5110c57e8e * obj.h (struct format_ops): New members begin, app_file,
s_set_other, s_set_desc, s_get_type, s_set_type,
	separate_stab_sections, init_stab_section.

	* config/obj-multi.h: Update GPL notice to v2.
	(obj_begin): New.
	(obj_app_file): New.
	(S_SET_SIZE): Test s_set_size for NULL before calling.
	(S_SET_ALIGN): Similar for s_set_align.
	(S_SET_OTHER): New.
	(S_SET_DESC): New.
	(S_GET_TYPE): New.
	(S_SET_TYPE): New.
	(SEPARATE_STAB_SECTIONS): New.
	(INIT_STAB_SECTION): New.
	(EMIT_SECTION_SYMBOLS): New.
	(AOUT_STABS) [OBJ_MAYBE_AOUT]: Define.

	* config/obj-elf.h: Update GPL notice to v2.
	Mention that this file is included from obj-multi.h.
	(obj_begin): Wrap definition in ifndef.
	(elf_file_symbol): Constify declaration.
	(obj_app_file): Ditto.
	(SEPARATE_STAB_SECTIONS, INIT_STAB_SECTION, OBJ_PROCESS_STAB):
	Wrap in ifndef SEPARATE_STAB_SECTIONS.

	* config/obj-elf.c (elf_s_set_other): New.
	(elf_file_symbol): Constify argument.
	(elf_separate_stab_sections): New.
	(elf_init_stab_section): New.
	(elf_format_ops): Add new members.  Remove comma at end.

	* config/obj-ecoff.c (ecoff_separate_stab_sections): New.
	(ecoff_format_ops): Add new fields.  Remove comma at end.
	Mention inconsistency for emit_section_symbols.

	* config/obj-coff.h (c_dot_file_symbol): Constify declaration.

	* config/obj-coff.c (c_dot_file_symbol): Constify argument.
	(coff_separate_stab_sections): New.
	(coff_format_ops): Add new members.

	* config/obj-aout.c (obj_aout_sec_sym_ok_for_reloc): New.
	(obj_aout_s_set_other): New.
	(obj_aout_s_set_desc): New.
	(obj_aout_s_get_type): New.
	(obj_aout_s_set_type): New.
	(obj_aout_separate_stab_sections): New.
	(aout_format_ops): New members added.  Use obj_aout_process_stab,
	not 0.  Use obj_aout_sec_sym_ok_for_reloc, not 0.
	(obj_aout_frob_symbol): Add ATTRIBUTE_UNUSED to args as
	appropriate.
	(obj_aout_line, obj_aout_weak, obj_aout_type): Ditto.
2000-05-22 21:19:43 +00:00
Alan Modra
b98ef14717 Keep a reloc for jumps to weak and external symbols. 2000-05-22 11:38:43 +00:00
Jeff Law
b3b6a3fe2b * config/tc-hppa.c (md_apply_fix): Mask out immediate bits of
instruction to reflect change in re_assemble_*.
2000-05-19 00:21:12 +00:00
Nick Clifton
322f2c4579 Add support for _x and _s flags to MSR instruction 2000-05-15 19:25:22 +00:00
Phil Blundell
5e6cbf410d Apply David O'Brien's comment patch. 2000-05-14 18:53:18 +00:00
Alan Modra
4132022df1 Kazu Hirata's output reloc for mov.
Don't rely on short being 16 bits.
2000-05-14 11:48:42 +00:00
Alan Modra
b4fd930a27 New file 2000-05-14 09:37:07 +00:00
Alan Modra
a38cf1db3a Add x86 gas -q option to quiet some x86 gas warnings.
Remove useless -m flag_do_long_jump from x86 gas.
If BFD_ASSEMBLER, store --defsym value in a bfd_vma, and use scan_bfd_vma.
2000-05-13 12:49:55 +00:00
Alan Modra
e413e4e996 `.arch cpu_type' pseudo for x86. 2000-05-13 09:26:23 +00:00
Alexandre Oliva
e8b1cae533 * config/tc-mn10300.h (md_end): Define.
(mn10300_finalize): Declare.
* config/tc-mn10300.c: Include dwarf2dbg.h.
(debug_line): Define.
(md_assemble): Generate dwarf2 line info.
(mn10300_finalize): New function.  Finalize dwarf2 info.
2000-05-12 06:16:30 +00:00
Alan Modra
426b040396 (md_estimate_size_before_relax): Use the external version of
the relocation for weak symbols.
2000-05-11 01:48:09 +00:00
Jim Wilson
e4c58b2551 Unwind info bug fixes from David Mosberger.
* config/tc-ia64.c (output_P7_format, case mem_stack_f): Output fixed
	frame size in units of 16 bytes, as required per SW Conventions manual.
	(output_unw_records): Output info-block header as a dword to get
	byte-order right.
2000-05-09 01:54:37 +00:00
Alan Modra
8fce3f5ef7 Michael Sokolov's 68000 patches + assorted compiler warning fixes. 2000-05-08 10:24:06 +00:00
J.T. Conklin
7a899fff9a * config/tc-ppc.c (pre_defined_registers): Add entries for vector
unit registers.
(md_parse_option): Recognize -m7400.
2000-05-03 22:23:01 +00:00
Ian Lance Taylor
44877466ff * config/atof-ieee.c (gen_to_words): When adding carry back in,
don't permit lp to become less than the words array.
2000-05-03 21:23:52 +00:00
Nick Clifton
eaa15ab811 Fix little endian relocs 2000-05-03 18:50:55 +00:00
Alan Modra
da5d444c29 go32 bss alignment. 2000-05-03 04:25:33 +00:00
Alan Modra
3f9b03b5da Assorted code cleanup and fixes for hppa. Re-enable elf32-hppa as
it now compiles even if it doesn't work too well.
2000-05-02 00:12:52 +00:00
Denis Chertykov
df13624506 * config/tc-avr.c: ATTRIBUTE_UNUSED added to the necessary places.
More comments added.
	(md_begin): Removed "construct symbols for each register name".
	Because register names conflicts with GCC generated function
	names.
	(avr_operand): Now constant numbers can be used as a register
	identifiers (0 as r0, 31 as r31).
	(md_assemble): use skip_space () before parsing instruction
	operands.
2000-05-01 11:14:05 +00:00
Denis Chertykov
b170af938f * config/tc-avr.c: New AVR_ISA_ defined.
(md_assemble): Handle opcodes with optional operands (lpm,elpm).
	(avr_operand): Handle 'a', 'v' and 'z' constraint letters needed
	for `fmul', `movw' and `lpm R,Z' instructions.
	(avr_operands): Warn if current opcode is a two-word instruction
	and previous opcode was cpse/sbic/sbis/sbrc/sbrs.
	(avr_opcodes): New commands added.
	(REGISTER_P): Check 'a' and 'v' constraint letters.
	(mcu_types): New MCU added.
2000-05-01 08:48:32 +00:00
Clinton Popetz
7f6d05e83e Add XCOFF64 support.
bfd:
	* Makefile.am (coff64-rs6000.lo): New rule.
	* Makefile.in: Regenerate.
	* coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
	xcoff_is_local_label_name, xcoff_rtype2howto,
	xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
	xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
	xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
	(NO_COFF_SYMBOLS): Define.
	(xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
	xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
	internally.
	(MINUS_ONE): New macro.
	(xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
	relocation.
	(coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
	coff_SWAP_aux_out): Map to the new functions.
	* coff64-rs6000.c: New file.
	* libcoff.h (bfd_coff_backend_data): Add new fields
	_bfd_coff_force_symnames_in_strings and
	_bfd_coff_debug_string_prefix_length.
	(bfd_coff_force_symnames_in_strings,
	bfd_coff_debug_string_prefix_length): New macros for above fields.
	* coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
	Set machine to 620 for XCOFF64.  Use bfd_coff_swap_sym_in instead
	of using coff_swap_sym_in directly.
	(FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
	(coff_set_flags) Set magic for XCOFF64.
	(coff_compute_section_file_positions): Add symbol name length to
	string section length if bfd_coff_debug_string_prefix_length is
	true.
	(coff_write_object_contents): Don't do reloc overflow for XCOFF64.
	(coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
	using coff_swap_lineno_in directly.
	(bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
	and _bfd_coff_debug_string_prefix_length fields.
	* coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
	symbol names into strings table when
	bfd_coff_force_symnames_in_strings is true.
	* coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
	SET_RELOC_VADDR): New macros.
	(coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
	(coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
	code.
	(coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
	changes within RS6000COFF_C specific code.
	(coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
	MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
	* reloc.c (bfd_perform_relocation, bfd_install_relocation):
	Extend existing hack on target name.
	* xcofflink.c (XCOFF_XVECP): Extend existing hack on
	target name.
	* coff-tic54x.c (ticof): Keep up to date with new fields
	in bfd_coff_backend_data.
	* config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
	targ_selvecs to include rs6000coff64_vec for rs6000.
	* configure.in: Add rs6000coff64_vec case.
 	* cpu-powerpc.c: New bfd_arch_info_type.

	gas:
	* as.c (parse_args): Allow md_parse_option to override -a listing
	option.
	* config/obj-coff.c (add_lineno): Change type of offset parameter
	from "int" to "bfd_vma."
	* config/tc-ppc.c (md_pseudo_table): Add "llong" and "machine."
	(ppc_mach, ppc_subseg_align, ppc_target_format): New.
	(ppc_change_csect): Align correctly for XCOFF64.
	(ppc_machine): New function, which discards "ppc_machine" line.
	(ppc_tc): Cons for 8 when code is 64 bit.
	(md_apply_fix3): Don't check operand->insert.  Handle 64 bit
	relocations.
	(md_parse_option): Handle -a64 and -a32.
	(ppc_xcoff64): New.
	* config/tc-ppc.h (TARGET_MACH): Define.
	(TARGET_FORMAT): Move to function.
	(SUB_SEGMENT_ALIGN): Use ppc_subseg_align.

	include:
	* include/coff/rs6k64.h: New file.

	opcodes:
	* configure.in: Add bfd_powerpc_64_arch.
	* disassemble.c (disassembler): Use print_insn_big_powerpc for
	64 bit code.
2000-04-26 15:09:44 +00:00
Alan Modra
d9b7d82070 Remove '/' from comment_chars for FreeBSD so divide operator works.
Fix as.1 typo.
2000-04-25 22:55:20 +00:00
Alan Modra
e799a69521 Use record_alignment, not bfd_set_section_alignment. 2000-04-25 10:02:20 +00:00
Alan Modra
3b0ec529f2 Keep shift count smaller than 32. 2000-04-25 08:55:01 +00:00
Nick Clifton
adcf07e614 Document behaviour of .align 0 for ARM targets.
Remove incomplete v5e code from tc-arm.c
2000-04-24 23:57:30 +00:00
Jeff Law
5047a41fff * obj-som.c: Terminate obj_pseudo_table. 2000-04-24 23:48:13 +00:00
Timothy Wall
bf3ca999c1 Clean up F-unit assembly and tests. 2000-04-23 02:53:35 +00:00
Jeff Law
a02fab7e03 * config/tc-hppa.c (md_apply_fix): Handle new PA2.0 formats.
* config/tc-hppa.c (CHECK_ALIGN): New macro.
        Added handling of new operand types l,y,&,fe,fE,fx.
2000-04-21 20:34:00 +00:00
Jim Wilson
800eeca487 IA-64 ELF support. 2000-04-21 20:22:24 +00:00
Richard Henderson
6677867973 * config/tc-d30v.c (write_2_short): Disregard opcode1->ecc when
bundling a non-delayed branch type instruction.
2000-04-21 17:20:03 +00:00
Alexandre Oliva
aa15f6f7b0 * config/tc-mn10300.c (HAVE_AM30): Define.
(md_assemble): Use it.
2000-04-20 22:18:27 +00:00
Alan Modra
742f45cf3a Check for changed section attributes. 2000-04-20 01:43:32 +00:00
H.J. Lu
508866be8a 2000-04-18 H.J. Lu (hjl@gnu.org)
* config/tc-i386.c (offset_in_range): Use addressT instead of
	bfd_vma for none bfd assemblers.
2000-04-18 17:46:31 +00:00
Alan Modra
ba2adb9390 64 bit bfd fix. 2000-04-17 03:18:36 +00:00
Alan Modra
fc633e5b97 Remove U suffix from constants for K&R compilers.
Fix a couple of 64 bit nits.
2000-04-13 01:08:05 +00:00
Nick Clifton
3db10f32e0 Apply patch to fix compuation of frag offsets for symbols 2000-04-12 18:03:58 +00:00
Nick Clifton
1ed18ec1a3 Apply Andrew Cagney's patch to fix use of 'struct fix'. 2000-04-12 17:59:32 +00:00
Alan Modra
847f7ad471 Fix 64-bit nits. 2000-04-10 12:36:06 +00:00
Nick Clifton
d92b1a8a2a Add support for BFD_RELOC_{ARM|THUMB}_PCREL_BLX relocs. 2000-04-08 00:11:46 +00:00
Joern Rennecke
52ccafd035 opcodes:
* sh-opc.c (sh_table): Use A_DISP_PC / PCRELIMM_8BY2 for ldre & ldrs.
	stc GBR,@-<REG_N> is available for arch_sh1_up.
	Group parallel processing insn with identical mnemonics together.
	Make three-operand psha / pshl come first.
gas:
	* config/tc-sh.c (get_operands): There's no third operand if the
	first operand is an immediate.
2000-04-05 21:43:26 +00:00
Joern Rennecke
015551fcfb sh-dsp REPEAT support:
opcodes:

        * sh-opc.h (sh_nibble_type): Remove DISP_8 and DISP_4.
        Split IMM_[48]{,BY[24]} into IMM[01]_[48]{,BY[24]}.  Add REPEAT.
        (sh_arg_type): Add A_PC.
        (sh_table): Update entries using immediates.  Add repeat.
        * sh-dis.c (print_insn_shx): Remove DISP_8 and DISP_4.
        Split IMM_[48]{,BY[24]} into IMM[01]_[48]{,BY[24]}.  Add REPEAT.

gas:

        * config/tc-sh.c (immediate): Delete.
        (sh_operand_info): Add immediate member.
        (parse_reg): Use A_PC for pc.
        (parse_exp): Add second argument 'op'.  All callers changed.
        (parse_at): Expect pc to be coded as A_PC.
        Use immediate field in *op.
        (insert): Add fourth argument 'op'.  All callers changed.
        (build_relax): Add second argument 'op'.  All callers changed.
        (insert_loop_bounds): New function.
        (build_Mytes): Remove DISP_4.
        Split IMM_[48]{,BY[24]} into IMM[01]_[48]{,BY[24]}.  Add REPEAT.
        (assemble_ppi): Use immediate field in *operand.
        (sh_force_relocation): Handle BFD_RELOC_SH_LOOP_{START,END}.
        (md_apply_fix): Likewise.
        (tc_gen_reloc): Likewise.  Check for a pcrel BFD_RELOC_SH_LABEL.

include/coff:

        * sh.h (R_SH_LOOP_START, R_SH_LOOP_END): Define.

include/elf:

        * sh.h (R_SH_LOOP_START, R_SH_LOOP_END): New RELOC_NUMBERs.

bfd:

        * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
        BFD_RELOC_SH_LOOP_END.
        * elf32-sh.c (sh_elf_howto_tab): Change special_func to
        sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
        Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
        (sh_elf_reloc_loop): New function.
        (sh_elf_reloc): No need to test for always-to-be-ignored relocs
        any more.
        (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
        (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
        * bfd-in2.h, libbfd.h: Regenerate.
2000-04-05 21:23:05 +00:00
Alexandre Oliva
79bd78bef5 * config/tc-sparc.c (sparc_ip): Avoid string pasting. 2000-04-05 09:38:43 +00:00