Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Side by Side Diff: src/compiler/arm/code-generator-arm.cc

Issue 2738683003: [wasm][arm] Emit MaybeCheckConstPool in the trap code generation (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/arm/macro-assembler-arm.h" 7 #include "src/arm/macro-assembler-arm.h"
8 #include "src/assembler-inl.h" 8 #include "src/assembler-inl.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 2117 matching lines...) Expand 10 before | Expand all | Expand 10 after
2128 __ EnterFrame(StackFrame::WASM_COMPILED); 2128 __ EnterFrame(StackFrame::WASM_COMPILED);
2129 } 2129 }
2130 GenerateCallToTrap(trap_id); 2130 GenerateCallToTrap(trap_id);
2131 if (frame_elided_) { 2131 if (frame_elided_) {
2132 __ set_has_frame(old_has_frame); 2132 __ set_has_frame(old_has_frame);
2133 } 2133 }
2134 } 2134 }
2135 2135
2136 private: 2136 private:
2137 void GenerateCallToTrap(Builtins::Name trap_id) { 2137 void GenerateCallToTrap(Builtins::Name trap_id) {
2138 // Ensure to emit the constant pool first if necessary.
2139 __ MaybeCheckConstPool();
jbramley 2017/03/07 14:24:08 What is special about this location? I would have
2138 if (trap_id == Builtins::builtin_count) { 2140 if (trap_id == Builtins::builtin_count) {
2139 // We cannot test calls to the runtime in cctest/test-run-wasm. 2141 // We cannot test calls to the runtime in cctest/test-run-wasm.
2140 // Therefore we emit a call to C here instead of a call to the runtime. 2142 // Therefore we emit a call to C here instead of a call to the runtime.
2141 // We use the context register as the scratch register, because we do 2143 // We use the context register as the scratch register, because we do
2142 // not have a context here. 2144 // not have a context here.
2143 __ PrepareCallCFunction(0, 0, cp); 2145 __ PrepareCallCFunction(0, 0, cp);
2144 __ CallCFunction( 2146 __ CallCFunction(
2145 ExternalReference::wasm_call_trap_callback_for_testing(isolate()), 2147 ExternalReference::wasm_call_trap_callback_for_testing(isolate()),
2146 0); 2148 0);
2147 __ LeaveFrame(StackFrame::WASM_COMPILED); 2149 __ LeaveFrame(StackFrame::WASM_COMPILED);
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
2684 padding_size -= v8::internal::Assembler::kInstrSize; 2686 padding_size -= v8::internal::Assembler::kInstrSize;
2685 } 2687 }
2686 } 2688 }
2687 } 2689 }
2688 2690
2689 #undef __ 2691 #undef __
2690 2692
2691 } // namespace compiler 2693 } // namespace compiler
2692 } // namespace internal 2694 } // namespace internal
2693 } // namespace v8 2695 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698