| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 7687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7698 | 7698 |
| 7699 | 7699 |
| 7700 // Get the integer part of a heap number. Surprisingly, all this bit twiddling | 7700 // Get the integer part of a heap number. Surprisingly, all this bit twiddling |
| 7701 // is faster than using the built-in instructions on floating point registers. | 7701 // is faster than using the built-in instructions on floating point registers. |
| 7702 // Trashes edi and ebx. Dest is ecx. Source cannot be ecx or one of the | 7702 // Trashes edi and ebx. Dest is ecx. Source cannot be ecx or one of the |
| 7703 // trashed registers. | 7703 // trashed registers. |
| 7704 void IntegerConvert(MacroAssembler* masm, | 7704 void IntegerConvert(MacroAssembler* masm, |
| 7705 Register source, | 7705 Register source, |
| 7706 bool use_sse3, | 7706 bool use_sse3, |
| 7707 Label* conversion_failure) { | 7707 Label* conversion_failure) { |
| 7708 ASSERT(!source.is(ecx) && !source.is(edi) && !source.is(ebx)); |
| 7708 Label done, right_exponent, normal_exponent; | 7709 Label done, right_exponent, normal_exponent; |
| 7709 Register scratch = ebx; | 7710 Register scratch = ebx; |
| 7710 Register scratch2 = edi; | 7711 Register scratch2 = edi; |
| 7711 // Get exponent word. | 7712 // Get exponent word. |
| 7712 __ mov(scratch, FieldOperand(source, HeapNumber::kExponentOffset)); | 7713 __ mov(scratch, FieldOperand(source, HeapNumber::kExponentOffset)); |
| 7713 // Get exponent alone in scratch2. | 7714 // Get exponent alone in scratch2. |
| 7714 __ mov(scratch2, scratch); | 7715 __ mov(scratch2, scratch); |
| 7715 __ and_(scratch2, HeapNumber::kExponentMask); | 7716 __ and_(scratch2, HeapNumber::kExponentMask); |
| 7716 if (use_sse3) { | 7717 if (use_sse3) { |
| 7717 CpuFeatures::Scope scope(SSE3); | 7718 CpuFeatures::Scope scope(SSE3); |
| (...skipping 2309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10027 | 10028 |
| 10028 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) | 10029 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) |
| 10029 // tagged as a small integer. | 10030 // tagged as a small integer. |
| 10030 __ bind(&runtime); | 10031 __ bind(&runtime); |
| 10031 __ TailCallRuntime(ExternalReference(Runtime::kStringCompare), 2, 1); | 10032 __ TailCallRuntime(ExternalReference(Runtime::kStringCompare), 2, 1); |
| 10032 } | 10033 } |
| 10033 | 10034 |
| 10034 #undef __ | 10035 #undef __ |
| 10035 | 10036 |
| 10036 } } // namespace v8::internal | 10037 } } // namespace v8::internal |
| OLD | NEW |