Commit Graph

35 Commits

Author SHA1 Message Date
Nick Clifton 91d6fa6a03 Add -Wshadow to the gcc command line options used when compiling the binutils.
Fix up all warnings generated by the addition of this switch.
2009-12-11 13:42:17 +00:00
Jie Zhang 66a6900a09 gas/
* config/bfin-parse.y (asm_1): Implement HLT instruction.
	Fix comments for DBGA, DBGAH and DBGAL.
	* config/tc-bfin.c (bfin_gen_pseudodbg_assert): Change according
	to the new encoding of DBGA, DBGAH, and DBGAL.

	include/
	* opcode/bfin.h (PseudoDbg_Assert): Add bits_grp and mask_grp.
	(PseudoDbg_Assert_grp_bits, PseudoDbg_Assert_grp_mask): Define.
	(PseudoDbg_Assert_dbgop_bits, PseudoDbg_Assert_dbgop_mask,
	PseudoDbg_Assert_dontcare_bits, PseudoDbg_Assert_dontcare_mask):
	Adjust accordingly.
	(init_PseudoDbg_Assert): Add PseudoDbg_Assert_grp_bits and
	PseudoDbg_Assert_grp_mask.

	opcodes/
	* bfin-dis.c (decode_pseudodbg_assert_0): Change according
	to the new encoding of DBGA, DBGAH, and DBGAL.
	(_print_insn_bfin): Likewise.
2009-09-04 04:29:42 +00:00
Jie Zhang ad15c38ee6 gas/
* config/bfin-parse.y: Remove trailing whitespace.
	(ccstat): Indent.
	* config/tc-bfin.c (struct bfin_reg_entry): Remove.
	(bfin_reg_info[]): Remove.

	opcodes/
	* bfin-dis.c (_print_insn_bfin): Don't declare.
	(print_insn_bfin): Don't declare.
	(dregs_pair): Remove.
	(ignore_bits): Remove.
	(ccstat): Remove.
2009-09-03 17:42:53 +00:00
Jie Zhang 118176876b * config/bfin-parse.y (gen_multi_instr_1): Check anomaly
05000074 only when both slot1 and slot2 are filled.

	testsuite/
	* gas/bfin/parallel5.s: New test.
	* gas/bfin/error.exp: New test.
2009-09-03 16:50:39 +00:00
Jie Zhang c958a8a8fb gas/
* config/bfin-defs.h (IS_GENREG): Define.
	(IS_DAGREG): Define.
	(IS_SYSREG): Define.
	* config/bfin-parse.y (asm_1): Check illegal register move
	instructions.

	gas/testsuite/
	* gas/bfin/expected_move_errors.s,
	gas/bfin/expected_move_errors.l: Add "LC1 = I0;".
	* gas/bfin/move.s, gas/bfin/move.d: Remove "CYCLES = A0.W".

	opcodes/
	* bfin-dis.c (IS_DREG): Define.
	(IS_PREG): Define.
	(IS_AREG): Define.
	(IS_GENREG): Define.
	(IS_DAGREG): Define.
	(IS_SYSREG): Define.
	(decode_REGMV_0): Check illegal register move instructions.
2009-09-03 16:17:36 +00:00
Jie Zhang 1d3ad4d0b0 * config/bfin-parse.y (asm_1): Fix a typo.
testsuite/
	* gas/bfin/expected_comparison_errors.l: Expect error on Line 13.
2009-09-03 15:48:16 +00:00
Jie Zhang d3a50e1419 * config/bfin-parse.y (asm_1): Add LOOP_BEGIN and LOOP_END.
* config/tc-bfin.c (bfin_start_line_hook): Remove.
	(bfin_loop_beginend): New.
	* config/tc-bfin.h (bfin_start_line_hook): Don't declare.
	(md_start_line_hook): Don't define.
	* config/bfin-aux.h (bfin_loop_beginend): Declare.

	testsuite/
	* gas/bfin/loop.s, gas/bfin/loop.d: New test.
	* gas/bfin/loop2.s, gas/bfin/loop2.d: New test.
	* gas/bfin/loop3.s, gas/bfin/loop3.d: New test.
	* gas/bfin/bfin.exp: Add the new tests.
2009-09-03 15:36:02 +00:00
Jie Zhang 958cff2f9b * config/bfin-parse.y (value_match): Use int instead of long.
From  Michael Frysinger  <michael.frysinger@analog.com>
	* config/bfin-defs.h (Expr_Node_Value): Declare the i_value
	member as long long.
2009-09-02 08:57:38 +00:00
Jie Zhang 39b4412d0f From Bernd Schmidt <bernd.schmidt@analog.com>
* config/gas/bfin-parse.y (asm_1): Clean up and unify error handling
	for load and store insns.
	(neg_value): Delete function.

	testsuite/
	From  Bernd Schmidt  <bernd.schmidt@analog.com>
	* gas/bfin/expected_errors.l, gas/bfin/expected_errors.s:
	Check error messages for invalid load/store insns.
2009-09-02 07:30:34 +00:00
Alan Modra aa820537ea update copyright dates 2009-09-02 07:25:43 +00:00
Jie Zhang 83ee431c60 * config/bfin-parse.y (asm_1): Only PREG and DREG are allowed
in comparison.

	testsuite/
	* gas/bfin/expected_comparison_errors.s: Add more cases.
	* gas/bfin/expected_comparison_errors.l: Update accordingly.
2009-09-01 07:21:42 +00:00
Bernd Schmidt 6306cd859b From Jie Zhang <jie.zhang@analog.com>
* config/tc-bfin.h (bfin_anomaly_checks): Declare.
	(AC_05000074): Define.
	(ENABLE_AC_05000074): Define.
	* config/tc-bfin.c (enum bfin_cpu_type): New.
	(bfin_cpu_t): Typedef.
	(bfin_cpu_type): Define.
	(bfin_si_revision): Define.
	(bfin_anomaly_checks): Define.
	(struct bfin_cpu): New.
	(bfin_cpus[]): New. (struct bfin_cpu_isa): Define.
	(bfin_isa): New global variable.
	(OPTION_MCPU): Define.
	(md_longopts[]): Add -mcpu option.
	(md_parse_option): Deal with -mcpu option and initialize
	bfin_anomaly_checks.
	* doc/c-bfin.texi: Rename BFIN to Blackfin throughout.  Document
	-mcpu option.
	* config/bfin-parse.y (gen_multi_instr_1): Check anomaly
	05000074.
2009-08-11 18:44:12 +00:00
Bernd Schmidt d55cb1c59e gas/
* config/bfin-parse.y (gen_multi_instr_1): New function.
	(asm): Use it instead of bfin_gen_multi_instr.
	(error): Add a format string when calling as_bad.
	* config/bfin-defs.h (insn_regmask): Declare.
	* config/tc-bfin.c (DREG_MASK, DREGH_MASK, DREGL_MASK, IREG_MASK): New
	macros.
	(decode_ProgCtrl_0, decode_LDSTpmod_0, decode_dagMODim_0,
	decode_dagMODik_0, decode_dspLDST_0, decode_LDST_0, decode_LDSTiiFP_0,
	decode_LDSTii_0, decode_dsp32mac_0, decode_dsp32mult_0,
	decode_dsp32alu_0, decode_dsp32shift_0, decode_dsp32shitimm_0,
	insn_regmask): New functions.
gas/testsuite/
	* gas/bfin/parallel.s: Add more test cases.
	* gas/bfin/parallel.d: Update accordingly.
	* gas/bfin/resource_conflict.l: New test.
	* gas/bfin/resource_conflict.s: New test.
	* gas/bfin/bfin.exp: Add resource_conflict.
2009-08-11 18:29:41 +00:00
Mike Frysinger baa3eb38df fix typo in gas error output (this is an assembler, not a compiler) 2009-08-11 17:16:37 +00:00
Nick Clifton f8f003f13a PR 10143
* config/bfin-parse.y (error): Use "%s" as format string for error
        message.
2009-05-26 15:35:37 +00:00
Alan Modra 8fc4ee9b84 * config/bfin-parse.y: Use C style comments.
* config/tc-bfin.c: Likewise.
	* config/tc-m68k.c: Likewise.
	* config/tc-mips.c: Likewise.
2008-10-20 01:03:50 +00:00
Jie Zhang 37b3293520 * config/bfin-parse.y (asm_1): Fix reduce/reduce conflicts. 2008-09-26 04:49:17 +00:00
Jie Zhang 6429b08478 * config/bfin-parse.y (check_macfunc_option): Fix instruction
mode checking.
	(asm_1): Check mode for 16-bit multiply instructions.

	testsuite/
	* gas/bfin/arith_mode.d: New test.
	* gas/bfin/arith_mode.s: New test.
	* gas/bfin/invalid_arith_mode.l: New test.
	* gas/bfin/invalid_arith_mode.s: New test.
	* gas/bfin/bfin.exp: Add arith_mode and invalid_arith_mode.
2008-08-26 10:03:24 +00:00
Jie Zhang 81fd73edd1 * config/bfin-parse.y (asm_1): Error if plain symbol is used
as load/store offset.
2008-07-24 07:25:13 +00:00
Bernd Schmidt ee171c8f94 gas/
* config/bfin-parse.y (check_macfunc_option): Allow (IU)
	option for multiply and multiply-accumulate to data register
	instruction.
	(check_macfuncs): Don't check if accumulator matches the data register
	here.
	(assign_macfunc): Check if accumulator matches the
	data register in each rule that moves to the data
	register.

gas/testsuite/
	* gas/bfin/arithmetic.s, gas/bfin/arithmetic.d: Add check
	for IU option.
	* gas/bfin/expected_errors.l, gas/bfin/expected_errors.s:
	Add check for mismatch of accumulator and data register.

opcodes/
	* bfin-dis.c (decode_dsp32mac_0): Decode (IU) option for
	multiply and multiply-accumulate to data register instruction.
2008-03-26 16:21:10 +00:00
Bernd Schmidt c1db045b89 gas/:
* config/bfin-parse.y (check_macfunc_option): New.
 	(check_macfuncs): Check option by calling check_macfunc_option.
	Fix comparison always true warnings.  Both scalar instructions
	of vector instruction must share the same mode option.  Only allow
	option mode at the end of the second instruction of the vector.
 	(asm_1): Check option by calling check_macfunc_option.

gas/testsuite/:
	* gas/bfin/expected_errors.l, gas/bfin/expected_errors.s: Add
	tests for bad options of "multiply and multipy-accumulate to
	accumulator" instructions.  Add new vector instruction option
	mode tests.
	* gas/bfin/vector2.s: Add new vector instruction option mode test.
	* gas/bfin/vector2.d: Adjust accordingly.

	* gas/bfin/expected_errors.s, gas/bfin/expected_errors.l: Add test
	for mismatched half registers in vector multipy-accumulate
	instructions.
2008-03-26 15:58:27 +00:00
Bernd Schmidt 99bfa74a53 gas/
From Jie Zhang  <jie.zhang@analog.com>
	* config/bfin-parse.y (asm_1): Check AREGS in comparison
	instructions. And call yyerror () when comparing PREG with
	DREG.

gas/testsuite/:
	* gas/bfin/expected_comparison_errors.l: New test.
	* gas/bfin/expected_comparison_errors.s: New test.
	* gas/bfin/bfin.exp: Add expected_comparison_errors.
2008-03-26 15:18:42 +00:00
Bernd Schmidt d908d8f43b * config/bfin-parse.y (asm_1): Slightly improve error messages
for "reg += const;".
2007-09-18 11:59:00 +00:00
Nick Clifton ec2655a6a7 Switch to GPLv3 2007-07-03 11:01:12 +00:00
Bernd Schmidt 7333257119 * config/bfin-parse.y (binary): Change sub of const to add of negated
const.
2006-09-18 20:13:23 +00:00
Bernd Schmidt c4ae04ceb1 * config/bfin-parse.y (binary): Do some more constant folding for
additions.
2006-09-15 17:02:35 +00:00
Alan Modra ebd1c8757c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
Jie Zhang f8fdc85041 * config/bfin-parse.y (check_macfunc): Loose the condition of
calling check_multiply_halfregs ().
2006-05-28 00:53:08 +00:00
Jie Zhang a32054651a * config/bfin-parse.y (asm_1): Better check and deal with
vector and scalar Multiply 16-Bit Operands instructions.
2006-05-25 04:07:08 +00:00
Jie Zhang 403022e0dc * config/bfin-defs.h (bfin_equals): Remove declaration.
* config/bfin-parse.y (asm_1): Remove "expr ASSIGN expr".
	* config/tc-bfin.c (bfin_name_is_register): Remove.
	(bfin_equals): Remove.
	* config/tc-bfin.h (TC_EQUAL_IN_INSN): Redefine as 1.
	(bfin_name_is_register): Remove declaration.
2006-05-23 04:23:41 +00:00
Bernd Schmidt 1ac4baeded * config/bfin-defs.h (Expr_Node_Type enum): Add Expr_Node_GOT_Reloc.
* config/bfin-lex.l: Recognize GOT17M4 and FUNCDESC_GOT17M4.
	* config/bfin-parse.y: Include "libbfd.h", "elf/common.h" and
	"elf/bfin.h".
	(GOT17M4, FUNCDESC_GOT17M4): New tokens of type <value>.
	(any_gotrel): New rule.
	(got): Use it, and create Expr_Node_GOT_Reloc nodes.
	* config/tc-bfin.c: Include "libbfd.h", "elf/common.h" and
	"elf/bfin.h".
	(DEFAULT_FLAGS, bfin_flags, bfin_pic_flag): New.
	(bfin_pic_ptr): New function.
	(md_pseudo_table): Add it for ".picptr".
	(OPTION_FDPIC): New macro.
	(md_longopts): Add -mfdpic.
	(md_parse_option): Handle it.
	(md_begin): Set BFD flags.
	(md_apply_fix3, bfin_fix_adjustable): Handle new relocs.
	(bfin_gen_ldstidxi): Adjust to match the trees that the parser gives
	us for GOT relocs.
	* Makefile.am (bfin-parse.o): Update dependencies.
	(DEPTC_bfin_elf): Likewise.
	* Makefile.in: Regenerate.
2006-03-26 01:12:07 +00:00
Jie Zhang b14273fe33 * config/bfin-parse.y (asm_1): Check value range for 16 bit immediate
in load immediate intruction.
2006-01-20 17:22:50 +00:00
Jie Zhang 39cd1c7675 * config/bfin-parse.y (value_match): Use correct conversion
specifications in template string for __FILE__ and __LINE__.
	(binary): Ditto.
	(unary): Ditto.
2006-01-20 16:57:09 +00:00
Jie Zhang 73562ad0c7 * config/bfin-defs.h (IS_BREG, IS_LREG): New macros.
* config/bfin-parse.y (asm_1): Check register type for load immediate
	instruction.
2005-11-18 14:21:29 +00:00
Catherine Moore 07c1b327c7 * Makefile.am: Bfin support.
* Makefile.in: Regenerated.
	* aclocal.m4: Regenerated.
	* configure: Regenerated.
	* configure.in: Bfin support.
	* configure.tgt: Bfin support.
	* config/bfin-aux.h: New file.
	* config/bfin-defs.h: New file.
	* config/bfin-lex.l: New file.
	* config/bfin-parse.y: New file.
	* config/tc-bfin.c: New file.
	* config/tc-bfin.h: New file.
	* doc/Makefile.am: Recognize c-bfin.texi.
	* doc/Makefile.in: Regenerated.
	* doc/all.texi: Bfin support.
	* doc/as.texinfo: Likewise.
	* doc/c-bfin.texi: Document bfin-specific syntax and
	directives.
2005-09-30 15:05:07 +00:00