OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 Major MajorKey() { return ConvertToDouble; } | 297 Major MajorKey() { return ConvertToDouble; } |
298 int MinorKey() { | 298 int MinorKey() { |
299 // Encode the parameters in a unique 16 bit value. | 299 // Encode the parameters in a unique 16 bit value. |
300 return result1_.code() + | 300 return result1_.code() + |
301 (result2_.code() << 4) + | 301 (result2_.code() << 4) + |
302 (source_.code() << 8) + | 302 (source_.code() << 8) + |
303 (zeros_.code() << 12); | 303 (zeros_.code() << 12); |
304 } | 304 } |
305 | 305 |
306 void Generate(MacroAssembler* masm); | 306 void Generate(MacroAssembler* masm); |
307 | |
308 const char* GetName() { return "ConvertToDoubleStub"; } | |
309 | |
310 #ifdef DEBUG | |
311 void Print() { PrintF("ConvertToDoubleStub\n"); } | |
312 #endif | |
313 }; | 307 }; |
314 | 308 |
315 | 309 |
316 void ConvertToDoubleStub::Generate(MacroAssembler* masm) { | 310 void ConvertToDoubleStub::Generate(MacroAssembler* masm) { |
317 Register exponent = result1_; | 311 Register exponent = result1_; |
318 Register mantissa = result2_; | 312 Register mantissa = result2_; |
319 | 313 |
320 Label not_special; | 314 Label not_special; |
321 // Convert from Smi to integer. | 315 // Convert from Smi to integer. |
322 __ mov(source_, Operand(source_, ASR, kSmiTagSize)); | 316 __ mov(source_, Operand(source_, ASR, kSmiTagSize)); |
(...skipping 6270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6593 __ mov(result, Operand(0)); | 6587 __ mov(result, Operand(0)); |
6594 __ Ret(); | 6588 __ Ret(); |
6595 } | 6589 } |
6596 | 6590 |
6597 | 6591 |
6598 #undef __ | 6592 #undef __ |
6599 | 6593 |
6600 } } // namespace v8::internal | 6594 } } // namespace v8::internal |
6601 | 6595 |
6602 #endif // V8_TARGET_ARCH_ARM | 6596 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |