Commit 6ca0d05f authored by sgjesse@gmail.com's avatar sgjesse@gmail.com

Changed two IA-32 assembler tests to use the stack below the return address as

temporary storage for moving data from register xmm0 to st(0) instead of overwriting
the parameters. This fixes a test that crashed on Windows in release build due to
stack corruption.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@55 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 36a4d039
......@@ -259,8 +259,11 @@ TEST(AssemblerIa326) {
__ mulsd(xmm0, xmm1);
__ subsd(xmm0, xmm1);
__ divsd(xmm0, xmm1);
__ movdbl(Operand(esp, 4), xmm0);
__ fld_d(Operand(esp, 4));
// Copy xmm0 to st(0) using eight bytes of stack.
__ sub(Operand(esp), Immediate(8));
__ movdbl(Operand(esp, 0), xmm0);
__ fld_d(Operand(esp, 0));
__ add(Operand(esp), Immediate(8));
__ ret(0);
CodeDesc desc;
......@@ -295,8 +298,11 @@ TEST(AssemblerIa328) {
Assembler assm(buffer, sizeof buffer);
__ mov(eax, Operand(esp, 4));
__ cvtsi2sd(xmm0, Operand(eax));
__ movdbl(Operand(esp, 4), xmm0);
__ fld_d(Operand(esp, 4));
// Copy xmm0 to st(0) using eight bytes of stack.
__ sub(Operand(esp), Immediate(8));
__ movdbl(Operand(esp, 0), xmm0);
__ fld_d(Operand(esp, 0));
__ add(Operand(esp), Immediate(8));
__ ret(0);
CodeDesc desc;
assm.GetCode(&desc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment