| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
| 8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
| 9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
| 10 #include "src/compiler/osr.h" | 10 #include "src/compiler/osr.h" |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 X87OperandConverter i(this, instr); | 305 X87OperandConverter i(this, instr); |
| 306 | 306 |
| 307 switch (ArchOpcodeField::decode(instr->opcode())) { | 307 switch (ArchOpcodeField::decode(instr->opcode())) { |
| 308 case kArchCallCodeObject: { | 308 case kArchCallCodeObject: { |
| 309 EnsureSpaceForLazyDeopt(); | 309 EnsureSpaceForLazyDeopt(); |
| 310 if (HasImmediateInput(instr, 0)) { | 310 if (HasImmediateInput(instr, 0)) { |
| 311 Handle<Code> code = Handle<Code>::cast(i.InputHeapObject(0)); | 311 Handle<Code> code = Handle<Code>::cast(i.InputHeapObject(0)); |
| 312 __ call(code, RelocInfo::CODE_TARGET); | 312 __ call(code, RelocInfo::CODE_TARGET); |
| 313 } else { | 313 } else { |
| 314 Register reg = i.InputRegister(0); | 314 Register reg = i.InputRegister(0); |
| 315 __ call(Operand(reg, Code::kHeaderSize - kHeapObjectTag)); | 315 __ add(reg, Immediate(Code::kHeaderSize - kHeapObjectTag)); |
| 316 __ call(reg); |
| 316 } | 317 } |
| 317 RecordCallPosition(instr); | 318 RecordCallPosition(instr); |
| 318 bool double_result = | 319 bool double_result = |
| 319 instr->HasOutput() && instr->Output()->IsDoubleRegister(); | 320 instr->HasOutput() && instr->Output()->IsDoubleRegister(); |
| 320 if (double_result) { | 321 if (double_result) { |
| 321 __ lea(esp, Operand(esp, -kDoubleSize)); | 322 __ lea(esp, Operand(esp, -kDoubleSize)); |
| 322 __ fstp_d(Operand(esp, 0)); | 323 __ fstp_d(Operand(esp, 0)); |
| 323 } | 324 } |
| 324 __ fninit(); | 325 __ fninit(); |
| 325 if (double_result) { | 326 if (double_result) { |
| (...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1882 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 1883 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
| 1883 __ Nop(padding_size); | 1884 __ Nop(padding_size); |
| 1884 } | 1885 } |
| 1885 } | 1886 } |
| 1886 | 1887 |
| 1887 #undef __ | 1888 #undef __ |
| 1888 | 1889 |
| 1889 } // namespace compiler | 1890 } // namespace compiler |
| 1890 } // namespace internal | 1891 } // namespace internal |
| 1891 } // namespace v8 | 1892 } // namespace v8 |
| OLD | NEW |