Chromium Code Reviews| Index: src/arm/codegen-arm.h |
| =================================================================== |
| --- src/arm/codegen-arm.h (revision 4136) |
| +++ src/arm/codegen-arm.h (working copy) |
| @@ -660,6 +660,45 @@ |
| }; |
| +// This stub can convert a signed int32 to a heap number (double). It does |
| +// not work for int32s that are in Smi range! No GC occurs during this stub |
| +// so you don't have to set up the frame. |
| +class WriteInt32ToHeapNumberStub : public CodeStub { |
| + public: |
| + WriteInt32ToHeapNumberStub(Register the_int, |
| + Register the_heap_number, |
| + Register scratch) |
| + : the_int_(the_int), |
| + the_heap_number_(the_heap_number), |
| + scratch_(scratch) { } |
| + |
| + private: |
| + Register the_int_; |
| + Register the_heap_number_; |
| + Register scratch_; |
| + |
| + // Minor key encoding in 16 bits. |
|
Mads Ager (chromium)
2010/03/23 11:46:54
This is not new code, but we do not seem to use th
|
| + class ModeBits: public BitField<OverwriteMode, 0, 2> {}; |
| + class OpBits: public BitField<Token::Value, 2, 14> {}; |
| + |
| + Major MajorKey() { return WriteInt32ToHeapNumber; } |
| + int MinorKey() { |
| + // Encode the parameters in a unique 16 bit value. |
| + return the_int_.code() + |
|
Mads Ager (chromium)
2010/03/23 11:46:54
Please remove extra space.
|
| + (the_heap_number_.code() << 4) + |
| + (scratch_.code() << 8); |
| + } |
| + |
| + void Generate(MacroAssembler* masm); |
| + |
| + const char* GetName() { return "WriteInt32ToHeapNumberStub"; } |
| + |
| +#ifdef DEBUG |
| + void Print() { PrintF("WriteInt32ToHeapNumberStub\n"); } |
| +#endif |
| +}; |
| + |
| + |
| } } // namespace v8::internal |
| #endif // V8_ARM_CODEGEN_ARM_H_ |