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

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

Issue 181183004: VM: Improve receiver class check in polymorphic inlining. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 3206 matching lines...) Expand 10 before | Expand all | Expand 10 after
3217 __ movl(ECX, Address(ESP, 4 * kWordSize)); 3217 __ movl(ECX, Address(ESP, 4 * kWordSize));
3218 __ pushl(EAX); 3218 __ pushl(EAX);
3219 __ StoreIntoObject(ECX, 3219 __ StoreIntoObject(ECX,
3220 FieldAddress(ECX, GrowableObjectArray::data_offset()), 3220 FieldAddress(ECX, GrowableObjectArray::data_offset()),
3221 EAX); 3221 EAX);
3222 __ popl(EAX); 3222 __ popl(EAX);
3223 __ popl(CTX); 3223 __ popl(CTX);
3224 __ ret(); 3224 __ ret();
3225 } 3225 }
3226 3226
3227
3228 ASSEMBLER_TEST_GENERATE(BitTest, assembler) {
3229 __ movl(EAX, Immediate(4));
3230 __ movl(ECX, Immediate(2));
3231 __ bt(EAX, ECX);
3232 Label ok;
3233 __ j(CARRY, &ok);
3234 __ int3();
3235 __ Bind(&ok);
3236 __ movl(EAX, Immediate(1));
3237 __ ret();
3238 }
3239
3240
3241 ASSEMBLER_TEST_RUN(BitTest, test) {
3242 typedef int (*BitTest)();
3243 EXPECT_EQ(1, reinterpret_cast<BitTest>(test->entry())());
3244 }
3245
3246
3227 } // namespace dart 3247 } // namespace dart
3228 3248
3229 #endif // defined TARGET_ARCH_IA32 3249 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698