| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_PPC | 7 #if V8_TARGET_ARCH_PPC |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 3545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3556 // Compare lengths - strings up to min-length are equal. | 3556 // Compare lengths - strings up to min-length are equal. |
| 3557 __ bind(&compare_lengths); | 3557 __ bind(&compare_lengths); |
| 3558 DCHECK(Smi::FromInt(EQUAL) == static_cast<Smi*>(0)); | 3558 DCHECK(Smi::FromInt(EQUAL) == static_cast<Smi*>(0)); |
| 3559 // Use length_delta as result if it's zero. | 3559 // Use length_delta as result if it's zero. |
| 3560 __ mr(r3, length_delta); | 3560 __ mr(r3, length_delta); |
| 3561 __ cmpi(r3, Operand::Zero()); | 3561 __ cmpi(r3, Operand::Zero()); |
| 3562 __ bind(&result_not_equal); | 3562 __ bind(&result_not_equal); |
| 3563 // Conditionally update the result based either on length_delta or | 3563 // Conditionally update the result based either on length_delta or |
| 3564 // the last comparion performed in the loop above. | 3564 // the last comparion performed in the loop above. |
| 3565 if (CpuFeatures::IsSupported(ISELECT)) { | 3565 if (CpuFeatures::IsSupported(ISELECT)) { |
| 3566 __ li(r4, Operand(GREATER)); | 3566 __ LoadSmiLiteral(r4, Smi::FromInt(GREATER)); |
| 3567 __ li(r5, Operand(LESS)); | 3567 __ LoadSmiLiteral(r5, Smi::FromInt(LESS)); |
| 3568 __ isel(eq, r3, r0, r4); | 3568 __ isel(eq, r3, r0, r4); |
| 3569 __ isel(lt, r3, r5, r3); | 3569 __ isel(lt, r3, r5, r3); |
| 3570 __ Ret(); | 3570 __ Ret(); |
| 3571 } else { | 3571 } else { |
| 3572 Label less_equal, equal; | 3572 Label less_equal, equal; |
| 3573 __ ble(&less_equal); | 3573 __ ble(&less_equal); |
| 3574 __ LoadSmiLiteral(r3, Smi::FromInt(GREATER)); | 3574 __ LoadSmiLiteral(r3, Smi::FromInt(GREATER)); |
| 3575 __ Ret(); | 3575 __ Ret(); |
| 3576 __ bind(&less_equal); | 3576 __ bind(&less_equal); |
| 3577 __ beq(&equal); | 3577 __ beq(&equal); |
| (...skipping 1775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5353 kStackUnwindSpace, NULL, | 5353 kStackUnwindSpace, NULL, |
| 5354 MemOperand(fp, 6 * kPointerSize), NULL); | 5354 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5355 } | 5355 } |
| 5356 | 5356 |
| 5357 | 5357 |
| 5358 #undef __ | 5358 #undef __ |
| 5359 } | 5359 } |
| 5360 } // namespace v8::internal | 5360 } // namespace v8::internal |
| 5361 | 5361 |
| 5362 #endif // V8_TARGET_ARCH_PPC | 5362 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |