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 10904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |