| 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 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1391 power = WhichPowerOf2(-divisor); | 1391 power = WhichPowerOf2(-divisor); |
| 1392 } | 1392 } |
| 1393 | 1393 |
| 1394 if (test_value != 0) { | 1394 if (test_value != 0) { |
| 1395 if (instr->hydrogen()->CheckFlag( | 1395 if (instr->hydrogen()->CheckFlag( |
| 1396 HInstruction::kAllUsesTruncatingToInt32)) { | 1396 HInstruction::kAllUsesTruncatingToInt32)) { |
| 1397 __ cmp(dividend, Operand(0)); | 1397 __ cmp(dividend, Operand(0)); |
| 1398 __ rsb(dividend, dividend, Operand(0), LeaveCC, lt); | 1398 __ rsb(dividend, dividend, Operand(0), LeaveCC, lt); |
| 1399 __ mov(dividend, Operand(dividend, ASR, power)); | 1399 __ mov(dividend, Operand(dividend, ASR, power)); |
| 1400 if (divisor > 0) __ rsb(dividend, dividend, Operand(0), LeaveCC, lt); | 1400 if (divisor > 0) __ rsb(dividend, dividend, Operand(0), LeaveCC, lt); |
| 1401 if (divisor < 0) __ rsb(dividend, dividend, Operand(0), LeaveCC, gt); |
| 1401 return; // Don't fall through to "__ rsb" below. | 1402 return; // Don't fall through to "__ rsb" below. |
| 1402 } else { | 1403 } else { |
| 1403 // Deoptimize if remainder is not 0. | 1404 // Deoptimize if remainder is not 0. |
| 1404 __ tst(dividend, Operand(test_value)); | 1405 __ tst(dividend, Operand(test_value)); |
| 1405 DeoptimizeIf(ne, instr->environment()); | 1406 DeoptimizeIf(ne, instr->environment()); |
| 1406 __ mov(dividend, Operand(dividend, ASR, power)); | 1407 __ mov(dividend, Operand(dividend, ASR, power)); |
| 1407 } | 1408 } |
| 1408 } | 1409 } |
| 1409 if (divisor < 0) __ rsb(dividend, dividend, Operand(0)); | 1410 if (divisor < 0) __ rsb(dividend, dividend, Operand(0)); |
| 1410 | 1411 |
| (...skipping 4376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5787 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5788 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
| 5788 __ ldr(result, FieldMemOperand(scratch, | 5789 __ ldr(result, FieldMemOperand(scratch, |
| 5789 FixedArray::kHeaderSize - kPointerSize)); | 5790 FixedArray::kHeaderSize - kPointerSize)); |
| 5790 __ bind(&done); | 5791 __ bind(&done); |
| 5791 } | 5792 } |
| 5792 | 5793 |
| 5793 | 5794 |
| 5794 #undef __ | 5795 #undef __ |
| 5795 | 5796 |
| 5796 } } // namespace v8::internal | 5797 } } // namespace v8::internal |
| OLD | NEW |