From: Jeff Law Date: Mon, 21 Jul 1997 14:54:49 +0000 (+0000) Subject: * config/tc-v850.c (system_registers): Fix ordering of registers. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=47bfb6fce30c95621eec22581cb453b34b16a288;p=binutils-gdb.git * config/tc-v850.c (system_registers): Fix ordering of registers. pr12913 (c/h from nec). --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 81acdbcd847..b6a70be95b3 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +start-sanitize-v850 +Mon Jul 21 08:57:17 1997 Jeffrey A Law (law@cygnus.com) + + * config/tc-v850.c (system_registers): Fix ordering of registers. + +end-sanitize-v850 start-sanitize-tic80 Tue Jul 15 16:29:54 1997 Fred Fish diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c index 10bf110f2c5..5c920a2c0bd 100644 --- a/gas/config/tc-v850.c +++ b/gas/config/tc-v850.c @@ -1,6 +1,5 @@ /* tc-v850.c -- Assembler code for the NEC V850 - - Copyright (C) 1996 Free Software Foundation. + Copyright (C) 1996, 1997 Free Software Foundation. This file is part of GAS, the GNU Assembler. @@ -146,11 +145,11 @@ static const struct reg_name pre_defined_registers[] = static const struct reg_name system_registers[] = { + { "ecr", 4 }, { "eipc", 0 }, { "eipsw", 1 }, { "fepc", 2 }, { "fepsw", 3 }, - { "ecr", 4 }, { "psw", 5 }, }; #define SYSREG_NAME_CNT (sizeof(system_registers) / sizeof(struct reg_name)) @@ -676,6 +675,10 @@ md_assemble (str) if (fc > MAX_INSN_FIXUPS) as_fatal ("too many fixups"); + /* Adjust any offsets for sst.{h,w}/sld.{h,w} instructions */ + if (operand->flags & V850_OPERAND_ADJUST_SHORT_MEMORY) + ex.X_add_number >>= 1; + fixups[fc].exp = ex; fixups[fc].opindex = *opindex_ptr; fixups[fc].reloc = reloc; @@ -827,7 +830,9 @@ md_assemble (str) if (relaxable && fc > 0) { f = frag_var (rs_machine_dependent, 6, 4, 0, - fixups[0].exp.X_add_symbol, 0, (char *)fixups[0].opindex); + fixups[0].exp.X_add_symbol, + fixups[0].exp.X_add_number, + (char *)fixups[0].opindex); insn_size = 2; md_number_to_chars (f, insn, insn_size); md_number_to_chars (f + 2, 0, 4); @@ -904,7 +909,7 @@ tc_gen_reloc (seg, fixp) fixS *fixp; { arelent *reloc; - reloc = (arelent *) bfd_alloc_by_size_t (stdoutput, sizeof (arelent)); + reloc = (arelent *) xmalloc (sizeof (arelent)); reloc->sym_ptr_ptr = &fixp->fx_addsy->bsym; reloc->address = fixp->fx_frag->fr_address + fixp->fx_where; reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type);