ld/ARM: Fix IFUNC and TLS descriptors in the same shared object
[deliverable/binutils-gdb.git] / gas / config / tc-dlx.c
index a629533b93cc4bd1b239f601a4bee98ea5c49a8b..3c487f25a27eb06437d368e25c60ade3f6726d3b 100644 (file)
@@ -1,6 +1,5 @@
 /* tc-dlx.c -- Assemble for the DLX
-   Copyright 2002, 2003, 2004, 2005, 2007, 2009, 2010, 2012
-   Free Software Foundation, Inc.
+   Copyright (C) 2002-2014 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -667,6 +666,9 @@ machine_ip (char *str)
   expressionS *operand = &the_operand;
   unsigned int reg, reg_shift = 0;
 
+  memset (&the_insn, '\0', sizeof (the_insn));
+  the_insn.reloc = NO_RELOC;
+
   /* Fixup the opcode string to all lower cases, and also
      allow numerical digits.  */
   s = str;
@@ -691,19 +693,12 @@ machine_ip (char *str)
       return;
     }
 
-  /* Hash the opcode, insn will have the string from opcode table.
-     also initialized the_insn struct.  */
+  /* Hash the opcode, insn will have the string from opcode table.  */
   if ((insn = (struct machine_opcode *) hash_find (op_hash, str)) == NULL)
     {
       /* Handle the ret and return macro here.  */
       if ((strcmp (str, "ret") == 0) || (strcmp (str, "return") == 0))
-       {
-         memset (&the_insn, '\0', sizeof (the_insn));
-         the_insn.reloc = NO_RELOC;
-         the_insn.pcrel = 0;
-         the_insn.opcode =
-           (unsigned long)(JROP | 0x03e00000);    /* 0x03e00000 = r31 << 21 */
-       }
+       the_insn.opcode = JROP | 0x03e00000;    /* 0x03e00000 = r31 << 21 */
       else
        as_bad (_("Unknown opcode `%s'."), str);
 
@@ -711,9 +706,6 @@ machine_ip (char *str)
     }
 
   opcode = insn->opcode;
-  memset (&the_insn, '\0', sizeof (the_insn));
-  the_insn.reloc = NO_RELOC;
-  the_insn.pcrel = 0;
 
   /* Set the sip reloc HI16 flag.  */
   if (!set_dlx_skip_hi16_flag (1))
This page took 0.024088 seconds and 4 git commands to generate.