This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[Patch] Small i860 clean-ups and fixes (committed)
- From: Jason Eckhardt <jle at owlnet dot rice dot edu>
- To: <binutils at sources dot redhat dot com>
- Date: Sun, 18 May 2003 16:29:33 -0500 (CDT)
- Subject: [Patch] Small i860 clean-ups and fixes (committed)
2003-05-18 Jason Eckhardt <jle@rice.edu>
gas:
* config/tc-i860.c (i860_process_insn): Initialize fc after
each opcode mismatch.
include/opcode:
* i860.h (form, pform): Add missing .dd suffix.
opcodes:
* i860-dis.c (print_insn_i860): Instruction shrd has a dual bit,
print it.
bfd:
* elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
Index: bfd/elf32-i860.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-i860.c,v
retrieving revision 1.20
diff -u -p -r1.20 elf32-i860.c
--- bfd/elf32-i860.c 12 May 2003 03:08:02 -0000 1.20
+++ bfd/elf32-i860.c 18 May 2003 21:02:20 -0000
@@ -803,7 +803,7 @@ elf32_i860_relocate_highadj (input_bfd,
insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
value += rel->r_addend;
- value += (value & 0x8000) << 1;
+ value += 0x8000;
value = ((value >> 16) & 0xffff);
insn = (insn & 0xffff0000) | value;
Index: gas/config/tc-i860.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-i860.c,v
retrieving revision 1.15
diff -u -p -r1.15 tc-i860.c
--- gas/config/tc-i860.c 12 May 2003 03:35:34 -0000 1.15
+++ gas/config/tc-i860.c 18 May 2003 21:02:25 -0000
@@ -477,6 +477,7 @@ i860_process_insn (str)
int t;
opcode = insn->match;
memset (&the_insn, '\0', sizeof (the_insn));
+ fc = 0;
for (t = 0; t < MAX_FIXUPS; t++)
{
the_insn.fi[t].reloc = BFD_RELOC_NONE;
Index: include/opcode/i860.h
===================================================================
RCS file: /cvs/src/src/include/opcode/i860.h,v
retrieving revision 1.5
diff -u -p -r1.5 i860.h
--- include/opcode/i860.h 18 Nov 2002 16:49:56 -0000 1.5
+++ include/opcode/i860.h 18 May 2003 21:02:36 -0000
@@ -478,8 +478,8 @@ static const struct i860_opcode i860_opc
{ "pfaddp", 0x48000450, 0xb40001af, "e,f,g", 0 }, /* pfaddp fsrc1,fsrc2,fdest */
{ "faddz", 0x480001d1, 0xb400042e, "e,f,g", 0 }, /* faddz fsrc1,fsrc2,fdest */
{ "pfaddz", 0x480005d1, 0xb400002e, "e,f,g", 0 }, /* pfaddz fsrc1,fsrc2,fdest */
-{ "form", 0x480001da, 0xb4000425, "e,g", 0 }, /* form fsrc1,fdest */
-{ "pform", 0x480005da, 0xb4000025, "e,g", 0 }, /* pform fsrc1,fdest */
+{ "form.dd", 0x480001da, 0xb4000425, "e,g", 0 }, /* form fsrc1,fdest */
+{ "pform.dd", 0x480005da, 0xb4000025, "e,g", 0 }, /* pform fsrc1,fdest */
/* Floating point pseudo-instructions. */
{ "fmov.ss", 0x48000049, 0xb7e005b6, "e,g", 0 }, /* fiadd.ss fsrc1,f0,fdest */
Index: opcodes/i860-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/i860-dis.c,v
retrieving revision 1.2
diff -u -p -r1.2 i860-dis.c
--- opcodes/i860-dis.c 9 Aug 2000 03:33:42 -0000 1.2
+++ opcodes/i860-dis.c 18 May 2003 21:02:37 -0000
@@ -138,8 +138,11 @@ print_insn_i860 (memaddr, info)
const char *s;
int val;
- /* If this a flop and its dual bit is set, prefix with 'd.'. */
- if ((insn & 0xfc000000) == 0x48000000 && (insn & 0x200))
+ /* If this a flop (or a shrd) and its dual bit is set,
+ prefix with 'd.'. */
+ if (((insn & 0xfc000000) == 0x48000000
+ || (insn & 0xfc000000) == 0xb0000000)
+ && (insn & 0x200))
(*info->fprintf_func) (info->stream, "d.%s\t", opcode->name);
else
(*info->fprintf_func) (info->stream, "%s\t", opcode->name);