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 2854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2865 | 2865 |
2866 void FloatingPointHelper::CheckSSE2OperandIsInt32(MacroAssembler* masm, | 2866 void FloatingPointHelper::CheckSSE2OperandIsInt32(MacroAssembler* masm, |
2867 Label* non_int32, | 2867 Label* non_int32, |
2868 XMMRegister operand, | 2868 XMMRegister operand, |
2869 Register scratch, | 2869 Register scratch, |
2870 XMMRegister xmm_scratch) { | 2870 XMMRegister xmm_scratch) { |
2871 __ cvttsd2si(scratch, Operand(operand)); | 2871 __ cvttsd2si(scratch, Operand(operand)); |
2872 __ cvtsi2sd(xmm_scratch, scratch); | 2872 __ cvtsi2sd(xmm_scratch, scratch); |
2873 __ pcmpeqd(xmm_scratch, operand); | 2873 __ pcmpeqd(xmm_scratch, operand); |
2874 __ movmskps(scratch, xmm_scratch); | 2874 __ movmskps(scratch, xmm_scratch); |
2875 __ neg(scratch); | 2875 // Two least significant bits should be both set. |
| 2876 __ not_(scratch); |
2876 __ test(scratch, Immediate(3)); | 2877 __ test(scratch, Immediate(3)); |
2877 __ j(not_zero, non_int32); | 2878 __ j(not_zero, non_int32); |
2878 } | 2879 } |
2879 | 2880 |
2880 | 2881 |
2881 void FloatingPointHelper::LoadFloatOperands(MacroAssembler* masm, | 2882 void FloatingPointHelper::LoadFloatOperands(MacroAssembler* masm, |
2882 Register scratch, | 2883 Register scratch, |
2883 ArgLocation arg_location) { | 2884 ArgLocation arg_location) { |
2884 Label load_smi_1, load_smi_2, done_load_1, done; | 2885 Label load_smi_1, load_smi_2, done_load_1, done; |
2885 if (arg_location == ARGS_IN_REGISTERS) { | 2886 if (arg_location == ARGS_IN_REGISTERS) { |
(...skipping 4584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7470 // Restore ecx. | 7471 // Restore ecx. |
7471 __ pop(ecx); | 7472 __ pop(ecx); |
7472 __ ret(0); | 7473 __ ret(0); |
7473 } | 7474 } |
7474 | 7475 |
7475 #undef __ | 7476 #undef __ |
7476 | 7477 |
7477 } } // namespace v8::internal | 7478 } } // namespace v8::internal |
7478 | 7479 |
7479 #endif // V8_TARGET_ARCH_IA32 | 7480 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |