Commit Graph

2711 Commits

Author SHA1 Message Date
Ian Lance Taylor
1540599959 * expr.c (expr): Always use unsigned right shifts for >>.
PR 10630.
1996-09-16 15:42:47 +00:00
Jeff Law
1b3b1c2d3c * gas/h8300/macs.s: Add "stmac" instructions.
* gas/h8300/basic.exp: Test them.
Somehow I forgot to test "stmac".
1996-09-13 21:27:22 +00:00
Jackie Smith Cashion
f17be6588b Thu Sep 12 10:25:45 1996 James G. Smith <jsmith@cygnus.co.uk>
* config/tc-arm.c (md_apply_fix3): Update two thumb instruction
 	slots when processing BL fixups.

	* config/tc-arm.c (output_inst): Ensure Thumb BL fixup is marked
 	on the first half of the instruction.

Thu Sep 12 10:28:44 1996  James G. Smith  <jsmith@cygnus.co.uk>

	* gas/arm/thumb.s (back): Check assembly of Thumb BL.
1996-09-12 09:31:02 +00:00
Ian Lance Taylor
1decafee51 * ecoff.c (ecoff_stab): Create an expression symbol for a complex
stabs expression, rather than giving an error.
1996-09-11 18:40:25 +00:00
Ian Lance Taylor
475c826bb4 * ecoff.c (ecoff_new_file): Don't do anything if we are still in
the same file.
PR 10595.
1996-09-11 04:14:35 +00:00
Ian Lance Taylor
8a3bdc3d2a * config/tc-mips.c (append_insn): Fill in the value for a constant
jump, rather than creating a reloc.
PR 10589.
1996-09-10 15:47:16 +00:00
Ian Lance Taylor
ca296aab0e Don't set interlocks for r5000. Rely on -mips4 settings. 1996-09-10 01:12:35 +00:00
Ian Lance Taylor
4a9149d501 * gas/mips/mips4.s, gas/mips/mips4.d: Use $fccN for condition code
registers.
1996-09-09 18:37:54 +00:00
Ian Lance Taylor
d31a3f5e76 * config/tc-mips.c (append_insn): Don't swap an instruction which
sets a condition code with an instruction which uses a condition
	code.
	(mips_ip): In cases 'N' and 'M', look for $fccN rather than an
	immediate value.
1996-09-09 18:37:10 +00:00
Ian Lance Taylor
517078c1b3 * config/tc-mips.c (md_begin): Recognize r5000 for cpu. If
mips_cpu is 5000, set interlocks and cop_interlocks.
	(mips_ip): Give a better error message if the ISA level is wrong.
	(md_parse_option): Recognize -mcpu=[v][r]5000.
1996-09-09 15:04:59 +00:00
Jackie Smith Cashion
ff8716f58e Sat Sep 7 13:25:55 1996 James G. Smith <jsmith@cygnus.co.uk>
* config/tc-mips.c (COUNT_TOP_ZEROES): Added macro to count
 	leading zeroes.
	(load_register): Ensure hi32 bits are not lost during lo32bit
 	processing. Fix shift offset that was overflowing into the next
 	instruction field. Add code to generate shorter sequences for
 	constants with a single contiguous seqeuence of ones.

Fri Sep  6 18:23:54 1996  James G. Smith  <jsmith@cygnus.co.uk>

	* gas/mips/dli.{s,d}: More test cases added.

NOTE: The COUNT_TOP_ZEROES macro is a bit bulky, and the same result
can be achieved by using a "standard" ffs() routine:
	count = ffs(~v);
	count = count == 0 ? 0 : 33 - count;

However the following timings (VR4300 CPU clock ticks on a CMA101
board) show the performance gain.

Number of	ffs()		for loop	if/then/else	conditional
leading								   ?:
zeroes
-------------------------------------------------------------------------------
  0		 167		 179		266		251
  1		1718		 283		263		259
  2		1670		 379		287		295
  3		1622		 475		311		311
  4		1574		 571		295		287
  5		1534		 667		311		319
  6		1478		 763		307		299
  7		1430		 859		323		323
  8		1382		 962		287		295
  9		1334		1051		319		311
 10		1286		1154		299		307
 11		1238		1250		323		331
 12		1183		1346		299		307
 13		1135		1442		331		323
 14		1087		1546		311		319
 15		1039		1642		335		343
 16		 991		1730		295		287
 17		 950		1834		311		319
 18		 895		1922		307		299
 19		 847		2026		331		323
 20		 799		2122		307		299
 21		 751		2218		323		323
 22		 703		2314		311		311
 23		 655		2417		343		335
 24		 599		2506		307		299
 25		 559		2602		331		331
 26		 511		2705		311		319
 27		 463		2801		343		335
 28		 407		2897		311		319
 29		 367		2993		343		335
 30		 311		3097		323		331
 31		 271		3185		355		355
 32		 215		3233		379		371
1996-09-07 12:45:19 +00:00
Martin Hunt
5e6c6406e6 Fri Sep 6 17:07:12 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c (d10v_dot_word): New function to support
	"@word" with the word pseudo-op.
	(md_apply_fix3): Cleanup and changes to support correct sizes
	for 16 and 18-bit relocs.
1996-09-07 00:12:56 +00:00
David Edelsohn
df4021c176 * configure.in (sparc-*-aout): Set `em'.
* configure: Regenerated.
	* config/te-sparcaout.h: New file.
	* config/tc-sparc.h (TARGET_BYTES_BIG_ENDIAN): Define.
	Ifdef TE_SPARCOUT define TARGET_FORMAT and SPARC_BIENDIAN.
	* config/tc-sparc.c (INSN_BIG_ENDIAN): New macro.
	(SPECIAL_CASE_{SETSW,SETX}): Define.
	({NOP,OR,FMOVS,SETHI,SLLX,SRA}_INSN): Define.
	(md_begin): Delete setting of `target_big_endian'.
	(output_insn): New function.
	(md_assemble): Rewrite.  Add `setx' support.
	(sparc_ip): Handle `0' operand char.  Recognize setuw, setsw, setx
	special cases.
	(md_atof): Add little endian support.
	(md_number_to_chars): Likewise.
	(md_apply_fix): Likewise.
	(md_longopts): Recognize -EL,-EB ifdef SPARC_BIENDIAN.
	(md_parse_option): Likewise.
	(md_show_usage): Print -EL, -EB ifdef SPARC_BIENDIAN.
1996-09-06 23:05:12 +00:00
Ian Lance Taylor
cfc71c6d3a * ecoff.c (ecoff_new_file): New function.
* ecoff.h (ecoff_new_file): Declare.
	* config/obj-ecoff.h (obj_app_file): Define.
PR 10548.
1996-09-05 17:43:06 +00:00
Ian Lance Taylor
711254da6c * config/tc-mips.c (load_register): Remove unused variable tmp. 1996-09-04 14:26:20 +00:00
Jackie Smith Cashion
1b68deb599 Wed Sep 4 11:24:29 1996 James G. Smith <jsmith@cygnus.co.uk>
* config/tc-mips.c (load_register): Remove unnecessary code that
 	was causing the high 32bits of 64bit constants to be lost.

Fixes PR10503. The compiler was producing the assembler code:
	dli $3,0xfffffffffffff
when constructing the softfloat library. Unfortunately it was being
incorrectly assembled.
1996-09-04 13:15:28 +00:00
Jeff Law
05fd83edd4 * config/tc-v850.c: Remove commented out and #if 0'd code.
(v850_reloc_prefix): Provide prototype.
        (postfix, get_reloc, build_insn): Remove prototypes for nonexistant
        functions.
        (md_begin, md_assemble, md_apply_fix3): Remove unused variables.
        (md_assemble): Add default to case statement.
Minor cleanups.
1996-09-03 17:59:16 +00:00
Jeff Law
270fd2adc3 * config/tc-v850.c (md_assemble): Compute size of the instrction
from the opcode.
1996-08-31 22:04:08 +00:00
Jeff Law
2d56269edf * config/tc-v850.c (md_apply_fix3): Do simple byte, short and
word fixups too.
Fixes "difference between forward references".
1996-08-31 18:36:19 +00:00
Jeff Law
6cff464b3a * gas/v850/basic.exp (do_branch): Check offsets in branch insns.
(do_jumps): Likewise.
Now that we can resolve known branch targets.
1996-08-31 07:26:35 +00:00
Jeff Law
74dd0c0786 * config/tc-v850.c (md_apply_fix3): Use little endian get/put
routines to fetch/store the updated instruction from/to memory.
        (v850_insert_operand): If the operand has a specialized insert
        routine, call it.
Getting fixups closer.  At least br <target> works now.
1996-08-31 05:52:38 +00:00
J.T. Conklin
c84615bc23 * config/tc-v850.c (reg_name_search): Align calling convention to
be like identical function found in tc-ppc.c.
(get_reloc): Removed.
(v850_reloc_prefix): New function, parse lo(), hi() and hi0().
(md_assemble): emit fixups.
(md_pcrel_from): renamed from md_pcrel_from_section, emit proper
displacement.
(md_apply_fix3): handle fixups/relocs.
* config/tc-v850.h (MD_PCREL_FROM_SECTION): Removed definition.
1996-08-31 01:42:46 +00:00
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