Index: src/arm/codegen-arm.h |
=================================================================== |
--- src/arm/codegen-arm.h (revision 4574) |
+++ src/arm/codegen-arm.h (working copy) |
@@ -904,6 +904,43 @@ |
}; |
+class RecordWriteStub : public CodeStub { |
+ public: |
+ RecordWriteStub(Register object, Register offset, Register scratch) |
+ : object_(object), offset_(offset), scratch_(scratch) { } |
+ |
+ void Generate(MacroAssembler* masm); |
+ |
+ private: |
+ Register object_; |
+ Register offset_; |
+ Register scratch_; |
+ |
+#ifdef DEBUG |
+ void Print() { |
+ PrintF("RecordWriteStub (object reg %d), (offset reg %d)," |
+ " (scratch reg %d)\n", |
+ object_.code(), offset_.code(), scratch_.code()); |
+ } |
+#endif |
+ |
+ // Minor key encoding in 12 bits. 4 bits for each of the three |
+ // registers (object, offset and scratch) OOOOAAAASSSS. |
+ class ScratchBits: public BitField<uint32_t, 0, 4> {}; |
+ class OffsetBits: public BitField<uint32_t, 4, 4> {}; |
+ class ObjectBits: public BitField<uint32_t, 8, 4> {}; |
+ |
+ Major MajorKey() { return RecordWrite; } |
+ |
+ int MinorKey() { |
+ // Encode the registers. |
+ return ObjectBits::encode(object_.code()) | |
+ OffsetBits::encode(offset_.code()) | |
+ ScratchBits::encode(scratch_.code()); |
+ } |
+}; |
+ |
+ |
} } // namespace v8::internal |
#endif // V8_ARM_CODEGEN_ARM_H_ |