Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 3351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3362 }; | 3362 }; |
| 3363 | 3363 |
| 3364 ASSERT(instr->value()->Equals(instr->result())); | 3364 ASSERT(instr->value()->Equals(instr->result())); |
| 3365 Representation r = instr->hydrogen()->value()->representation(); | 3365 Representation r = instr->hydrogen()->value()->representation(); |
| 3366 | 3366 |
| 3367 if (r.IsDouble()) { | 3367 if (r.IsDouble()) { |
| 3368 XMMRegister scratch = double_scratch0(); | 3368 XMMRegister scratch = double_scratch0(); |
| 3369 XMMRegister input_reg = ToDoubleRegister(instr->value()); | 3369 XMMRegister input_reg = ToDoubleRegister(instr->value()); |
| 3370 __ xorps(scratch, scratch); | 3370 __ xorps(scratch, scratch); |
| 3371 __ subsd(scratch, input_reg); | 3371 __ subsd(scratch, input_reg); |
| 3372 __ andpd(input_reg, scratch); | 3372 __ andps(input_reg, scratch); |
|
Benedikt Meurer
2013/10/28 11:23:18
Why use andps instead of andpd here?
| |
| 3373 } else if (r.IsInteger32()) { | 3373 } else if (r.IsInteger32()) { |
| 3374 EmitIntegerMathAbs(instr); | 3374 EmitIntegerMathAbs(instr); |
| 3375 } else if (r.IsSmi()) { | 3375 } else if (r.IsSmi()) { |
| 3376 EmitSmiMathAbs(instr); | 3376 EmitSmiMathAbs(instr); |
| 3377 } else { // Tagged case. | 3377 } else { // Tagged case. |
| 3378 DeferredMathAbsTaggedHeapNumber* deferred = | 3378 DeferredMathAbsTaggedHeapNumber* deferred = |
| 3379 new(zone()) DeferredMathAbsTaggedHeapNumber(this, instr); | 3379 new(zone()) DeferredMathAbsTaggedHeapNumber(this, instr); |
| 3380 Register input_reg = ToRegister(instr->value()); | 3380 Register input_reg = ToRegister(instr->value()); |
| 3381 // Smi check. | 3381 // Smi check. |
| 3382 __ JumpIfNotSmi(input_reg, deferred->entry()); | 3382 __ JumpIfNotSmi(input_reg, deferred->entry()); |
| (...skipping 2072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5455 FixedArray::kHeaderSize - kPointerSize)); | 5455 FixedArray::kHeaderSize - kPointerSize)); |
| 5456 __ bind(&done); | 5456 __ bind(&done); |
| 5457 } | 5457 } |
| 5458 | 5458 |
| 5459 | 5459 |
| 5460 #undef __ | 5460 #undef __ |
| 5461 | 5461 |
| 5462 } } // namespace v8::internal | 5462 } } // namespace v8::internal |
| 5463 | 5463 |
| 5464 #endif // V8_TARGET_ARCH_X64 | 5464 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |