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

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

Issue 384703002: Revert r38116 because of crashes. (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
« no previous file with comments | « runtime/vm/assembler_ia32.cc ('k') | runtime/vm/assembler_x64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3226 matching lines...) Expand 10 before | Expand all | Expand 10 after
3237 __ movl(ECX, Address(ESP, 4 * kWordSize)); 3237 __ movl(ECX, Address(ESP, 4 * kWordSize));
3238 __ pushl(EAX); 3238 __ pushl(EAX);
3239 __ StoreIntoObject(ECX, 3239 __ StoreIntoObject(ECX,
3240 FieldAddress(ECX, GrowableObjectArray::data_offset()), 3240 FieldAddress(ECX, GrowableObjectArray::data_offset()),
3241 EAX); 3241 EAX);
3242 __ popl(EAX); 3242 __ popl(EAX);
3243 __ popl(CTX); 3243 __ popl(CTX);
3244 __ ret(); 3244 __ ret();
3245 } 3245 }
3246 3246
3247
3248 ASSEMBLER_TEST_GENERATE(BitTest, assembler) {
3249 __ movl(EAX, Immediate(4));
3250 __ movl(ECX, Immediate(2));
3251 __ bt(EAX, ECX);
3252 Label ok;
3253 __ j(CARRY, &ok);
3254 __ int3();
3255 __ Bind(&ok);
3256 __ movl(EAX, Immediate(1));
3257 __ ret();
3258 }
3259
3260
3261 ASSEMBLER_TEST_RUN(BitTest, test) {
3262 typedef int (*BitTest)();
3263 EXPECT_EQ(1, reinterpret_cast<BitTest>(test->entry())());
3264 }
3265
3266
3267 } // namespace dart 3247 } // namespace dart
3268 3248
3269 #endif // defined TARGET_ARCH_IA32 3249 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/assembler_ia32.cc ('k') | runtime/vm/assembler_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698