OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 7548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7559 FloatingPointHelper::LoadFloatOperands(masm); | 7559 FloatingPointHelper::LoadFloatOperands(masm); |
7560 | 7560 |
7561 Label skip_allocation, non_smi_result, operand_conversion_failure; | 7561 Label skip_allocation, non_smi_result, operand_conversion_failure; |
7562 | 7562 |
7563 // Reserve space for converted numbers. | 7563 // Reserve space for converted numbers. |
7564 __ subq(rsp, Immediate(2 * kPointerSize)); | 7564 __ subq(rsp, Immediate(2 * kPointerSize)); |
7565 | 7565 |
7566 if (use_sse3_) { | 7566 if (use_sse3_) { |
7567 // Truncate the operands to 32-bit integers and check for | 7567 // Truncate the operands to 32-bit integers and check for |
7568 // exceptions in doing so. | 7568 // exceptions in doing so. |
7569 CpuFeatures::Scope scope(CpuFeatures::SSE3); | 7569 CpuFeatures::Scope scope(SSE3); |
7570 __ fisttp_s(Operand(rsp, 0 * kPointerSize)); | 7570 __ fisttp_s(Operand(rsp, 0 * kPointerSize)); |
7571 __ fisttp_s(Operand(rsp, 1 * kPointerSize)); | 7571 __ fisttp_s(Operand(rsp, 1 * kPointerSize)); |
7572 __ fnstsw_ax(); | 7572 __ fnstsw_ax(); |
7573 __ testl(rax, Immediate(1)); | 7573 __ testl(rax, Immediate(1)); |
7574 __ j(not_zero, &operand_conversion_failure); | 7574 __ j(not_zero, &operand_conversion_failure); |
7575 } else { | 7575 } else { |
7576 // Check if right operand is int32. | 7576 // Check if right operand is int32. |
7577 __ fist_s(Operand(rsp, 0 * kPointerSize)); | 7577 __ fist_s(Operand(rsp, 0 * kPointerSize)); |
7578 __ fild_s(Operand(rsp, 0 * kPointerSize)); | 7578 __ fild_s(Operand(rsp, 0 * kPointerSize)); |
7579 __ FCmp(); | 7579 __ FCmp(); |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7835 masm.GetCode(&desc); | 7835 masm.GetCode(&desc); |
7836 // Call the function from C++. | 7836 // Call the function from C++. |
7837 return FUNCTION_CAST<ModuloFunction>(buffer); | 7837 return FUNCTION_CAST<ModuloFunction>(buffer); |
7838 } | 7838 } |
7839 | 7839 |
7840 #endif | 7840 #endif |
7841 | 7841 |
7842 #undef __ | 7842 #undef __ |
7843 | 7843 |
7844 } } // namespace v8::internal | 7844 } } // namespace v8::internal |
OLD | NEW |