Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Side by Side Diff: src/x64/macro-assembler-x64.h

Issue 6015011: Use the macro assembler Set instead of explicit xor for clearing registers. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698