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

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

Issue 10916082: Make register allocator to disregard constant computation with no uses. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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/os.h" 9 #include "vm/os.h"
10 #include "vm/unit_test.h" 10 #include "vm/unit_test.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 ASSEMBLER_TEST_GENERATE(Bitwise, assembler) { 338 ASSEMBLER_TEST_GENERATE(Bitwise, assembler) {
339 __ movl(ECX, Immediate(42)); 339 __ movl(ECX, Immediate(42));
340 __ xorl(ECX, ECX); 340 __ xorl(ECX, ECX);
341 __ orl(ECX, Immediate(256)); 341 __ orl(ECX, Immediate(256));
342 __ movl(EAX, Immediate(4)); 342 __ movl(EAX, Immediate(4));
343 __ orl(ECX, EAX); 343 __ orl(ECX, EAX);
344 __ movl(EAX, Immediate(0xfff0)); 344 __ movl(EAX, Immediate(0xfff0));
345 __ andl(ECX, EAX); 345 __ andl(ECX, EAX);
346 __ movl(EAX, Immediate(1)); 346 __ movl(EAX, Immediate(1));
347 __ orl(ECX, EAX); 347 __ orl(ECX, EAX);
348 __ xorl(ECX, Immediate(0));
348 __ movl(EAX, ECX); 349 __ movl(EAX, ECX);
349 __ ret(); 350 __ ret();
350 } 351 }
351 352
352 353
353 ASSEMBLER_TEST_RUN(Bitwise, entry) { 354 ASSEMBLER_TEST_RUN(Bitwise, entry) {
354 typedef int (*Bitwise)(); 355 typedef int (*Bitwise)();
355 EXPECT_EQ(256 + 1, reinterpret_cast<Bitwise>(entry)()); 356 EXPECT_EQ(256 + 1, reinterpret_cast<Bitwise>(entry)());
356 } 357 }
357 358
(...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1859 FieldAddress(ECX, GrowableObjectArray::data_offset()), 1860 FieldAddress(ECX, GrowableObjectArray::data_offset()),
1860 EAX); 1861 EAX);
1861 __ popl(CTX); 1862 __ popl(CTX);
1862 __ ret(); 1863 __ ret();
1863 } 1864 }
1864 1865
1865 1866
1866 } // namespace dart 1867 } // namespace dart
1867 1868
1868 #endif // defined TARGET_ARCH_IA32 1869 #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