Chromium Code Reviews| Index: src/IceAssemblerX8632.h |
| diff --git a/src/IceAssemblerX8632.h b/src/IceAssemblerX8632.h |
| index 8b13fc62ead65acadd912b65a5873b9eb64ff46c..f0d25e3b3f9ab3dee99e08889f3d0eee4e1debbb 100644 |
| --- a/src/IceAssemblerX8632.h |
| +++ b/src/IceAssemblerX8632.h |
| @@ -156,14 +156,14 @@ private: |
| explicit Operand(GPRRegister reg) : fixup_(nullptr) { SetModRM(3, reg); } |
| - // Get the operand encoding byte at the given index. |
| + /// Get the operand encoding byte at the given index. |
| uint8_t encoding_at(intptr_t index) const { |
| assert(index >= 0 && index < length_); |
| return encoding_[index]; |
| } |
| - // Returns whether or not this operand is really the given register in |
| - // disguise. Used from the assembler to generate better encodings. |
| + /// Returns whether or not this operand is really the given register in |
| + /// disguise. Used from the assembler to generate better encodings. |
| bool IsRegister(GPRRegister reg) const { |
| return ((encoding_[0] & 0xF8) == 0xC0) // Addressing mode is register only. |
| && ((encoding_[0] & 0x07) == reg); // Register codes match. |
| @@ -270,27 +270,27 @@ public: |
| // TODO(jvoung): why are labels offset by this? |
| static const uint32_t kWordSize = sizeof(uint32_t); |
| - // Returns the position for bound labels (branches that come after this |
| - // are considered backward branches). Cannot be used for unused or linked |
| - // labels. |
| + /// Returns the position for bound labels (branches that come after this |
| + /// are considered backward branches). Cannot be used for unused or linked |
| + /// labels. |
| intptr_t Position() const { |
| assert(IsBound()); |
| return -position_ - kWordSize; |
| } |
| - // Returns the position of an earlier branch instruction that was linked |
| - // to this label (branches that use this are considered forward branches). |
| - // The linked instructions form a linked list, of sorts, using the |
| - // instruction's displacement field for the location of the next |
| - // instruction that is also linked to this label. |
| + /// Returns the position of an earlier branch instruction that was linked |
| + /// to this label (branches that use this are considered forward branches). |
| + /// The linked instructions form a linked list, of sorts, using the |
| + /// instruction's displacement field for the location of the next |
| + /// instruction that is also linked to this label. |
| intptr_t LinkPosition() const { |
| assert(IsLinked()); |
| return position_ - kWordSize; |
| } |
| - // Returns the position of an earlier branch instruction which |
| - // assumes that this label is "near", and bumps iterator to the |
| - // next near position. |
| + /// Returns the position of an earlier branch instruction which |
| + /// assumes that this label is "near", and bumps iterator to the |
| + /// next near position. |
| intptr_t NearPosition() { |
| assert(HasNear()); |
| return unresolved_near_positions_[--num_unresolved_]; |
| @@ -382,7 +382,7 @@ public: |
| return Asm->getKind() == Asm_X8632; |
| } |
| - // Operations to emit GPR instructions (and dispatch on operand type). |
| + /// Operations to emit GPR instructions (and dispatch on operand type). |
| typedef void (AssemblerX8632::*TypedEmitGPR)(Type, GPRRegister); |
| typedef void (AssemblerX8632::*TypedEmitAddr)(Type, const Address &); |
| struct GPREmitterOneOp { |
| @@ -428,7 +428,7 @@ public: |
| TypedEmitAddrImm AddrImm; |
| }; |
| - // Operations to emit XMM instructions (and dispatch on operand type). |
| + /// Operations to emit XMM instructions (and dispatch on operand type). |
| typedef void (AssemblerX8632::*TypedEmitXmmXmm)(Type, XmmRegister, |
| XmmRegister); |
| typedef void (AssemblerX8632::*TypedEmitXmmAddr)(Type, XmmRegister, |
| @@ -456,7 +456,7 @@ public: |
| TypedEmitXmmImm XmmImm; |
| }; |
| - // Cross Xmm/GPR cast instructions. |
| + /// Cross Xmm/GPR cast instructions. |
| template <typename DReg_t, typename SReg_t> struct CastEmitterRegOp { |
| typedef void (AssemblerX8632::*TypedEmitRegs)(Type, DReg_t, SReg_t); |
| typedef void (AssemblerX8632::*TypedEmitAddr)(Type, DReg_t, |
| @@ -466,8 +466,8 @@ public: |
| TypedEmitAddr RegAddr; |
| }; |
| - // Three operand (potentially) cross Xmm/GPR instructions. |
| - // The last operand must be an immediate. |
| + /// Three operand (potentially) cross Xmm/GPR instructions. |
| + /// The last operand must be an immediate. |
| template <typename DReg_t, typename SReg_t> struct ThreeOpImmEmitter { |
| typedef void (AssemblerX8632::*TypedEmitRegRegImm)(Type, DReg_t, SReg_t, |
| const Immediate &); |
| @@ -817,7 +817,7 @@ public: |
| void ret(); |
| void ret(const Immediate &imm); |
| - // 'size' indicates size in bytes and must be in the range 1..8. |
| + /// 'size' indicates size in bytes and must be in the range 1..8. |
| void nop(int size = 1); |
| void int3(); |
| void hlt(); |
| @@ -870,16 +870,16 @@ private: |
| GPRRegister shifter); |
| typedef std::vector<Label *> LabelVector; |
| - // A vector of pool-allocated x86 labels for CFG nodes. |
| + /// A vector of pool-allocated x86 labels for CFG nodes. |
| LabelVector CfgNodeLabels; |
| - // A vector of pool-allocated x86 labels for Local labels. |
| + /// A vector of pool-allocated x86 labels for Local labels. |
| LabelVector LocalLabels; |
| Label *GetOrCreateLabel(SizeT Number, LabelVector &Labels); |
| - // The arith_int() methods factor out the commonality between the encodings of |
| - // add(), Or(), adc(), sbb(), And(), sub(), Xor(), and cmp(). The Tag |
| - // parameter is statically asserted to be less than 8. |
| + /// The arith_int() methods factor out the commonality between the encodings of |
|
jvoung (off chromium)
2015/06/30 22:05:47
wrap comment?
ascull
2015/07/06 19:29:08
Done.
|
| + /// add(), Or(), adc(), sbb(), And(), sub(), Xor(), and cmp(). The Tag |
| + /// parameter is statically asserted to be less than 8. |
| template <uint32_t Tag> |
| void arith_int(Type Ty, GPRRegister reg, const Immediate &imm); |