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

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

Issue 1156593002: Cache current thread in a reserved register and use it in LoadIsolate (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Added more comments. Created 5 years, 7 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
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_ARM) 6 #if defined(TARGET_ARCH_ARM)
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/os.h" 10 #include "vm/os.h"
(...skipping 3913 matching lines...) Expand 10 before | Expand all | Expand 10 after
3924 EXPECT_FLOAT_EQ(2.0, res, 0.0001f); 3924 EXPECT_FLOAT_EQ(2.0, res, 0.0001f);
3925 } 3925 }
3926 } 3926 }
3927 3927
3928 3928
3929 // Called from assembler_test.cc. 3929 // Called from assembler_test.cc.
3930 // LR: return address. 3930 // LR: return address.
3931 // R0: context. 3931 // R0: context.
3932 // R1: value. 3932 // R1: value.
3933 // R2: growable array. 3933 // R2: growable array.
3934 // R3: current thread.
3934 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) { 3935 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) {
3935 __ PushList((1 << CTX) | (1 << LR)); 3936 __ PushList((1 << CTX) | (1 << LR) | (1 << THR));
3936 __ mov(CTX, Operand(R0)); 3937 __ mov(CTX, Operand(R0));
3938 __ mov(THR, Operand(R3));
3937 __ StoreIntoObject(R2, 3939 __ StoreIntoObject(R2,
3938 FieldAddress(R2, GrowableObjectArray::data_offset()), 3940 FieldAddress(R2, GrowableObjectArray::data_offset()),
3939 R1); 3941 R1);
3940 __ PopList((1 << CTX) | (1 << LR)); 3942 __ PopList((1 << CTX) | (1 << LR) | (1 << THR));
3941 __ Ret(); 3943 __ Ret();
3942 } 3944 }
3943 3945
3944 3946
3945 ASSEMBLER_TEST_GENERATE(ComputeRange, assembler) { 3947 ASSEMBLER_TEST_GENERATE(ComputeRange, assembler) {
3946 Label miss, done; 3948 Label miss, done;
3947 __ mov(R1, Operand(R0)); 3949 __ mov(R1, Operand(R0));
3948 __ ComputeRange(R0, R1, R2, &miss); 3950 __ ComputeRange(R0, R1, R2, &miss);
3949 __ b(&done); 3951 __ b(&done);
3950 3952
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
3989 EXPECT_EQ(ICData::kInt64RangeBit, RANGE_OF(Integer::New(kMinInt64))); 3991 EXPECT_EQ(ICData::kInt64RangeBit, RANGE_OF(Integer::New(kMinInt64)));
3990 3992
3991 EXPECT_EQ(-1, RANGE_OF(Bool::True().raw())); 3993 EXPECT_EQ(-1, RANGE_OF(Bool::True().raw()));
3992 3994
3993 #undef RANGE_OF 3995 #undef RANGE_OF
3994 } 3996 }
3995 3997
3996 } // namespace dart 3998 } // namespace dart
3997 3999
3998 #endif // defined TARGET_ARCH_ARM 4000 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698