OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1169 | 1169 |
1170 movq(dst, kScratchRegister); | 1170 movq(dst, kScratchRegister); |
1171 xor_(dst, src2); | 1171 xor_(dst, src2); |
1172 j(positive, &zero_correct_result); // Result was positive zero. | 1172 j(positive, &zero_correct_result); // Result was positive zero. |
1173 | 1173 |
1174 bind(&failure); // Reused failure exit, restores src1. | 1174 bind(&failure); // Reused failure exit, restores src1. |
1175 movq(src1, kScratchRegister); | 1175 movq(src1, kScratchRegister); |
1176 jmp(on_not_smi_result); | 1176 jmp(on_not_smi_result); |
1177 | 1177 |
1178 bind(&zero_correct_result); | 1178 bind(&zero_correct_result); |
1179 xor_(dst, dst); | 1179 Set(dst, 0); |
1180 | 1180 |
1181 bind(&correct_result); | 1181 bind(&correct_result); |
1182 } else { | 1182 } else { |
1183 SmiToInteger64(dst, src1); | 1183 SmiToInteger64(dst, src1); |
1184 imul(dst, src2); | 1184 imul(dst, src2); |
1185 j(overflow, on_not_smi_result); | 1185 j(overflow, on_not_smi_result); |
1186 // Check for negative zero result. If product is zero, and one | 1186 // Check for negative zero result. If product is zero, and one |
1187 // argument is negative, go to slow case. | 1187 // argument is negative, go to slow case. |
1188 NearLabel correct_result; | 1188 NearLabel correct_result; |
1189 testq(dst, dst); | 1189 testq(dst, dst); |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1746 Jump(adaptor, RelocInfo::CODE_TARGET); | 1746 Jump(adaptor, RelocInfo::CODE_TARGET); |
1747 } | 1747 } |
1748 bind(&invoke); | 1748 bind(&invoke); |
1749 } | 1749 } |
1750 } | 1750 } |
1751 | 1751 |
1752 | 1752 |
1753 } } // namespace v8::internal | 1753 } } // namespace v8::internal |
1754 | 1754 |
1755 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1755 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |