Chromium Code Reviews| Index: src/IceAssemblerARM32.h |
| diff --git a/src/IceAssemblerARM32.h b/src/IceAssemblerARM32.h |
| index 1c2528c21c675b11595696fd293274b6848d8508..76e95897ec994a72cd356f454464abeae08d5e27 100644 |
| --- a/src/IceAssemblerARM32.h |
| +++ b/src/IceAssemblerARM32.h |
| @@ -137,6 +137,18 @@ public: |
| return false; |
| } |
| + /// Used inside InstARM32::emitUsingTextFixup() to define the beginning of the |
| + /// first assembly instruction to be emitted. |
| + void startFirstInst() { TextInstCount = 1; } |
|
Jim Stichnoth
2015/11/04 23:45:26
Bikeshedding a bit. It would be nice if the gette
Karl
2015/11/05 16:18:40
Done.
|
| + |
| + /// Used inside InstARM32::emit() methods to define the beginning of the next |
| + /// assembly instruction being emitted. |
| + void startNextInst() { ++TextInstCount; } |
| + |
| + /// Returns the number of emitted instructions since the last call |
| + /// to startFirstInst(). |
| + size_t getNumberEmittedInsts() const { return TextInstCount; } |
| + |
| void bind(Label *label); |
| // List of instructions implemented by integrated assembler. |
| @@ -196,7 +208,7 @@ public: |
| return Asm->getKind() == Asm_ARM32; |
| } |
| - void emitTextInst(const std::string &Text, SizeT InstSize = sizeof(IValueT)); |
| + void emitTextInst(const std::string &Text, SizeT InstSize); |
| private: |
| // A vector of pool-allocated x86 labels for CFG nodes. |
| @@ -204,6 +216,9 @@ private: |
| LabelVector CfgNodeLabels; |
| // A vector of pool-allocated x86 labels for Local labels. |
| LabelVector LocalLabels; |
| + // Counter used to count number of instructions emitted inside |
| + // InstARM32::emit() methods, when run inside InstARM32::emitUsingTextFixup(). |
| + size_t TextInstCount = 0; |
| Label *getOrCreateLabel(SizeT Number, LabelVector &Labels); |