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

Side by Side Diff: src/arm64/lithium-codegen-arm64.cc

Issue 318773009: ARM64: Clean up support for explicit literal load. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arm64/lithium-codegen-arm64.h" 7 #include "src/arm64/lithium-codegen-arm64.h"
8 #include "src/arm64/lithium-gap-resolver-arm64.h" 8 #include "src/arm64/lithium-gap-resolver-arm64.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/stub-cache.h" 10 #include "src/stub-cache.h"
(...skipping 3085 matching lines...) Expand 10 before | Expand all | Expand 10 after
3096 // instanceof stub. 3096 // instanceof stub.
3097 __ Ldr(map, FieldMemOperand(object, HeapObject::kMapOffset)); 3097 __ Ldr(map, FieldMemOperand(object, HeapObject::kMapOffset));
3098 { 3098 {
3099 // Below we use Factory::the_hole_value() on purpose instead of loading from 3099 // Below we use Factory::the_hole_value() on purpose instead of loading from
3100 // the root array to force relocation and later be able to patch with a 3100 // the root array to force relocation and later be able to patch with a
3101 // custom value. 3101 // custom value.
3102 InstructionAccurateScope scope(masm(), 5); 3102 InstructionAccurateScope scope(masm(), 5);
3103 __ bind(&map_check); 3103 __ bind(&map_check);
3104 // Will be patched with the cached map. 3104 // Will be patched with the cached map.
3105 Handle<Cell> cell = factory()->NewCell(factory()->the_hole_value()); 3105 Handle<Cell> cell = factory()->NewCell(factory()->the_hole_value());
3106 __ LoadRelocated(scratch, Operand(Handle<Object>(cell))); 3106 __ ldr(scratch, Immediate(Handle<Object>(cell)));
3107 __ ldr(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset)); 3107 __ ldr(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset));
3108 __ cmp(map, scratch); 3108 __ cmp(map, scratch);
3109 __ b(&cache_miss, ne); 3109 __ b(&cache_miss, ne);
3110 // The address of this instruction is computed relative to the map check 3110 // The address of this instruction is computed relative to the map check
3111 // above, so check the size of the code generated. 3111 // above, so check the size of the code generated.
3112 ASSERT(masm()->InstructionsGeneratedSince(&map_check) == 4); 3112 ASSERT(masm()->InstructionsGeneratedSince(&map_check) == 4);
3113 // Will be patched with the cached result. 3113 // Will be patched with the cached result.
3114 __ LoadRelocated(result, Operand(factory()->the_hole_value())); 3114 __ ldr(result, Immediate(factory()->the_hole_value()));
3115 } 3115 }
3116 __ B(&done); 3116 __ B(&done);
3117 3117
3118 // The inlined call site cache did not match. 3118 // The inlined call site cache did not match.
3119 // Check null and string before calling the deferred code. 3119 // Check null and string before calling the deferred code.
3120 __ Bind(&cache_miss); 3120 __ Bind(&cache_miss);
3121 // Compute the address of the map check. It must not be clobbered until the 3121 // Compute the address of the map check. It must not be clobbered until the
3122 // InstanceOfStub has used it. 3122 // InstanceOfStub has used it.
3123 __ Adr(map_check_site, &map_check); 3123 __ Adr(map_check_site, &map_check);
3124 // Null is not instance of anything. 3124 // Null is not instance of anything.
(...skipping 2923 matching lines...) Expand 10 before | Expand all | Expand 10 after
6048 Handle<ScopeInfo> scope_info = instr->scope_info(); 6048 Handle<ScopeInfo> scope_info = instr->scope_info();
6049 __ Push(scope_info); 6049 __ Push(scope_info);
6050 __ Push(ToRegister(instr->function())); 6050 __ Push(ToRegister(instr->function()));
6051 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); 6051 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr);
6052 RecordSafepoint(Safepoint::kNoLazyDeopt); 6052 RecordSafepoint(Safepoint::kNoLazyDeopt);
6053 } 6053 }
6054 6054
6055 6055
6056 6056
6057 } } // namespace v8::internal 6057 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698