| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
| 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 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1334 | 1334 |
| 1335 __ Subu(result, zero_reg, dividend); | 1335 __ Subu(result, zero_reg, dividend); |
| 1336 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { | 1336 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { |
| 1337 DeoptimizeIf(eq, instr->environment(), result, Operand(zero_reg)); | 1337 DeoptimizeIf(eq, instr->environment(), result, Operand(zero_reg)); |
| 1338 } | 1338 } |
| 1339 | 1339 |
| 1340 // Dividing by -1 is basically negation, unless we overflow. | 1340 // Dividing by -1 is basically negation, unless we overflow. |
| 1341 __ Xor(scratch, scratch, result); | 1341 __ Xor(scratch, scratch, result); |
| 1342 if (divisor == -1) { | 1342 if (divisor == -1) { |
| 1343 if (instr->hydrogen()->CheckFlag(HValue::kLeftCanBeMinInt)) { | 1343 if (instr->hydrogen()->CheckFlag(HValue::kLeftCanBeMinInt)) { |
| 1344 DeoptimizeIf(ge, instr->environment(), at, Operand(zero_reg)); | 1344 DeoptimizeIf(ge, instr->environment(), scratch, Operand(zero_reg)); |
| 1345 } | 1345 } |
| 1346 return; | 1346 return; |
| 1347 } | 1347 } |
| 1348 | 1348 |
| 1349 // If the negation could not overflow, simply shifting is OK. | 1349 // If the negation could not overflow, simply shifting is OK. |
| 1350 if (!instr->hydrogen()->CheckFlag(HValue::kLeftCanBeMinInt)) { | 1350 if (!instr->hydrogen()->CheckFlag(HValue::kLeftCanBeMinInt)) { |
| 1351 __ sra(result, result, shift); | 1351 __ sra(result, result, shift); |
| 1352 return; | 1352 return; |
| 1353 } | 1353 } |
| 1354 | 1354 |
| (...skipping 4536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5891 __ li(at, scope_info); | 5891 __ li(at, scope_info); |
| 5892 __ Push(at, ToRegister(instr->function())); | 5892 __ Push(at, ToRegister(instr->function())); |
| 5893 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); | 5893 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); |
| 5894 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5894 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5895 } | 5895 } |
| 5896 | 5896 |
| 5897 | 5897 |
| 5898 #undef __ | 5898 #undef __ |
| 5899 | 5899 |
| 5900 } } // namespace v8::internal | 5900 } } // namespace v8::internal |
| OLD | NEW |