| 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 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 case CodeStub::SubString: { | 1038 case CodeStub::SubString: { |
| 1039 SubStringStub stub; | 1039 SubStringStub stub; |
| 1040 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 1040 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 1041 break; | 1041 break; |
| 1042 } | 1042 } |
| 1043 case CodeStub::StringCompare: { | 1043 case CodeStub::StringCompare: { |
| 1044 StringCompareStub stub; | 1044 StringCompareStub stub; |
| 1045 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 1045 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 1046 break; | 1046 break; |
| 1047 } | 1047 } |
| 1048 case CodeStub::TranscendentalCache: { | |
| 1049 __ lw(a0, MemOperand(sp, 0)); | |
| 1050 TranscendentalCacheStub stub(instr->transcendental_type(), | |
| 1051 TranscendentalCacheStub::TAGGED); | |
| 1052 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | |
| 1053 break; | |
| 1054 } | |
| 1055 default: | 1048 default: |
| 1056 UNREACHABLE(); | 1049 UNREACHABLE(); |
| 1057 } | 1050 } |
| 1058 } | 1051 } |
| 1059 | 1052 |
| 1060 | 1053 |
| 1061 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { | 1054 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { |
| 1062 GenerateOsrPrologue(); | 1055 GenerateOsrPrologue(); |
| 1063 } | 1056 } |
| 1064 | 1057 |
| (...skipping 2792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3857 Register temp1 = ToRegister(instr->temp1()); | 3850 Register temp1 = ToRegister(instr->temp1()); |
| 3858 Register temp2 = ToRegister(instr->temp2()); | 3851 Register temp2 = ToRegister(instr->temp2()); |
| 3859 | 3852 |
| 3860 MathExpGenerator::EmitMathExp( | 3853 MathExpGenerator::EmitMathExp( |
| 3861 masm(), input, result, double_scratch1, double_scratch2, | 3854 masm(), input, result, double_scratch1, double_scratch2, |
| 3862 temp1, temp2, scratch0()); | 3855 temp1, temp2, scratch0()); |
| 3863 } | 3856 } |
| 3864 | 3857 |
| 3865 | 3858 |
| 3866 void LCodeGen::DoMathLog(LMathLog* instr) { | 3859 void LCodeGen::DoMathLog(LMathLog* instr) { |
| 3867 ASSERT(ToDoubleRegister(instr->result()).is(f4)); | 3860 // TODO(svenpanne) Implement me without the transcendental cache! |
| 3868 // Set the context register to a GC-safe fake value. Clobbering it is | |
| 3869 // OK because this instruction is marked as a call. | |
| 3870 __ mov(cp, zero_reg); | |
| 3871 TranscendentalCacheStub stub(TranscendentalCache::LOG, | |
| 3872 TranscendentalCacheStub::UNTAGGED); | |
| 3873 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | |
| 3874 } | 3861 } |
| 3875 | 3862 |
| 3876 | 3863 |
| 3877 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { | 3864 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { |
| 3878 ASSERT(ToRegister(instr->context()).is(cp)); | 3865 ASSERT(ToRegister(instr->context()).is(cp)); |
| 3879 ASSERT(ToRegister(instr->function()).is(a1)); | 3866 ASSERT(ToRegister(instr->function()).is(a1)); |
| 3880 ASSERT(instr->HasPointerMap()); | 3867 ASSERT(instr->HasPointerMap()); |
| 3881 | 3868 |
| 3882 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); | 3869 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); |
| 3883 if (known_function.is_null()) { | 3870 if (known_function.is_null()) { |
| (...skipping 1934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5818 __ Subu(scratch, result, scratch); | 5805 __ Subu(scratch, result, scratch); |
| 5819 __ lw(result, FieldMemOperand(scratch, | 5806 __ lw(result, FieldMemOperand(scratch, |
| 5820 FixedArray::kHeaderSize - kPointerSize)); | 5807 FixedArray::kHeaderSize - kPointerSize)); |
| 5821 __ bind(&done); | 5808 __ bind(&done); |
| 5822 } | 5809 } |
| 5823 | 5810 |
| 5824 | 5811 |
| 5825 #undef __ | 5812 #undef __ |
| 5826 | 5813 |
| 5827 } } // namespace v8::internal | 5814 } } // namespace v8::internal |
| OLD | NEW |