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

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

Issue 605533003: Make subtype test stubs isolate-specific. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/class_table.h » ('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_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/heap.h" 10 #include "vm/heap.h"
(...skipping 3414 matching lines...) Expand 10 before | Expand all | Expand 10 after
3425 3425
3426 void Assembler::LoadClassId(Register result, Register object) { 3426 void Assembler::LoadClassId(Register result, Register object) {
3427 ASSERT(RawObject::kClassIdTagPos == 16); 3427 ASSERT(RawObject::kClassIdTagPos == 16);
3428 ASSERT(RawObject::kClassIdTagSize == 16); 3428 ASSERT(RawObject::kClassIdTagSize == 16);
3429 const intptr_t class_id_offset = Object::tags_offset() + 3429 const intptr_t class_id_offset = Object::tags_offset() +
3430 RawObject::kClassIdTagPos / kBitsPerByte; 3430 RawObject::kClassIdTagPos / kBitsPerByte;
3431 movzxw(result, FieldAddress(object, class_id_offset)); 3431 movzxw(result, FieldAddress(object, class_id_offset));
3432 } 3432 }
3433 3433
3434 3434
3435 void Assembler::LoadClassById(Register result, Register class_id) { 3435 void Assembler::LoadClassById(Register result, Register class_id, Register pp) {
3436 ASSERT(result != class_id); 3436 ASSERT(result != class_id);
3437 movq(result, FieldAddress(CTX, Context::isolate_offset())); 3437 Isolate* isolate = Isolate::Current();
3438 const intptr_t table_offset_in_isolate = 3438 LoadImmediate(result, Immediate(isolate->class_table()->TableAddress()), pp);
3439 Isolate::class_table_offset() + ClassTable::table_offset(); 3439 movq(result, Address(result, 0));
3440 movq(result, Address(result, table_offset_in_isolate));
3441 movq(result, Address(result, class_id, TIMES_8, 0)); 3440 movq(result, Address(result, class_id, TIMES_8, 0));
3442 } 3441 }
3443 3442
3444 3443
3445 void Assembler::LoadClass(Register result, Register object) { 3444 void Assembler::LoadClass(Register result, Register object, Register pp) {
3446 LoadClassId(TMP, object); 3445 LoadClassId(TMP, object);
3447 LoadClassById(result, TMP); 3446 LoadClassById(result, TMP, pp);
3448 } 3447 }
3449 3448
3450 3449
3451 void Assembler::CompareClassId(Register object, intptr_t class_id) { 3450 void Assembler::CompareClassId(Register object, intptr_t class_id) {
3452 LoadClassId(TMP, object); 3451 LoadClassId(TMP, object);
3453 cmpl(TMP, Immediate(class_id)); 3452 cmpl(TMP, Immediate(class_id));
3454 } 3453 }
3455 3454
3456 3455
3457 void Assembler::SmiUntagOrCheckClass(Register object, 3456 void Assembler::SmiUntagOrCheckClass(Register object,
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
3564 3563
3565 3564
3566 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3565 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3567 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 3566 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
3568 return xmm_reg_names[reg]; 3567 return xmm_reg_names[reg];
3569 } 3568 }
3570 3569
3571 } // namespace dart 3570 } // namespace dart
3572 3571
3573 #endif // defined TARGET_ARCH_X64 3572 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/class_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698