Commit Graph

134 Commits

Author SHA1 Message Date
Jan Hubicka 23df107806 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
* tc-i386.c (i386_displacement): Fix handling of
	BFD_RELOC_X86_64_GOTPCREL.
	(i386_validate_fix): Likewise.
2001-02-12 16:47:15 +00:00
Kazu Hirata e5cb08ac57 2001-01-16 Kazu Hirata <kazu@hxi.com>
* config/tc-i386.c: Fix formatting.
2001-01-17 23:41:35 +00:00
Kazu Hirata bfb32b5207 2001-01-14 Kazu Hirata <kazu@hxi.com>
* config/tc-alpha.c: Fix formatting.
	* config/tc-arc.c: Likewise.
	* config/tc-arc.h: Likewise.
	* config/tc-d10v.c: Likewise.
	* config/tc-i370.c: Likewise.
	* config/tc-i386.c: Likewise.
	* config/tc-i960.c: Likewise.
	* config/tc-m68k.c: Likewise.
	* config/tc-ppc.c: Likewise.
	* config/tc-sparc.c: Likewise.
	* config/tc-tahoe.c: Likewise.
	* config/tc-vax.c: Likewise.
2001-01-14 18:54:06 +00:00
Jan Hubicka b9d79e0379 * tc-i386.h (TARGET_MACH): New macro.
(i386_mach): Declare.
	* tc-i386.c (i386_mach): New function.
2001-01-13 23:37:57 +00:00
Jan Hubicka e2914f484e * i386.c (md_assemble): Check cpu_flags even for nullary instructions.
* i386.h (i386_optab): Fix pusha and ret templates.

	* i386-dis.c (dis386_att, disx86_64_att): Fix ret, lret and iret
	templates.
2001-01-13 09:05:55 +00:00
Alan Modra 6e0b89ee6c Cure recent x86 warts. 2001-01-12 03:34:49 +00:00
Andreas Jaeger b77a7acd1b 2001-01-08 Bo Thorsen <bo@suse.de>
* config/tc-i386.c (i386_immediate, i386_displacement):
        GOTPCREL check fix.
2001-01-08 09:37:43 +00:00
Jan Hubicka b96d3a207a * configure.in: Define DEFAULT_ARCH for i386.
* tc-i386.c (md_assemble): Return after the error message;
	move testing for 64bit operands to proper place.

	* i386.exp: Add tests for presence of 32bit versus 64bit output
	format; run both 64bit and 32bit tests when format is available;
	add x86_64 test.
	* x86_64.s: New file.
	* x86_64.d: New file.
2001-01-06 12:36:04 +00:00
Jan Hubicka 7bc70a8e57 * tc-i386.c (md_assemble): Handle third byte of the opcode as prefix.
* i386.h (i386_optab): Make [sml]fence template to use immext field.
2001-01-05 12:30:12 +00:00
Jan Hubicka a167610dd0 * tc-i386.c (cpu_arch): Add Pentium4 and modify sledgehammer entry.
* NEWS: Add note about Pentium4 support.
2001-01-04 21:27:56 +00:00
Jan Hubicka 09f131f2b6 * tc-i387.c (pi, pte, pt): Update.
(type_names): Add new types.
2001-01-03 16:27:41 +00:00
H.J. Lu ec56dfb4b0 2000-12-22 H.J. Lu <hjl@gnu.org>
* config/tc-i386.c (reloc): Update the macro for non-bfd
	assembler.
	(BFD_RELOC_X86_64_GOTPCREL): Set to 0 for non-bfd assembler.
2000-12-22 20:53:35 +00:00
Jan Hubicka 3e73aa7c95 * tc-i386.h (i386_target_format): Define even for ELFs.
(QWORD_MNEM_SUFFIX): New macro.
	(CpuK6,CpuAthlon,CpuSledgehammer, Cpu64, CpuNo64, CpuUnknownFlags):
	New macros
	(CpuMMX,CpuSSE,Cpu3dnow, CpuUnknown): Renumber.
	(IgnoreSize, DefaultSize, No_?Suf, FWait, IsString, regKludge, IsPrefix,
	ImmExt): Renumber.
	(Size64, No_qSuf, NoRex64, Rex64): New macros.
	(Reg64, Imm32S, Imm64, Disp32S, Disp64): New macros.
	(Imm8, Imm8S, Imm16, Imm32, Imm1, BaseIndex, Disp8, Disp16, Disp32,
	InOutPortReg,ShiftCount, Control, Debug, Test, FloatReg, FloatAcc,
	SReg2, SReg3, Acc, JumpAbsolute, RegMMX, RegXMM, EsSeg, InvMem): Renumber.
	(Reg, WordReg): Add Reg64.
	(Imm): Add Imm32S and Imm64.
	(EncImm): New.
	(Disp): Add Disp64 and Disp32S.
	(AnyMem): Add Disp32S.
	(RegRex, RegRex64): New macros.
	(rex_byte): New type.
	* tc-i386.c (set_16bit_code_flag): Kill.
	(fits_in_unsigned_long, fits_in_signed_long): New functions.
	(reloc): New parameter "signed"; support x86_64.
	(set_code_flag): New.
	(DEFAULT_ARCH): New macro; default to "i386".
	(default_arch): New static variable.
	(struct _i386_insn): New fields Operand_PCrel; rex.
	(flag_16bit_code): Kill; All tests replaced to "flag_code == CODE_64BIT";
	(flag_code): New enum and static variable.
	(use_rela_relocations): New static variable.
	(flag_code_names): New static variable.
	(cpu_arch_flags): Default to CpuUnknownFlags|CpuNo64.
	(cpu_arch): Add "sledgehammer"; Add CPUAthlon to Athlon and CpuK6 to
	K6 and Athlon.
	(i386_align_code): Return plain "nop" for x86_64.
	(mode_from_disp_size): Support Disp32S.
	(smallest_imm_type): Support Imm32S and Imm64.
	(offset_in_range): Support size of 8.
	(set_cpu_arch): Do not clobber to Cpu64/CpuNo64.
	(md_pseudo_table): Add "code64"; use set_code_flat.
	(md_begin): Emit sane error message on hash failure.
	(tc_i386_fix_adjustable): Support x86_64 relocations.
	(md_assemble): Support QWORD_MNEM_SUFFIX, REX registers,
	instructions supported on particular arch just partially,
	output of 64bit immediates, handling of Imm32S and Disp32S type.
	(i386_immedaite): Support x86_64 relocations; support 64bit constants.
	(i386_displacement): Likewise.
	(i386_index_check): Cleanup; support 64bit addresses.
	(md_apply_fix3): Support x86_64 relocation and rela.
	(md_longopts): Add "32" and "64".
	(md_parse_option): Add OPTION_32 and OPTION_64.
	(i386_target_format): Call even for ELFs; choose between
	elf64-x86-64 and elf32-i386.
	(i386_validate_fix): Refuse GOTOFF in 64bit mode.
	(tc_gen_reloc): Support rela relocations and x86_64.
	(intel_e09_1): Support QWORD.

	* i386.h (i386_optab): Replace "Imm" with "EncImm".
	(i386_regtab): Add flags field.
2000-12-20 13:24:13 +00:00
Diego Novillo 21d6c4af5d 2000-12-15 Diego Novillo <dnovillo@redhat.com>
* config/tc-i386.c (intel_e09_1): Only flag as a memory operand if
	it's not an offset expression.
	(intel_e10_1): Ditto. Also, if the operand is an offset expression,
	keep the braces '[' and ']' in the output string.
	(intel_e11): Ditto. Also remove comparison intel_parser.op_modifier
	!= FLAT. There is no such op_modifier.
2000-12-16 05:45:08 +00:00
Jan Hubicka f16b83dfe5 * tc-i386.c (md_assemble): Refuse 's' and 'l' suffixes in the intel
mode; convert 'd' suffix to 's' or 'l'; remove all DWORD_MNEM_SUFFIX
	references.
	(intel_e09_1): Convert QWORD to 'l' suffix for FP operations; refuse
	otherwise.
	* tc-i386.h (DWORD_MNEM_SUFFIX): Kill.
	(No_dSuf): Kill.

	* i386.h (*_Suf): Remove No_dSuf.
	(d_suf, wld_Suf,sld_Suf, sldx_Suf, bwld_Suf, d_FP, sld_FP, sldx_FP)
	Remove.
	(i386_optab): Remove 'd' in the suffixes.
2000-12-11 14:01:46 +00:00
Alan Modra 50705ef487 Fix T_SHORT macro conflict. 2000-12-06 02:40:55 +00:00
Kazu Hirata bc80588841 2000-12-03 Kazu Hirata <kazu@hxi.com>
* tc-a29k.c: Fix formatting.
	* tc-alpha.c: Likewise.
	* tc-arm.c: Likewise.
	* tc-cris.c: Likewise.
	* tc-hppa.c: Likewise.
	* tc-i370.c: Likewise.
	* tc-i386.c: Likewise.
	* tc-i860.c: Likewise.
	* tc-i960.c: Likewise.
	* tc-ia64.c: Likewise.
	* tc-m68hc11.c: Likewise.
	* tc-m68k.c: Likewise.
	* tc-m88k.c: Likewise.
	* tc-pj.c: Likewise.
	* tc-ppc.c: Likewise.
	* tc-sh.c: Likewise.
	* tc-sparc.c: Likewise.
	* tc-tahoe.c: Likewise.
	* tc-vax.c: Likewise.
2000-12-03 06:49:23 +00:00
Diego Novillo 76a0ddacc0 2000-11-30 Diego Novillo <dnovillo@redhat.com>
* tc-i386.c (md_assemble): Swap i.disp_relocs when using intel
	syntax.

2000-11-30  Diego Novillo  <dnovillo@redhat.com>

	* intel.s, intel.d: New test for @GOT references.
2000-12-01 03:08:32 +00:00
Richard Henderson 316e2c0578 * config/tc-i386.c (md_pseudo_table): Add .file and .loc. 2000-11-17 18:15:53 +00:00
Richard Henderson e346e481c2 * config/tc-i386.c (md_assemble): Call dwarf2_emit_insn. 2000-11-17 09:28:04 +00:00
Kazu Hirata 4a1805b14d 2000-11-14 Kazu Hirata <kazu@hxi.com>
* config/aout_gnu.h: Fix formatting.
	* config/atof-vax.c: Likewise.
	* config/m68k-parse.h: Likewise.
	* config/m88k-opcode.h: Likewise.
	* config/obj-elf.c: Likewise.
	* config/tc-arm.c: Likewise.
	* config/tc-cris.c: Likewise.
	* config/tc-i386.c: Likewise.
	* config/tc-ia64.c: Likewise.
	* config/tc-mn10300.c: Likewise.
	* config/te-386bsd.h: Likewise.
	* config/te-hppa.h: Likewise.
	* config/te-nbsd.h: Likewise.
	* config/te-ppcnw.h: Likewise.
	* config/te-sparcaout.h: Likewise.
	* config/te-tmips.h: Likewise.
	* config/vax-inst.h: Likewise.
	* config/vms-conf.h: Likewise.
2000-11-14 20:57:30 +00:00
Diego Novillo cce0cbdcd7 2000-10-25 Diego Novillo <dnovillo@cygnus.com>
* tc-i386.c: Fix prototype declarations for functions taking no
	arguments.
2000-10-25 11:42:51 +00:00
Diego Novillo 64a0c77978 2000-10-24 Diego Novillo <dnovillo@cygnus.com>
* tc-i386.c (i386_operand_modifier): Remove.
	(build_displacement_string): Remove.
	(i386_parse_seg): Remove.
	(i386_intel_memory_operand): Remove.
	(i386_intel_operand): Re-write using recursive descent parser based
	on MASM documentation.
	(struct intel_parser_s): New structure.
	(intel_parser): New static variable.
	(struct intel_token): New structure.
	(cur_token, prev_token): New static variables.
	(T_NIL): Define.
	(T_CONST): Define.
	(T_REG): Define.
	(T_BYTE): Define.
	(T_WORD): Define.
	(T_DWORD): Define.
	(T_QWORD): Define.
	(T_XWORD): Define.
	(T_SHORT): Define.
	(T_OFFSET): Define.
	(T_PTR): Define.
	(T_ID): Define.
	(intel_match_token): New function.
	(intel_get_token): New function.
	(intel_putback_token): New function.
	(intel_expr): New function.
	(intel_e05): New function.
	(intel_e05_1): New function.
	(intel_e06): New function.
	(intel_e06_1): New function.
	(intel_e09): New function.
	(intel_e09_1): New function.
	(intel_e10): New function.
	(intel_e10_1): New function.
	(intel_e11): New function.

2000-10-24  Diego Novillo  <dnovillo@cygnus.com>

	* intel.s, intel.d: Add new tests for intel syntax.
2000-10-25 01:39:11 +00:00
Diego Novillo 6588847e4f gas:
2000-10-15  Diego Novillo  <dnovillo@cygnus.com>

	* config/tc-i386.c (i386_operand_modifier): Only match
	modifiers SHORT and FLAT if they are followed by a space.
	(parse_register): When `allow_naked_reg' is set, do not confuse
	identifiers that start with a register name with a register.

gas/testsuite:

2000-10-15  Diego Novillo  <dnovillo@cygnus.com>

	* intel.s, intel.d: Add new tests for naked registers using intel
	syntax.
2000-10-15 06:17:36 +00:00
Alan Modra ce8a8b2f62 Correct handling of non-global syms in linkonce sections.
Tidy a few comments.
2000-10-05 01:49:36 +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
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
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 45288df104 Fix a problem with 32-bit displacements in .code16gcc mode. 2000-06-22 10:49:13 +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
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
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
Alan Modra 65172ab8f7 Update md_shortopts to what we actually handle. 2000-06-03 13:06:33 +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
Alan Modra b98ef14717 Keep a reloc for jumps to weak and external symbols. 2000-05-22 11:38:43 +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
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 3b0ec529f2 Keep shift count smaller than 32. 2000-04-25 08:55:01 +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 847f7ad471 Fix 64-bit nits. 2000-04-10 12:36:06 +00:00
Alan Modra 726c5dcddf Correct 2000-02-26 change. 2000-04-03 11:19:51 +00:00
Alan Modra d0b4722035 Mostly cosmetic. Fixes to comments. Don't start as_bad and as_warn
messages with capital.  Don't malign Unixware, malign SysV386 instead.
2000-03-26 14:13:02 +00:00
Alan Modra 773f551c1d Catch some more cases where we can represent a 16 bit immediate operand as
8 bit sign extended.
2000-02-26 04:00:13 +00:00
Alan Modra cc5ca5ce51 Extend the i386 gas testsuite to do some tests for intel_syntax. Fix all
the errors exposed by this addition.  These were intel mode
"fi... word ptr", "fi... dword ptr", "jmp Imm seg, Imm offset", "out dx,al".
The failure with intel "out dx,al" was also present in att "out al,dx".
Extend testsuite to catch this case too.
2000-02-25 11:41:12 +00:00
Alan Modra 36bf8ab9fb Yet more .intel_syntax fixes. 2000-02-24 15:26:57 +00:00
Alan Modra 7f3f1ea2a1 Correct intel_syntax fsub* and fdiv* handling. Oh, how I'd like to be rid
of UNIXWARE_COMPAT.
2000-02-24 12:40:45 +00:00
Alan Modra 520dc8e893 config/tc-i386.c (struct _i386_insn): Combine disps, imms, regs into
a union.  Use throughout file.  Delete TC_RELOC macro.
2000-02-24 08:18:20 +00:00
Richard Henderson 7e0527420a * config/tc-i386.c (md_assemble): When swapping operands for
intel_syntax, assume everything that's not Imm or Disp is a
        register.
2000-02-24 00:43:29 +00:00
Alan Modra f6af82bd44 This lot mainly cleans up `comparison between signed and unsigned' gcc
warnings.  One usused var, and a macro parenthesis fix too.  Also check
input sections are elf when doing gc in elflink.h.
2000-02-21 12:01:27 +00:00
Alan Modra 4c63da97a7 This set of patches add support for aout emulation on the x86
assembler.  ie. You will be able to do "as --em=i386aout" on an x86
linux-elf assembler to generate aout format object files, rather than
using a separate assembler.  The aout emulation is enabled by giving
"--enable-targets=i386-linuxaout" to configure.
Oh yeah, there's a couple of fixes too.  Error messages shouldn't be
passed to printf in the format arg just in case someone puts a `%' in
the message.
2000-01-26 22:48:31 +00:00
Alan Modra add0c67765 Cosmetic changes to tc-i386.[ch] + extend x86 gas testsuite jmp and
call tests + tweak intel mode far call and jmp.
2000-01-15 12:06:03 +00:00
Alan Modra 3138f287b1 x86 indirect jump/call syntax fixes. Disassembly fix for lcall. 1999-12-27 16:10:31 +00:00
Alan Modra 2daf4fd896 * config/tc-i386.c (i386_immediate): Disallow O_big immediates.
(i386_displacement): Disallow O_big displacements.
1999-11-16 12:27:25 +00:00
Alan Modra c388dee89b Nit fix. 1999-10-12 11:07:34 +00:00
Ian Lance Taylor 4cc782b591 1999-09-19 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* config/tc-i386.c (md_shortopts): Check OBJ_MAYBE_ELF as well as
	OBJ_ELF.  If ELF, add "sq".
	(md_parse_option): If ELF, ignore -s and -q.
	(md_show_usage): Mention ELF options.
1999-09-19 23:03:56 +00:00
Alan Modra 2f66722d55 Hackery to handle ix86 "jmp constant" as a pc-relative jump to the given
absolute address.
1999-09-13 06:45:15 +00:00
Alan Modra a217f122fa Tidy jump handling code and comments. 1999-09-13 03:44:49 +00:00
Ian Lance Taylor d33e1d248c 1999-09-11 Donn Terry <donn@interix.com>
* config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust
	BFD_RELOC_RVA relocations.
1999-09-12 05:09:50 +00:00
Ian Lance Taylor c0c949c786 * config/tc-i386.c (md_apply_fix3): Add horrible adjustments to
the value if TE_PE and a global defined symbol.
1999-09-12 05:06:09 +00:00
Ian Lance Taylor 18dc2407f4 1999-09-11 Donn Terry <donn@interix.com>
* config/tc-i386.c (md_undefined_symbol): Compare the name against
	the macro GLOBAL_OFFSET_TABLE_NAME, rather than assuming that it
	starts with "_G".
1999-09-12 03:50:42 +00:00
Ian Lance Taylor 79d292aaa2 1999-09-11 Donn Terry <donn@interix.com>
* config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust
	relocations against global symbols if TE_PE.
1999-09-12 03:18:54 +00:00
Ian Lance Taylor 0723899b7e comment change 1999-09-12 02:27:31 +00:00
Ian Lance Taylor 2ab9b79ef9 1999-09-11 Donn Terry <donn@interix.com>
* config/atof-ieee.c (atof_ieee): Change what_kind to int.
	* config/atof-vax.c (flonum_gen2vax): Change format_letter to
	int.
	(md_atof): Return NULL rather than 0.
	* config/tc-i386.c (md_atof): Change type to int.
1999-09-12 02:12:38 +00:00
Alan Modra af6bdddf8c i386 gas code cleanups: combine i386_is_reg and parse_register. 1999-08-30 13:12:54 +00:00
Alan Modra 5f47d35be1 Allow spaces in i386 FP reg names, eg. %st ( 1 ). 1999-08-29 23:44:27 +00:00
Alan Modra b23bac3600 *gas/config/tc-i386.c: Fix errors in displacement size when
automatically inferring an address prefex.
1999-08-20 11:59:19 +00:00
Alan Modra bf6d389561 config/tc-i386.c: Remove dead code 1999-08-11 14:10:07 +00:00
Alan Modra eecb386cd7 Support for gcc to generate 16-bit i386 code. (.code16gcc) 1999-08-04 10:07:41 +00:00
Ian Lance Taylor a04b544b56 * config/obj-coff.c (coff_frob_symbol): Always update set_end with
next_set_end even if the end symbol is being discarded.

	* gasp.c: Add ATTRIBUTE_UNUSED as needed for non-BFD_ASSEMBLER.
	* output-file.c, symbols.c, config/tc-i386.c: Likewise.
	* config/obj-coff.c: Likewise.
	(seg_info_type): Remove.
	(seg_info_off_by_4): Change to array of segT.
	(s_get_segment): Adjust accordingly.
	(obj_pseudo_table): Fully initialize sentinel entry.
1999-08-03 15:29:04 +00:00
Alan Modra 24eab124bd Rationalize some of the i386 intel mode code.
Indentation and white space changes.
1999-08-03 14:30:05 +00:00
Alan Modra c3332e24e8 * config/tc-i386.c: Add INFER_ADDR_PREFIX code. Fix 16 bit mode nop. 1999-08-03 05:47:26 +00:00
Alan Modra b77ad1d4c9 Fix an overflow checking bug uncovered when a 32 bit target is compiled
with a 64 bit bfd.
1999-07-28 23:19:26 +00:00
Alan Modra b4cac588ae * gas/config/tc-i386.c: Fix for immediates and displacements in 16-bit
mode when no insn suffix present, eg. push $0x12345678.  Fix some
compiler warnings.  Disallow immediate jump absolute.
1999-07-16 11:09:15 +00:00
Ian Lance Taylor ab9da55419 * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
as appropriate.  Fill in structure initializations.  Add variable
	initializations.  Add casts.
	* dwarf2dbg.c (print_stats): Change i to size_t.
	* listing.c (listing_listing): Change list_line to unsigned int.
1999-07-11 20:20:04 +00:00
Ian Lance Taylor ae69440806 * config/tc-i386.c (i386_immediate): Remove unused label
seg_unimplemented.
1999-06-11 21:07:03 +00:00
Ian Lance Taylor 5865bb778d * config/tc-i386.c (md_apply_fix3): Add default case to switch. 1999-06-10 21:47:35 +00:00
Ian Lance Taylor 49309057b4 Add support for storing local symbols in a small structure to save
memory when assembling large files.
	* as.h: Don't include struc-symbol.h.
	(symbolS): Add typedef.
	* symbols.c: Include struc-symbol.h.
	(local_hash): New static variable.
	(save_symbol_name): New static function, from symbol_create.
	(symbol_create): Call save_symbol_name.
	(local_symbol_count): New static variable.
	(local_symbol_conversion_count): Likewise.
	(LOCAL_SYMBOL_CHECK): Define.
	(local_symbol_make): New static function.
	(local_symbol_convert): New static function.
	(colon): Handle local symbols.  Create local symbol for local
	label name.
	(symbol_table_insert): Handle local symbols.
	(symbol_find_or_make): Create local symbol for local label name.
	(symbol_find_base): Check for local symbol.
	(symbol_append, symbol_insert): Check for local symbols.
	(symbol_clear_list_pointers, symbol_remove): Likewise.
	(verify_symbol_chain): Likewise.
	(copy_symbol_attributes): Likewise.
	(resolve_symbol_value): Handle local symbols.
	(resolve_local_symbol): New static function.
	(resolve_local_symbol_values): New function.
	(S_GET_VALUE, S_SET_VALUE): Handle local symbols.
	(S_IS_FUNCTION, S_IS_EXTERNAL, S_IS_WEAK, S_IS_COMMON): Likewise.
	(S_IS_DEFINED, S_IS_DEBUG, S_IS_LOCAL, S_GET_NAME): Likewise.
	(S_GET_SEGMENT, S_SET_SEGMENT, S_SET_EXTERNAL): Likewise.
	(S_CLEAR_EXTERNAL, S_SET_WEAK, S_SET_NAME): Likewise.
	(symbol_previous, symbol_next): New functions.
	(symbol_get_value_expression): Likewise.
	(symbol_set_value_expression): Likewise.
	(symbol_set_frag, symbol_get_frag): Likewise.
	(symbol_mark_used, symbol_clear_used, symbol_used_p): Likewise.
	(symbol_mark_used_in_reloc): Likewise.
	(symbol_clear_used_in_reloc, symbol_used_in_reloc_p): Likewise.
	(symbol_mark_mri_common, symbol_clear_mri_common): Likewise.
	(symbol_mri_common_p): Likewise.
	(symbol_mark_written, symbol_clear_written): Likewise.
	(symbol_written_p): Likewise.
	(symbol_mark_resolved, symbol_resolved_p): Likewise.
	(symbol_section_p, symbol_equated_p): Likewise.
	(symbol_constant_p): Likewise.
	(symbol_get_bfdsym, symbol_set_bfdsym): Likewise.
	(symbol_get_obj, symbol_set_obj): Likewise.
	(symbol_get_tc, symbol_set_tc): Likewise.
	(symbol_begin): Initialize local_hash.
	(print_symbol_value_1): Handle local symbols.
	(symbol_print_statistics): Print local symbol statistics.
	* symbols.h: Include "struc-symbol.h" if not BFD_ASSEMBLER.
	Declare new symbols.c functions.  Move many declarations here from
	struc-symbol.h.
	(SYMBOLS_NEED_BACKPOINTERS): Define if needed.
	* struc-symbol.h (SYMBOLS_NEED_BACKPOINTERS): Don't set.
	(struct symbol): Move bsym to make it clearly the first field.
	Remove TARGET_SYMBOL_FIELDS.
	(symbolS): Don't typedef.
	(struct broken_word): Remove.
	(N_TYPE_seg, seg_N_TYPE): Move to symbol.h.
	(SEGMENT_TO_SYMBOL_TYPE, N_REGISTER): Likewise.
	(symbol_clear_list_pointers): Likewise.
	(symbol_insert, symbol_remove): Likewise.
	(symbol_previous, symbol_append): Likewise.
	(verify_symbol_chain, verify_symbol_chain_2): Likewise.
	(struct local_symbol): Define.
	(local_symbol_converted_p, local_symbol_mark_converted): Define.
	(local_symbol_resolved_p, local_symbol_mark_resolved): Define.
	(local_symbol_get_frag, local_symbol_set_frag): Define.
	(local_symbol_get_real_symbol): Define.
	(local_symbol_set_real_symbol): Define.
	Define.
	* write.c (write_object_file): Call resolve_local_symbol_values.
	* config/obj-ecoff.h (OBJ_SYMFIELD_TYPE): Define.
	(TARGET_SYMBOL_FIELDS): Don't define.
	* config/obj-elf.h (OBJ_SYMFIELD_TYPE): Add local field.  If
	ECOFF_DEBUGGING, add ECOFF fields.
	(ELF_TARGET_SYMBOL_FIELDS, TARGET_SYMBOL_FIELDS): Don't define.
	* config/obj-multi.h (struct elf_obj_sy): Add local field.  If
	ECOFF_DEBUGGING, add ECOFF fields.
	(ELF_TARGET_SYMBOL_FIELDS, TARGET_SYMBOL_FIELDS): Don't define.
	(ECOFF_DEBUG_TARGET_SYMBOL_FIELDS): Don't define.
	* config/tc-mcore.h: Don't include struc-symbol.h.
	(TARGET_SYMBOL_FIELDS): Don't define.
	(struct mcore_tc_sy): Define.
	(TC_SYMFIELD_TYPE): Define.
	* Many files: Use symbolS instead of struct symbol.  Use new
	accessor functions rather than referring to symbolS fields
	directly.
	* read.c (s_mri_common): Don't add in value of line_label.
	* config/tc-mips.c (md_apply_fix): Correct parenthesization when
	checking for SEC_LINK_ONCE.
	* config/tc-sh.h (sh_fix_adjustable): Declare.
1999-06-03 00:29:48 +00:00
Alan Modra e1b283bbb7 ÿ
Fiz i386-iaout breakage introduced by last patch.
1999-05-24 18:25:27 +00:00
Alan Modra 93382f6dd7 n
Move bitfield overflow checks to after the md_apply_fix call in
fixup_segment so that md_apply_fix has a chance to modify value.
Handle 8 and 16-bit pcrel relocs for i386.
Prototypes and other minor code cleanups.
1999-05-17 03:21:50 +00:00
Alan Modra 3f4438abfd ÿ
i386 PIII SIMD support, remove ReverseRegRegmem kludge
tidy a few things in i386 intel mode disassembly
1999-05-13 06:00:13 +00:00
Richard Henderson 83183c0c36 * config/tc-i386.c (i386_immediate): Skip whitespace before
complaining about junk after expression.
        (i386_displacement): Likewise.
1999-05-06 23:16:36 +00:00
Richard Henderson 252b5132c7 19990502 sourceware import 1999-05-03 07:29:11 +00:00