aboutsummaryrefslogtreecommitdiff
path: root/sim/mn10300
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2011-06-20 16:50:51 +0000
committerNick Clifton <nickc@redhat.com>2011-06-20 16:50:51 +0000
commitbe07a3d39e44e32d4a918efc9febfd14aec01de3 (patch)
treecd202d7498fab7e56a617476e76e9620303c8575 /sim/mn10300
parentade78dba78cd284ca34c045657f4f549da99993f (diff)
downloadgdb-be07a3d39e44e32d4a918efc9febfd14aec01de3.zip
gdb-be07a3d39e44e32d4a918efc9febfd14aec01de3.tar.gz
gdb-be07a3d39e44e32d4a918efc9febfd14aec01de3.tar.bz2
* am33.igen (sub Rm,Rn,Rd): Fix computation of carry flag.
Diffstat (limited to 'sim/mn10300')
-rw-r--r--sim/mn10300/ChangeLog4
-rw-r--r--sim/mn10300/am33.igen2
2 files changed, 5 insertions, 1 deletions
diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog
index 2077186..1543b03 100644
--- a/sim/mn10300/ChangeLog
+++ b/sim/mn10300/ChangeLog
@@ -1,3 +1,7 @@
+2011-06-20 Nick Clifton <nickc@redhat.com>
+
+ * am33.igen (sub Rm,Rn,Rd): Fix computation of carry flag.
+
2011-01-11 Andrew Burgess <aburgess@broadcom.com>
* interp.c (sim_store_register): Update return value to
diff --git a/sim/mn10300/am33.igen b/sim/mn10300/am33.igen
index f17283c..5bc96ac 100644
--- a/sim/mn10300/am33.igen
+++ b/sim/mn10300/am33.igen
@@ -2573,7 +2573,7 @@
z = (difference == 0);
n = (difference & 0x80000000);
- c = (source1 > source1);
+ c = (source1 > source2);
v = ((source1 & 0x80000000) == (source2 & 0x80000000)
&& (source1 & 0x80000000) != (difference & 0x80000000));