* gencode.c (build_instruction) [MUL]: Cast operands to word64, to
authorIan Lance Taylor <ian@airs.com>
Thu, 19 Dec 1996 19:08:46 +0000 (19:08 +0000)
committerIan Lance Taylor <ian@airs.com>
Thu, 19 Dec 1996 19:08:46 +0000 (19:08 +0000)
force a 64 bit multiplication.
(build_instruction) [OR]: In mips16 mode, don't do anything if the
destination register is 0, since that is the default mips16 nop
instruction.

sim/mips/ChangeLog
sim/mips/gencode.c

index 00923df829e19ee9457fa98ecd62fdbfc20ab3f7..6b76eb984055bf2a2bd4b1754f235a3d6633a090 100644 (file)
@@ -1,3 +1,11 @@
+Thu Dec 19 14:07:27 1996  Ian Lance Taylor  <ian@cygnus.com>
+
+       * gencode.c (build_instruction) [MUL]: Cast operands to word64, to
+       force a 64 bit multiplication.
+       (build_instruction) [OR]: In mips16 mode, don't do anything if the
+       destination register is 0, since that is the default mips16 nop
+       instruction.
+
 Mon Dec 16 14:59:38 1996  Ian Lance Taylor  <ian@cygnus.com>
 
        * gencode.c (MIPS16_DECODE): SWRASP is I8, not RI.
index bf3d0edae77bdb5a15702cc65c94f3962031ea84..023c99dd4458247f168afda68d8540935ea3d785 100644 (file)
@@ -1622,7 +1622,7 @@ build_instruction (doisa, features, mips16, insn)
        if (insn->flags & UNSIGNED)
         printf("   uword64 temp = ((uword64)(op1 & 0xffffffff) * (uword64)(op2 & 0xffffffff));\n");
        else
-        printf("   uword64 temp = (op1 * op2);\n");
+        printf("   uword64 temp = ((word64) op1 * (word64) op2);\n");
        printf("   LO = SIGNEXTEND((%s)WORD64LO(temp),32);\n",regtype);
        printf("   HI = SIGNEXTEND((%s)WORD64HI(temp),32);\n",regtype);
      }
@@ -1795,6 +1795,11 @@ build_instruction (doisa, features, mips16, insn)
      break ;
 
     case OR:
+     /* The default mips16 nop instruction does an or to register
+        zero; catch that case, so that we don't get useless warnings
+        from the simulator.  */
+     if (mips16)
+       printf ("   if (destreg != 0)\n");
      printf("   GPR[destreg] = %s(op1 | op2);\n",((insn->flags & NOT) ? "~" : ""));
      break ;
 
This page took 0.029097 seconds and 4 git commands to generate.