| 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 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1012 __ cmp(right_reg, -1); | 1012 __ cmp(right_reg, -1); |
| 1013 DeoptimizeIf(zero, instr->environment()); | 1013 DeoptimizeIf(zero, instr->environment()); |
| 1014 __ bind(&left_not_min_int); | 1014 __ bind(&left_not_min_int); |
| 1015 } | 1015 } |
| 1016 | 1016 |
| 1017 // Sign extend to edx. | 1017 // Sign extend to edx. |
| 1018 __ cdq(); | 1018 __ cdq(); |
| 1019 __ idiv(right_reg); | 1019 __ idiv(right_reg); |
| 1020 | 1020 |
| 1021 // Deoptimize if remainder is not 0. | 1021 // Deoptimize if remainder is not 0. |
| 1022 __ test(edx, Operand(edx)); | 1022 if (!instr->hydrogen()->CheckFlag(HValue::kWillTruncateToInt32)) { |
| 1023 DeoptimizeIf(not_zero, instr->environment()); | 1023 __ test(edx, Operand(edx)); |
| 1024 DeoptimizeIf(not_zero, instr->environment()); |
| 1025 } |
| 1024 } | 1026 } |
| 1025 | 1027 |
| 1026 | 1028 |
| 1027 void LCodeGen::DoMathFloorOfDiv(LMathFloorOfDiv* instr) { | 1029 void LCodeGen::DoMathFloorOfDiv(LMathFloorOfDiv* instr) { |
| 1028 ASSERT(instr->InputAt(1)->IsConstantOperand()); | 1030 ASSERT(instr->InputAt(1)->IsConstantOperand()); |
| 1029 | 1031 |
| 1030 Register dividend = ToRegister(instr->InputAt(0)); | 1032 Register dividend = ToRegister(instr->InputAt(0)); |
| 1031 int32_t divisor = ToInteger32(LConstantOperand::cast(instr->InputAt(1))); | 1033 int32_t divisor = ToInteger32(LConstantOperand::cast(instr->InputAt(1))); |
| 1032 Register result = ToRegister(instr->result()); | 1034 Register result = ToRegister(instr->result()); |
| 1033 | 1035 |
| (...skipping 4316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5350 FixedArray::kHeaderSize - kPointerSize)); | 5352 FixedArray::kHeaderSize - kPointerSize)); |
| 5351 __ bind(&done); | 5353 __ bind(&done); |
| 5352 } | 5354 } |
| 5353 | 5355 |
| 5354 | 5356 |
| 5355 #undef __ | 5357 #undef __ |
| 5356 | 5358 |
| 5357 } } // namespace v8::internal | 5359 } } // namespace v8::internal |
| 5358 | 5360 |
| 5359 #endif // V8_TARGET_ARCH_IA32 | 5361 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |