| 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 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1471 DwVfpRegister multiplier = ToDoubleRegister(instr->multiplier()); | 1471 DwVfpRegister multiplier = ToDoubleRegister(instr->multiplier()); |
| 1472 DwVfpRegister multiplicand = ToDoubleRegister(instr->multiplicand()); | 1472 DwVfpRegister multiplicand = ToDoubleRegister(instr->multiplicand()); |
| 1473 | 1473 |
| 1474 // This is computed in-place. | 1474 // This is computed in-place. |
| 1475 ASSERT(addend.is(ToDoubleRegister(instr->result()))); | 1475 ASSERT(addend.is(ToDoubleRegister(instr->result()))); |
| 1476 | 1476 |
| 1477 __ vmla(addend, multiplier, multiplicand); | 1477 __ vmla(addend, multiplier, multiplicand); |
| 1478 } | 1478 } |
| 1479 | 1479 |
| 1480 | 1480 |
| 1481 void LCodeGen::DoMultiplySubD(LMultiplySubD* instr) { |
| 1482 DwVfpRegister minuend = ToDoubleRegister(instr->minuend()); |
| 1483 DwVfpRegister multiplier = ToDoubleRegister(instr->multiplier()); |
| 1484 DwVfpRegister multiplicand = ToDoubleRegister(instr->multiplicand()); |
| 1485 |
| 1486 // This is computed in-place. |
| 1487 ASSERT(minuend.is(ToDoubleRegister(instr->result()))); |
| 1488 |
| 1489 __ vmls(minuend, multiplier, multiplicand); |
| 1490 } |
| 1491 |
| 1492 |
| 1481 void LCodeGen::DoMathFloorOfDiv(LMathFloorOfDiv* instr) { | 1493 void LCodeGen::DoMathFloorOfDiv(LMathFloorOfDiv* instr) { |
| 1482 const Register result = ToRegister(instr->result()); | 1494 const Register result = ToRegister(instr->result()); |
| 1483 const Register left = ToRegister(instr->left()); | 1495 const Register left = ToRegister(instr->left()); |
| 1484 const Register remainder = ToRegister(instr->temp()); | 1496 const Register remainder = ToRegister(instr->temp()); |
| 1485 const Register scratch = scratch0(); | 1497 const Register scratch = scratch0(); |
| 1486 | 1498 |
| 1487 if (!CpuFeatures::IsSupported(SUDIV)) { | 1499 if (!CpuFeatures::IsSupported(SUDIV)) { |
| 1488 // If the CPU doesn't support sdiv instruction, we only optimize when we | 1500 // If the CPU doesn't support sdiv instruction, we only optimize when we |
| 1489 // have magic numbers for the divisor. The standard integer division routine | 1501 // have magic numbers for the divisor. The standard integer division routine |
| 1490 // is usually slower than transitionning to VFP. | 1502 // is usually slower than transitionning to VFP. |
| (...skipping 4839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6330 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 6342 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
| 6331 __ ldr(result, FieldMemOperand(scratch, | 6343 __ ldr(result, FieldMemOperand(scratch, |
| 6332 FixedArray::kHeaderSize - kPointerSize)); | 6344 FixedArray::kHeaderSize - kPointerSize)); |
| 6333 __ bind(&done); | 6345 __ bind(&done); |
| 6334 } | 6346 } |
| 6335 | 6347 |
| 6336 | 6348 |
| 6337 #undef __ | 6349 #undef __ |
| 6338 | 6350 |
| 6339 } } // namespace v8::internal | 6351 } } // namespace v8::internal |
| OLD | NEW |