OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2499 } | 2499 } |
2500 | 2500 |
2501 bool use_sse2 = CpuFeatures::IsSupported(SSE2); | 2501 bool use_sse2 = CpuFeatures::IsSupported(SSE2); |
2502 if (use_sse2) { | 2502 if (use_sse2) { |
2503 CpuFeatureScope scope(masm(), SSE2); | 2503 CpuFeatureScope scope(masm(), SSE2); |
2504 XMMRegister input_reg = ToDoubleRegister(instr->object()); | 2504 XMMRegister input_reg = ToDoubleRegister(instr->object()); |
2505 __ ucomisd(input_reg, input_reg); | 2505 __ ucomisd(input_reg, input_reg); |
2506 } else { | 2506 } else { |
2507 // Put the value to the top of stack | 2507 // Put the value to the top of stack |
2508 X87Register src = ToX87Register(instr->object()); | 2508 X87Register src = ToX87Register(instr->object()); |
2509 X87LoadForUsage(src); | 2509 X87Fxch(src); |
2510 __ fld(0); | 2510 __ fld(0); |
2511 __ fld(0); | 2511 __ fld(0); |
2512 __ FCmp(); | 2512 __ FCmp(); |
2513 } | 2513 } |
2514 | 2514 |
2515 EmitFalseBranch(instr, parity_odd); | 2515 EmitFalseBranch(instr, parity_odd); |
2516 | 2516 |
2517 __ sub(esp, Immediate(kDoubleSize)); | 2517 __ sub(esp, Immediate(kDoubleSize)); |
2518 if (use_sse2) { | 2518 if (use_sse2) { |
2519 CpuFeatureScope scope(masm(), SSE2); | 2519 CpuFeatureScope scope(masm(), SSE2); |
2520 XMMRegister input_reg = ToDoubleRegister(instr->object()); | 2520 XMMRegister input_reg = ToDoubleRegister(instr->object()); |
2521 __ movdbl(MemOperand(esp, 0), input_reg); | 2521 __ movdbl(MemOperand(esp, 0), input_reg); |
2522 } else { | 2522 } else { |
2523 __ fld(0); | 2523 __ fld(0); |
2524 __ fstp_d(MemOperand(esp, 0)); | 2524 __ fstp_d(MemOperand(esp, 0)); |
2525 } | 2525 } |
2526 | 2526 |
2527 __ add(esp, Immediate(kDoubleSize)); | 2527 __ add(esp, Immediate(kDoubleSize)); |
2528 __ cmp(MemOperand(esp, -sizeof(kHoleNanUpper32)), Immediate(kHoleNanUpper32)); | 2528 int offset = sizeof(kHoleNanUpper32); |
| 2529 __ cmp(MemOperand(esp, -offset), Immediate(kHoleNanUpper32)); |
2529 EmitBranch(instr, equal); | 2530 EmitBranch(instr, equal); |
2530 } | 2531 } |
2531 | 2532 |
2532 | 2533 |
2533 Condition LCodeGen::EmitIsObject(Register input, | 2534 Condition LCodeGen::EmitIsObject(Register input, |
2534 Register temp1, | 2535 Register temp1, |
2535 Label* is_not_object, | 2536 Label* is_not_object, |
2536 Label* is_object) { | 2537 Label* is_object) { |
2537 __ JumpIfSmi(input, is_not_object); | 2538 __ JumpIfSmi(input, is_not_object); |
2538 | 2539 |
(...skipping 3904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6443 FixedArray::kHeaderSize - kPointerSize)); | 6444 FixedArray::kHeaderSize - kPointerSize)); |
6444 __ bind(&done); | 6445 __ bind(&done); |
6445 } | 6446 } |
6446 | 6447 |
6447 | 6448 |
6448 #undef __ | 6449 #undef __ |
6449 | 6450 |
6450 } } // namespace v8::internal | 6451 } } // namespace v8::internal |
6451 | 6452 |
6452 #endif // V8_TARGET_ARCH_IA32 | 6453 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |