| 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/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 | 869 |
| 870 DECLARE_LEAF_RUNTIME_ENTRY(void, StoreBufferBlockProcess, Isolate* isolate); | 870 DECLARE_LEAF_RUNTIME_ENTRY(void, StoreBufferBlockProcess, Isolate* isolate); |
| 871 | 871 |
| 872 // Helper stub to implement Assembler::StoreIntoObject. | 872 // Helper stub to implement Assembler::StoreIntoObject. |
| 873 // Input parameters: | 873 // Input parameters: |
| 874 // R0: address (i.e. object) being stored into. | 874 // R0: address (i.e. object) being stored into. |
| 875 void StubCode::GenerateUpdateStoreBufferStub(Assembler* assembler) { | 875 void StubCode::GenerateUpdateStoreBufferStub(Assembler* assembler) { |
| 876 // Save values being destroyed. | 876 // Save values being destroyed. |
| 877 __ PushList((1 << R1) | (1 << R2) | (1 << R3)); | 877 __ PushList((1 << R1) | (1 << R2) | (1 << R3)); |
| 878 | 878 |
| 879 Label add_to_buffer; |
| 880 // Check whether this object has already been remembered. Skip adding to the |
| 881 // store buffer if the object is in the store buffer already. |
| 882 // Spilled: EDX, ECX |
| 883 // EAX: Address being stored |
| 884 __ ldr(R2, FieldAddress(R0, Object::tags_offset())); |
| 885 __ tst(R2, ShifterOperand(1 << RawObject::kRememberedBit)); |
| 886 __ b(&add_to_buffer, EQ); |
| 887 __ PopList((1 << R1) | (1 << R2) | (1 << R3)); |
| 888 __ Ret(); |
| 889 |
| 890 __ Bind(&add_to_buffer); |
| 891 __ orr(R2, R2, ShifterOperand(1 << RawObject::kRememberedBit)); |
| 892 __ str(R2, FieldAddress(R0, Object::tags_offset())); |
| 893 |
| 879 // Load the isolate out of the context. | 894 // Load the isolate out of the context. |
| 880 // Spilled: R1, R2, R3. | 895 // Spilled: R1, R2, R3. |
| 881 // R0: address being stored. | 896 // R0: address being stored. |
| 882 __ ldr(R1, FieldAddress(CTX, Context::isolate_offset())); | 897 __ ldr(R1, FieldAddress(CTX, Context::isolate_offset())); |
| 883 | 898 |
| 884 // Load top_ out of the StoreBufferBlock and add the address to the pointers_. | 899 // Load top_ out of the StoreBufferBlock and add the address to the pointers_. |
| 885 // R1: isolate. | 900 // R1: isolate. |
| 886 intptr_t store_buffer_offset = Isolate::store_buffer_block_offset(); | 901 intptr_t store_buffer_offset = Isolate::store_buffer_block_offset(); |
| 887 __ LoadFromOffset(kLoadWord, R2, R1, | 902 __ LoadFromOffset(kLoadWord, R2, R1, |
| 888 store_buffer_offset + StoreBufferBlock::top_offset()); | 903 store_buffer_offset + StoreBufferBlock::top_offset()); |
| (...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1903 __ Bind(&reference_compare); | 1918 __ Bind(&reference_compare); |
| 1904 __ cmp(left, ShifterOperand(right)); | 1919 __ cmp(left, ShifterOperand(right)); |
| 1905 __ Bind(&done); | 1920 __ Bind(&done); |
| 1906 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); | 1921 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); |
| 1907 __ Ret(); | 1922 __ Ret(); |
| 1908 } | 1923 } |
| 1909 | 1924 |
| 1910 } // namespace dart | 1925 } // namespace dart |
| 1911 | 1926 |
| 1912 #endif // defined TARGET_ARCH_ARM | 1927 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |