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 3856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3867 ASSERT(ToDoubleRegister(instr->result()).is(f4)); | 3867 ASSERT(ToDoubleRegister(instr->result()).is(f4)); |
3868 // Set the context register to a GC-safe fake value. Clobbering it is | 3868 // Set the context register to a GC-safe fake value. Clobbering it is |
3869 // OK because this instruction is marked as a call. | 3869 // OK because this instruction is marked as a call. |
3870 __ mov(cp, zero_reg); | 3870 __ mov(cp, zero_reg); |
3871 TranscendentalCacheStub stub(TranscendentalCache::LOG, | 3871 TranscendentalCacheStub stub(TranscendentalCache::LOG, |
3872 TranscendentalCacheStub::UNTAGGED); | 3872 TranscendentalCacheStub::UNTAGGED); |
3873 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 3873 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
3874 } | 3874 } |
3875 | 3875 |
3876 | 3876 |
3877 void LCodeGen::DoMathTan(LMathTan* instr) { | |
3878 ASSERT(ToDoubleRegister(instr->result()).is(f4)); | |
3879 // Set the context register to a GC-safe fake value. Clobbering it is | |
3880 // OK because this instruction is marked as a call. | |
3881 __ mov(cp, zero_reg); | |
3882 TranscendentalCacheStub stub(TranscendentalCache::TAN, | |
3883 TranscendentalCacheStub::UNTAGGED); | |
3884 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | |
3885 } | |
3886 | |
3887 | |
3888 void LCodeGen::DoMathCos(LMathCos* instr) { | |
3889 ASSERT(ToDoubleRegister(instr->result()).is(f4)); | |
3890 // Set the context register to a GC-safe fake value. Clobbering it is | |
3891 // OK because this instruction is marked as a call. | |
3892 __ mov(cp, zero_reg); | |
3893 TranscendentalCacheStub stub(TranscendentalCache::COS, | |
3894 TranscendentalCacheStub::UNTAGGED); | |
3895 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | |
3896 } | |
3897 | |
3898 | |
3899 void LCodeGen::DoMathSin(LMathSin* instr) { | |
3900 ASSERT(ToDoubleRegister(instr->result()).is(f4)); | |
3901 // Set the context register to a GC-safe fake value. Clobbering it is | |
3902 // OK because this instruction is marked as a call. | |
3903 __ mov(cp, zero_reg); | |
3904 TranscendentalCacheStub stub(TranscendentalCache::SIN, | |
3905 TranscendentalCacheStub::UNTAGGED); | |
3906 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | |
3907 } | |
3908 | |
3909 | |
3910 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { | 3877 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { |
3911 ASSERT(ToRegister(instr->context()).is(cp)); | 3878 ASSERT(ToRegister(instr->context()).is(cp)); |
3912 ASSERT(ToRegister(instr->function()).is(a1)); | 3879 ASSERT(ToRegister(instr->function()).is(a1)); |
3913 ASSERT(instr->HasPointerMap()); | 3880 ASSERT(instr->HasPointerMap()); |
3914 | 3881 |
3915 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); | 3882 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); |
3916 if (known_function.is_null()) { | 3883 if (known_function.is_null()) { |
3917 LPointerMap* pointers = instr->pointer_map(); | 3884 LPointerMap* pointers = instr->pointer_map(); |
3918 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt); | 3885 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt); |
3919 ParameterCount count(instr->arity()); | 3886 ParameterCount count(instr->arity()); |
(...skipping 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5851 __ Subu(scratch, result, scratch); | 5818 __ Subu(scratch, result, scratch); |
5852 __ lw(result, FieldMemOperand(scratch, | 5819 __ lw(result, FieldMemOperand(scratch, |
5853 FixedArray::kHeaderSize - kPointerSize)); | 5820 FixedArray::kHeaderSize - kPointerSize)); |
5854 __ bind(&done); | 5821 __ bind(&done); |
5855 } | 5822 } |
5856 | 5823 |
5857 | 5824 |
5858 #undef __ | 5825 #undef __ |
5859 | 5826 |
5860 } } // namespace v8::internal | 5827 } } // namespace v8::internal |
OLD | NEW |