Chromium Code Reviews| 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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 | 6 |
| 7 #include "src/arm64/macro-assembler-arm64.h" | 7 #include "src/arm64/macro-assembler-arm64.h" |
| 8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
| 9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
| 10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 139 case kArchCallCodeObject: { | 139 case kArchCallCodeObject: { |
| 140 if (instr->InputAt(0)->IsImmediate()) { | 140 if (instr->InputAt(0)->IsImmediate()) { |
| 141 __ Call(Handle<Code>::cast(i.InputHeapObject(0)), | 141 __ Call(Handle<Code>::cast(i.InputHeapObject(0)), |
| 142 RelocInfo::CODE_TARGET); | 142 RelocInfo::CODE_TARGET); |
| 143 } else { | 143 } else { |
| 144 Register target = i.InputRegister(0); | 144 Register target = i.InputRegister(0); |
| 145 __ Add(target, target, Code::kHeaderSize - kHeapObjectTag); | 145 __ Add(target, target, Code::kHeaderSize - kHeapObjectTag); |
| 146 __ Call(target); | 146 __ Call(target); |
| 147 } | 147 } |
| 148 AddSafepointAndDeopt(instr); | 148 AddSafepointAndDeopt(instr); |
| 149 // Meaningless instruction for ICs to overwrite. | |
| 150 AddNopForSmiCodeInlining(); | |
|
Michael Starzinger
2014/08/27 12:50:11
Yeah! You are my hero. :)
| |
| 151 break; | 149 break; |
| 152 } | 150 } |
| 153 case kArchCallJSFunction: { | 151 case kArchCallJSFunction: { |
| 154 // TODO(jarin) The load of the context should be separated from the call. | 152 // TODO(jarin) The load of the context should be separated from the call. |
| 155 Register func = i.InputRegister(0); | 153 Register func = i.InputRegister(0); |
| 156 __ Ldr(cp, FieldMemOperand(func, JSFunction::kContextOffset)); | 154 __ Ldr(cp, FieldMemOperand(func, JSFunction::kContextOffset)); |
| 157 __ Ldr(x10, FieldMemOperand(func, JSFunction::kCodeEntryOffset)); | 155 __ Ldr(x10, FieldMemOperand(func, JSFunction::kCodeEntryOffset)); |
| 158 __ Call(x10); | 156 __ Call(x10); |
| 159 AddSafepointAndDeopt(instr); | 157 AddSafepointAndDeopt(instr); |
| 160 break; | 158 break; |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 842 } | 840 } |
| 843 | 841 |
| 844 | 842 |
| 845 void CodeGenerator::AddNopForSmiCodeInlining() { __ movz(xzr, 0); } | 843 void CodeGenerator::AddNopForSmiCodeInlining() { __ movz(xzr, 0); } |
| 846 | 844 |
| 847 #undef __ | 845 #undef __ |
| 848 | 846 |
| 849 } // namespace compiler | 847 } // namespace compiler |
| 850 } // namespace internal | 848 } // namespace internal |
| 851 } // namespace v8 | 849 } // namespace v8 |
| OLD | NEW |