MIPS: Fix register usage in commit r14239.

BUG=

Review URL: https://codereview.chromium.org/14046006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14245 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
palfia@homejinni.com 2013-04-12 09:25:04 +00:00
parent a183e52085
commit 8611646813

View File

@ -1098,7 +1098,7 @@ void Simulator::GetFpArgs(double* x, double* y, int32_t* z) {
if (!IsMipsSoftFloatABI) { if (!IsMipsSoftFloatABI) {
*x = get_fpu_register_double(12); *x = get_fpu_register_double(12);
*y = get_fpu_register_double(14); *y = get_fpu_register_double(14);
*z = registers_[1]; *z = get_register(a2);
} else { } else {
// We use a char buffer to get around the strict-aliasing rules which // We use a char buffer to get around the strict-aliasing rules which
// otherwise allow the compiler to optimize away the copy. // otherwise allow the compiler to optimize away the copy.
@ -1114,12 +1114,8 @@ void Simulator::GetFpArgs(double* x, double* y, int32_t* z) {
reg_buffer[1] = get_register(a3); reg_buffer[1] = get_register(a3);
memcpy(y, buffer, sizeof(buffer)); memcpy(y, buffer, sizeof(buffer));
// Register 2 -> z. // Register 2 -> z.
memcpy(buffer, registers_ + 2, sizeof(*z));
memcpy(z, buffer, sizeof(*z));
// Register 2 -> y.
reg_buffer[0] = get_register(a2); reg_buffer[0] = get_register(a2);
memcpy(y, buffer, sizeof(*y)); memcpy(z, buffer, sizeof(*z));
} }
} }