Commit graph

831 commits

Author SHA1 Message Date
Michael Meissner
653b59c8a6 Fix last fixes #2 1995-10-16 11:35:05 +00:00
Michael Meissner
17e2f77408 Fix last fixes 1995-10-16 11:23:34 +00:00
Michael Meissner
9f2c8daa27 Change error message 1995-10-16 11:18:23 +00:00
Michael Meissner
b6b8f91187 Allow duplicate cmp instructions for -mcom 1995-10-16 11:10:22 +00:00
Michael Meissner
27ec941d72 spelling typo 1995-10-16 10:34:21 +00:00
Michael Meissner
958e09079d For -mcom, do not allow only POWER|PPC instructions. 1995-10-16 10:27:49 +00:00
Michael Meissner
4c2935f4c0 Add -mcom support. 1995-10-16 02:09:01 +00:00
Ken Raeburn
70aeac05ee more vms work (mostly whitespace/comment cleanup) from Pat Rankin 1995-10-06 02:29:16 +00:00
Kim Knuttila
ca0bd54f8d Better parsing, tocd, tocv started 1995-10-04 21:02:22 +00:00
Ian Lance Taylor
cd557d83d6 * config/tc-ppc.c (ppc_frob_symbol): Don't create an aux entry for
an absolute symbol.
1995-10-04 18:05:59 +00:00
Ian Lance Taylor
a7512014c6 * config/tc-m68k.c (isbyte): Accept all values from -65536 to
+65535,	so ~VAL will not be rejected.
1995-10-04 18:02:13 +00:00
Ian Lance Taylor
11b072f46c * config/tc-ppc.h (tc_fix_adjustable): Define.
(ppc_pe_fix_adjustable): Declare.
	* config/tc-ppc.c (ppc_pe_fix_adjustable): New function.
1995-09-28 16:17:53 +00:00
Ian Lance Taylor
18c9057f2b * config/tc-ppc.h (OBJ_XCOFF): Define if OBJ_COFF and not TE_PE.
Change OBJ_COFF checks to check OBJ_XCOFF instead.
	(TARGET_FORMAT): Fully parenthesize.
	(LEX_QM): Define if TE_PE.
	* config/tc-ppc.c: Replace OBJ_COFF by OBJ_XCOFF throughout.
	Remove checks of TE_PE within #ifdef OBJ_XCOFF sections.
	(init_regtable): Make i unsigned.
	(ppc_set_current_section): Rename from setCurrentSection.  Change
	all callers.
	(ppc_arch): Return after as_fatal to avoid gcc warning.
	(md_assemble): Only declare reloc if OBJ_ELF.  Add default to
	switch on fixups[i].reloc to avoid gcc warning.
	(IMAGE_SGN_LNK_OTHER): Fix nested comment.
	(ppc_pe_function): Don't call ppc_canonicalize_symbol_name.
	(ppc_frob_symbol): Remove TE_PE section checks.
	(md_estimate_size_before_relax): Return after abort to avoid gcc
	warning.
	(md_apply_fix3): Add BFD_RELOC_16_GOT_PCREL to switch.
	* read.c (LEX_QM): Define as 0 if not defined.
	(lex_type): Use LEX_QM for '?'.
1995-09-27 19:02:16 +00:00
Kim Knuttila
943dbfb8e8 Added back some missing code @ diff tc-ppc.c 1995-09-27 16:03:36 +00:00
Michael Meissner
0e31d0ce8a Undo md_apply_fix3 changes 1995-09-27 15:37:54 +00:00
Kim Knuttila
1f7cc434dc Added assembler support for ppc/PE environments 1995-09-27 14:48:45 +00:00
Kim Knuttila
1d854da665 Added TE_PE target environment support 1995-09-27 14:47:41 +00:00
Michael Meissner
65c91be516 Support all of the V.4 relocations 1995-09-26 19:17:10 +00:00
Michael Meissner
4ecbc1efea Better reloc support 1995-09-25 20:15:13 +00:00
Michael Meissner
25b1cdd0f3 start at handling branch taken/branch not taken hints. 1995-09-22 20:42:38 +00:00
Michael Meissner
4493af6636 do not set EF_PPC_RELOCATABLE for -mrelocatable-lib 1995-09-22 01:19:53 +00:00
Michael Meissner
2c4747540f add -mrelocatable-lib, -memb support 1995-09-21 20:23:15 +00:00
Ian Lance Taylor
9adcd78108 * config/tc-m68k.c (m68k_ip): Reject immediate operands for '|'.
Replace 'P' with '0', '1', and '2'.
1995-09-19 19:33:48 +00:00
Ian Lance Taylor
e1c0287d1c * config/tc-m68k.c (parse_mri_control_operand): Change leftstop
and rightstop to not be const.
	(parse_mri_control_expression): Likewise.
	(build_mri_control_operand): Likewise.  Use m68k_ip_op to examine
	the operand, not m68k_reg_parse.
	(s_mri_if): In MRI mode, stop at the first '*'.
	(s_mri_while): Likewise.
	(s_mri_else): In MRI mode, ignore trailing characters.
	(s_mri_endi, s_mri_break, s_mri_next, s_mri_for): Likewise.
	(s_mri_endf, s_mri_repeat, s_mri_until, s_mri_endw): Likewise.
	* config/m68k-parse.y: Revert yesterday's change.
	* config/m68k-parse.h: Revert yesterday's change.
1995-09-19 15:36:38 +00:00
Ian Lance Taylor
b3625fe62c * config/tc-m68k.c (parse_mri_control_operand): Change leftstart
and rightstart to not be const.
	(parse_mri_control_expression): Likewise.
	(build_mri_control_operand): Likewise.  If the left side of the
	comparison is a register, and the right side is not, swap the two
	sides.
	* config/m68k-parse.y (m68k_reg_parse): Make globally visible.
	* config/m68k-parse.h (m68k_reg_parse): Declare.
1995-09-18 22:25:54 +00:00
Ian Lance Taylor
f9680a0598 * read.c (mri_comment_field): New function.
(mri_comment_end): New function.
	(s_align_bytes): Use mri_comment_field.
	(s_align_ptwo, s_comm, s_mri_common, s_fail, s_globl): Likewise.
	(s_float_space, s_struct): Likewise.
	(s_space): Use mri_comment_field rather than doing it by hand.
	(cons_worker, equals): Likewise.
	(s_end): Ignore comments starting with '*' or '!'.
	* read.h (mri_comment_field): Declare.
	(mri_comment_end): Declare.
	* cond.c (s_if): Use mri_comment_field.
	* config/tc-m68k.c (s_chip, s_reg): Likewise.
1995-09-18 21:53:40 +00:00
Ian Lance Taylor
3b06beb757 * write.c (fixup_segment): Handle ABS-sym in -sym case rather than
sym-sym case.
	* config/obj-coff.c (fixup_segment): Likewise.  Permit negative
	symbols if TC_M68K.
	* config/tc-m68k.c (tc_coff_fix2rtype): If fx_tcbit is set, return
	R_RELLONG_NEG.
	(tc_gen_reloc): If fx_tcbit is set, abort.
	(md_apply_fix_2): For a negative reloc, move fx_subsy to fx_addsy,
	and set fx_tcbit.
Permits generating negative relocs for m68k COFF.
1995-09-18 21:11:34 +00:00
Ian Lance Taylor
85f341221b * config/tc-m68k.c (s_reg): Ignore comment field in MRI mode. 1995-09-18 19:23:53 +00:00
Ken Raeburn
0afed96a34 in verbose mode add newline after files are processed 1995-09-18 16:28:11 +00:00
Jeff Law
326b087c89 * config/tc-m68k.c: Change some "CONST" references to "const".
Just changed those which caused redefinition errors on a system where
CONST != const.  Many more remain.
1995-09-16 03:44:03 +00:00
Ken Raeburn
d57bf0e0de vms updates 1995-09-15 21:41:56 +00:00
Ian Lance Taylor
f00f5ecd1d * write.c (relax_and_size_seg): Change to the segment we are
relaxing, in case md_convert_frag, called by cvt_frag_to_fill,
	wants to call fix_new.
	* config/tc-m68k.c (m68k_ip): Permit PC relative code if the
	segment of the symbol is the current segment, not just in
	text_section.
	(md_convert_frag_1): Don't call subseg_change.
	(md_estimate_size_before_relax): Likewise.
1995-09-13 17:19:27 +00:00
Ian Lance Taylor
92a25e12ff * app.c (do_scrub_chars): In MRI mode, keep a space before a
possible comment character.
	* config/tc-m68k.c (m68k_ip): In MRI mode, ignore anything after
	an instruction which takes no operands.
1995-09-08 19:17:46 +00:00
Steve Chamberlain
305a3af6e3 Thu Aug 31 16:41:06 1995 steve chamberlain <sac@slash.cygnus.com>
* write.c (fixup_segment): Remove change of 29th.
	* config/tc-{i386,arm}.h (TC_FORCE_RELOCATION): Keep RVA relocs.
1995-08-31 23:46:47 +00:00
David Edelsohn
593d18d36c * config/tc-sparc.c (sparc_ip): Clean up ASI support. 1995-08-29 22:48:54 +00:00
David Edelsohn
338a706070 * config/tc-arm.c (do_swi): Allow optional leading '#'. 1995-08-28 00:45:44 +00:00
Ian Lance Taylor
d634f0a8af * config/te-delta.h: Include obj-format.h.
* config/te-sco386.h: Likewise.
	* config/te-sysv32.h: Likewise.
1995-08-27 01:18:28 +00:00
Ken Raeburn
53499500e0 vms changes 1995-08-22 07:06:13 +00:00
Ian Lance Taylor
4026c1222f * read.c (read_a_source_file): In MRI mode, don't end the
statement inside a quotation.
	(s_space): Don't warn about a zero repeat count in MRI mode.
	* config/tc-m68k.c (crack_operand): In MRI mode, don't count
	parentheses inside quotes.
	(md_assemble): In MRI mode, anything after the operands field is a
	comment.
	(parse_mri_control_operand): Adjust start and stop to remove
	spaces.
	(s_mri_for): Likewise.
1995-08-21 21:05:06 +00:00
Ian Lance Taylor
7e047ac2c1 Add support for macros.
* as.c: Include sb.h and macro.h.
	(max_macro_next): New global variable.
	(main): Call macro_init.
	(macro_expr): New static function.
	* as.h (max_macro_nest): Declare.
	* read.c (line_label): Rename from mri_line_label.  Change all
	uses.
	(potable): Add exitm, irp, irpc, macro, mexit, rept.
	(read_a_source_file): Always clear line_label at the start of a
	line, not just when flag_mri or LABELS_WITHOUT_COLONS.  Fixup
	MRI/LABELS_WITHOUT_COLONS handling.  In MRI mode, permit label:
	equ val.  Set line_label when calling colon.  In MRI mode, a
	leading '.' does not imply a pseudo-op.  Check for macro expansion
	before calling md_assemble.
	(s_irp): New function.
	(get_line_sb): New static function.
	(s_macro): New function.
	(s_mexit): New function.
	(s_rept): New function.
	* read.h (line_label): Rename from mri_line_label.
	(s_irp, s_rept): Declare.
	(s_macro, s_mexit): Declare.
	* input-scrub.c: Include sb.h.
	(sb_index, from_sb): New static variables.
	(macro_nest): New static variable.
	(struct input_save): Add sb_index and from_sb fields.  Change
	next_saved_file field to be struct input_save *.
	(next_saved_file): Changed to be struct input_save *.
	(input_scrub_push): Change to return type struct input_save *.
	Save sb_index and from_sb.
	(input_scrub_pop): Change parameter type to struct input_save *.
	Restore sb_index and from_sb.
	(input_scrub_include_sb): New function.
	(input_scrub_next_buffer): Handle reading from from_sb.
	(bump_line_counters): Only increment lines if not using from_sb.
	* config/tc-m68k.c (opt_table): Add nest.
	(opt_nest): New static function.
	* gasp.c: Include sb.h and macro.h.  Move all sb related functions
	and definitions to sb.h and sb.c.  Move all macro related
	functions and definitions to macro.h and macro.c.
	* sb.h, sb.c: New files, extracted from gasp.c.
	* macro.h, macro.c: Likewise.
	* Makefile.in (OBJS): Add sb.o and macro.o
	(GASPOBJS): Define.
	(gasp.new): Depend upon $(GASPOBJS).  Use $(GASPOBJS) to link.
	(TARG_CPU_DEP_m68k): Depend upon subsegs.h.
	(gasp.o): Depend upon sb.h and macro.h.
	(sb.o): New target.
	(macro.o): New target.
	(as.o): Depend upon sb.h and macro.h.
	(input-scrub.o): Depend upon sb.h.
	(read.o): Depend upon sb.h and macro.h.
1995-08-21 18:35:11 +00:00
Michael Meissner
840886d875 Allow @HA, @L, and @H on constant expressions. 1995-08-21 17:47:01 +00:00
Ian Lance Taylor
b4ec75e09f * config/tc-m68k.c: Include subsegs.h.
(m68k_ip): Pass 64 rather than -1 to add_Fix in 'B' 'B' case.
	(md_pcrel_from): If fx_pcrel_adjust is 64, use -1 instead.
You can't portably store negative numbers in a char.
1995-08-18 15:02:56 +00:00
Ian Lance Taylor
4c67b523a3 * config/tc-sparc.c (tc_gen_reloc): If PIC, only change PCREL_S2
to WPLT30 for an undefined or external symbol.  Don't consider
	PC10 or PC22 to be a PC relative reloc when choosing between
	fx_addnumber and fx_offset.
1995-08-16 20:21:49 +00:00
Ian Lance Taylor
8e11ad0acd * config/tc-m68k.c (s_reg): Rename local op to rop to avoid
confusion with macro op.
1995-08-14 21:33:29 +00:00
Ian Lance Taylor
9bef2324a2 * config/tc-m68k.c (s_opt): Reset *input_line_pointer even if we
don't do anything with the option.
1995-08-14 19:50:12 +00:00
Jeff Law
5ae218df2a * config/tc-hppa.c (md_pseudo_table): Add entries for
"begin_brtab" and "end_brtab" pseudo-ops.
	(pa_brtab): New function.
	(tc_gen_reloc, SOM version): Handle R_BEGIN_BRTAB and R_END_BRTAB.
	(hppa_force_relocation): Force relocations for BRTAB fixups
	when OBJ_SOM is defined.

More infrastructure for PA optimziations.
1995-08-13 06:39:39 +00:00
Ian Lance Taylor
336435bc4d * config/tc-m68k.c (m68k_ip): When recognizing '#', use isbyte and
iword rather than expr8 and expr16.  When recognizing 'M', use
	issbyte rather than expr8.  When recognizing 'Q' and 't', just
	check for O_constant rather than using expr8.
	* config/m68k-parse.h (expr8, expr16): Don't define.
	* Makefile.in (m68k-parse.o): Depend upon m68k-parse.h, not
	m68k-parse.y.
1995-08-10 16:43:00 +00:00
Ian Lance Taylor
e14994d980 * read.c (potable): Add spc, ttl, xcom, xref.
(s_mri_sect): New function.
	* read.h (s_mri_sect): Declare.
	* config/obj-coff.c (obj_coff_section) (both versions): In MRI
	mode, call s_mri_sect.
	(obj_pseudo_table): Add sect.s and section.s.  Move sect outside
	of ifndef BFD_ASSEMBLER.
	* config/obj-elf.c (elf_pseudo_table): Add section.s, sect,
	sect.s.
	(obj_elf_section): In MRI mode, call s_mri_sect.
	* config/tc-m68k.c (md_pseudo_table): Add restore, save.
	(struct save_opts): Define.
	(save_stack): New static variable.
	(s_save, s_restore): New static functions.
1995-08-10 16:19:34 +00:00
Ian Lance Taylor
a920b69312 * read.c (s_set): Remove unused local ptr.
(hex_float): Check target_big_endian.
	(equals): Remove unused local p.
	* config/tc-a29k.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-h8500.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-hppa.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-i860.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-m68k.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-m88k.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-tahoe.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-sh.c (little): Set target_big_endian.
	(md_begin): Likewise.
	(md_parse_option): Likewise.
	(build_relax): Check target_big_endian rather than shl.
	(build_Mytes, md_atof): Likewise.
	(md_convert_frag, md_apply_fix): Likewise.
	(md_number_to_chars): Likewise.
1995-08-10 04:44:59 +00:00
Ian Lance Taylor
6700d36e84 * config/tc-m68k.c (m68k_abspcadd): New static variable.
(m68k_quick): New static variable.
	(m68k_rel32): New static variable.
	(md_pseudo_table): Add opt and reg.
	(m68k_ip): Permit absolute symbols in 'l'/'L' recognition.  Check
	m68k_quick in 'M' and 'Q' recognition.  Check m68k_abspcadd in
	DISP handling.  Check m68k_rel32 in BASE/POST/PRE handling.
	(md_begin): In MRI mode, initialize m68k_abspcadd and m68k_rel32.
	In MRI mode, change unsized branch aliases to be variable sized.
	(struct opt_action): Define.
	(opt_table): Define.
	(s_opt): New static function.
	(skip_to_comma): New static function.
	(opt_chip): New static function.
	(opt_list): New static function.
	(opt_list_symbols): New static function.
	(s_reg): New static function.
	* as.h (flag_keep_locals): Change from unsigned char to int.
	(flag_no_warnings): Likewise.
1995-08-09 23:22:13 +00:00