| 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/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
| 8 #include "src/arm64/macro-assembler-arm64.h" | 8 #include "src/arm64/macro-assembler-arm64.h" |
| 9 #include "src/compilation-info.h" | 9 #include "src/compilation-info.h" |
| 10 #include "src/compiler/code-generator-impl.h" | 10 #include "src/compiler/code-generator-impl.h" |
| (...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1732 private: | 1732 private: |
| 1733 void GenerateCallToTrap(Runtime::FunctionId trap_id) { | 1733 void GenerateCallToTrap(Runtime::FunctionId trap_id) { |
| 1734 if (trap_id == Runtime::kNumFunctions) { | 1734 if (trap_id == Runtime::kNumFunctions) { |
| 1735 // We cannot test calls to the runtime in cctest/test-run-wasm. | 1735 // We cannot test calls to the runtime in cctest/test-run-wasm. |
| 1736 // Therefore we emit a call to C here instead of a call to the runtime. | 1736 // Therefore we emit a call to C here instead of a call to the runtime. |
| 1737 __ CallCFunction( | 1737 __ CallCFunction( |
| 1738 ExternalReference::wasm_call_trap_callback_for_testing(isolate()), | 1738 ExternalReference::wasm_call_trap_callback_for_testing(isolate()), |
| 1739 0); | 1739 0); |
| 1740 } else { | 1740 } else { |
| 1741 DCHECK(csp.Is(__ StackPointer())); | 1741 DCHECK(csp.Is(__ StackPointer())); |
| 1742 __ Move(cp, isolate()->native_context()); | 1742 __ Move(cp, Smi::kZero); |
| 1743 // Initialize the jssp because it is required for the runtime call. | 1743 // Initialize the jssp because it is required for the runtime call. |
| 1744 __ Mov(jssp, csp); | 1744 __ Mov(jssp, csp); |
| 1745 gen_->AssembleSourcePosition(instr_); | 1745 gen_->AssembleSourcePosition(instr_); |
| 1746 __ CallRuntime(trap_id); | 1746 __ CallRuntime(trap_id); |
| 1747 } | 1747 } |
| 1748 ReferenceMap* reference_map = | 1748 ReferenceMap* reference_map = |
| 1749 new (gen_->zone()) ReferenceMap(gen_->zone()); | 1749 new (gen_->zone()) ReferenceMap(gen_->zone()); |
| 1750 gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0, | 1750 gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0, |
| 1751 Safepoint::kNoLazyDeopt); | 1751 Safepoint::kNoLazyDeopt); |
| 1752 } | 1752 } |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2174 padding_size -= kInstructionSize; | 2174 padding_size -= kInstructionSize; |
| 2175 } | 2175 } |
| 2176 } | 2176 } |
| 2177 } | 2177 } |
| 2178 | 2178 |
| 2179 #undef __ | 2179 #undef __ |
| 2180 | 2180 |
| 2181 } // namespace compiler | 2181 } // namespace compiler |
| 2182 } // namespace internal | 2182 } // namespace internal |
| 2183 } // namespace v8 | 2183 } // namespace v8 |
| OLD | NEW |