aboutsummaryrefslogtreecommitdiff
path: root/sim/sh/gencode.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2005-06-17 03:13:07 +0000
committerDaniel Jacobowitz <drow@false.org>2005-06-17 03:13:07 +0000
commit195b8a572e7c45d991906fd5b4e9fbbf5567abfd (patch)
treebac5f406171caff2b0cc6d62b4b90459f6f6b93e /sim/sh/gencode.c
parent61e264e76ff7593888235ec52bee559e80dcdbfe (diff)
downloadgdb-195b8a572e7c45d991906fd5b4e9fbbf5567abfd.zip
gdb-195b8a572e7c45d991906fd5b4e9fbbf5567abfd.tar.gz
gdb-195b8a572e7c45d991906fd5b4e9fbbf5567abfd.tar.bz2
* gencode.c (tab): Avoid lvalue casts. Suggested by
Ralf Corsepius <ralf.corsepius@rtems.org>.
Diffstat (limited to 'sim/sh/gencode.c')
-rw-r--r--sim/sh/gencode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c
index c3c8c05..e86bd29 100644
--- a/sim/sh/gencode.c
+++ b/sim/sh/gencode.c
@@ -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",