| 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 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1005 __ cmpl(right_reg, Immediate(-1)); | 1005 __ cmpl(right_reg, Immediate(-1)); |
| 1006 DeoptimizeIf(zero, instr->environment()); | 1006 DeoptimizeIf(zero, instr->environment()); |
| 1007 __ bind(&left_not_min_int); | 1007 __ bind(&left_not_min_int); |
| 1008 } | 1008 } |
| 1009 | 1009 |
| 1010 // Sign extend to rdx. | 1010 // Sign extend to rdx. |
| 1011 __ cdq(); | 1011 __ cdq(); |
| 1012 __ idivl(right_reg); | 1012 __ idivl(right_reg); |
| 1013 | 1013 |
| 1014 // Deoptimize if remainder is not 0. | 1014 // Deoptimize if remainder is not 0. |
| 1015 __ testl(rdx, rdx); | 1015 if (!instr->hydrogen()->CheckFlag(HValue::kWillTruncateToInt32)) { |
| 1016 DeoptimizeIf(not_zero, instr->environment()); | 1016 __ testl(rdx, rdx); |
| 1017 DeoptimizeIf(not_zero, instr->environment()); |
| 1018 } |
| 1017 } | 1019 } |
| 1018 | 1020 |
| 1019 | 1021 |
| 1020 void LCodeGen::DoMulI(LMulI* instr) { | 1022 void LCodeGen::DoMulI(LMulI* instr) { |
| 1021 Register left = ToRegister(instr->InputAt(0)); | 1023 Register left = ToRegister(instr->InputAt(0)); |
| 1022 LOperand* right = instr->InputAt(1); | 1024 LOperand* right = instr->InputAt(1); |
| 1023 | 1025 |
| 1024 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { | 1026 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { |
| 1025 __ movl(kScratchRegister, left); | 1027 __ movl(kScratchRegister, left); |
| 1026 } | 1028 } |
| (...skipping 4044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5071 FixedArray::kHeaderSize - kPointerSize)); | 5073 FixedArray::kHeaderSize - kPointerSize)); |
| 5072 __ bind(&done); | 5074 __ bind(&done); |
| 5073 } | 5075 } |
| 5074 | 5076 |
| 5075 | 5077 |
| 5076 #undef __ | 5078 #undef __ |
| 5077 | 5079 |
| 5078 } } // namespace v8::internal | 5080 } } // namespace v8::internal |
| 5079 | 5081 |
| 5080 #endif // V8_TARGET_ARCH_X64 | 5082 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |