| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_PPC | 7 #if V8_TARGET_ARCH_PPC |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 1955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1966 Register key = LoadDescriptor::NameRegister(); | 1966 Register key = LoadDescriptor::NameRegister(); |
| 1967 | 1967 |
| 1968 // Check that the key is an array index, that is Uint32. | 1968 // Check that the key is an array index, that is Uint32. |
| 1969 __ TestIfPositiveSmi(key, r0); | 1969 __ TestIfPositiveSmi(key, r0); |
| 1970 __ bne(&slow, cr0); | 1970 __ bne(&slow, cr0); |
| 1971 | 1971 |
| 1972 // Everything is fine, call runtime. | 1972 // Everything is fine, call runtime. |
| 1973 __ Push(receiver, key); // Receiver, key. | 1973 __ Push(receiver, key); // Receiver, key. |
| 1974 | 1974 |
| 1975 // Perform tail call to the entry. | 1975 // Perform tail call to the entry. |
| 1976 __ TailCallExternalReference( | 1976 __ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2, 1); |
| 1977 ExternalReference(IC_Utility(IC::kLoadElementWithInterceptor), | |
| 1978 masm->isolate()), | |
| 1979 2, 1); | |
| 1980 | 1977 |
| 1981 __ bind(&slow); | 1978 __ bind(&slow); |
| 1982 PropertyAccessCompiler::TailCallBuiltin( | 1979 PropertyAccessCompiler::TailCallBuiltin( |
| 1983 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); | 1980 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); |
| 1984 } | 1981 } |
| 1985 | 1982 |
| 1986 | 1983 |
| 1987 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { | 1984 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { |
| 1988 // sp[0] : number of parameters | 1985 // sp[0] : number of parameters |
| 1989 // sp[4] : receiver displacement | 1986 // sp[4] : receiver displacement |
| (...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3080 } | 3077 } |
| 3081 | 3078 |
| 3082 | 3079 |
| 3083 void CallICStub::GenerateMiss(MacroAssembler* masm) { | 3080 void CallICStub::GenerateMiss(MacroAssembler* masm) { |
| 3084 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 3081 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
| 3085 | 3082 |
| 3086 // Push the function and feedback info. | 3083 // Push the function and feedback info. |
| 3087 __ Push(r4, r5, r6); | 3084 __ Push(r4, r5, r6); |
| 3088 | 3085 |
| 3089 // Call the entry. | 3086 // Call the entry. |
| 3090 IC::UtilityId id = GetICState() == DEFAULT ? IC::kCallIC_Miss | 3087 Runtime::FunctionId id = GetICState() == DEFAULT |
| 3091 : IC::kCallIC_Customization_Miss; | 3088 ? Runtime::kCallIC_Miss |
| 3092 | 3089 : Runtime::kCallIC_Customization_Miss; |
| 3093 ExternalReference miss = ExternalReference(IC_Utility(id), masm->isolate()); | 3090 __ CallRuntime(id, 3); |
| 3094 __ CallExternalReference(miss, 3); | |
| 3095 | 3091 |
| 3096 // Move result to r4 and exit the internal frame. | 3092 // Move result to r4 and exit the internal frame. |
| 3097 __ mr(r4, r3); | 3093 __ mr(r4, r3); |
| 3098 } | 3094 } |
| 3099 | 3095 |
| 3100 | 3096 |
| 3101 // StringCharCodeAtGenerator | 3097 // StringCharCodeAtGenerator |
| 3102 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { | 3098 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { |
| 3103 // If the receiver is a smi trigger the non-string case. | 3099 // If the receiver is a smi trigger the non-string case. |
| 3104 if (check_mode_ == RECEIVER_IS_UNKNOWN) { | 3100 if (check_mode_ == RECEIVER_IS_UNKNOWN) { |
| (...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4039 __ Ret(); | 4035 __ Ret(); |
| 4040 | 4036 |
| 4041 __ bind(&miss); | 4037 __ bind(&miss); |
| 4042 GenerateMiss(masm); | 4038 GenerateMiss(masm); |
| 4043 } | 4039 } |
| 4044 | 4040 |
| 4045 | 4041 |
| 4046 void CompareICStub::GenerateMiss(MacroAssembler* masm) { | 4042 void CompareICStub::GenerateMiss(MacroAssembler* masm) { |
| 4047 { | 4043 { |
| 4048 // Call the runtime system in a fresh internal frame. | 4044 // Call the runtime system in a fresh internal frame. |
| 4049 ExternalReference miss = | |
| 4050 ExternalReference(IC_Utility(IC::kCompareIC_Miss), isolate()); | |
| 4051 | |
| 4052 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 4045 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
| 4053 __ Push(r4, r3); | 4046 __ Push(r4, r3); |
| 4054 __ Push(r4, r3); | 4047 __ Push(r4, r3); |
| 4055 __ LoadSmiLiteral(r0, Smi::FromInt(op())); | 4048 __ LoadSmiLiteral(r0, Smi::FromInt(op())); |
| 4056 __ push(r0); | 4049 __ push(r0); |
| 4057 __ CallExternalReference(miss, 3); | 4050 __ CallRuntime(Runtime::kCompareIC_Miss, 3); |
| 4058 // Compute the entry point of the rewritten stub. | 4051 // Compute the entry point of the rewritten stub. |
| 4059 __ addi(r5, r3, Operand(Code::kHeaderSize - kHeapObjectTag)); | 4052 __ addi(r5, r3, Operand(Code::kHeaderSize - kHeapObjectTag)); |
| 4060 // Restore registers. | 4053 // Restore registers. |
| 4061 __ Pop(r4, r3); | 4054 __ Pop(r4, r3); |
| 4062 } | 4055 } |
| 4063 | 4056 |
| 4064 __ JumpToJSEntry(r5); | 4057 __ JumpToJSEntry(r5); |
| 4065 } | 4058 } |
| 4066 | 4059 |
| 4067 | 4060 |
| (...skipping 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5673 kStackUnwindSpace, NULL, | 5666 kStackUnwindSpace, NULL, |
| 5674 MemOperand(fp, 6 * kPointerSize), NULL); | 5667 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5675 } | 5668 } |
| 5676 | 5669 |
| 5677 | 5670 |
| 5678 #undef __ | 5671 #undef __ |
| 5679 } // namespace internal | 5672 } // namespace internal |
| 5680 } // namespace v8 | 5673 } // namespace v8 |
| 5681 | 5674 |
| 5682 #endif // V8_TARGET_ARCH_PPC | 5675 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |