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

Side by Side Diff: src/ia32/codegen-ia32.cc

Issue 661368: Add cld before doing rep movs. (Closed)
Patch Set: Created 10 years, 9 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
« no previous file with comments | « no previous file | no next file » | 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 10904 matching lines...) Expand 10 before | Expand all | Expand 10 after
10915 } 10915 }
10916 10916
10917 // Don't enter the rep movs if there are less than 4 bytes to copy. 10917 // Don't enter the rep movs if there are less than 4 bytes to copy.
10918 Label last_bytes; 10918 Label last_bytes;
10919 __ test(count, Immediate(~3)); 10919 __ test(count, Immediate(~3));
10920 __ j(zero, &last_bytes); 10920 __ j(zero, &last_bytes);
10921 10921
10922 // Copy from edi to esi using rep movs instruction. 10922 // Copy from edi to esi using rep movs instruction.
10923 __ mov(scratch, count); 10923 __ mov(scratch, count);
10924 __ sar(count, 2); // Number of doublewords to copy. 10924 __ sar(count, 2); // Number of doublewords to copy.
10925 __ cld();
10925 __ rep_movs(); 10926 __ rep_movs();
10926 10927
10927 // Find number of bytes left. 10928 // Find number of bytes left.
10928 __ mov(count, scratch); 10929 __ mov(count, scratch);
10929 __ and_(count, 3); 10930 __ and_(count, 3);
10930 10931
10931 // Check if there are more bytes to copy. 10932 // Check if there are more bytes to copy.
10932 __ bind(&last_bytes); 10933 __ bind(&last_bytes);
10933 __ test(count, Operand(count)); 10934 __ test(count, Operand(count));
10934 __ j(zero, &done); 10935 __ j(zero, &done);
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
11383 11384
11384 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) 11385 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater)
11385 // tagged as a small integer. 11386 // tagged as a small integer.
11386 __ bind(&runtime); 11387 __ bind(&runtime);
11387 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); 11388 __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
11388 } 11389 }
11389 11390
11390 #undef __ 11391 #undef __
11391 11392
11392 } } // namespace v8::internal 11393 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698