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

Side by Side Diff: src/x87/macro-assembler-x87.cc

Issue 1773083002: X87: [wasm] Int64Lowering of I64Shl on ia32. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update the argument name in macro-assembler-x87.h Created 4 years, 9 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
« no previous file with comments | « src/x87/macro-assembler-x87.h ('k') | test/cctest/test-disasm-x87.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 } 590 }
591 591
592 void MacroAssembler::DebugBreak() { 592 void MacroAssembler::DebugBreak() {
593 Move(eax, Immediate(0)); 593 Move(eax, Immediate(0));
594 mov(ebx, Immediate(ExternalReference(Runtime::kHandleDebuggerStatement, 594 mov(ebx, Immediate(ExternalReference(Runtime::kHandleDebuggerStatement,
595 isolate()))); 595 isolate())));
596 CEntryStub ces(isolate(), 1); 596 CEntryStub ces(isolate(), 1);
597 call(ces.GetCode(), RelocInfo::DEBUGGER_STATEMENT); 597 call(ces.GetCode(), RelocInfo::DEBUGGER_STATEMENT);
598 } 598 }
599 599
600 void MacroAssembler::PairShl(Register high, Register low, uint8_t shift) {
601 if (shift >= 32) {
602 mov(high, low);
603 shl(high, shift - 32);
604 xor_(low, low);
605 } else {
606 shld(high, low, shift);
607 shl(low, shift);
608 }
609 }
610
611 void MacroAssembler::PairShl_cl(Register high, Register low) {
612 shld_cl(high, low);
613 shl_cl(low);
614 Label done;
615 test(ecx, Immediate(0x20));
616 j(equal, &done, Label::kNear);
617 mov(high, low);
618 xor_(low, low);
619 bind(&done);
620 }
600 621
601 bool MacroAssembler::IsUnsafeImmediate(const Immediate& x) { 622 bool MacroAssembler::IsUnsafeImmediate(const Immediate& x) {
602 static const int kMaxImmediateBits = 17; 623 static const int kMaxImmediateBits = 17;
603 if (!RelocInfo::IsNone(x.rmode_)) return false; 624 if (!RelocInfo::IsNone(x.rmode_)) return false;
604 return !is_intn(x.x_, kMaxImmediateBits); 625 return !is_intn(x.x_, kMaxImmediateBits);
605 } 626 }
606 627
607 628
608 void MacroAssembler::SafeMove(Register dst, const Immediate& x) { 629 void MacroAssembler::SafeMove(Register dst, const Immediate& x) {
609 if (IsUnsafeImmediate(x) && jit_cookie() != 0) { 630 if (IsUnsafeImmediate(x) && jit_cookie() != 0) {
(...skipping 2465 matching lines...) Expand 10 before | Expand all | Expand 10 after
3075 mov(eax, dividend); 3096 mov(eax, dividend);
3076 shr(eax, 31); 3097 shr(eax, 31);
3077 add(edx, eax); 3098 add(edx, eax);
3078 } 3099 }
3079 3100
3080 3101
3081 } // namespace internal 3102 } // namespace internal
3082 } // namespace v8 3103 } // namespace v8
3083 3104
3084 #endif // V8_TARGET_ARCH_X87 3105 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/macro-assembler-x87.h ('k') | test/cctest/test-disasm-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698