| Index: src/x87/macro-assembler-x87.cc
|
| diff --git a/src/x87/macro-assembler-x87.cc b/src/x87/macro-assembler-x87.cc
|
| index 0434119c4e496d50de471c0e431e7e7df47a1e28..821229d1952b9037490404761dddedb635c8cd13 100644
|
| --- a/src/x87/macro-assembler-x87.cc
|
| +++ b/src/x87/macro-assembler-x87.cc
|
| @@ -597,7 +597,7 @@ void MacroAssembler::DebugBreak() {
|
| call(ces.GetCode(), RelocInfo::DEBUGGER_STATEMENT);
|
| }
|
|
|
| -void MacroAssembler::PairShl(Register high, Register low, uint8_t shift) {
|
| +void MacroAssembler::ShlPair(Register high, Register low, uint8_t shift) {
|
| if (shift >= 32) {
|
| mov(high, low);
|
| shl(high, shift - 32);
|
| @@ -608,7 +608,7 @@ void MacroAssembler::PairShl(Register high, Register low, uint8_t shift) {
|
| }
|
| }
|
|
|
| -void MacroAssembler::PairShl_cl(Register high, Register low) {
|
| +void MacroAssembler::ShlPair_cl(Register high, Register low) {
|
| shld_cl(high, low);
|
| shl_cl(low);
|
| Label done;
|
| @@ -619,6 +619,50 @@ void MacroAssembler::PairShl_cl(Register high, Register low) {
|
| bind(&done);
|
| }
|
|
|
| +void MacroAssembler::ShrPair(Register high, Register low, uint8_t shift) {
|
| + if (shift >= 32) {
|
| + mov(low, high);
|
| + shr(low, shift - 32);
|
| + xor_(high, high);
|
| + } else {
|
| + shrd(high, low, shift);
|
| + shr(high, shift);
|
| + }
|
| +}
|
| +
|
| +void MacroAssembler::ShrPair_cl(Register high, Register low) {
|
| + shrd_cl(low, high);
|
| + shr_cl(high);
|
| + Label done;
|
| + test(ecx, Immediate(0x20));
|
| + j(equal, &done, Label::kNear);
|
| + mov(low, high);
|
| + xor_(high, high);
|
| + bind(&done);
|
| +}
|
| +
|
| +void MacroAssembler::SarPair(Register high, Register low, uint8_t shift) {
|
| + if (shift >= 32) {
|
| + mov(low, high);
|
| + sar(low, shift - 32);
|
| + sar(high, 31);
|
| + } else {
|
| + shrd(high, low, shift);
|
| + sar(high, shift);
|
| + }
|
| +}
|
| +
|
| +void MacroAssembler::SarPair_cl(Register high, Register low) {
|
| + shrd_cl(low, high);
|
| + sar_cl(high);
|
| + Label done;
|
| + test(ecx, Immediate(0x20));
|
| + j(equal, &done, Label::kNear);
|
| + mov(low, high);
|
| + sar(high, 31);
|
| + bind(&done);
|
| +}
|
| +
|
| bool MacroAssembler::IsUnsafeImmediate(const Immediate& x) {
|
| static const int kMaxImmediateBits = 17;
|
| if (!RelocInfo::IsNone(x.rmode_)) return false;
|
|
|