ia32: Calls to the TranscendentalCacheStub must ensure that esi is set to something safe.
BUG=v8:2827 R=verwaest@chromium.org Review URL: https://codereview.chromium.org/22863002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16154 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
ba8b106059
commit
b1a1d5bbcb
@ -4092,6 +4092,9 @@ void LCodeGen::DoMathExp(LMathExp* instr) {
|
||||
|
||||
void LCodeGen::DoMathTan(LMathTan* instr) {
|
||||
ASSERT(ToDoubleRegister(instr->result()).is(xmm1));
|
||||
// Set the context register to a GC-safe fake value. Clobbering it is
|
||||
// OK because this instruction is marked as a call.
|
||||
__ Set(esi, Immediate(0));
|
||||
TranscendentalCacheStub stub(TranscendentalCache::TAN,
|
||||
TranscendentalCacheStub::UNTAGGED);
|
||||
CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
|
||||
@ -4100,6 +4103,9 @@ void LCodeGen::DoMathTan(LMathTan* instr) {
|
||||
|
||||
void LCodeGen::DoMathCos(LMathCos* instr) {
|
||||
ASSERT(ToDoubleRegister(instr->result()).is(xmm1));
|
||||
// Set the context register to a GC-safe fake value. Clobbering it is
|
||||
// OK because this instruction is marked as a call.
|
||||
__ Set(esi, Immediate(0));
|
||||
TranscendentalCacheStub stub(TranscendentalCache::COS,
|
||||
TranscendentalCacheStub::UNTAGGED);
|
||||
CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
|
||||
@ -4108,6 +4114,9 @@ void LCodeGen::DoMathCos(LMathCos* instr) {
|
||||
|
||||
void LCodeGen::DoMathSin(LMathSin* instr) {
|
||||
ASSERT(ToDoubleRegister(instr->result()).is(xmm1));
|
||||
// Set the context register to a GC-safe fake value. Clobbering it is
|
||||
// OK because this instruction is marked as a call.
|
||||
__ Set(esi, Immediate(0));
|
||||
TranscendentalCacheStub stub(TranscendentalCache::SIN,
|
||||
TranscendentalCacheStub::UNTAGGED);
|
||||
CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
|
||||
|
Loading…
Reference in New Issue
Block a user