aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-v850.c17
2 files changed, 18 insertions, 6 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 3a963dd..ee32278 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 <meissner@tiktok.cygnus.com>
* 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 6fb4ef0..b37bc2b 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,