summaryrefslogtreecommitdiff
path: root/target-sparc
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-22 16:52:28 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-22 16:52:28 +0000
commit1121f87961e87563df65134b15db05c0c2cc67da (patch)
treeefcf081613c900fcb030f38ca19f37868708c9cf /target-sparc
parent64c68080da429edf30a9857e3a698cb9ed335bd3 (diff)
downloadqemu-1121f87961e87563df65134b15db05c0c2cc67da.tar.gz
qemu-1121f87961e87563df65134b15db05c0c2cc67da.tar.bz2
qemu-1121f87961e87563df65134b15db05c0c2cc67da.zip
Fix arguments used in cas/casx, thanks to Igor Kovalenko for spotting
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5296 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc')
-rw-r--r--target-sparc/op_helper.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c
index cf15cd342d..163e82b902 100644
--- a/target-sparc/op_helper.c
+++ b/target-sparc/op_helper.c
@@ -2199,11 +2199,11 @@ target_ulong helper_cas_asi(target_ulong addr, target_ulong val1,
{
target_ulong ret;
- val1 &= 0xffffffffUL;
+ val2 &= 0xffffffffUL;
ret = helper_ld_asi(addr, asi, 4, 0);
ret &= 0xffffffffUL;
- if (val1 == ret)
- helper_st_asi(addr, val2 & 0xffffffffUL, asi, 4);
+ if (val2 == ret)
+ helper_st_asi(addr, val1 & 0xffffffffUL, asi, 4);
return ret;
}
@@ -2213,8 +2213,8 @@ target_ulong helper_casx_asi(target_ulong addr, target_ulong val1,
target_ulong ret;
ret = helper_ld_asi(addr, asi, 8, 0);
- if (val1 == ret)
- helper_st_asi(addr, val2, asi, 8);
+ if (val2 == ret)
+ helper_st_asi(addr, val1, asi, 8);
return ret;
}
#endif /* TARGET_SPARC64 */