Index: runtime/vm/intermediate_language_arm.cc |
=================================================================== |
--- runtime/vm/intermediate_language_arm.cc (revision 36715) |
+++ runtime/vm/intermediate_language_arm.cc (working copy) |
@@ -91,7 +91,7 @@ |
const intptr_t fp_sp_dist = |
(kFirstLocalSlotFromFp + 1 - compiler->StackSize()) * kWordSize; |
ASSERT(fp_sp_dist <= 0); |
- __ sub(R2, SP, ShifterOperand(FP)); |
+ __ sub(R2, SP, Operand(FP)); |
__ CompareImmediate(R2, fp_sp_dist); |
__ b(&stack_ok, EQ); |
__ bkpt(0); |
@@ -143,7 +143,7 @@ |
ASSERT(!left.IsConstant() || !right.IsConstant()); |
// Clear out register. |
- __ eor(result, result, ShifterOperand(result)); |
+ __ eor(result, result, Operand(result)); |
// Emit comparison code. This must not overwrite the result register. |
BranchLabels labels = { NULL, NULL, NULL }; |
@@ -170,14 +170,14 @@ |
} |
} |
- __ mov(result, ShifterOperand(1), true_condition); |
+ __ mov(result, Operand(1), true_condition); |
if (is_power_of_two_kind) { |
const intptr_t shift = |
Utils::ShiftForPowerOfTwo(Utils::Maximum(true_value, false_value)); |
__ Lsl(result, result, shift + kSmiTagSize); |
} else { |
- __ sub(result, result, ShifterOperand(1)); |
+ __ sub(result, result, Operand(1)); |
const int32_t val = |
Smi::RawValue(true_value) - Smi::RawValue(false_value); |
__ AndImmediate(result, result, val); |
@@ -440,9 +440,9 @@ |
Label* value_is_smi = NULL) { |
Label done; |
if (value_is_smi == NULL) { |
- __ mov(value_cid_reg, ShifterOperand(kSmiCid)); |
+ __ mov(value_cid_reg, Operand(kSmiCid)); |
} |
- __ tst(value_reg, ShifterOperand(kSmiTagMask)); |
+ __ tst(value_reg, Operand(kSmiTagMask)); |
if (value_is_smi == NULL) { |
__ b(&done, EQ); |
} else { |
@@ -506,7 +506,7 @@ |
} else if (right.IsConstant()) { |
__ CompareObject(left.reg(), right.constant()); |
} else { |
- __ cmp(left.reg(), ShifterOperand(right.reg())); |
+ __ cmp(left.reg(), Operand(right.reg())); |
} |
return true_condition; |
} |
@@ -539,9 +539,9 @@ |
Register right2 = right_pair->At(1).reg(); |
// Compare lower. |
- __ cmp(left1, ShifterOperand(right1)); |
+ __ cmp(left1, Operand(right1)); |
// Compare upper if lower is equal. |
- __ cmp(left2, ShifterOperand(right2), EQ); |
+ __ cmp(left2, Operand(right2), EQ); |
return TokenKindToMintCondition(kind); |
} |
@@ -580,13 +580,13 @@ |
Label is_true, is_false, done; |
// Compare upper halves first. |
- __ cmp(left2, ShifterOperand(right2)); |
+ __ cmp(left2, Operand(right2)); |
__ LoadImmediate(out, 0, hi_false_cond); |
__ LoadImmediate(out, 1, hi_true_cond); |
// If higher words aren't equal, skip comparing lower words. |
__ b(&done, NE); |
- __ cmp(left1, ShifterOperand(right1)); |
+ __ cmp(left1, Operand(right1)); |
__ LoadImmediate(out, 1); |
__ LoadImmediate(out, 0, lo_false_cond); |
__ Bind(&done); |
@@ -701,7 +701,7 @@ |
reinterpret_cast<int32_t>(right.constant().raw()); |
__ TestImmediate(left, imm); |
} else { |
- __ tst(left, ShifterOperand(right.reg())); |
+ __ tst(left, Operand(right.reg())); |
} |
Condition true_condition = (kind() == Token::kNE) ? NE : EQ; |
return true_condition; |
@@ -748,7 +748,7 @@ |
const ZoneGrowableArray<intptr_t>& data = cid_results(); |
ASSERT(data[0] == kSmiCid); |
bool result = data[1] == true_result; |
- __ tst(val_reg, ShifterOperand(kSmiTagMask)); |
+ __ tst(val_reg, Operand(kSmiTagMask)); |
__ b(result ? labels.true_label : labels.false_label, EQ); |
__ LoadClassId(cid_reg, val_reg); |
@@ -992,7 +992,7 @@ |
const Register str = locs()->in(0).reg(); |
const Register result = locs()->out(0).reg(); |
__ ldr(result, FieldAddress(str, String::length_offset())); |
- __ cmp(result, ShifterOperand(Smi::RawValue(1))); |
+ __ cmp(result, Operand(Smi::RawValue(1))); |
__ LoadImmediate(result, -1, NE); |
__ ldrb(result, FieldAddress(str, OneByteString::data_offset()), EQ); |
__ SmiTag(result); |
@@ -1057,7 +1057,7 @@ |
const Register object = locs()->in(0).reg(); |
const Register result = locs()->out(0).reg(); |
Label load, done; |
- __ tst(object, ShifterOperand(kSmiTagMask)); |
+ __ tst(object, Operand(kSmiTagMask)); |
__ b(&load, NE); |
__ LoadImmediate(result, Smi::RawValue(kSmiCid)); |
__ b(&done); |
@@ -1240,9 +1240,9 @@ |
(size == kSWord) || (size == kDWord) || (size == kRegList)) { |
if (shift < 0) { |
ASSERT(shift == -1); |
- assembler->add(base, array, ShifterOperand(index, ASR, 1)); |
+ assembler->add(base, array, Operand(index, ASR, 1)); |
} else { |
- assembler->add(base, array, ShifterOperand(index, LSL, shift)); |
+ assembler->add(base, array, Operand(index, LSL, shift)); |
} |
} else { |
if (shift < 0) { |
@@ -1324,7 +1324,7 @@ |
// Load low word. |
__ ldr(result1, element_address); |
// Zero high word. |
- __ eor(result2, result2, ShifterOperand(result2)); |
+ __ eor(result2, result2, Operand(result2)); |
break; |
default: |
UNREACHABLE(); |
@@ -1542,11 +1542,11 @@ |
const Register value = locs()->in(2).reg(); |
Label store_value; |
__ SmiUntag(value); |
- __ cmp(value, ShifterOperand(0xFF)); |
+ __ cmp(value, Operand(0xFF)); |
// Clamp to 0x00 or 0xFF respectively. |
__ b(&store_value, LS); |
- __ mov(value, ShifterOperand(0x00), LE); |
- __ mov(value, ShifterOperand(0xFF), GT); |
+ __ mov(value, Operand(0x00), LE); |
+ __ mov(value, Operand(0xFF), GT); |
__ Bind(&store_value); |
__ strb(value, element_address); |
} |
@@ -1677,7 +1677,7 @@ |
LoadValueCid(compiler, value_cid_reg, value_reg); |
Label skip_length_check; |
__ ldr(IP, field_cid_operand); |
- __ cmp(value_cid_reg, ShifterOperand(IP)); |
+ __ cmp(value_cid_reg, Operand(IP)); |
__ b(&skip_length_check, NE); |
if (field_has_length) { |
ASSERT(temp_reg != kNoRegister); |
@@ -1716,7 +1716,7 @@ |
__ ldr(temp_reg, |
FieldAddress(value_reg, TypedData::length_offset())); |
__ ldr(IP, field_length_operand); |
- __ cmp(temp_reg, ShifterOperand(IP)); |
+ __ cmp(temp_reg, Operand(IP)); |
__ b(&length_compared); |
// Check for regular array. |
__ Bind(&check_array); |
@@ -1727,7 +1727,7 @@ |
__ ldr(temp_reg, |
FieldAddress(value_reg, Array::length_offset())); |
__ ldr(IP, field_length_operand); |
- __ cmp(temp_reg, ShifterOperand(IP)); |
+ __ cmp(temp_reg, Operand(IP)); |
__ b(&length_compared); |
__ Bind(&no_fixed_length); |
__ b(fail); |
@@ -1738,7 +1738,7 @@ |
} |
__ Bind(&skip_length_check); |
__ ldr(IP, field_nullability_operand); |
- __ cmp(value_cid_reg, ShifterOperand(IP)); |
+ __ cmp(value_cid_reg, Operand(IP)); |
} else if (value_cid == kNullCid) { |
__ ldr(value_cid_reg, field_nullability_operand); |
__ CompareImmediate(value_cid_reg, value_cid); |
@@ -1860,7 +1860,7 @@ |
} |
if (value_cid == kDynamicCid) { |
// Field's guarded class id is fixed by value's class id is not known. |
- __ tst(value_reg, ShifterOperand(kSmiTagMask)); |
+ __ tst(value_reg, Operand(kSmiTagMask)); |
if (field_cid != kSmiCid) { |
__ b(fail, EQ); |
@@ -1885,7 +1885,7 @@ |
FieldAddress(value_reg, TypedData::length_offset())); |
} |
__ ldr(IP, field_length_operand); |
- __ cmp(value_cid_reg, ShifterOperand(IP)); |
+ __ cmp(value_cid_reg, Operand(IP)); |
} |
if (field().is_nullable() && (field_cid != kNullCid)) { |
@@ -2070,7 +2070,7 @@ |
__ b(&store_pointer, EQ); |
__ ldrb(temp2, FieldAddress(temp, Field::kind_bits_offset())); |
- __ tst(temp2, ShifterOperand(1 << Field::kUnboxingCandidateBit)); |
+ __ tst(temp2, Operand(1 << Field::kUnboxingCandidateBit)); |
__ b(&store_pointer, EQ); |
__ ldr(temp2, FieldAddress(temp, Field::guarded_cid_offset())); |
@@ -2310,13 +2310,13 @@ |
// R7: potential next object start. |
__ LoadImmediate(R3, heap->EndAddress()); |
__ ldr(R3, Address(R3, 0)); |
- __ cmp(R7, ShifterOperand(R3)); |
+ __ cmp(R7, Operand(R3)); |
__ b(slow_path, CS); |
// Successfully allocated the object(s), now update top to point to |
// next object start and initialize the object. |
__ str(R7, Address(R6, 0)); |
- __ add(R0, R0, ShifterOperand(kHeapObjectTag)); |
+ __ add(R0, R0, Operand(kHeapObjectTag)); |
__ LoadImmediate(R8, heap->TopAddress()); |
__ UpdateAllocationStatsWithSize(kArrayCid, R8, R4); |
@@ -2354,7 +2354,7 @@ |
Label init_loop; |
__ Bind(&init_loop); |
- __ cmp(R8, ShifterOperand(R7)); |
+ __ cmp(R8, Operand(R7)); |
__ str(R3, Address(R8, 0), CC); |
__ AddImmediate(R8, kWordSize, CC); |
__ b(&init_loop, CC); |
@@ -2453,7 +2453,7 @@ |
&label, |
PcDescriptors::kOther, |
locs); |
- __ mov(locs->out(0).reg(), ShifterOperand(R0)); |
+ __ mov(locs->out(0).reg(), Operand(R0)); |
compiler->RestoreLiveRegisters(locs); |
__ b(exit_label()); |
@@ -2485,7 +2485,7 @@ |
&label, |
PcDescriptors::kOther, |
locs); |
- __ mov(locs->out(0).reg(), ShifterOperand(R0)); |
+ __ mov(locs->out(0).reg(), Operand(R0)); |
compiler->RestoreLiveRegisters(locs); |
__ b(exit_label()); |
@@ -2706,7 +2706,7 @@ |
const intptr_t len = type_arguments().Length(); |
if (type_arguments().IsRawInstantiatedRaw(len)) { |
__ LoadImmediate(IP, reinterpret_cast<intptr_t>(Object::null())); |
- __ cmp(instantiator_reg, ShifterOperand(IP)); |
+ __ cmp(instantiator_reg, Operand(IP)); |
__ b(&type_arguments_instantiated, EQ); |
} |
@@ -2718,7 +2718,7 @@ |
Label loop, found, slow_case; |
__ Bind(&loop); |
__ ldr(R1, Address(R2, 0 * kWordSize)); // Cached instantiator. |
- __ cmp(R1, ShifterOperand(R0)); |
+ __ cmp(R1, Operand(R0)); |
__ b(&found, EQ); |
__ AddImmediate(R2, 2 * kWordSize); |
__ CompareImmediate(R1, Smi::RawValue(StubCode::kNoInstantiator)); |
@@ -2906,7 +2906,7 @@ |
__ LoadImmediate(IP, Isolate::Current()->stack_limit_address()); |
__ ldr(IP, Address(IP)); |
- __ cmp(SP, ShifterOperand(IP)); |
+ __ cmp(SP, Operand(IP)); |
__ b(slow_path->entry_label(), LS); |
if (compiler->CanOSRFunction() && in_loop()) { |
const Register temp = locs()->temp(0).reg(); |
@@ -2948,7 +2948,7 @@ |
// This condition may not be known earlier in some cases because |
// of constant propagation, inlining, etc. |
if ((value >= kCountLimit) && is_truncating) { |
- __ mov(result, ShifterOperand(0)); |
+ __ mov(result, Operand(0)); |
} else { |
// Result is Mint or exception. |
__ b(deopt); |
@@ -2957,7 +2957,7 @@ |
if (!is_truncating) { |
// Check for overflow (preserve left). |
__ Lsl(IP, left, value); |
- __ cmp(left, ShifterOperand(IP, ASR, value)); |
+ __ cmp(left, Operand(IP, ASR, value)); |
__ b(deopt, NE); // Overflow. |
} |
// Shift for result now we know there is no overflow. |
@@ -2976,9 +2976,9 @@ |
if (obj.IsSmi()) { |
const intptr_t left_int = Smi::Cast(obj).Value(); |
if (left_int == 0) { |
- __ cmp(right, ShifterOperand(0)); |
+ __ cmp(right, Operand(0)); |
__ b(deopt, MI); |
- __ mov(result, ShifterOperand(0)); |
+ __ mov(result, Operand(0)); |
return; |
} |
const intptr_t max_right = kSmiBits - Utils::HighestBit(left_int); |
@@ -2986,8 +2986,7 @@ |
(right_range == NULL) || |
!right_range->IsWithin(0, max_right - 1); |
if (right_needs_check) { |
- __ cmp(right, |
- ShifterOperand(reinterpret_cast<int32_t>(Smi::New(max_right)))); |
+ __ cmp(right, Operand(reinterpret_cast<int32_t>(Smi::New(max_right)))); |
__ b(deopt, CS); |
} |
__ Asr(IP, right, kSmiTagSize); // SmiUntag right into IP. |
@@ -3005,13 +3004,12 @@ |
!right_range->IsWithin(0, RangeBoundary::kPlusInfinity); |
if (right_may_be_negative) { |
ASSERT(shift_left->CanDeoptimize()); |
- __ cmp(right, ShifterOperand(0)); |
+ __ cmp(right, Operand(0)); |
__ b(deopt, MI); |
} |
- __ cmp(right, |
- ShifterOperand(reinterpret_cast<int32_t>(Smi::New(Smi::kBits)))); |
- __ mov(result, ShifterOperand(0), CS); |
+ __ cmp(right, Operand(reinterpret_cast<int32_t>(Smi::New(Smi::kBits)))); |
+ __ mov(result, Operand(0), CS); |
__ Asr(IP, right, kSmiTagSize, CC); // SmiUntag right into IP if CC. |
__ Lsl(result, left, IP, CC); |
} else { |
@@ -3021,8 +3019,7 @@ |
} else { |
if (right_needs_check) { |
ASSERT(shift_left->CanDeoptimize()); |
- __ cmp(right, |
- ShifterOperand(reinterpret_cast<int32_t>(Smi::New(Smi::kBits)))); |
+ __ cmp(right, Operand(reinterpret_cast<int32_t>(Smi::New(Smi::kBits)))); |
__ b(deopt, CS); |
} |
// Left is not a constant. |
@@ -3031,7 +3028,7 @@ |
// Overflow test (preserve left, right, and IP); |
const Register temp = locs.temp(0).reg(); |
__ Lsl(temp, left, IP); |
- __ cmp(left, ShifterOperand(temp, ASR, IP)); |
+ __ cmp(left, Operand(temp, ASR, IP)); |
__ b(deopt, NE); // Overflow. |
// Shift for result now we know there is no overflow. |
__ Lsl(result, left, IP); |
@@ -3129,24 +3126,24 @@ |
const intptr_t value = Smi::Cast(constant).Value(); |
if (deopt == NULL) { |
if (value == 2) { |
- __ mov(result, ShifterOperand(left, LSL, 1)); |
+ __ mov(result, Operand(left, LSL, 1)); |
} else { |
__ LoadImmediate(IP, value); |
__ mul(result, left, IP); |
} |
} else { |
if (value == 2) { |
- __ mov(IP, ShifterOperand(left, ASR, 31)); // IP = sign of left. |
- __ mov(result, ShifterOperand(left, LSL, 1)); |
+ __ mov(IP, Operand(left, ASR, 31)); // IP = sign of left. |
+ __ mov(result, Operand(left, LSL, 1)); |
// IP: result bits 32..63. |
- __ cmp(IP, ShifterOperand(result, ASR, 31)); |
+ __ cmp(IP, Operand(result, ASR, 31)); |
__ b(deopt, NE); |
} else { |
if (TargetCPUFeatures::arm_version() == ARMv7) { |
__ LoadImmediate(IP, value); |
__ smull(result, IP, left, IP); |
// IP: result bits 32..63. |
- __ cmp(IP, ShifterOperand(result, ASR, 31)); |
+ __ cmp(IP, Operand(result, ASR, 31)); |
__ b(deopt, NE); |
} else { |
const QRegister qtmp = locs()->temp(0).fpu_reg(); |
@@ -3170,57 +3167,57 @@ |
// case we cannot negate the result. |
__ CompareImmediate(left, 0x80000000); |
__ b(deopt, EQ); |
- __ rsb(result, left, ShifterOperand(0)); |
+ __ rsb(result, left, Operand(0)); |
break; |
} |
ASSERT(Utils::IsPowerOfTwo(Utils::Abs(value))); |
const intptr_t shift_count = |
Utils::ShiftForPowerOfTwo(Utils::Abs(value)) + kSmiTagSize; |
ASSERT(kSmiTagSize == 1); |
- __ mov(IP, ShifterOperand(left, ASR, 31)); |
+ __ mov(IP, Operand(left, ASR, 31)); |
ASSERT(shift_count > 1); // 1, -1 case handled above. |
const Register temp = locs()->temp(0).reg(); |
- __ add(temp, left, ShifterOperand(IP, LSR, 32 - shift_count)); |
+ __ add(temp, left, Operand(IP, LSR, 32 - shift_count)); |
ASSERT(shift_count > 0); |
- __ mov(result, ShifterOperand(temp, ASR, shift_count)); |
+ __ mov(result, Operand(temp, ASR, shift_count)); |
if (value < 0) { |
- __ rsb(result, result, ShifterOperand(0)); |
+ __ rsb(result, result, Operand(0)); |
} |
__ SmiTag(result); |
break; |
} |
case Token::kBIT_AND: { |
// No overflow check. |
- ShifterOperand shifter_op; |
- if (ShifterOperand::CanHold(imm, &shifter_op)) { |
- __ and_(result, left, shifter_op); |
- } else if (ShifterOperand::CanHold(~imm, &shifter_op)) { |
- __ bic(result, left, shifter_op); |
+ Operand o; |
+ if (Operand::CanHold(imm, &o)) { |
+ __ and_(result, left, o); |
+ } else if (Operand::CanHold(~imm, &o)) { |
+ __ bic(result, left, o); |
} else { |
__ LoadImmediate(IP, imm); |
- __ and_(result, left, ShifterOperand(IP)); |
+ __ and_(result, left, Operand(IP)); |
} |
break; |
} |
case Token::kBIT_OR: { |
// No overflow check. |
- ShifterOperand shifter_op; |
- if (ShifterOperand::CanHold(imm, &shifter_op)) { |
- __ orr(result, left, shifter_op); |
+ Operand o; |
+ if (Operand::CanHold(imm, &o)) { |
+ __ orr(result, left, o); |
} else { |
__ LoadImmediate(IP, imm); |
- __ orr(result, left, ShifterOperand(IP)); |
+ __ orr(result, left, Operand(IP)); |
} |
break; |
} |
case Token::kBIT_XOR: { |
// No overflow check. |
- ShifterOperand shifter_op; |
- if (ShifterOperand::CanHold(imm, &shifter_op)) { |
- __ eor(result, left, shifter_op); |
+ Operand o; |
+ if (Operand::CanHold(imm, &o)) { |
+ __ eor(result, left, o); |
} else { |
__ LoadImmediate(IP, imm); |
- __ eor(result, left, ShifterOperand(IP)); |
+ __ eor(result, left, Operand(IP)); |
} |
break; |
} |
@@ -3261,18 +3258,18 @@ |
switch (op_kind()) { |
case Token::kADD: { |
if (deopt == NULL) { |
- __ add(result, left, ShifterOperand(right)); |
+ __ add(result, left, Operand(right)); |
} else { |
- __ adds(result, left, ShifterOperand(right)); |
+ __ adds(result, left, Operand(right)); |
__ b(deopt, VS); |
} |
break; |
} |
case Token::kSUB: { |
if (deopt == NULL) { |
- __ sub(result, left, ShifterOperand(right)); |
+ __ sub(result, left, Operand(right)); |
} else { |
- __ subs(result, left, ShifterOperand(right)); |
+ __ subs(result, left, Operand(right)); |
__ b(deopt, VS); |
} |
break; |
@@ -3285,7 +3282,7 @@ |
if (TargetCPUFeatures::arm_version() == ARMv7) { |
__ smull(result, IP, IP, right); |
// IP: result bits 32..63. |
- __ cmp(IP, ShifterOperand(result, ASR, 31)); |
+ __ cmp(IP, Operand(result, ASR, 31)); |
__ b(deopt, NE); |
} else { |
const QRegister qtmp = locs()->temp(0).fpu_reg(); |
@@ -3299,23 +3296,23 @@ |
} |
case Token::kBIT_AND: { |
// No overflow check. |
- __ and_(result, left, ShifterOperand(right)); |
+ __ and_(result, left, Operand(right)); |
break; |
} |
case Token::kBIT_OR: { |
// No overflow check. |
- __ orr(result, left, ShifterOperand(right)); |
+ __ orr(result, left, Operand(right)); |
break; |
} |
case Token::kBIT_XOR: { |
// No overflow check. |
- __ eor(result, left, ShifterOperand(right)); |
+ __ eor(result, left, Operand(right)); |
break; |
} |
case Token::kTRUNCDIV: { |
if ((right_range == NULL) || right_range->Overlaps(0, 0)) { |
// Handle divide by zero in runtime. |
- __ cmp(right, ShifterOperand(0)); |
+ __ cmp(right, Operand(0)); |
__ b(deopt, EQ); |
} |
const Register temp = locs()->temp(0).reg(); |
@@ -3335,7 +3332,7 @@ |
case Token::kMOD: { |
if ((right_range == NULL) || right_range->Overlaps(0, 0)) { |
// Handle divide by zero in runtime. |
- __ cmp(right, ShifterOperand(0)); |
+ __ cmp(right, Operand(0)); |
__ b(deopt, EQ); |
} |
const Register temp = locs()->temp(0).reg(); |
@@ -3357,12 +3354,12 @@ |
// } |
// } |
Label done; |
- __ cmp(result, ShifterOperand(0)); |
+ __ cmp(result, Operand(0)); |
__ b(&done, GE); |
// Result is negative, adjust it. |
- __ cmp(right, ShifterOperand(0)); |
- __ sub(result, result, ShifterOperand(right), LT); |
- __ add(result, result, ShifterOperand(right), GE); |
+ __ cmp(right, Operand(0)); |
+ __ sub(result, result, Operand(right), LT); |
+ __ add(result, result, Operand(right), GE); |
__ Bind(&done); |
break; |
} |
@@ -3428,14 +3425,14 @@ |
const Register left = locs()->in(0).reg(); |
const Register right = locs()->in(1).reg(); |
if (this->left()->definition() == this->right()->definition()) { |
- __ tst(left, ShifterOperand(kSmiTagMask)); |
+ __ tst(left, Operand(kSmiTagMask)); |
} else if (left_cid == kSmiCid) { |
- __ tst(right, ShifterOperand(kSmiTagMask)); |
+ __ tst(right, Operand(kSmiTagMask)); |
} else if (right_cid == kSmiCid) { |
- __ tst(left, ShifterOperand(kSmiTagMask)); |
+ __ tst(left, Operand(kSmiTagMask)); |
} else { |
- __ orr(IP, left, ShifterOperand(right)); |
- __ tst(IP, ShifterOperand(kSmiTagMask)); |
+ __ orr(IP, left, Operand(right)); |
+ __ tst(IP, Operand(kSmiTagMask)); |
} |
__ b(deopt, EQ); |
} |
@@ -3515,7 +3512,7 @@ |
Double::value_offset() - kHeapObjectTag); |
} else { |
Label is_smi, done; |
- __ tst(value, ShifterOperand(kSmiTagMask)); |
+ __ tst(value, Operand(kSmiTagMask)); |
__ b(&is_smi, EQ); |
__ CompareClassId(value, kDoubleCid, temp); |
__ b(deopt, NE); |
@@ -3524,7 +3521,7 @@ |
__ b(&done); |
__ Bind(&is_smi); |
// TODO(regis): Why do we preserve value here but not above? |
- __ mov(IP, ShifterOperand(value, ASR, 1)); // Copy and untag. |
+ __ mov(IP, Operand(value, ASR, 1)); // Copy and untag. |
__ vmovsr(STMP, IP); |
__ vcvtdi(result, STMP); |
__ Bind(&done); |
@@ -3592,7 +3589,7 @@ |
if (value_cid != kFloat32x4Cid) { |
const Register temp = locs()->temp(0).reg(); |
Label* deopt = compiler->AddDeoptStub(deopt_id_, ICData::kDeoptCheckClass); |
- __ tst(value, ShifterOperand(kSmiTagMask)); |
+ __ tst(value, Operand(kSmiTagMask)); |
__ b(deopt, EQ); |
__ CompareClassId(value, kFloat32x4Cid, temp); |
__ b(deopt, NE); |
@@ -3663,7 +3660,7 @@ |
if (value_cid != kFloat64x2Cid) { |
const Register temp = locs()->temp(0).reg(); |
Label* deopt = compiler->AddDeoptStub(deopt_id_, ICData::kDeoptCheckClass); |
- __ tst(value, ShifterOperand(kSmiTagMask)); |
+ __ tst(value, Operand(kSmiTagMask)); |
__ b(deopt, EQ); |
__ CompareClassId(value, kFloat64x2Cid, temp); |
__ b(deopt, NE); |
@@ -3711,7 +3708,7 @@ |
&label, |
PcDescriptors::kOther, |
locs); |
- __ mov(locs->out(0).reg(), ShifterOperand(R0)); |
+ __ mov(locs->out(0).reg(), Operand(R0)); |
compiler->RestoreLiveRegisters(locs); |
__ b(exit_label()); |
@@ -3765,7 +3762,7 @@ |
if (value_cid != kInt32x4Cid) { |
const Register temp = locs()->temp(0).reg(); |
Label* deopt = compiler->AddDeoptStub(deopt_id_, ICData::kDeoptCheckClass); |
- __ tst(value, ShifterOperand(kSmiTagMask)); |
+ __ tst(value, Operand(kSmiTagMask)); |
__ b(deopt, EQ); |
__ CompareClassId(value, kInt32x4Cid, temp); |
__ b(deopt, NE); |
@@ -4046,15 +4043,15 @@ |
// Y lane. |
__ vmovrs(temp, OddSRegisterOf(dvalue0)); |
__ Lsr(temp, temp, 31); |
- __ orr(out, out, ShifterOperand(temp, LSL, 1)); |
+ __ orr(out, out, Operand(temp, LSL, 1)); |
// Z lane. |
__ vmovrs(temp, EvenSRegisterOf(dvalue1)); |
__ Lsr(temp, temp, 31); |
- __ orr(out, out, ShifterOperand(temp, LSL, 2)); |
+ __ orr(out, out, Operand(temp, LSL, 2)); |
// W lane. |
__ vmovrs(temp, OddSRegisterOf(dvalue1)); |
__ Lsr(temp, temp, 31); |
- __ orr(out, out, ShifterOperand(temp, LSL, 3)); |
+ __ orr(out, out, Operand(temp, LSL, 3)); |
// Tag. |
__ SmiTag(out); |
} |
@@ -4599,7 +4596,7 @@ |
// Upper 32-bits of Y lane. |
__ vmovrs(TMP, OddSRegisterOf(dvalue1)); |
__ Lsr(TMP, TMP, 31); |
- __ orr(out, out, ShifterOperand(TMP, LSL, 1)); |
+ __ orr(out, out, Operand(TMP, LSL, 1)); |
// Tag. |
__ SmiTag(out); |
return; |
@@ -4791,7 +4788,7 @@ |
default: UNREACHABLE(); |
} |
- __ tst(result, ShifterOperand(result)); |
+ __ tst(result, Operand(result)); |
__ LoadObject(result, Bool::True(), NE); |
__ LoadObject(result, Bool::False(), EQ); |
} |
@@ -5050,7 +5047,7 @@ |
// - max -> left is negative ? right : left |
// Check the sign bit. |
__ vmovrrd(IP, temp, left); // Sign bit is in bit 31 of temp. |
- __ cmp(temp, ShifterOperand(0)); |
+ __ cmp(temp, Operand(0)); |
if (is_min) { |
ASSERT(left == result); |
__ vmovd(result, right, GE); |
@@ -5066,12 +5063,12 @@ |
const Register left = locs()->in(0).reg(); |
const Register right = locs()->in(1).reg(); |
const Register result = locs()->out(0).reg(); |
- __ cmp(left, ShifterOperand(right)); |
+ __ cmp(left, Operand(right)); |
ASSERT(result == left); |
if (is_min) { |
- __ mov(result, ShifterOperand(right), GT); |
+ __ mov(result, Operand(right), GT); |
} else { |
- __ mov(result, ShifterOperand(right), LT); |
+ __ mov(result, Operand(right), LT); |
} |
} |
@@ -5096,14 +5093,14 @@ |
switch (op_kind()) { |
case Token::kNEGATE: { |
Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptUnaryOp); |
- __ rsbs(result, value, ShifterOperand(0)); |
+ __ rsbs(result, value, Operand(0)); |
__ b(deopt, VS); |
break; |
} |
case Token::kBIT_NOT: |
- __ mvn(result, ShifterOperand(value)); |
+ __ mvn(result, Operand(value)); |
// Remove inverted smi-tag. |
- __ bic(result, result, ShifterOperand(kSmiTagMask)); |
+ __ bic(result, result, Operand(kSmiTagMask)); |
break; |
default: |
UNREACHABLE(); |
@@ -5518,7 +5515,7 @@ |
ASSERT(representation() == kTagged); |
const Register out = locs()->out(0).reg(); |
const Register in = in_loc.reg(); |
- __ mov(out, ShifterOperand(in)); |
+ __ mov(out, Operand(in)); |
} |
} |
@@ -5559,7 +5556,7 @@ |
Range* right_range = InputAt(1)->definition()->range(); |
if ((right_range == NULL) || right_range->Overlaps(0, 0)) { |
// Handle divide by zero in runtime. |
- __ cmp(right, ShifterOperand(0)); |
+ __ cmp(right, Operand(0)); |
__ b(deopt, EQ); |
} |
const Register temp = locs()->temp(0).reg(); |
@@ -5589,12 +5586,12 @@ |
// } |
// } |
Label done; |
- __ cmp(result_mod, ShifterOperand(0)); |
+ __ cmp(result_mod, Operand(0)); |
__ b(&done, GE); |
// Result is negative, adjust it. |
- __ cmp(right, ShifterOperand(0)); |
- __ sub(result_mod, result_mod, ShifterOperand(right), LT); |
- __ add(result_mod, result_mod, ShifterOperand(right), GE); |
+ __ cmp(right, Operand(0)); |
+ __ sub(result_mod, result_mod, Operand(right), LT); |
+ __ add(result_mod, result_mod, Operand(right), GE); |
__ Bind(&done); |
return; |
@@ -5697,11 +5694,11 @@ |
Label is_ok; |
intptr_t cix = 0; |
if (unary_checks().GetReceiverClassIdAt(cix) == kSmiCid) { |
- __ tst(value, ShifterOperand(kSmiTagMask)); |
+ __ tst(value, Operand(kSmiTagMask)); |
__ b(&is_ok, EQ); |
cix++; // Skip first check. |
} else { |
- __ tst(value, ShifterOperand(kSmiTagMask)); |
+ __ tst(value, Operand(kSmiTagMask)); |
__ b(deopt, EQ); |
} |
__ LoadClassId(temp, value); |
@@ -5733,7 +5730,7 @@ |
void CheckSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
const Register value = locs()->in(0).reg(); |
Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptCheckSmi); |
- __ tst(value, ShifterOperand(kSmiTagMask)); |
+ __ tst(value, Operand(kSmiTagMask)); |
__ b(deopt, NE); |
} |
@@ -5780,7 +5777,7 @@ |
} else { |
const Register length = length_loc.reg(); |
const Register index = index_loc.reg(); |
- __ cmp(index, ShifterOperand(length)); |
+ __ cmp(index, Operand(length)); |
__ b(deopt, CS); |
} |
} |
@@ -5844,7 +5841,7 @@ |
Mint::value_offset() - kHeapObjectTag + kWordSize); |
} else if (value_cid == kSmiCid) { |
// Load Smi into result_lo. |
- __ mov(result_lo, ShifterOperand(value)); |
+ __ mov(result_lo, Operand(value)); |
// Untag. |
__ SmiUntag(result_lo); |
__ SignFill(result_hi, result_lo); |
@@ -5853,7 +5850,7 @@ |
Label* deopt = compiler->AddDeoptStub(deopt_id_, |
ICData::kDeoptUnboxInteger); |
Label is_smi, done; |
- __ tst(value, ShifterOperand(kSmiTagMask)); |
+ __ tst(value, Operand(kSmiTagMask)); |
__ b(&is_smi, EQ); |
__ CompareClassId(value, kMintCid, temp); |
__ b(deopt, NE); |
@@ -5874,7 +5871,7 @@ |
// It's a Smi. |
__ Bind(&is_smi); |
// Load Smi into result_lo. |
- __ mov(result_lo, ShifterOperand(value)); |
+ __ mov(result_lo, Operand(value)); |
// Untag. |
__ SmiUntag(result_lo); |
// Sign extend result_lo into result_hi. |
@@ -5922,7 +5919,7 @@ |
&label, |
PcDescriptors::kOther, |
locs); |
- __ mov(locs->out(0).reg(), ShifterOperand(R0)); |
+ __ mov(locs->out(0).reg(), Operand(R0)); |
compiler->RestoreLiveRegisters(locs); |
__ b(exit_label()); |
@@ -5967,7 +5964,7 @@ |
// lo is a Smi. Tag it and return. |
__ Bind(&is_smi); |
- __ mov(out_reg, ShifterOperand(value_lo)); |
+ __ mov(out_reg, Operand(value_lo)); |
__ SmiTag(out_reg); |
__ b(&done); |
@@ -6024,18 +6021,18 @@ |
} |
switch (op_kind()) { |
case Token::kBIT_AND: { |
- __ and_(out_lo, left_lo, ShifterOperand(right_lo)); |
- __ and_(out_hi, left_hi, ShifterOperand(right_hi)); |
+ __ and_(out_lo, left_lo, Operand(right_lo)); |
+ __ and_(out_hi, left_hi, Operand(right_hi)); |
} |
break; |
case Token::kBIT_OR: { |
- __ orr(out_lo, left_lo, ShifterOperand(right_lo)); |
- __ orr(out_hi, left_hi, ShifterOperand(right_hi)); |
+ __ orr(out_lo, left_lo, Operand(right_lo)); |
+ __ orr(out_hi, left_hi, Operand(right_hi)); |
} |
break; |
case Token::kBIT_XOR: { |
- __ eor(out_lo, left_lo, ShifterOperand(right_lo)); |
- __ eor(out_hi, left_hi, ShifterOperand(right_hi)); |
+ __ eor(out_lo, left_lo, Operand(right_lo)); |
+ __ eor(out_hi, left_hi, Operand(right_hi)); |
} |
break; |
case Token::kADD: |
@@ -6044,12 +6041,12 @@ |
deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryMintOp); |
} |
if (op_kind() == Token::kADD) { |
- __ adds(out_lo, left_lo, ShifterOperand(right_lo)); |
- __ adcs(out_hi, left_hi, ShifterOperand(right_hi)); |
+ __ adds(out_lo, left_lo, Operand(right_lo)); |
+ __ adcs(out_hi, left_hi, Operand(right_hi)); |
} else { |
ASSERT(op_kind() == Token::kSUB); |
- __ subs(out_lo, left_lo, ShifterOperand(right_lo)); |
- __ sbcs(out_hi, left_hi, ShifterOperand(right_hi)); |
+ __ subs(out_lo, left_lo, Operand(right_lo)); |
+ __ sbcs(out_hi, left_hi, Operand(right_hi)); |
} |
// Deopt on overflow. |
__ b(deopt, VS); |
@@ -6096,8 +6093,8 @@ |
// Early out if shift is 0. |
__ CompareImmediate(shift, 0); |
- __ mov(out_lo, ShifterOperand(left_lo)); |
- __ mov(out_hi, ShifterOperand(left_hi)); |
+ __ mov(out_lo, Operand(left_lo)); |
+ __ mov(out_hi, Operand(left_hi)); |
__ b(&done, EQ); |
// Untag shift count. |
@@ -6113,34 +6110,34 @@ |
switch (op_kind()) { |
case Token::kSHR: { |
- __ cmp(shift, ShifterOperand(32)); |
+ __ cmp(shift, Operand(32)); |
- __ mov(out_lo, ShifterOperand(out_hi), HI); |
+ __ mov(out_lo, Operand(out_hi), HI); |
__ Asr(out_hi, out_hi, 31, HI); |
- __ sub(shift, shift, ShifterOperand(32), HI); |
+ __ sub(shift, shift, Operand(32), HI); |
- __ rsb(temp, shift, ShifterOperand(32)); |
- __ mov(temp, ShifterOperand(out_hi, LSL, temp)); |
- __ orr(out_lo, temp, ShifterOperand(out_lo, LSR, shift)); |
+ __ rsb(temp, shift, Operand(32)); |
+ __ mov(temp, Operand(out_hi, LSL, temp)); |
+ __ orr(out_lo, temp, Operand(out_lo, LSR, shift)); |
__ Asr(out_hi, out_hi, shift); |
break; |
} |
case Token::kSHL: { |
- __ rsbs(temp, shift, ShifterOperand(32)); |
- __ sub(temp, shift, ShifterOperand(32), MI); |
- __ mov(out_hi, ShifterOperand(out_lo, LSL, temp), MI); |
- __ mov(out_hi, ShifterOperand(out_hi, LSL, shift), PL); |
- __ orr(out_hi, out_hi, ShifterOperand(out_lo, LSR, temp), PL); |
- __ mov(out_lo, ShifterOperand(out_lo, LSL, shift)); |
+ __ rsbs(temp, shift, Operand(32)); |
+ __ sub(temp, shift, Operand(32), MI); |
+ __ mov(out_hi, Operand(out_lo, LSL, temp), MI); |
+ __ mov(out_hi, Operand(out_hi, LSL, shift), PL); |
+ __ orr(out_hi, out_hi, Operand(out_lo, LSR, temp), PL); |
+ __ mov(out_lo, Operand(out_lo, LSL, shift)); |
// Check for overflow. |
// Copy high word from output. |
- __ mov(temp, ShifterOperand(out_hi)); |
+ __ mov(temp, Operand(out_hi)); |
// Shift copy right. |
__ Asr(temp, temp, shift); |
// Compare with high word from input. |
- __ cmp(temp, ShifterOperand(left_hi)); |
+ __ cmp(temp, Operand(left_hi)); |
// Overflow if they aren't equal. |
__ b(deopt, NE); |
break; |
@@ -6186,8 +6183,8 @@ |
if (FLAG_throw_on_javascript_int_overflow) { |
deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptUnaryMintOp); |
} |
- __ mvn(out_lo, ShifterOperand(left_lo)); |
- __ mvn(out_hi, ShifterOperand(left_hi)); |
+ __ mvn(out_lo, Operand(left_lo)); |
+ __ mvn(out_hi, Operand(left_hi)); |
if (FLAG_throw_on_javascript_int_overflow) { |
EmitJavascriptIntOverflowCheck(compiler, deopt, out_lo, out_hi); |
} |
@@ -6296,7 +6293,7 @@ |
void CurrentContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
- __ mov(locs()->out(0).reg(), ShifterOperand(CTX)); |
+ __ mov(locs()->out(0).reg(), Operand(CTX)); |
} |
@@ -6388,7 +6385,7 @@ |
const Register result = locs()->out(0).reg(); |
__ LoadObject(result, Bool::True()); |
- __ cmp(result, ShifterOperand(value)); |
+ __ cmp(result, Operand(value)); |
__ LoadObject(result, Bool::False(), EQ); |
} |