]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* gencode.c (tab): Avoid lvalue casts. Suggested by
authorDaniel Jacobowitz <drow@false.org>
Fri, 17 Jun 2005 03:13:07 +0000 (03:13 +0000)
committerDaniel Jacobowitz <drow@false.org>
Fri, 17 Jun 2005 03:13:07 +0000 (03:13 +0000)
Ralf Corsepius <ralf.corsepius@rtems.org>.

sim/sh/ChangeLog
sim/sh/gencode.c

index 8a6d6ff1ad697463445d8eea1fb45635597027c3..5d6a1461bca8a09404d0bf140ceac9bbd35cb7fe 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * gencode.c (tab): Avoid lvalue casts.  Suggested by
+       Ralf Corsepius <ralf.corsepius@rtems.org>.
+
 2005-04-12  Jonathan Larmour  <jifl@eCosCentric.com>
 
        * gencode.c (tab): Avoid inserting code before variables all declared.
index c3c8c055b774418ea9ec8d0e09295ea3a35058d7..e86bd298f68fd4e16301a2aefd90270620ef923a 100644 (file)
@@ -215,7 +215,9 @@ op tab[] =
     "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
     "if (R0 == 0)",
     "  R[n] = 0xffffffff;",
-    "else (unsigned int) R[n] = (unsigned int) R[n] / (unsigned int) R0;",
+    "/* FIXME: The result may be implementation-defined if it is outside */",
+    "/* the range of signed int (i.e. if R[n] was negative and R0 == 1).  */",
+    "else R[n] = R[n] / (unsigned int) R0;",
     "L (n);",
   },
   { "n", "0n", "mulr R0,<REG_N>", "0100nnnn10000000",