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

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

Issue 387733002: Specialize mint shift code on ia32 for a constant shift amount. (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/disassembler_ia32.cc » ('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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 __ movl(EAX, Immediate(-1)); 546 __ movl(EAX, Immediate(-1));
547 __ movl(ECX, Immediate(2)); 547 __ movl(ECX, Immediate(2));
548 __ shll(Address(ESP, 0), ECX); 548 __ shll(Address(ESP, 0), ECX);
549 __ shld(Address(ESP, 0), EAX); 549 __ shld(Address(ESP, 0), EAX);
550 __ cmpl(Address(ESP, 0), Immediate(0xF0000003)); 550 __ cmpl(Address(ESP, 0), Immediate(0xF0000003));
551 __ j(EQUAL, &donetest15); 551 __ j(EQUAL, &donetest15);
552 __ int3(); 552 __ int3();
553 __ Bind(&donetest15); 553 __ Bind(&donetest15);
554 __ addl(ESP, Immediate(kWordSize)); 554 __ addl(ESP, Immediate(kWordSize));
555 555
556 Label donetest16;
557 __ movl(EDX, Immediate(0x80000000));
558 __ movl(EAX, Immediate(0));
559 __ movl(ECX, Immediate(3));
560 __ sarl(EDX, Immediate(3));
561 __ shrd(EDX, EAX, Immediate(3));
562 __ cmpl(EDX, Immediate(0x1e000000));
563 __ j(EQUAL, &donetest16);
564 __ int3();
565 __ Bind(&donetest16);
566
567 Label donetest17;
568 __ movl(EDX, Immediate(0xFF000000));
569 __ movl(EAX, Immediate(-1));
570 __ shll(EDX, Immediate(2));
571 __ shld(EDX, EAX, Immediate(2));
572 __ cmpl(EDX, Immediate(0xF0000003));
573 __ j(EQUAL, &donetest17);
574 __ int3();
575 __ Bind(&donetest17);
576
556 __ movl(EAX, Immediate(0)); 577 __ movl(EAX, Immediate(0));
557 __ ret(); 578 __ ret();
558 } 579 }
559 580
560 581
561 ASSEMBLER_TEST_RUN(LogicalOps, test) { 582 ASSEMBLER_TEST_RUN(LogicalOps, test) {
562 typedef int (*LogicalOpsCode)(); 583 typedef int (*LogicalOpsCode)();
563 EXPECT_EQ(0, reinterpret_cast<LogicalOpsCode>(test->entry())()); 584 EXPECT_EQ(0, reinterpret_cast<LogicalOpsCode>(test->entry())());
564 } 585 }
565 586
(...skipping 2695 matching lines...) Expand 10 before | Expand all | Expand 10 after
3261 FieldAddress(ECX, GrowableObjectArray::data_offset()), 3282 FieldAddress(ECX, GrowableObjectArray::data_offset()),
3262 EAX); 3283 EAX);
3263 __ popl(EAX); 3284 __ popl(EAX);
3264 __ popl(CTX); 3285 __ popl(CTX);
3265 __ ret(); 3286 __ ret();
3266 } 3287 }
3267 3288
3268 } // namespace dart 3289 } // namespace dart
3269 3290
3270 #endif // defined TARGET_ARCH_IA32 3291 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/assembler_ia32.cc ('k') | runtime/vm/disassembler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698