Chromium Code Reviews| Index: runtime/vm/assembler_arm.h |
| =================================================================== |
| --- runtime/vm/assembler_arm.h (revision 40678) |
| +++ runtime/vm/assembler_arm.h (working copy) |
| @@ -231,6 +231,10 @@ |
| encoding_ |= static_cast<uint32_t>(rn) << kRnShift; |
| } |
| + // There is no register offset mode unless Mode is Offset, in which case the |
| + // shifted register case below should be used. |
| + Address(Register rn, Register r, Mode am); |
| + |
| Address(Register rn, Register rm, |
| Shift shift = LSL, uint32_t shift_imm = 0, Mode am = Offset) { |
| Operand o(rm, shift, shift_imm); |
| @@ -243,6 +247,9 @@ |
| encoding_ = o.encoding() | am | (static_cast<uint32_t>(rn) << kRnShift); |
| } |
| + // There is no shifted register mode with a register shift. |
| + Address(Register rn, Register rm, Shift shift, Register r, Mode am = Offset); |
| + |
| static OperandSize OperandSizeFor(intptr_t cid); |
| static bool CanHoldLoadOffset(OperandSize size, |
| @@ -279,6 +286,11 @@ |
| FieldAddress(Register base, int32_t disp) |
| : Address(base, disp - kHeapObjectTag) { } |
| + // This addressing mode does not exist. |
| + FieldAddress(Register base, Register r) : Address(base) { |
| + UNREACHABLE(); |
|
Florian Schneider
2014/09/26 12:36:58
Remove definition and just leave declaration here
zra
2014/09/26 17:11:35
Done.
|
| + } |
| + |
| FieldAddress(const FieldAddress& other) : Address(other) { } |
| FieldAddress& operator=(const FieldAddress& other) { |
| @@ -396,8 +408,6 @@ |
| // Miscellaneous data-processing instructions. |
| void clz(Register rd, Register rm, Condition cond = AL); |
| - void movw(Register rd, uint16_t imm16, Condition cond = AL); |
| - void movt(Register rd, uint16_t imm16, Condition cond = AL); |
| // Multiply instructions. |
| void mul(Register rd, Register rn, Register rm, Condition cond = AL); |
| @@ -714,14 +724,19 @@ |
| // Convenience shift instructions. Use mov instruction with shifter operand |
| // for variants setting the status flags. |
| - void Lsl(Register rd, Register rm, uint32_t shift_imm, Condition cond = AL); |
| + void Lsl(Register rd, Register rm, const Operand& shift_imm, |
| + Condition cond = AL); |
| void Lsl(Register rd, Register rm, Register rs, Condition cond = AL); |
| - void Lsr(Register rd, Register rm, uint32_t shift_imm, Condition cond = AL); |
| + void Lsr(Register rd, Register rm, const Operand& shift_imm, |
| + Condition cond = AL); |
| void Lsr(Register rd, Register rm, Register rs, Condition cond = AL); |
| - void Asr(Register rd, Register rm, uint32_t shift_imm, Condition cond = AL); |
| + void Asr(Register rd, Register rm, const Operand& shift_imm, |
| + Condition cond = AL); |
| void Asr(Register rd, Register rm, Register rs, Condition cond = AL); |
| - void Asrs(Register rd, Register rm, uint32_t shift_imm, Condition cond = AL); |
| - void Ror(Register rd, Register rm, uint32_t shift_imm, Condition cond = AL); |
| + void Asrs(Register rd, Register rm, const Operand& shift_imm, |
| + Condition cond = AL); |
| + void Ror(Register rd, Register rm, const Operand& shift_imm, |
| + Condition cond = AL); |
| void Ror(Register rd, Register rm, Register rs, Condition cond = AL); |
| void Rrx(Register rd, Register rm, Condition cond = AL); |
| @@ -735,19 +750,19 @@ |
| void Vdivqs(QRegister qd, QRegister qn, QRegister qm); |
| void SmiTag(Register reg, Condition cond = AL) { |
| - Lsl(reg, reg, kSmiTagSize, cond); |
| + Lsl(reg, reg, Operand(kSmiTagSize), cond); |
| } |
| void SmiTag(Register dst, Register src, Condition cond = AL) { |
| - Lsl(dst, src, kSmiTagSize, cond); |
| + Lsl(dst, src, Operand(kSmiTagSize), cond); |
| } |
| void SmiUntag(Register reg, Condition cond = AL) { |
| - Asr(reg, reg, kSmiTagSize, cond); |
| + Asr(reg, reg, Operand(kSmiTagSize), cond); |
| } |
| void SmiUntag(Register dst, Register src, Condition cond = AL) { |
| - Asr(dst, src, kSmiTagSize, cond); |
| + Asr(dst, src, Operand(kSmiTagSize), cond); |
| } |
| // Untag the value in the register assuming it is a smi. |
| @@ -756,7 +771,7 @@ |
| // Otherwise fall-through. |
| void SmiUntag(Register dst, Register src, Label* is_smi) { |
| ASSERT(kSmiTagSize == 1); |
| - Asrs(dst, src, kSmiTagSize); |
| + Asrs(dst, src, Operand(kSmiTagSize)); |
| b(is_smi, CC); |
| } |
| @@ -860,6 +875,11 @@ |
| bool use_far_branches_; |
| + // If you are thinking of using one or both of these instructions directly, |
| + // instead LoadImmediate should probably be used. |
| + void movw(Register rd, uint16_t imm16, Condition cond = AL); |
| + void movt(Register rd, uint16_t imm16, Condition cond = AL); |
| + |
| int32_t AddObject(const Object& obj); |
| int32_t AddExternalLabel(const ExternalLabel* label); |