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

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

Issue 141363005: A64: Synchronize with r15204. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/a64/macro-assembler-a64.h ('k') | src/a64/simulator-a64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 STATIC_ASSERT((Heap::kTrueValueRootIndex + 1) == Heap::kFalseValueRootIndex); 865 STATIC_ASSERT((Heap::kTrueValueRootIndex + 1) == Heap::kFalseValueRootIndex);
866 Ldp(true_root, false_root, 866 Ldp(true_root, false_root,
867 MemOperand(root, Heap::kTrueValueRootIndex << kPointerSizeLog2)); 867 MemOperand(root, Heap::kTrueValueRootIndex << kPointerSizeLog2));
868 } 868 }
869 869
870 870
871 void MacroAssembler::LoadHeapObject(Register result, 871 void MacroAssembler::LoadHeapObject(Register result,
872 Handle<HeapObject> object) { 872 Handle<HeapObject> object) {
873 AllowDeferredHandleDereference using_raw_address; 873 AllowDeferredHandleDereference using_raw_address;
874 if (isolate()->heap()->InNewSpace(*object)) { 874 if (isolate()->heap()->InNewSpace(*object)) {
875 Handle<JSGlobalPropertyCell> cell = 875 Handle<Cell> cell = isolate()->factory()->NewCell(object);
876 isolate()->factory()->NewJSGlobalPropertyCell(object);
877 Mov(result, Operand(cell)); 876 Mov(result, Operand(cell));
878 Ldr(result, FieldMemOperand(result, JSGlobalPropertyCell::kValueOffset)); 877 Ldr(result, FieldMemOperand(result, Cell::kValueOffset));
879 } else { 878 } else {
880 Mov(result, Operand(object)); 879 Mov(result, Operand(object));
881 } 880 }
882 } 881 }
883 882
884 883
885 void MacroAssembler::CheckForInvalidValuesInCalleeSavedRegs(RegList list) { 884 void MacroAssembler::CheckForInvalidValuesInCalleeSavedRegs(RegList list) {
886 if (emit_debug_code()) { 885 if (emit_debug_code()) {
887 // Only check for callee-saved registers. 886 // Only check for callee-saved registers.
888 // TODO(jbramley): Why? We still don't want caller-saved registers to be 887 // TODO(jbramley): Why? We still don't want caller-saved registers to be
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 CallStub(&stub); 1281 CallStub(&stub);
1283 } 1282 }
1284 1283
1285 1284
1286 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { 1285 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) {
1287 return ref0.address() - ref1.address(); 1286 return ref0.address() - ref1.address();
1288 } 1287 }
1289 1288
1290 1289
1291 void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function, 1290 void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function,
1291 Address function_address,
1292 ExternalReference thunk_ref,
1293 Register thunk_last_arg,
1292 int stack_space, 1294 int stack_space,
1293 int spill_offset, 1295 int spill_offset,
1294 bool returns_handle, 1296 bool returns_handle,
1295 int return_value_offset_from_fp) { 1297 int return_value_offset_from_fp) {
1298 ASM_LOCATION("CallApiFunctionAndReturn");
1296 ExternalReference next_address = 1299 ExternalReference next_address =
1297 ExternalReference::handle_scope_next_address(isolate()); 1300 ExternalReference::handle_scope_next_address(isolate());
1298 const int kNextOffset = 0; 1301 const int kNextOffset = 0;
1299 const int kLimitOffset = AddressOffset( 1302 const int kLimitOffset = AddressOffset(
1300 ExternalReference::handle_scope_limit_address(isolate()), 1303 ExternalReference::handle_scope_limit_address(isolate()),
1301 next_address); 1304 next_address);
1302 const int kLevelOffset = AddressOffset( 1305 const int kLevelOffset = AddressOffset(
1303 ExternalReference::handle_scope_level_address(isolate()), 1306 ExternalReference::handle_scope_level_address(isolate()),
1304 next_address); 1307 next_address);
1305 1308
(...skipping 20 matching lines...) Expand all
1326 Str(level_reg, MemOperand(handle_scope_base, kLevelOffset)); 1329 Str(level_reg, MemOperand(handle_scope_base, kLevelOffset));
1327 1330
1328 if (FLAG_log_timer_events) { 1331 if (FLAG_log_timer_events) {
1329 FrameScope frame(this, StackFrame::MANUAL); 1332 FrameScope frame(this, StackFrame::MANUAL);
1330 PushSafepointRegisters(); 1333 PushSafepointRegisters();
1331 Mov(x0, Operand(ExternalReference::isolate_address(isolate()))); 1334 Mov(x0, Operand(ExternalReference::isolate_address(isolate())));
1332 CallCFunction(ExternalReference::log_enter_external_function(isolate()), 1); 1335 CallCFunction(ExternalReference::log_enter_external_function(isolate()), 1);
1333 PopSafepointRegisters(); 1336 PopSafepointRegisters();
1334 } 1337 }
1335 1338
1339 Label profiler_disabled;
1340 Label end_profiler_check;
1341 bool* is_profiling_flag = isolate()->cpu_profiler()->is_profiling_address();
1342 STATIC_ASSERT(sizeof(*is_profiling_flag) == 1);
1343 Mov(x10, reinterpret_cast<uintptr_t>(is_profiling_flag));
1344 Ldrb(w10, MemOperand(x10));
1345 Cbz(w10, &profiler_disabled);
1346
1347 Register function_reg = x10;
1348 ASSERT(!AreAliased(thunk_last_arg, function_reg));
1349
1350 // Additional parameter is the address of the actual callback.
1351 Mov(thunk_last_arg, reinterpret_cast<uintptr_t>(function_address));
1352 Mov(function_reg, Operand(thunk_ref));
1353 B(&end_profiler_check);
1354
1355 Bind(&profiler_disabled);
1356 Mov(function_reg, Operand(function));
1357
1358 Bind(&end_profiler_check);
1359
1336 // Native call returns to the DirectCEntry stub which redirects to the 1360 // Native call returns to the DirectCEntry stub which redirects to the
1337 // return address pushed on stack (could have moved after GC). 1361 // return address pushed on stack (could have moved after GC).
1338 // DirectCEntry stub itself is generated early and never moves. 1362 // DirectCEntry stub itself is generated early and never moves.
1339 DirectCEntryStub stub; 1363 DirectCEntryStub stub;
1340 __ Mov(x2, Operand(function)); 1364 stub.GenerateCall(this, function_reg);
1341 stub.GenerateCall(this, x2);
1342 1365
1343 if (FLAG_log_timer_events) { 1366 if (FLAG_log_timer_events) {
1344 FrameScope frame(this, StackFrame::MANUAL); 1367 FrameScope frame(this, StackFrame::MANUAL);
1345 PushSafepointRegisters(); 1368 PushSafepointRegisters();
1346 Mov(x0, Operand(ExternalReference::isolate_address(isolate()))); 1369 Mov(x0, Operand(ExternalReference::isolate_address(isolate())));
1347 CallCFunction(ExternalReference::log_leave_external_function(isolate()), 1); 1370 CallCFunction(ExternalReference::log_leave_external_function(isolate()), 1);
1348 PopSafepointRegisters(); 1371 PopSafepointRegisters();
1349 } 1372 }
1350 1373
1351 Label promote_scheduled_exception; 1374 Label promote_scheduled_exception;
(...skipping 3289 matching lines...) Expand 10 before | Expand all | Expand 10 after
4641 } 4664 }
4642 } 4665 }
4643 4666
4644 4667
4645 #undef __ 4668 #undef __
4646 4669
4647 4670
4648 } } // namespace v8::internal 4671 } } // namespace v8::internal
4649 4672
4650 #endif // V8_TARGET_ARCH_A64 4673 #endif // V8_TARGET_ARCH_A64
OLDNEW
« no previous file with comments | « src/a64/macro-assembler-a64.h ('k') | src/a64/simulator-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698