| OLD | NEW |
| 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_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 757 | 757 |
| 758 __ Bind(&call_target_function); | 758 __ Bind(&call_target_function); |
| 759 // R0: Target function. | 759 // R0: Target function. |
| 760 __ ldr(R0, FieldAddress(R0, Function::code_offset())); | 760 __ ldr(R0, FieldAddress(R0, Function::code_offset())); |
| 761 __ ldr(R0, FieldAddress(R0, Code::instructions_offset())); | 761 __ ldr(R0, FieldAddress(R0, Code::instructions_offset())); |
| 762 __ AddImmediate(R0, Instructions::HeaderSize() - kHeapObjectTag); | 762 __ AddImmediate(R0, Instructions::HeaderSize() - kHeapObjectTag); |
| 763 __ bx(R0); | 763 __ bx(R0); |
| 764 | 764 |
| 765 // Instance in R0, return its class-id in R0 as Smi. | 765 // Instance in R0, return its class-id in R0 as Smi. |
| 766 __ Bind(&get_class_id_as_smi); | 766 __ Bind(&get_class_id_as_smi); |
| 767 Label not_smi; | 767 |
| 768 // Test if Smi -> load Smi class for comparison. | 768 // Test if Smi -> load Smi class for comparison. |
| 769 __ tst(R0, ShifterOperand(kSmiTagMask)); | 769 __ tst(R0, ShifterOperand(kSmiTagMask)); |
| 770 __ mov(R0, ShifterOperand(Smi::RawValue(kSmiCid)), EQ); | 770 __ mov(R0, ShifterOperand(Smi::RawValue(kSmiCid)), EQ); |
| 771 __ bx(LR, EQ); | 771 __ bx(LR, EQ); |
| 772 __ LoadClassId(R0, R0); | 772 __ LoadClassId(R0, R0); |
| 773 __ SmiTag(R0); | 773 __ SmiTag(R0); |
| 774 __ bx(LR); | 774 __ bx(LR); |
| 775 } | 775 } |
| 776 | 776 |
| 777 | 777 |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 __ Bind(&reference_compare); | 1083 __ Bind(&reference_compare); |
| 1084 __ cmp(left, ShifterOperand(right)); | 1084 __ cmp(left, ShifterOperand(right)); |
| 1085 __ Bind(&done); | 1085 __ Bind(&done); |
| 1086 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); | 1086 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); |
| 1087 __ Ret(); | 1087 __ Ret(); |
| 1088 } | 1088 } |
| 1089 | 1089 |
| 1090 } // namespace dart | 1090 } // namespace dart |
| 1091 | 1091 |
| 1092 #endif // defined TARGET_ARCH_ARM | 1092 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |