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

Side by Side Diff: src/x64/codegen-x64.h

Issue 545108: X64 implementation of native ascii string compare. (Closed)
Patch Set: Created 10 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
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 Register desc, 773 Register desc,
774 Register src, 774 Register src,
775 Register count, 775 Register count,
776 bool ascii); 776 bool ascii);
777 777
778 // Should the stub check whether arguments are strings? 778 // Should the stub check whether arguments are strings?
779 bool string_check_; 779 bool string_check_;
780 }; 780 };
781 781
782 782
783 class StringCompareStub: public CodeStub {
784 public:
785 explicit StringCompareStub() {}
786
787 // Compare two flat ascii strings and returns result in rax after popping two
788 // arguments from the stack.
789 static void GenerateCompareFlatAsciiStrings(MacroAssembler* masm,
790 Register left,
791 Register right,
792 Register scratch1,
793 Register scratch2,
794 Register scratch3,
795 Register scratch4);
796
797 private:
798 Major MajorKey() { return StringCompare; }
799 int MinorKey() { return 0; }
800
801 void Generate(MacroAssembler* masm);
802 };
803
804
783 } } // namespace v8::internal 805 } } // namespace v8::internal
784 806
785 #endif // V8_X64_CODEGEN_X64_H_ 807 #endif // V8_X64_CODEGEN_X64_H_
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x64/codegen-x64.cc » ('j') | src/x64/codegen-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698