Commit Graph

2689 Commits

Author SHA1 Message Date
Ian Lance Taylor
0f616818c0 Add SH ELF support.
* configure.in (sh-*-elf*): New target.
	* config/tc-sh.h (TARGET_ARCH): Define.
	(WORKING_DOT_WORD): Define.
 	(TC_COFF_FIX2RTYPE): Only define if OBJ_COFF.
	(BFD_ARCH, COFF_MAGIC, TC_COUNT_RELOC): Likewise.
	(TC_RELOC_MANGLE, tc_coff_symbol_emit_hook): Likewise.
	(DO_NOT_STRIP, NEED_FX_R_TYPE, TC_KEEP_FX_OFFSET): Likewise.
	(TC_COFF_SIZEMACHDEP, tc_frob_file): Likewise.
	(SUB_SEGMENT_ALIGN): Likewise.
	(RELOC_32): Don't define.
	(tc_frob_file_before_adjust): Define if BFD_ASSEMBLER.
	(target_big_endian): Declare if OBJ_ELF.
	(TARGET_FORMAT): Define if OBJ_ELF.
	* config/tc-sh.c: Use BFD reloc codes instead of SH COFF reloc
	numbers throughout.
	(tc_crawl_symbol_chain): Only define if OBJ_COFF.
	(tc_headers_hook, tc_coff_sizemachdep): Likewise.
	(struct sh_count_relocs): Define.
	(sh_count_relocs): New static function, broken out of
	sh_frob_file.  Add BFD_ASSEMBLER code.
	(sh_frob_section): Likewise.
	(sh_frob_file): Call sh_frob_section.
	(md_convert_frag): If BFD_ASSEMBLER, change type of headers, and
	call section_symbol rather than seg_info (seg)->dot.
	(md_section_align): Add OBJ_ELF version.
	(SWITCH_TABLE_CONS): Define.
	(SWITCH_TABLE): Use SWITCH_TABLE_CONS.
	(md_apply_fix): Change parameter types if BFD_ASSEMBLER.  Only
	handle fx_r_type == 0 if not BFD_ASSEMBLER.  Return 0 if
	BFD_ASSEMBLER.
	(struct reloc_map): Define if not BFD_ASSEMBLER.
	(coff_reloc_map): Likewise.
	(sh_coff_reloc_mangle): Use coff_reloc_map to convert fx_r_type.
	(tc_gen_reloc): New function if BFD_ASSEMBLER.
	* write.c (write_relocs): Ifdef out fx_where test which triggers
	inappropriately for SH ELF.
	(write_object_file): Call tc_frob_file_before_adjust and
	obj_frob_file_before_adjust if they are defined.

	* write.c (write_object_file): Use BFD_RELOC_16, not
	BFD_RELOC_NONE, when calling fix_new_exp for a broken word.
1996-08-30 22:29:42 +00:00
Martin Hunt
20dbcd5c31 Fri Aug 30 14:47:38 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c (find_opcode): Fix problem with calculating
	branch sizes in across sections.
1996-08-30 21:50:52 +00:00
Jeff Law
1a393e50be * gas/v850/misc.s: Tweak register numbers for better testing.
* gas/v850/basic.exp (misc_tests): Corresponding changes.
1996-08-30 19:59:06 +00:00
Jeff Law
05631de266 * config/tc-850.c (md_assemble): Handle hi() correctly. Handle
hi0() too.
Bugfix.
1996-08-30 06:44:44 +00:00
Jeff Law
1f17971dee * gas/v850/hilo.s: New testfile.
* gas/v850/basic.exp: Run hilo tests.
1996-08-30 06:40:44 +00:00
Jackie Smith Cashion
d833e7e3c8 Thu Aug 29 11:32:23 1996 James G. Smith <jsmith@cygnus.co.uk>
* gas/arm/arm7t.d: Explicitly force little-endian assembly.
1996-08-29 10:34:09 +00:00
Martin Hunt
e592d28fa4 Wed Aug 28 19:20:04 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c (find_opcode): Fix a bug which could generate
	the wrong opcode for cases like st2w where there are many forms
	of the same instruction.
1996-08-29 02:22:25 +00:00
Ian Lance Taylor
6fce31a64b * expr.c (operand): If md_parse_name is defined, call it before
calling symbol_find_or_make.
	* config/tc-ppc.h (md_parse_name): Define.
	(ppc_parse_name): Declare.
	* config/tc-ppc.c (reg_name_search): Add regs and regcount
	parameters.
	(register_name): Update call to reg_name_search.
	(cr_operand): New static variable.
	(cr_names): New static const array.
	(ppc_parse_name): New function.
	(md_assemble): If PPC_OPERAND_CR is set in the operand flags, set
	cr_operand before calling expression.
PR 10460.
1996-08-27 17:56:47 +00:00
Jeff Law
a58b037adc * config/tc-hppa.c (tc_gen_reloc): Add new argument to
hppa_gen_reloc_type call.
Fixing a problem with -mlinker-opt.
1996-08-27 15:21:30 +00:00
Martin Hunt
67f0d0ea4c Mon Aug 26 18:24:51 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* tc-d10v.c: Fixed ".word".  Fixed problem with range checking
	on addresses.  Improved error messages.
1996-08-27 01:28:29 +00:00
Martin Hunt
3017263b68 Mon Aug 26 18:24:51 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: Fixed ".word".  Fixed problem with range checking
	on addresses.  Improved error messages.
	* doc/c-d10v.texi: Added docs for register pairs.
1996-08-27 01:28:10 +00:00
Martin Hunt
443dbf147e Mon Aug 26 13:39:27 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* tc-d10v.c (parallel_ok): Fix bug in parallel
	checking code.
1996-08-26 20:42:37 +00:00
Martin Hunt
f9085532dd Mon Aug 26 13:39:27 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c (parallel_ok): Fix bug in parallel
	checking code.
1996-08-26 20:42:19 +00:00
Ian Lance Taylor
58275724ff * ecoff.c (init_file): Initialize fMerge to 1.
(add_file): Restore old file merging code, but only merge files if
	fMerge is set.
	(ecoff_directive_loc): Clear fMerge field of current file.
	(ecoff_generate_asm_lineno): Likewise.
1996-08-26 19:07:06 +00:00
Jeff Law
88b47a8521 * config/tc-v850.c (md_assemble): Rough cut at demanding
"ep" or "r30" in sst and sld instructions.
        (md_apply_fix3): Don't abort.  Just warn that we don't
        have relocs yet.
1996-08-23 20:58:13 +00:00
Jeff Law
29fb63b671 * gas/v850/basic.exp (move_tests): Test instruction bit patterns.
* gas/v850/move.s: Tweak constants for better testing.
1996-08-23 20:29:34 +00:00
Jeff Law
8289ed0b65 * gas/v850/basic.exp (mem_tests): Test instruction bit patterns.
xfail sst and sld tests.
        (mov_tests): Remove bogus xfail.
        * gas/v850/mem.s: sst and sld instructions can only index from
        "ep" register.
1996-08-23 19:35:05 +00:00
Jeff Law
1fa751362b * gas/v850/basic.exp (logical_tests): Test instruction bit patterns.
Update addresses.
        * gas/v850/logical.s: Tweak constants for better testing.
1996-08-23 19:13:56 +00:00
Jeff Law
5bd7d77946 * gas/v850/basic.exp (jump_tests): Test instruction bit patterns,
but not displacements (yet).
1996-08-23 19:05:52 +00:00
Jeff Law
c9f1b2d9c7 * config/tc-v850.c (CC_NAME_CNT): Define.
(cc_name): New function.
        (md_assemble): Handle V850_OPERAND_CC correctly.
setf stuff
1996-08-23 19:01:37 +00:00
Jeff Law
7be3453a1a * gas/v850/basic.exp (compare_tests): Test instruction bit patterns. 1996-08-23 18:58:09 +00:00
Martin Hunt
b1c28263c9 Fri Aug 23 11:40:47 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* doc/c-d10v.texi: Fix typo.
1996-08-23 18:43:48 +00:00
Jeff Law
78872957c4 * gas/v850/basic.exp (branch_tests): Test instruction bit patters,
but not displacements (yet).
1996-08-23 18:34:48 +00:00
Jeff Law
47183e0e38 * gas/v850/basic.exp (bit_tests): Test instruction bit patterns. 1996-08-23 18:26:59 +00:00
Jeff Law
d5974c571c * config/tc-v850.c (md_assemble): Don't forget to initialize
"insn"!
1996-08-23 18:19:08 +00:00
Jeff Law
ad9889dd59 * gas/v850/basic.exp (arith_tests): Test instruction bit patterns.
* gas/v850/arith.s: Tweak constants for better testing.
1996-08-23 18:16:02 +00:00
Jeff Law
827b80748b * gas/v850/basic.exp (misc_tests): No longer expect failures
assembling "ldsr" and "stsr" opcodes.
        * gas/v850/misc.s: Re-enable assembling of "ldsr" and "stsr"
        opcodes.
1996-08-23 17:42:00 +00:00
Jeff Law
0e8f9bd15e * config/tc-v850.c (reg_name_search): Generalize to search
any given register table.
        (register_name): Pass appropriate table and size to reg_name_search.
        (system_register_name): New function.
        (SYSREG_NAME_CNT): Define.
        (md_assemble): Handle operands which are system registers.
Still working on the parser..
1996-08-23 17:39:43 +00:00
Jeff Law
4fc797ff5c * gas/v850/basic.exp (misc_tests): No longer expect failures
assembling "trap" opcodes.
        * gas/v850/misc.s: Re-enable assembling of "trap" opcodes.
1996-08-23 17:10:41 +00:00
Jeff Law
50f7abfaed * gas/v850: New directory with v850 tests.
Beginnings of a gas testsuite for the v850.
1996-08-23 17:03:52 +00:00
Jeff Law
c9a32d6ca7 * config/tc-v850.c (md_assemble): If we find a register, but the
opcode doesn't want a register, then we don't have a match.
        (md_assemble): Get size of the instruction from the opcode table.
So we choose the right opcode and so that we get the sizes right.
1996-08-23 16:43:23 +00:00
J.T. Conklin
1510cd39b6 rework operand parsing 1996-08-23 06:33:10 +00:00
Ian Lance Taylor
8ee90d359b * configure.in: Set and substitute HLDENV.
* configure: Rebuild.
	* Makefile.in (HLDENV): New variable.
	(as.new): Use $(HLDENV).
1996-08-23 00:10:40 +00:00
Ian Lance Taylor
eeef602f20 * ecoff.c (ecoff_directive_endef): Avoid a division by zero error
if an array dimension is not known.
PR 10426.
1996-08-22 21:00:36 +00:00
Martin Hunt
d0810b2b8d Thu Aug 22 10:50:00 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* doc/c-d10v.texi: Cleanup.
1996-08-22 17:54:41 +00:00
Martin Hunt
6be9ec8d75 Thu Aug 22 10:50:00 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: Fix a reloc bug caused by my last change.
	* doc/c-d10v.texi: Cleanup.
1996-08-22 17:53:59 +00:00
J.T. Conklin
dcf5d11760 parse [reg], lo(exp), and hi(exp) 1996-08-22 05:30:14 +00:00
J.T. Conklin
c6aa56bca9 * config/tc-v850.c: New file.
* config/tc-v850.h: New file.
* configure (v850-*-elf): New target.
* configure.in (v850-*-elf): New target.
1996-08-21 23:37:04 +00:00
Martin Hunt
337350a309 Wed Aug 21 15:50:54 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* c-d10v.texi: New file.
	* all.texi: Added D10V stuff.
	* as.texinfo: Added D10V stuff.
1996-08-21 22:53:53 +00:00
Martin Hunt
2c2e562634 Wed Aug 21 15:50:54 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* doc/c-d10v.texi: New file.
	* doc/all.texi: Added D10V stuff.
	* doc/as.texinfo: Added D10V stuff.
1996-08-21 22:53:14 +00:00
Martin Hunt
bb5638c637 Tue Aug 20 14:10:02 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* tc-d10v.c: All references to defined symbols should
 	now use the optimal instruction.  .float and .double now work.
1996-08-20 21:15:18 +00:00
Martin Hunt
ab457c4c0b Tue Aug 20 14:10:02 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: All references to defined symbols should
 	now use the optimal instruction.  .float and .double now work.
1996-08-20 21:15:05 +00:00
Ian Lance Taylor
d4e1b0be7b * config/obj-coff.c (fixup_segment): Adjust PC relative reloc by
section address for the i960 as is done for the i386.
PR 10344.
1996-08-19 21:42:49 +00:00
Stan Shebs
9072e640c4 * mpw-config.in: Add wildcards for config matching, add mips-*-*
case, forward-include bfd/elf-bfd.h.
1996-08-15 23:40:40 +00:00
Martin Hunt
b98b04eadb Thu Aug 15 13:24:30 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: Add additional information to the opcode
        table to help determinine which instructions can be done
        in parallel.
1996-08-15 20:26:03 +00:00
Jackie Smith Cashion
ac5a75ae11 Thu Aug 15 16:25:05 1996 James G. Smith <jsmith@cygnus.co.uk>
* gas/arm/arm.exp: Change inst.s test to check objdump.
	* gas/arm/inst.d: Added.
1996-08-15 15:27:53 +00:00
Jackie Smith Cashion
3bce65a493 Thu Aug 15 16:06:02 1996 James G. Smith <jsmith@cygnus.co.uk>
* gas/arm/thumb.s: Added.
	* gas/arm/immed.s: Added.
	* gas/arm/arch4t.s: Added.
	* gas/arm/arm.exp: Updated to run the new tests.
1996-08-15 15:07:55 +00:00
Ian Lance Taylor
126436a8ca * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust relocs
against weak symbols.
1996-08-14 17:51:49 +00:00
Ian Lance Taylor
0e94336ef5 * config/tc-ppc.h (TC_FORCE_RELOCTION): Define if OBJ_XCOFF.
(ppc_force_relocation): Declare if OBJ_XCOFF.
	* config/tc-ppc.c (ppc_force_relocation): New function if
	OBJ_XCOFF.
1996-08-14 01:02:04 +00:00
Ian Lance Taylor
817e4f757f * config/tc-mips.h (BYTE_ORDER): Don't define. No longer used. 1996-08-12 23:51:25 +00:00