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

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 849103007: arm (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_ARM 9 #if V8_TARGET_ARCH_ARM
10 10
(...skipping 2345 matching lines...) Expand 10 before | Expand all | Expand 10 after
2356 Jump(stub->GetCode(), RelocInfo::CODE_TARGET, cond); 2356 Jump(stub->GetCode(), RelocInfo::CODE_TARGET, cond);
2357 } 2357 }
2358 2358
2359 2359
2360 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { 2360 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) {
2361 return ref0.address() - ref1.address(); 2361 return ref0.address() - ref1.address();
2362 } 2362 }
2363 2363
2364 2364
2365 void MacroAssembler::CallApiFunctionAndReturn( 2365 void MacroAssembler::CallApiFunctionAndReturn(
2366 Register function_address, 2366 Register function_address, ExternalReference thunk_ref, int stack_space,
2367 ExternalReference thunk_ref, 2367 MemOperand* stack_space_operand, MemOperand return_value_operand,
2368 int stack_space,
2369 MemOperand return_value_operand,
2370 MemOperand* context_restore_operand) { 2368 MemOperand* context_restore_operand) {
2371 ExternalReference next_address = 2369 ExternalReference next_address =
2372 ExternalReference::handle_scope_next_address(isolate()); 2370 ExternalReference::handle_scope_next_address(isolate());
2373 const int kNextOffset = 0; 2371 const int kNextOffset = 0;
2374 const int kLimitOffset = AddressOffset( 2372 const int kLimitOffset = AddressOffset(
2375 ExternalReference::handle_scope_limit_address(isolate()), 2373 ExternalReference::handle_scope_limit_address(isolate()),
2376 next_address); 2374 next_address);
2377 const int kLevelOffset = AddressOffset( 2375 const int kLevelOffset = AddressOffset(
2378 ExternalReference::handle_scope_level_address(isolate()), 2376 ExternalReference::handle_scope_level_address(isolate()),
2379 next_address); 2377 next_address);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
2457 ldr(r5, MemOperand(ip)); 2455 ldr(r5, MemOperand(ip));
2458 cmp(r4, r5); 2456 cmp(r4, r5);
2459 b(ne, &promote_scheduled_exception); 2457 b(ne, &promote_scheduled_exception);
2460 bind(&exception_handled); 2458 bind(&exception_handled);
2461 2459
2462 bool restore_context = context_restore_operand != NULL; 2460 bool restore_context = context_restore_operand != NULL;
2463 if (restore_context) { 2461 if (restore_context) {
2464 ldr(cp, *context_restore_operand); 2462 ldr(cp, *context_restore_operand);
2465 } 2463 }
2466 // LeaveExitFrame expects unwind space to be in a register. 2464 // LeaveExitFrame expects unwind space to be in a register.
2467 mov(r4, Operand(stack_space)); 2465 if (stack_space_operand != NULL) {
2466 ldr(r4, *stack_space_operand);
2467 } else {
2468 mov(r4, Operand(stack_space));
2469 }
2468 LeaveExitFrame(false, r4, !restore_context); 2470 LeaveExitFrame(false, r4, !restore_context);
2469 mov(pc, lr); 2471 mov(pc, lr);
2470 2472
2471 bind(&promote_scheduled_exception); 2473 bind(&promote_scheduled_exception);
2472 { 2474 {
2473 FrameScope frame(this, StackFrame::INTERNAL); 2475 FrameScope frame(this, StackFrame::INTERNAL);
2474 CallExternalReference( 2476 CallExternalReference(
2475 ExternalReference(Runtime::kPromoteScheduledException, isolate()), 2477 ExternalReference(Runtime::kPromoteScheduledException, isolate()),
2476 0); 2478 0);
2477 } 2479 }
(...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after
4086 } 4088 }
4087 } 4089 }
4088 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 4090 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
4089 add(result, result, Operand(dividend, LSR, 31)); 4091 add(result, result, Operand(dividend, LSR, 31));
4090 } 4092 }
4091 4093
4092 } // namespace internal 4094 } // namespace internal
4093 } // namespace v8 4095 } // namespace v8
4094 4096
4095 #endif // V8_TARGET_ARCH_ARM 4097 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« src/arm/code-stubs-arm.cc ('K') | « src/arm/macro-assembler-arm.h ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698