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

Side by Side Diff: runtime/vm/stub_code_arm.cc

Issue 2374173002: Revert "Pass new pool pointer to the JumpToException stub instead of reloading in through the frame… (Closed)
Patch Set: Created 4 years, 2 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 | « runtime/vm/stack_frame.h ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 1807 matching lines...) Expand 10 before | Expand all | Expand 10 after
1818 1818
1819 1819
1820 // Jump to the exception or error handler. 1820 // Jump to the exception or error handler.
1821 // LR: return address. 1821 // LR: return address.
1822 // R0: program_counter. 1822 // R0: program_counter.
1823 // R1: stack_pointer. 1823 // R1: stack_pointer.
1824 // R2: frame_pointer. 1824 // R2: frame_pointer.
1825 // R3: error object. 1825 // R3: error object.
1826 // SP + 0: address of stacktrace object. 1826 // SP + 0: address of stacktrace object.
1827 // SP + 4: thread. 1827 // SP + 4: thread.
1828 // SP + 8: pool pointer
1829 // Does not return. 1828 // Does not return.
1830 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { 1829 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
1831 ASSERT(kExceptionObjectReg == R0); 1830 ASSERT(kExceptionObjectReg == R0);
1832 ASSERT(kStackTraceObjectReg == R1); 1831 ASSERT(kStackTraceObjectReg == R1);
1833 __ mov(IP, Operand(R1)); // Copy Stack pointer into IP. 1832 __ mov(IP, Operand(R1)); // Copy Stack pointer into IP.
1834 __ mov(LR, Operand(R0)); // Program counter. 1833 __ mov(LR, Operand(R0)); // Program counter.
1835 __ mov(R0, Operand(R3)); // Exception object. 1834 __ mov(R0, Operand(R3)); // Exception object.
1836 __ ldr(R1, Address(SP, 0)); // StackTrace object. 1835 __ ldr(R1, Address(SP, 0)); // StackTrace object.
1837 __ ldr(THR, Address(SP, 4)); // Thread. 1836 __ ldr(THR, Address(SP, 4)); // Thread.
1838 __ ldr(PP, Address(SP, 8)); // Pool pointer.
1839 __ mov(FP, Operand(R2)); // Frame_pointer. 1837 __ mov(FP, Operand(R2)); // Frame_pointer.
1840 __ mov(SP, Operand(IP)); // Set Stack pointer. 1838 __ mov(SP, Operand(IP)); // Set Stack pointer.
1841 // Set the tag. 1839 // Set the tag.
1842 __ LoadImmediate(R2, VMTag::kDartTagId); 1840 __ LoadImmediate(R2, VMTag::kDartTagId);
1843 __ StoreToOffset(kWord, R2, THR, Thread::vm_tag_offset()); 1841 __ StoreToOffset(kWord, R2, THR, Thread::vm_tag_offset());
1844 // Clear top exit frame. 1842 // Clear top exit frame.
1845 __ LoadImmediate(R2, 0); 1843 __ LoadImmediate(R2, 0);
1846 __ StoreToOffset(kWord, R2, THR, Thread::top_exit_frame_info_offset()); 1844 __ StoreToOffset(kWord, R2, THR, Thread::top_exit_frame_info_offset());
1845 // Restore the pool pointer.
1846 __ RestoreCodePointer();
1847 __ LoadPoolPointer();
1847 __ bx(LR); // Jump to the exception handler code. 1848 __ bx(LR); // Jump to the exception handler code.
1848 } 1849 }
1849 1850
1850 1851
1851 // Calls to the runtime to optimize the given function. 1852 // Calls to the runtime to optimize the given function.
1852 // R8: function to be reoptimized. 1853 // R8: function to be reoptimized.
1853 // R4: argument descriptor (preserved). 1854 // R4: argument descriptor (preserved).
1854 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { 1855 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) {
1855 __ EnterStubFrame(); 1856 __ EnterStubFrame();
1856 __ Push(R4); 1857 __ Push(R4);
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
2217 } 2218 }
2218 2219
2219 2220
2220 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { 2221 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
2221 __ bkpt(0); 2222 __ bkpt(0);
2222 } 2223 }
2223 2224
2224 } // namespace dart 2225 } // namespace dart
2225 2226
2226 #endif // defined TARGET_ARCH_ARM 2227 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/stack_frame.h ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698