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

Side by Side Diff: src/arm/macro-assembler-arm.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/arm/macro-assembler-arm.h ('k') | src/arm/simulator-arm.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 Heap::RootListIndex index, 393 Heap::RootListIndex index,
394 Condition cond) { 394 Condition cond) {
395 str(source, MemOperand(kRootRegister, index << kPointerSizeLog2), cond); 395 str(source, MemOperand(kRootRegister, index << kPointerSizeLog2), cond);
396 } 396 }
397 397
398 398
399 void MacroAssembler::LoadHeapObject(Register result, 399 void MacroAssembler::LoadHeapObject(Register result,
400 Handle<HeapObject> object) { 400 Handle<HeapObject> object) {
401 AllowDeferredHandleDereference using_raw_address; 401 AllowDeferredHandleDereference using_raw_address;
402 if (isolate()->heap()->InNewSpace(*object)) { 402 if (isolate()->heap()->InNewSpace(*object)) {
403 Handle<JSGlobalPropertyCell> cell = 403 Handle<Cell> cell = isolate()->factory()->NewCell(object);
404 isolate()->factory()->NewJSGlobalPropertyCell(object);
405 mov(result, Operand(cell)); 404 mov(result, Operand(cell));
406 ldr(result, FieldMemOperand(result, JSGlobalPropertyCell::kValueOffset)); 405 ldr(result, FieldMemOperand(result, Cell::kValueOffset));
407 } else { 406 } else {
408 mov(result, Operand(object)); 407 mov(result, Operand(object));
409 } 408 }
410 } 409 }
411 410
412 411
413 void MacroAssembler::InNewSpace(Register object, 412 void MacroAssembler::InNewSpace(Register object,
414 Register scratch, 413 Register scratch,
415 Condition cond, 414 Condition cond,
416 Label* branch) { 415 Label* branch) {
(...skipping 1821 matching lines...) Expand 10 before | Expand all | Expand 10 after
2238 Jump(stub->GetCode(isolate()), RelocInfo::CODE_TARGET, cond); 2237 Jump(stub->GetCode(isolate()), RelocInfo::CODE_TARGET, cond);
2239 } 2238 }
2240 2239
2241 2240
2242 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { 2241 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) {
2243 return ref0.address() - ref1.address(); 2242 return ref0.address() - ref1.address();
2244 } 2243 }
2245 2244
2246 2245
2247 void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function, 2246 void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function,
2247 Address function_address,
2248 ExternalReference thunk_ref,
2249 Register thunk_last_arg,
2248 int stack_space, 2250 int stack_space,
2249 bool returns_handle, 2251 bool returns_handle,
2250 int return_value_offset) { 2252 int return_value_offset) {
2251 ExternalReference next_address = 2253 ExternalReference next_address =
2252 ExternalReference::handle_scope_next_address(isolate()); 2254 ExternalReference::handle_scope_next_address(isolate());
2253 const int kNextOffset = 0; 2255 const int kNextOffset = 0;
2254 const int kLimitOffset = AddressOffset( 2256 const int kLimitOffset = AddressOffset(
2255 ExternalReference::handle_scope_limit_address(isolate()), 2257 ExternalReference::handle_scope_limit_address(isolate()),
2256 next_address); 2258 next_address);
2257 const int kLevelOffset = AddressOffset( 2259 const int kLevelOffset = AddressOffset(
(...skipping 10 matching lines...) Expand all
2268 2270
2269 if (FLAG_log_timer_events) { 2271 if (FLAG_log_timer_events) {
2270 FrameScope frame(this, StackFrame::MANUAL); 2272 FrameScope frame(this, StackFrame::MANUAL);
2271 PushSafepointRegisters(); 2273 PushSafepointRegisters();
2272 PrepareCallCFunction(1, r0); 2274 PrepareCallCFunction(1, r0);
2273 mov(r0, Operand(ExternalReference::isolate_address(isolate()))); 2275 mov(r0, Operand(ExternalReference::isolate_address(isolate())));
2274 CallCFunction(ExternalReference::log_enter_external_function(isolate()), 1); 2276 CallCFunction(ExternalReference::log_enter_external_function(isolate()), 1);
2275 PopSafepointRegisters(); 2277 PopSafepointRegisters();
2276 } 2278 }
2277 2279
2280 ASSERT(!thunk_last_arg.is(r3));
2281 Label profiler_disabled;
2282 Label end_profiler_check;
2283 bool* is_profiling_flag =
2284 isolate()->cpu_profiler()->is_profiling_address();
2285 STATIC_ASSERT(sizeof(*is_profiling_flag) == 1);
2286 mov(r3, Operand(reinterpret_cast<int32_t>(is_profiling_flag)));
2287 ldrb(r3, MemOperand(r3, 0));
2288 cmp(r3, Operand(0));
2289 b(eq, &profiler_disabled);
2290
2291 // Additional parameter is the address of the actual callback.
2292 mov(thunk_last_arg, Operand(reinterpret_cast<int32_t>(function_address)));
2293 mov(r3, Operand(thunk_ref));
2294 jmp(&end_profiler_check);
2295
2296 bind(&profiler_disabled);
2297 mov(r3, Operand(function));
2298 bind(&end_profiler_check);
2299
2278 // Native call returns to the DirectCEntry stub which redirects to the 2300 // Native call returns to the DirectCEntry stub which redirects to the
2279 // return address pushed on stack (could have moved after GC). 2301 // return address pushed on stack (could have moved after GC).
2280 // DirectCEntry stub itself is generated early and never moves. 2302 // DirectCEntry stub itself is generated early and never moves.
2281 DirectCEntryStub stub; 2303 DirectCEntryStub stub;
2282 stub.GenerateCall(this, function); 2304 stub.GenerateCall(this, r3);
2283 2305
2284 if (FLAG_log_timer_events) { 2306 if (FLAG_log_timer_events) {
2285 FrameScope frame(this, StackFrame::MANUAL); 2307 FrameScope frame(this, StackFrame::MANUAL);
2286 PushSafepointRegisters(); 2308 PushSafepointRegisters();
2287 PrepareCallCFunction(1, r0); 2309 PrepareCallCFunction(1, r0);
2288 mov(r0, Operand(ExternalReference::isolate_address(isolate()))); 2310 mov(r0, Operand(ExternalReference::isolate_address(isolate())));
2289 CallCFunction(ExternalReference::log_leave_external_function(isolate()), 1); 2311 CallCFunction(ExternalReference::log_leave_external_function(isolate()), 1);
2290 PopSafepointRegisters(); 2312 PopSafepointRegisters();
2291 } 2313 }
2292 2314
(...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after
3794 void CodePatcher::EmitCondition(Condition cond) { 3816 void CodePatcher::EmitCondition(Condition cond) {
3795 Instr instr = Assembler::instr_at(masm_.pc_); 3817 Instr instr = Assembler::instr_at(masm_.pc_);
3796 instr = (instr & ~kCondMask) | cond; 3818 instr = (instr & ~kCondMask) | cond;
3797 masm_.emit(instr); 3819 masm_.emit(instr);
3798 } 3820 }
3799 3821
3800 3822
3801 } } // namespace v8::internal 3823 } } // namespace v8::internal
3802 3824
3803 #endif // V8_TARGET_ARCH_ARM 3825 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/simulator-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698