aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-mips.c
AgeCommit message (Collapse)AuthorFilesLines
2002-01-16 * config/tc-mips.c (percent_op): Ensure longer percent_op's areThiemo Seufer1-56/+86
matched before the shorter ones. (my_getSmallParser): Fix handling of nested parentheses in percent_op's. Code cleanup. (my_getPercentOp): New function, code from my_getSmallParser. (my_getSmallExpression): Fix handling of closing parentheses. Code cleanup. Better comments.
2002-01-052002-01-05 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz1-1/+46
* tc-mips.c (mips_cprestore_valid): New flag. (mips_frame_reg_valid): New flag. (macro) [M_JAL_2]: Check both flags. [M_JAL_A]: Likewise. (s_cprestore): Set mips_cprestore_valid. (tc_get_register): If setting mips_frame_reg, set mips_frame_reg_valid and clear mips_cprestore_valid. (s_mips_ent): Clear both flags. (s_mips_end): Clear both flags. 2002-01-05 Daniel Jacobowitz <drow@mvista.com> * gas/mips/jal-svr4pic.s: Add .ent and .frame directives. * gas/mips/mips-abi32-pic.s: Add .frame directive. * gas/mips/mips-gp32-fp32-pic.s: Likewise. * gas/mips/mips-gp32-fp64-pic.s: Likewise. * gas/mips/mips-gp64-fp32-pic.s: Likewise. * gas/mips/mips-gp64-fp64-pic.s: Likewise.
2001-12-202001-12-20 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>Daniel Jacobowitz1-2/+74
Daniel Jacobowitz <drow@mvista.com> * config/tc-mips.c (file_mips_gp32): Initialize to invalid value. (file_mips_fp32): Likewise. (md_begin): Compatibility handling for -mipsN option.
2001-12-04 * config.bfd: Remove trailing blanks.Thiemo Seufer1-43/+35
* elf32-mips.c (gprel16_with_gp): Remove superfluous casts. * strings.c (get_char): Initialize value. * config/tc-mips.c (mips_cpreturn_offset): Better comment. (load_register): Better error message. Cast away signedness mismatches. Add casts needed for varargs. (load_address): Replace checks of HAVE_64BIT_ADDRESS with dbl. Remove superfluous casts. (macro): Cast away signedness mismatches. Remove superfluous casts. (s_cpload): Fix wrong comment. (s_mips_weakext): Standardize output message. (get_number): Likewise.
2001-12-04 * config/tc-mips.c (append_insn): Add jump address range overflowThiemo Seufer1-0/+8
check.
2001-12-04 * config/tc-mips.c (md_parse_option): Fix comment. Allow -mabi optionThiemo Seufer1-2/+35
for ELF only. (show): Document -mabi option.
2001-12-042001-12-03 Eric Christopher <echristo@redhat.com>Eric Christopher1-1/+1
* config/tc-mips.c (tc_gen_reloc): One missed BFD_RELOC_MIPS_GPREL.
2001-12-02 * coff-mips.c (mips_bfd_reloc_type_lookup): ReplaceThiemo Seufer1-40/+39
BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16. * pe-mips.c (mips_bfd_reloc_type_lookup): Likewise. * elf32-mips.c (mips_reloc_map): Likewise. Replace BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32. * elf64-mips.c (mips_reloc_map): Likewise. * reloc.c (BFD_RELOC_MIPS_GPREL): Remove. (BFD_RELOC_MIPS_GPREL32): Remove. * config/tc-mips.c (macro_build): Replace BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16. (load_address): Likewise. (macro): Likewise. (md_apply_fix): Likewise. Replace BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32. (s_gpword): Replace BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32. (tc_gen_reloc): Replace BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16. *config/tc-mips.h: Replace BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
2001-11-21 * config/tc-mips.c (mips_need_elf_addend_fixup): New, extracted from...Richard Sandiford1-15/+37
(md_apply_fix3): ...here. Don't prevent the symbol value being subtracted twice from GPREL addends. (tc_gen_reloc): Add the symbol value to a GPREL addend if it was subtracted by the previous function.
2001-11-15Update all uses of md_apply_fix to use md_apply_fix3. Make it a void function.Nick Clifton1-8/+8
2001-11-15 * config/tc-mips.c (mips_ip): Re-allow %hi() op for non-ELF assembler.Thiemo Seufer1-3/+3
2001-11-12 * config/tc-mips.c (support_64bit_objects): Define for OBJ_ELF only.Thiemo Seufer1-52/+57
(md_longopts): Allow OPTION_MABI for ELF compilation only. RE-allow OPTION_GP32, OPTION_GP64, OPTION_FP32 for non-ELF compilation. Sort options a bit more logical. (md_parse_option): Allow OPTION_32, OPTION_N32, OPTION_N64, OPTION_MABI only for elf targets. * gas/mips/mips.exp: Change naming of some conditionals to reflect the object format they actually mean. Don't try mips-abi32 and mips-abi32-pic tests for ecoff.
2001-11-12 * config/tc-mips.c (set_at): Add cast needed for varargs.Thiemo Seufer1-181/+240
(load_register): Likewise. (macro): Likewise. Some code reformatting. (macro2): Add cast needed for varargs. (mips16_macro): Likewise.
2001-11-12 * config/tc-mips.c (md_assemble): Remove superflous casts.Thiemo Seufer1-42/+28
(append_insn): Likewise. (mips16_macro_build): Likewise. (macro): Likewise. (mips16_ip): Likewise. (s_cpload): Likewise. (mips_relax_frag): Likewise.
2001-11-12 * config/tc-mips.c (mips_abi_level): Move in front ofThiemo Seufer1-79/+74
mips_set_options. (mips_set_options): Add members gp32, fp32, abi. (file_mips_gp32): New flag. (file_mips_fp32): New flag. (mips_opts): Initialize the new members. (mips_gp32): Remove. (mips_fp32): Remove. (HAVE_32BIT_GPRS): Use the new values from mips_opts. (HAVE_32BIT_FPRS): Likewise. (HAVE_NEWABI): Likewise. (HAVE_64BIT_OBJECTS): Likewise. (md_begin): Likewise. Save default (file) values. (md_parse_option): Use the new values from mips_opts. (s_mipsset): Likewise. Fix logic to keep the ABI selection if possible. Let .set mipsN work together with .set push/pop. Enhance error messages. (mips_elf_final_processing): Use file_mips_* for header processing.
2001-11-08 * config/tc-mips.c (mips_force_relocation): Remove duplicate code.Thiemo Seufer1-7/+0
2001-11-062001-11-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>Eric Christopher1-13/+13
* config/tc-mips.c (my_getSmallParser): Fix small parser bug.
2001-11-01[ bfd/ChangeLog ]Chris Demetriou1-35/+84
2001-10-31 Chris Demetriou <cgd@demetriou.com> * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative relocations properly. [ gas/ChangeLog ] 2001-10-31 Chris Demetriou <cgd@broadcom.com> * config/tc-mips.c (HAVE_32BIT_ADDRESSES): If compiling embedded PIC code, assume pointers the same size as GPRs. (macro): In M_LA_AB handling for embedded PIC code, support "la $treg,foo-bar($breg)". In load/store handling (label ld_st) support "<op> $treg,<sym>-<local_sym>($breg)" which is used by the compiler for switch statements. In load/store double multi-instruction macro handling (label ldd_std) add a comment that no special handling is currently done for embedded PIC. (mips_ip): In 'o' (16-bit offset) case, only accept 16 bit offsets. [ gas/testsuite/ChangeLog ] 2001-10-31 Chris Demetriou <cgd@broadcom.com> * gas/mips/empic.s: Undo damage inflicted on 2000-12-02. * gas/mips/empic.d: Likewise. * gas/mips/elempic.d: Likewise (it was copied into other files). * gas/mips/telempic.d: Likewise. * gas/mips/tempic.d: Likewise. * gas/mips/empic2.s: New test to check new 'la' and 'lw' (and related ops) syntax, test loads with large offsets. * gas/mips/emcic2.d: Likewise. * gas/mips/mips.exp: Run the new test on ELF platforms.
2001-10-242001-10-24 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-0/+2
* config/tc-mips.c (hilo_interlocks, cop_interlocks): Make these evaluate to true if mips_arch indicates SB-1.
2001-10-212001-10-20 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-2/+2
* config/tc-mips.c (md_show_usage): Print "sb1" for Broadcom SB-1 CPU for consistency. (mips_cpu_info_table): Tweak comment about SB-1.
2001-10-17 * bit_fix.h: Comment typo fix.Alan Modra1-1/+1
* config/tc-mips.c: Likewise. * config/tc-sh.c: Likewise. * config/tc-arc.c (arc_code_symbol): Remove unnecessary test.
2001-10-15 * config/tc-mips.c (md_apply_fix): Preliminary handling of NewABIThiemo Seufer1-0/+15
relocations.
2001-10-11 * config/tc-alpha.c: Fix comment typos.Kazu Hirata1-9/+9
* config/tc-cris.c: Likewise. * config/tc-hppa.c: Likewise. * config/tc-i370.c: Likewise. * config/tc-mips.c: Likewise. * config/tc-mn10200.c: Likewise. * config/tc-mn10300.c: Likewise. * config/tc-sh.c: Likewise. * config/tc-tahoe.c: Likewise. * config/tc-v850.c: Likewise.
2001-10-10 * config/tc-mips.c (mips_cpreturn_offset): New variable.Thiemo Seufer1-33/+232
(mips_cpreturn_register): Likewise. (mips_gp_register): Likewise. (s_cpsetup): New function prototype. (s_cplocal): Likewise. (s_cpreturn): Likewise. (s_gpvalue): Likewise. (mips_pseudo_table): Add .cpsetup, .cplocal, .cpreturn, .gpvalue pseudo-ops. (macro): Don't warn about .cprestore for NewABI. (md_pcrel_from): Code cleanup. (mips_force_relocation): Force output of some NewABI relocations even without a defined symbol. (s_cpload): Ignore .cpload for NewABI. (s_cpsetup): Handle .cpsetup. (s_cplocal): Handle .cplocal. (s_cprestore): Ignore .cprestore for NewABI. (s_cpreturn): Handle .cpreturn. (s_gpvalue): Handle .gpvalue. (s_cpadd): Ignore .cpadd for NewABI. (nopic_need_relax): Take g_switch_value into account as gp optimization. (tc_gen_reloc): Don't handle BFD_RELOC_MIPS_{CALL,GOT}* for NewABI.
2001-10-10 * config/tc-mips.c (my_getSmallParser): New function prototype.Thiemo Seufer1-137/+233
(small_ex_type): Named this enum, more return values for my_getSmallExpression. (mips_ip): Allow SPC and HT between arguments. Handle some NewABI triple relocations. Protect some parts with ifdef OBJ_ELF. (percent_op_match): New struct, lookup table for %some_reloc(). (my_getSmallParser): New function, parses nested percent_ops also. (my_getSmallExpression): Rewite to support nested percent_ops.
2001-10-10 * config/tc-mips.cThiemo Seufer1-49/+254
(load_address): Support both 32- and 64-bit addresses. (macro): Call load_register correctly. Expand 64-bit loads ans stores. (macro2): Call load_address correctly.
2001-10-04 * config/tc-mips.c (prev_insn_reloc_type): Make it an array to hold aThiemo Seufer1-111/+306
relocation triple. (prev_insn_fixp): Likewise. (append_insn): Changed prototype to accept a relocation pointer. (imm_reloc): Make it an array. (offset_reloc): Likewise. (md_assemble): Handle triple relocations. (append_insn): Likewise. Add handling for some NewABI relocations. (mips_no_prev_insn): Handle triple relocations. (macro_build): Likewise. Add handling for some NewABI relocations. Move handling for the 'u' case to append_insn(). (mips16_macro_build): Handle triple relocations. (macro_build_lui): Likewise. Don't handle _gp_disp as special symbol for NewABI. (mips_ip): Handle triple relocations. (mips16_ip): Likewise. (mips_force_relocation): Force handling of triple relocations without symbols for NewABI. (md_apply_fix): Add handling for some NewABI relocations.
2001-10-03 * config/tc-mips.c (mips_64): Remove.Thiemo Seufer1-115/+136
(mips_target_format): Move downwards in file, use HAVE_64BIT_OBJECTS in it. (mips_abi_level, mips_abi): New enum. (mips_32bit_abi): Remove. (HAVE*PRS): Use mips_abi instead of mips_32bit_abi. (HAVE_NEWABI): New define. (HAVE_64BIT_OBJECTS): New define. (HAVE_32BIT_ADDRESSES): Don't return true for 64bit objects. (HAVE_64BIT_ADDRESSES): New define, inverse of HAVE_32BIT_ADDRESSES. (support_64bit_objects): New prototype. (md_begin): Use mips_abi instead of mips_32bit_abi. Don't write .reginfo section for n32, use .MIPS.options instead. (support_64bit_objects): New function, code from md_parse_option. (md_longopts): Add -n32 option. (md_parse_option): Use mips_abi instead of mips_32bit_abi/mips64. Add -n32 option. Protect with OBJ_ELF. (s_mipsset): Use mips_abi instead of mips_32bit_abi. (mips_elf_final_processing): Likewise. Don't write .reginfo section for n32, use .MIPS.options instead.
2001-09-19Locale changes from Bruno Haible <haible@clisp.cons.org>.H.J. Lu1-52/+54
2001-09-142001-09-14 Eric Christopher <echristo@redhat.com>Eric Christopher1-2/+0
* config/tc-mips.c (md_parse_option): Remove setting mips_64 via -mgp32/mgp64.
2001-09-12 * config/tc-mips.c (append_insn): Don't rightshift BFD_RELOC_16_PCREL.Thiemo Seufer1-1/+1
2001-09-09 * expr.c (expr): Move code setting "retval" to the end of the loop,Alan Modra1-2/+1
and rearrange for efficiency. For "PIC code" subtraction, use "rightseg" rather than recalculating. For "symbol OP symbol" subtract, set "retval" to absolute_section if symbols in same section. * symbols.c (resolve_symbol_value): Resolve "sym +/- expr" to an O_symbol. Simplify a +/- b code. Allow equality and non-equality comparisons on symbols from any section. Allow other comparison operators as for subtraction. (symbol_equated_reloc_p): New predicate function. * symbols.h (symbol_equated_reloc_p): Declare. * write.c (adjust_reloc_syms): Use symbol_equated_reloc_p. (write_relocs): Likewise. (write_object_file): Likewise. (relax_segment <rs_machine_dependent>): Ensure segment for expression syms is set correctly. * config/tc-mips.c (md_estimate_size_before_relax): Likewise. * config/tc-i386.c (md_assemble <Output jumps>): Don't lose part of a complex expression when setting up frag_var.
2001-09-07 Reallow unrestricted use of .set mipsX pseudo-op in gas.Thiemo Seufer1-0/+45
Update testcases accordingly.
2001-09-07 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handlingThiemo Seufer1-11/+33
of R_MIPS_PC16. * config/tc-mips.c (append_insn): Handle BFD_RELOC_16_PCREL. (macro_build): Use BFD_RELOC_16_PCREL_S2 only for embedded PIC, BFD_RELOC_16_PCREL for the rest. (mips_ip): Likewise. (md_pcrel_from): return the right offset for the differently shifted pcrel relocs. (md_apply_fix): Handle BFD_RELOC_16_PCREL. * gas/mips/beq.d: Check branches to external labels. * gas/mips/beq.s: Likewise. * gas/mips/bge.d: Likewise. * gas/mips/bge.s: Likewise. * gas/mips/bgeu.d: Likewise. * gas/mips/bgeu.s: Likewise. * gas/mips/blt.d: Likewise. * gas/mips/blt.s: Likewise. * gas/mips/bltu.d: Likewise. * gas/mips/bltu.s: Likewise. * gas/mips/elempic.d: Switch from R_MIPS_GNU_REL16_S2 to R_MIPS_PC16. * gas/mips/empic.d: Likewise. * gas/mips/empic.s: Likewise. * gas/mips/telempic.d: Likewise. * gas/mips/tempic.d: Likewise.
2001-08-312001-08-31 Eric Christopher <echristo@redhat.com>Eric Christopher1-17/+10
Jason Eckhardt <jle@redhat.com> * config/tc-mips.c (mips_cpu_info): Add support for mipsisa32, 5kc, and 20kc. Clean up old entries.
2001-08-27 * tc_mips.c (load_address): Reflect change to MAX_GPREL_OFFSET.Thiemo Seufer1-2/+2
(macro): Reflect change to MAX_GPREL_OFFSET.
2001-08-26 * tc_mips.h (MAX_GPREL_OFFSET): Change it to the maximum allowedThiemo Seufer1-16/+13
value, not the word beyond maximum. * tc_mips.c (macro_build_lui): Code cleanup. (macro): Reflect change to MAX_GPREL_OFFSET. (mips_ip): Check explicitly against S_EX_NONE. (my_get_SmallExpression): parse for %gp_rel, not %gprel. (md_apply_fix): Code cleanup.
2001-08-21 * tc_mips.c (md_begin): Warn about incompatibility between -march=FOOThiemo Seufer1-1/+17
and -mipsN option, continue with default ISA.
2001-08-21 * config/tc-mips.c (md_parse_option): #ifdef theThiemo Seufer1-3/+7
traditional/non-traditional names as it is done in mips_target_format.
2001-08-182001-08-18 H.J. Lu <hjl@gnu.org>H.J. Lu1-0/+1
* config/tc-mips.c (show): Add the missing prototype.
2001-08-18 * config/tc-mips.c (S_EX_*): New enum for my_getSmallExpression()Thiemo Seufer1-73/+149
return values. (mips_ip): Use the new return values instead of characters. Add support for %higher and %highest. (LP): Remove. (RP): Remove. (my_getSmallExpression): Make parsing case insensitive and more reliable. Add support for %higher and %highest. Further support to parse %gprel and %neg is implemented but currently deactivated.
2001-08-16Set MIPS n32 ABI flag in ELF header if appropriate.Thiemo Seufer1-0/+4
2001-08-16Remove obsolete special handling of 64bit Relocations.Thiemo Seufer1-31/+0
2001-08-11 * config/tc-mips.c: Fix a comment typo.Kazu Hirata1-1/+1
2001-08-10 * config/tc-mips.c (move_register): New function.Richard Sandiford1-13/+27
(macro_build): Remove OPCODE_IS_MEMBER's gp32 argument. (mips_ip): Likewise. (macro2): Use move_register rather than macro_build for moves. (mips16_macro): Likewise. (macro): Likewise. Handle M_MOVE.
2001-08-07Replace a bunch of magic constants in tc-mips.c with their properThiemo Seufer1-42/+48
defines from mips.h.
2001-08-07Some formatting fixes and assorted cleanup in tc-mips.c.Thiemo Seufer1-98/+55
2001-08-07 * config/tc-mips.c (md_begin): Take -mcpu value into account even whenThiemo Seufer1-13/+52
-mipsX is specified. Make both -mcpu/-march and -mcpu/-mtune pairs mutually exclusive (if they are different). (md_parse_option): Warn if an -march/-mtune/-mcpu/-m<cpu> option is set more than once.
2001-08-03 * config/tc-mips.c (md_apply_fix): Don't subtract the symbol valueRichard Sandiford1-1/+3
from GPREL addends.
2001-08-02 * doc/c-mips.tex (-mgp32, -mfp32): Added -mfp32, unified with -mgp32.Richard Sandiford1-252/+162
* config/tc-mips.c (mips_fp32, mips_32bit_abi): New static variables. (md_long_opts): Add -mfp32 option. (md_parse_option): Handle it. Set mips_32bit_abi given -mabi=32. (md_show_usage): Show usage for -mfp32 and -mgp32. (HAVE_32BIT_GPRS, HAVE_32BIT_FPRS): New macros. (HAVE_64BIT_GPRS, HAVE_64BIT_FPRS): New macros, inverse of the above. (HAVE_32BIT_ADDRESSES): New macro. (load_register): Use HAVE_32BIT_GPRS to determine the register width. (load_address): Use HAVE_32BIT_ADDRESSES to determine the address size. (s_cprestore, s_cpadd): Likewise. (macro): Use HAVE_32BIT_GPRS to determine the width of registers used in branch and M_LI_D macros. Use HAVE_64BIT_FPRS to determine the width registers used in M_LI_DD macros. Use HAVE_32BIT_ADDRESSES to determine the width of addresses in load, store and jump macros. (macro2): Use HAVE_32BIT_GPRS to determine the width of registers used in set instructions; do not check the address size for them. Use HAVE_32BIT_ADDRESSES to determine the width of addresses in unaligned load and store macros. (mips_ip): Use the new macros to check the width of a register when processing float constants. Force a constant into memory if it is destined for an FPR and the FPRs are wider than the GPRs. Warn about odd FPR numbers if HAVE_32BIT_FPRS. Use HAVE_32BIT_GPRS rather than mips_gp32 to select synthetic instructions. (macro_build): Use HAVE_32BIT_GPRS rather than mips_gp32 to select synthetic instructions.