Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2984 __ xorps(xmm_scratch, xmm_scratch); | 2984 __ xorps(xmm_scratch, xmm_scratch); |
| 2985 __ addsd(input_reg, xmm_scratch); // Convert -0 to +0. | 2985 __ addsd(input_reg, xmm_scratch); // Convert -0 to +0. |
| 2986 __ sqrtsd(input_reg, input_reg); | 2986 __ sqrtsd(input_reg, input_reg); |
| 2987 __ bind(&done); | 2987 __ bind(&done); |
| 2988 } | 2988 } |
| 2989 | 2989 |
| 2990 | 2990 |
| 2991 void LCodeGen::DoPower(LPower* instr) { | 2991 void LCodeGen::DoPower(LPower* instr) { |
| 2992 Representation exponent_type = instr->hydrogen()->right()->representation(); | 2992 Representation exponent_type = instr->hydrogen()->right()->representation(); |
| 2993 // Having marked this as a call, we can use any registers. | 2993 // Having marked this as a call, we can use any registers. |
| 2994 // Just make sure that the input registers are the expected ones. | 2994 // Just make sure that the input/output registers are the expected ones. |
| 2995 ASSERT(!instr->InputAt(1)->IsDoubleRegister() || | 2995 ASSERT(!instr->InputAt(1)->IsDoubleRegister() || |
|
ulan
2011/12/06 17:38:04
Don't forget to change the assertions to reflect r
| |
| 2996 ToDoubleRegister(instr->InputAt(1)).is(xmm2)); | 2996 ToDoubleRegister(instr->InputAt(1)).is(xmm2)); |
| 2997 ASSERT(!instr->InputAt(1)->IsRegister() || | 2997 ASSERT(!instr->InputAt(1)->IsRegister() || |
| 2998 ToRegister(instr->InputAt(1)).is(eax)); | 2998 ToRegister(instr->InputAt(1)).is(eax)); |
| 2999 ASSERT(ToDoubleRegister(instr->InputAt(0)).is(xmm1)); | 2999 ASSERT(ToDoubleRegister(instr->InputAt(0)).is(xmm1)); |
| 3000 ASSERT(ToDoubleRegister(instr->result()).is(xmm3)); | 3000 ASSERT(ToDoubleRegister(instr->result()).is(xmm3)); |
| 3001 | 3001 |
| 3002 if (exponent_type.IsTagged()) { | 3002 if (exponent_type.IsTagged()) { |
| 3003 Label no_deopt; | 3003 Label no_deopt; |
| 3004 __ JumpIfSmi(eax, &no_deopt); | 3004 __ JumpIfSmi(eax, &no_deopt); |
| 3005 __ CmpObjectType(eax, HEAP_NUMBER_TYPE, ecx); | 3005 __ CmpObjectType(eax, HEAP_NUMBER_TYPE, ecx); |
| (...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4621 this, pointers, Safepoint::kLazyDeopt); | 4621 this, pointers, Safepoint::kLazyDeopt); |
| 4622 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); | 4622 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); |
| 4623 } | 4623 } |
| 4624 | 4624 |
| 4625 | 4625 |
| 4626 #undef __ | 4626 #undef __ |
| 4627 | 4627 |
| 4628 } } // namespace v8::internal | 4628 } } // namespace v8::internal |
| 4629 | 4629 |
| 4630 #endif // V8_TARGET_ARCH_IA32 | 4630 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |