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

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 106853002: Use FAR jump in GenerateCompareFlatAsciiStrings. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR feedback for landing Created 7 years 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 | « 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 4317 matching lines...) Expand 10 before | Expand all | Expand 10 after
4328 const Register min_length = scratch1; 4328 const Register min_length = scratch1;
4329 4329
4330 Label compare_lengths; 4330 Label compare_lengths;
4331 // If min-length is zero, go directly to comparing lengths. 4331 // If min-length is zero, go directly to comparing lengths.
4332 __ SmiTest(min_length); 4332 __ SmiTest(min_length);
4333 __ j(zero, &compare_lengths, Label::kNear); 4333 __ j(zero, &compare_lengths, Label::kNear);
4334 4334
4335 // Compare loop. 4335 // Compare loop.
4336 Label result_not_equal; 4336 Label result_not_equal;
4337 GenerateAsciiCharsCompareLoop(masm, left, right, min_length, scratch2, 4337 GenerateAsciiCharsCompareLoop(masm, left, right, min_length, scratch2,
4338 &result_not_equal, Label::kNear); 4338 &result_not_equal,
4339 // In debug-code mode, SmiTest below might push
4340 // the target label outside the near range.
4341 Label::kFar);
4339 4342
4340 // Completed loop without finding different characters. 4343 // Completed loop without finding different characters.
4341 // Compare lengths (precomputed). 4344 // Compare lengths (precomputed).
4342 __ bind(&compare_lengths); 4345 __ bind(&compare_lengths);
4343 __ SmiTest(length_difference); 4346 __ SmiTest(length_difference);
4344 Label length_not_equal; 4347 Label length_not_equal;
4345 __ j(not_zero, &length_not_equal, Label::kNear); 4348 __ j(not_zero, &length_not_equal, Label::kNear);
4346 4349
4347 // Result is EQUAL. 4350 // Result is EQUAL.
4348 __ Move(rax, Smi::FromInt(EQUAL)); 4351 __ Move(rax, Smi::FromInt(EQUAL));
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after
5691 __ bind(&fast_elements_case); 5694 __ bind(&fast_elements_case);
5692 GenerateCase(masm, FAST_ELEMENTS); 5695 GenerateCase(masm, FAST_ELEMENTS);
5693 } 5696 }
5694 5697
5695 5698
5696 #undef __ 5699 #undef __
5697 5700
5698 } } // namespace v8::internal 5701 } } // namespace v8::internal
5699 5702
5700 #endif // V8_TARGET_ARCH_X64 5703 #endif // V8_TARGET_ARCH_X64
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