Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 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/longjump.h" | 10 #include "vm/longjump.h" |
| (...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1066 } | 1066 } |
| 1067 | 1067 |
| 1068 | 1068 |
| 1069 void Assembler::CompareClassId( | 1069 void Assembler::CompareClassId( |
| 1070 Register object, intptr_t class_id, Register pp) { | 1070 Register object, intptr_t class_id, Register pp) { |
| 1071 LoadClassId(TMP, object, pp); | 1071 LoadClassId(TMP, object, pp); |
| 1072 CompareImmediate(TMP, class_id, pp); | 1072 CompareImmediate(TMP, class_id, pp); |
| 1073 } | 1073 } |
| 1074 | 1074 |
| 1075 | 1075 |
| 1076 void Assembler::LoadTaggedClassIdMayBeSmi(Register result, Register object) { | |
|
zra
2014/06/04 18:55:00
tsti(object, kSmiTagMask);
LoadImmediate(result, S
srdjan
2014/06/04 20:08:04
Discussed offline, leave it as it be since LoadCla
| |
| 1077 Label load, done; | |
| 1078 tsti(object, kSmiTagMask); | |
| 1079 b(&load, NE); | |
| 1080 LoadImmediate(result, Smi::RawValue(kSmiCid), PP); | |
| 1081 b(&done); | |
| 1082 Bind(&load); | |
| 1083 LoadClassId(result, object, PP); | |
| 1084 SmiTag(result); | |
| 1085 Bind(&done); | |
| 1086 } | |
| 1087 | |
| 1088 | |
| 1076 // Frame entry and exit. | 1089 // Frame entry and exit. |
| 1077 void Assembler::ReserveAlignedFrameSpace(intptr_t frame_space) { | 1090 void Assembler::ReserveAlignedFrameSpace(intptr_t frame_space) { |
| 1078 // Reserve space for arguments and align frame before entering | 1091 // Reserve space for arguments and align frame before entering |
| 1079 // the C++ world. | 1092 // the C++ world. |
| 1080 if (frame_space != 0) { | 1093 if (frame_space != 0) { |
| 1081 AddImmediate(SP, SP, -frame_space, kNoPP); | 1094 AddImmediate(SP, SP, -frame_space, kNoPP); |
| 1082 } | 1095 } |
| 1083 if (OS::ActivationFrameAlignment() > 1) { | 1096 if (OS::ActivationFrameAlignment() > 1) { |
| 1084 andi(SP, SP, ~(OS::ActivationFrameAlignment() - 1)); | 1097 andi(SP, SP, ~(OS::ActivationFrameAlignment() - 1)); |
| 1085 } | 1098 } |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1368 LoadImmediate(TMP, tags, pp); | 1381 LoadImmediate(TMP, tags, pp); |
| 1369 StoreFieldToOffset(TMP, instance_reg, Object::tags_offset(), pp); | 1382 StoreFieldToOffset(TMP, instance_reg, Object::tags_offset(), pp); |
| 1370 } else { | 1383 } else { |
| 1371 b(failure); | 1384 b(failure); |
| 1372 } | 1385 } |
| 1373 } | 1386 } |
| 1374 | 1387 |
| 1375 } // namespace dart | 1388 } // namespace dart |
| 1376 | 1389 |
| 1377 #endif // defined TARGET_ARCH_ARM64 | 1390 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |