OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 4074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4085 XMMRegister result = ToDoubleRegister(instr->result()); | 4085 XMMRegister result = ToDoubleRegister(instr->result()); |
4086 Register temp1 = ToRegister(instr->temp1()); | 4086 Register temp1 = ToRegister(instr->temp1()); |
4087 Register temp2 = ToRegister(instr->temp2()); | 4087 Register temp2 = ToRegister(instr->temp2()); |
4088 | 4088 |
4089 MathExpGenerator::EmitMathExp(masm(), input, result, xmm0, temp1, temp2); | 4089 MathExpGenerator::EmitMathExp(masm(), input, result, xmm0, temp1, temp2); |
4090 } | 4090 } |
4091 | 4091 |
4092 | 4092 |
4093 void LCodeGen::DoMathTan(LMathTan* instr) { | 4093 void LCodeGen::DoMathTan(LMathTan* instr) { |
4094 ASSERT(ToDoubleRegister(instr->result()).is(xmm1)); | 4094 ASSERT(ToDoubleRegister(instr->result()).is(xmm1)); |
| 4095 // Set the context register to a GC-safe fake value. Clobbering it is |
| 4096 // OK because this instruction is marked as a call. |
| 4097 __ Set(esi, Immediate(0)); |
4095 TranscendentalCacheStub stub(TranscendentalCache::TAN, | 4098 TranscendentalCacheStub stub(TranscendentalCache::TAN, |
4096 TranscendentalCacheStub::UNTAGGED); | 4099 TranscendentalCacheStub::UNTAGGED); |
4097 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 4100 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
4098 } | 4101 } |
4099 | 4102 |
4100 | 4103 |
4101 void LCodeGen::DoMathCos(LMathCos* instr) { | 4104 void LCodeGen::DoMathCos(LMathCos* instr) { |
4102 ASSERT(ToDoubleRegister(instr->result()).is(xmm1)); | 4105 ASSERT(ToDoubleRegister(instr->result()).is(xmm1)); |
| 4106 // Set the context register to a GC-safe fake value. Clobbering it is |
| 4107 // OK because this instruction is marked as a call. |
| 4108 __ Set(esi, Immediate(0)); |
4103 TranscendentalCacheStub stub(TranscendentalCache::COS, | 4109 TranscendentalCacheStub stub(TranscendentalCache::COS, |
4104 TranscendentalCacheStub::UNTAGGED); | 4110 TranscendentalCacheStub::UNTAGGED); |
4105 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 4111 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
4106 } | 4112 } |
4107 | 4113 |
4108 | 4114 |
4109 void LCodeGen::DoMathSin(LMathSin* instr) { | 4115 void LCodeGen::DoMathSin(LMathSin* instr) { |
4110 ASSERT(ToDoubleRegister(instr->result()).is(xmm1)); | 4116 ASSERT(ToDoubleRegister(instr->result()).is(xmm1)); |
| 4117 // Set the context register to a GC-safe fake value. Clobbering it is |
| 4118 // OK because this instruction is marked as a call. |
| 4119 __ Set(esi, Immediate(0)); |
4111 TranscendentalCacheStub stub(TranscendentalCache::SIN, | 4120 TranscendentalCacheStub stub(TranscendentalCache::SIN, |
4112 TranscendentalCacheStub::UNTAGGED); | 4121 TranscendentalCacheStub::UNTAGGED); |
4113 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 4122 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
4114 } | 4123 } |
4115 | 4124 |
4116 | 4125 |
4117 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { | 4126 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { |
4118 ASSERT(ToRegister(instr->context()).is(esi)); | 4127 ASSERT(ToRegister(instr->context()).is(esi)); |
4119 ASSERT(ToRegister(instr->function()).is(edi)); | 4128 ASSERT(ToRegister(instr->function()).is(edi)); |
4120 ASSERT(instr->HasPointerMap()); | 4129 ASSERT(instr->HasPointerMap()); |
(...skipping 2341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6462 FixedArray::kHeaderSize - kPointerSize)); | 6471 FixedArray::kHeaderSize - kPointerSize)); |
6463 __ bind(&done); | 6472 __ bind(&done); |
6464 } | 6473 } |
6465 | 6474 |
6466 | 6475 |
6467 #undef __ | 6476 #undef __ |
6468 | 6477 |
6469 } } // namespace v8::internal | 6478 } } // namespace v8::internal |
6470 | 6479 |
6471 #endif // V8_TARGET_ARCH_IA32 | 6480 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |