| 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 // so we do the second best thing - test it ourselves. | 259 // so we do the second best thing - test it ourselves. |
| 260 // They are both equal and they are not both Smis so both of them are not | 260 // They are both equal and they are not both Smis so both of them are not |
| 261 // Smis. If it's not a heap number, then return equal. | 261 // Smis. If it's not a heap number, then return equal. |
| 262 if (cond == lt || cond == gt) { | 262 if (cond == lt || cond == gt) { |
| 263 // Call runtime on identical JSObjects. | 263 // Call runtime on identical JSObjects. |
| 264 __ CompareObjectType(r3, r7, r7, FIRST_SPEC_OBJECT_TYPE); | 264 __ CompareObjectType(r3, r7, r7, FIRST_SPEC_OBJECT_TYPE); |
| 265 __ bge(slow); | 265 __ bge(slow); |
| 266 // Call runtime on identical symbols since we need to throw a TypeError. | 266 // Call runtime on identical symbols since we need to throw a TypeError. |
| 267 __ cmpi(r7, Operand(SYMBOL_TYPE)); | 267 __ cmpi(r7, Operand(SYMBOL_TYPE)); |
| 268 __ beq(slow); | 268 __ beq(slow); |
| 269 // Call runtime on identical SIMD values since we must throw a TypeError. |
| 270 __ cmpi(r7, Operand(FLOAT32X4_TYPE)); |
| 271 __ beq(slow); |
| 269 if (is_strong(strength)) { | 272 if (is_strong(strength)) { |
| 270 // Call the runtime on anything that is converted in the semantics, since | 273 // Call the runtime on anything that is converted in the semantics, since |
| 271 // we need to throw a TypeError. Smis have already been ruled out. | 274 // we need to throw a TypeError. Smis have already been ruled out. |
| 272 __ cmpi(r7, Operand(HEAP_NUMBER_TYPE)); | 275 __ cmpi(r7, Operand(HEAP_NUMBER_TYPE)); |
| 273 __ beq(&return_equal); | 276 __ beq(&return_equal); |
| 274 __ andi(r0, r7, Operand(kIsNotStringMask)); | 277 __ andi(r0, r7, Operand(kIsNotStringMask)); |
| 275 __ bne(slow, cr0); | 278 __ bne(slow, cr0); |
| 276 } | 279 } |
| 277 } else { | 280 } else { |
| 278 __ CompareObjectType(r3, r7, r7, HEAP_NUMBER_TYPE); | 281 __ CompareObjectType(r3, r7, r7, HEAP_NUMBER_TYPE); |
| 279 __ beq(&heap_number); | 282 __ beq(&heap_number); |
| 280 // Comparing JS objects with <=, >= is complicated. | 283 // Comparing JS objects with <=, >= is complicated. |
| 281 if (cond != eq) { | 284 if (cond != eq) { |
| 282 __ cmpi(r7, Operand(FIRST_SPEC_OBJECT_TYPE)); | 285 __ cmpi(r7, Operand(FIRST_SPEC_OBJECT_TYPE)); |
| 283 __ bge(slow); | 286 __ bge(slow); |
| 284 // Call runtime on identical symbols since we need to throw a TypeError. | 287 // Call runtime on identical symbols since we need to throw a TypeError. |
| 285 __ cmpi(r7, Operand(SYMBOL_TYPE)); | 288 __ cmpi(r7, Operand(SYMBOL_TYPE)); |
| 286 __ beq(slow); | 289 __ beq(slow); |
| 290 // Call runtime on identical SIMD values since we must throw a TypeError. |
| 291 __ cmpi(r7, Operand(FLOAT32X4_TYPE)); |
| 292 __ beq(slow); |
| 287 if (is_strong(strength)) { | 293 if (is_strong(strength)) { |
| 288 // Call the runtime on anything that is converted in the semantics, | 294 // Call the runtime on anything that is converted in the semantics, |
| 289 // since we need to throw a TypeError. Smis and heap numbers have | 295 // since we need to throw a TypeError. Smis and heap numbers have |
| 290 // already been ruled out. | 296 // already been ruled out. |
| 291 __ andi(r0, r7, Operand(kIsNotStringMask)); | 297 __ andi(r0, r7, Operand(kIsNotStringMask)); |
| 292 __ bne(slow, cr0); | 298 __ bne(slow, cr0); |
| 293 } | 299 } |
| 294 // Normally here we fall through to return_equal, but undefined is | 300 // Normally here we fall through to return_equal, but undefined is |
| 295 // special: (undefined == undefined) == true, but | 301 // special: (undefined == undefined) == true, but |
| 296 // (undefined <= undefined) == false! See ECMAScript 11.8.5. | 302 // (undefined <= undefined) == false! See ECMAScript 11.8.5. |
| (...skipping 5370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5667 kStackUnwindSpace, NULL, | 5673 kStackUnwindSpace, NULL, |
| 5668 MemOperand(fp, 6 * kPointerSize), NULL); | 5674 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5669 } | 5675 } |
| 5670 | 5676 |
| 5671 | 5677 |
| 5672 #undef __ | 5678 #undef __ |
| 5673 } // namespace internal | 5679 } // namespace internal |
| 5674 } // namespace v8 | 5680 } // namespace v8 |
| 5675 | 5681 |
| 5676 #endif // V8_TARGET_ARCH_PPC | 5682 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |