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); | |
272 if (is_strong(strength)) { | 269 if (is_strong(strength)) { |
273 // Call the runtime on anything that is converted in the semantics, since | 270 // Call the runtime on anything that is converted in the semantics, since |
274 // we need to throw a TypeError. Smis have already been ruled out. | 271 // we need to throw a TypeError. Smis have already been ruled out. |
275 __ cmpi(r7, Operand(HEAP_NUMBER_TYPE)); | 272 __ cmpi(r7, Operand(HEAP_NUMBER_TYPE)); |
276 __ beq(&return_equal); | 273 __ beq(&return_equal); |
277 __ andi(r0, r7, Operand(kIsNotStringMask)); | 274 __ andi(r0, r7, Operand(kIsNotStringMask)); |
278 __ bne(slow, cr0); | 275 __ bne(slow, cr0); |
279 } | 276 } |
280 } else { | 277 } else { |
281 __ CompareObjectType(r3, r7, r7, HEAP_NUMBER_TYPE); | 278 __ CompareObjectType(r3, r7, r7, HEAP_NUMBER_TYPE); |
282 __ beq(&heap_number); | 279 __ beq(&heap_number); |
283 // Comparing JS objects with <=, >= is complicated. | 280 // Comparing JS objects with <=, >= is complicated. |
284 if (cond != eq) { | 281 if (cond != eq) { |
285 __ cmpi(r7, Operand(FIRST_SPEC_OBJECT_TYPE)); | 282 __ cmpi(r7, Operand(FIRST_SPEC_OBJECT_TYPE)); |
286 __ bge(slow); | 283 __ bge(slow); |
287 // Call runtime on identical symbols since we need to throw a TypeError. | 284 // Call runtime on identical symbols since we need to throw a TypeError. |
288 __ cmpi(r7, Operand(SYMBOL_TYPE)); | 285 __ cmpi(r7, Operand(SYMBOL_TYPE)); |
289 __ beq(slow); | 286 __ beq(slow); |
290 // Call runtime on identical SIMD values since we must throw a TypeError. | |
291 __ cmpi(r7, Operand(FLOAT32X4_TYPE)); | |
292 __ beq(slow); | |
293 if (is_strong(strength)) { | 287 if (is_strong(strength)) { |
294 // Call the runtime on anything that is converted in the semantics, | 288 // Call the runtime on anything that is converted in the semantics, |
295 // since we need to throw a TypeError. Smis and heap numbers have | 289 // since we need to throw a TypeError. Smis and heap numbers have |
296 // already been ruled out. | 290 // already been ruled out. |
297 __ andi(r0, r7, Operand(kIsNotStringMask)); | 291 __ andi(r0, r7, Operand(kIsNotStringMask)); |
298 __ bne(slow, cr0); | 292 __ bne(slow, cr0); |
299 } | 293 } |
300 // Normally here we fall through to return_equal, but undefined is | 294 // Normally here we fall through to return_equal, but undefined is |
301 // special: (undefined == undefined) == true, but | 295 // special: (undefined == undefined) == true, but |
302 // (undefined <= undefined) == false! See ECMAScript 11.8.5. | 296 // (undefined <= undefined) == false! See ECMAScript 11.8.5. |
(...skipping 5366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5669 kStackUnwindSpace, NULL, | 5663 kStackUnwindSpace, NULL, |
5670 MemOperand(fp, 6 * kPointerSize), NULL); | 5664 MemOperand(fp, 6 * kPointerSize), NULL); |
5671 } | 5665 } |
5672 | 5666 |
5673 | 5667 |
5674 #undef __ | 5668 #undef __ |
5675 } // namespace internal | 5669 } // namespace internal |
5676 } // namespace v8 | 5670 } // namespace v8 |
5677 | 5671 |
5678 #endif // V8_TARGET_ARCH_PPC | 5672 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |