| 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/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 __ ldr(R2, FieldAddress(R0, Object::tags_offset())); | 977 __ ldr(R2, FieldAddress(R0, Object::tags_offset())); |
| 978 __ tst(R2, Operand(1 << RawObject::kRememberedBit)); | 978 __ tst(R2, Operand(1 << RawObject::kRememberedBit)); |
| 979 __ b(&add_to_buffer, EQ); | 979 __ b(&add_to_buffer, EQ); |
| 980 __ PopList((1 << R1) | (1 << R2) | (1 << R3)); | 980 __ PopList((1 << R1) | (1 << R2) | (1 << R3)); |
| 981 __ Ret(); | 981 __ Ret(); |
| 982 | 982 |
| 983 __ Bind(&add_to_buffer); | 983 __ Bind(&add_to_buffer); |
| 984 // R2: Header word. | 984 // R2: Header word. |
| 985 if (TargetCPUFeatures::arm_version() == ARMv5TE) { | 985 if (TargetCPUFeatures::arm_version() == ARMv5TE) { |
| 986 // TODO(21263): Implement 'swp' and use it below. | 986 // TODO(21263): Implement 'swp' and use it below. |
| 987 #if !defined(USING_SIMULATOR) |
| 987 ASSERT(OS::NumberOfAvailableProcessors() <= 1); | 988 ASSERT(OS::NumberOfAvailableProcessors() <= 1); |
| 989 #endif |
| 988 __ orr(R2, R2, Operand(1 << RawObject::kRememberedBit)); | 990 __ orr(R2, R2, Operand(1 << RawObject::kRememberedBit)); |
| 989 __ str(R2, FieldAddress(R0, Object::tags_offset())); | 991 __ str(R2, FieldAddress(R0, Object::tags_offset())); |
| 990 } else { | 992 } else { |
| 991 // Atomically set the remembered bit of the object header. | 993 // Atomically set the remembered bit of the object header. |
| 992 ASSERT(Object::tags_offset() == 0); | 994 ASSERT(Object::tags_offset() == 0); |
| 993 __ sub(R3, R0, Operand(kHeapObjectTag)); | 995 __ sub(R3, R0, Operand(kHeapObjectTag)); |
| 994 // R3: Untagged address of header word (ldrex/strex do not support offsets). | 996 // R3: Untagged address of header word (ldrex/strex do not support offsets). |
| 995 Label retry; | 997 Label retry; |
| 996 __ Bind(&retry); | 998 __ Bind(&retry); |
| 997 __ ldrex(R2, R3); | 999 __ ldrex(R2, R3); |
| (...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2053 const Register right = R0; | 2055 const Register right = R0; |
| 2054 __ ldr(left, Address(SP, 1 * kWordSize)); | 2056 __ ldr(left, Address(SP, 1 * kWordSize)); |
| 2055 __ ldr(right, Address(SP, 0 * kWordSize)); | 2057 __ ldr(right, Address(SP, 0 * kWordSize)); |
| 2056 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 2058 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
| 2057 __ Ret(); | 2059 __ Ret(); |
| 2058 } | 2060 } |
| 2059 | 2061 |
| 2060 } // namespace dart | 2062 } // namespace dart |
| 2061 | 2063 |
| 2062 #endif // defined TARGET_ARCH_ARM | 2064 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |