sim-card
/
qemu
Archived
10
0
Fork 0

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
This commit is contained in:
blueswir1 2008-09-22 16:52:28 +00:00
parent 64c68080da
commit 1121f87961
1 changed files with 5 additions and 5 deletions

View File

@ -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 */