From: Jeff Law Date: Wed, 23 Oct 1996 04:06:04 +0000 (+0000) Subject: * config/tc-v850.c (md_assemble): Handle TDAOFF relocs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8ea15b863f62e7b92e596d84978e7fa5a25c9a21;p=binutils-gdb.git * config/tc-v850.c (md_assemble): Handle TDAOFF relocs differently for movea & sst/sld insns. Working on tda for the v850. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 3a963dd3b88..ee3227816b7 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +start-sanitize-v850 +Tue Oct 22 22:01:25 1996 Jeffrey A Law (law@cygnus.com) + + * config/tc-v850.c (md_assemble): Handle TDAOFF relocs + differently for movea & sst/sld insns. + +end-sanitize-v850 Tue Oct 22 17:09:32 1996 Michael Meissner * config/tc-d10v.c (parallel_ok): Don't allow illegal combinations diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c index 6fb4ef0dc7d..b37bc2b52e6 100644 --- a/gas/config/tc-v850.c +++ b/gas/config/tc-v850.c @@ -501,7 +501,7 @@ md_assemble (str) struct v850_opcode *next_opcode; const unsigned char *opindex_ptr; int next_opindex; - unsigned long insn, size; + unsigned long insn, insn_size; char *f; int i; int match; @@ -749,11 +749,11 @@ md_assemble (str) Four byte insns have an opcode with the two high bits on. */ if ((insn & 0x0600) == 0x0600) - size = 4; + insn_size = 4; else - size = 2; - f = frag_more (size); - md_number_to_chars (f, insn, size); + insn_size = 2; + f = frag_more (insn_size); + md_number_to_chars (f, insn, insn_size); /* Create any fixups. At this point we do not use a bfd_reloc_code_real_type, but instead just use the @@ -777,11 +777,16 @@ md_assemble (str) abort(); size = bfd_get_reloc_size (reloc_howto); - offset = 4 - size; + + /* The "size" of a TDA_OFFSET reloc varies depending + on what kind of instruction it's used in! */ + if (reloc_howto->type == 11 && insn_size > 2) + size = 2; if (size < 1 || size > 4) abort(); + offset = 4 - size; fixP = fix_new_exp (frag_now, f - frag_now->fr_literal + offset, size, &fixups[i].exp, reloc_howto->pc_relative,