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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 __ cmp(r3, r4); | 255 __ cmp(r3, r4); |
256 __ bne(¬_identical); | 256 __ bne(¬_identical); |
257 | 257 |
258 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(), | 258 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(), |
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 __ CompareObjectType(r3, r7, r7, FIRST_SPEC_OBJECT_TYPE); | 263 __ CompareObjectType(r3, r7, r7, FIRST_SPEC_OBJECT_TYPE); |
264 __ bge(slow); | 264 __ bge(slow); |
| 265 __ CompareObjectType(r3, r7, r7, SYMBOL_TYPE); |
| 266 __ beq(slow); |
265 } else { | 267 } else { |
266 __ CompareObjectType(r3, r7, r7, HEAP_NUMBER_TYPE); | 268 __ CompareObjectType(r3, r7, r7, HEAP_NUMBER_TYPE); |
267 __ beq(&heap_number); | 269 __ beq(&heap_number); |
268 // Comparing JS objects with <=, >= is complicated. | 270 // Comparing JS objects with <=, >= is complicated. |
269 if (cond != eq) { | 271 if (cond != eq) { |
270 __ cmpi(r7, Operand(FIRST_SPEC_OBJECT_TYPE)); | 272 __ cmpi(r7, Operand(FIRST_SPEC_OBJECT_TYPE)); |
271 __ bge(slow); | 273 __ bge(slow); |
272 // Normally here we fall through to return_equal, but undefined is | 274 // Normally here we fall through to return_equal, but undefined is |
273 // special: (undefined == undefined) == true, but | 275 // special: (undefined == undefined) == true, but |
274 // (undefined <= undefined) == false! See ECMAScript 11.8.5. | 276 // (undefined <= undefined) == false! See ECMAScript 11.8.5. |
(...skipping 5304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5579 kStackUnwindSpace, NULL, | 5581 kStackUnwindSpace, NULL, |
5580 MemOperand(fp, 6 * kPointerSize), NULL); | 5582 MemOperand(fp, 6 * kPointerSize), NULL); |
5581 } | 5583 } |
5582 | 5584 |
5583 | 5585 |
5584 #undef __ | 5586 #undef __ |
5585 } | 5587 } |
5586 } // namespace v8::internal | 5588 } // namespace v8::internal |
5587 | 5589 |
5588 #endif // V8_TARGET_ARCH_PPC | 5590 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |