OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 void Generate(MacroAssembler* masm); | 806 void Generate(MacroAssembler* masm); |
807 }; | 807 }; |
808 | 808 |
809 | 809 |
810 class StringCompareStub: public StringStubBase { | 810 class StringCompareStub: public StringStubBase { |
811 public: | 811 public: |
812 explicit StringCompareStub() { | 812 explicit StringCompareStub() { |
813 } | 813 } |
814 | 814 |
815 // Compare two flat ascii strings and returns result in eax after popping two | 815 // Compare two flat ascii strings and returns result in eax after popping two |
816 // arguments from the stack. Due to the instructions used there are certain | 816 // arguments from the stack. |
817 // constraints on the registers that can be passed. | |
818 // counter must be ecx | |
819 // scratch1 most be one of eax, ebx or edx | |
820 static void GenerateCompareFlatAsciiStrings(MacroAssembler* masm, | 817 static void GenerateCompareFlatAsciiStrings(MacroAssembler* masm, |
821 Register left, | 818 Register left, |
822 Register right, | 819 Register right, |
823 Register counter, | |
824 Register scratch1, | 820 Register scratch1, |
825 Register scratch2); | 821 Register scratch2, |
| 822 Register scratch3); |
826 | 823 |
827 private: | 824 private: |
828 Major MajorKey() { return StringCompare; } | 825 Major MajorKey() { return StringCompare; } |
829 int MinorKey() { return 0; } | 826 int MinorKey() { return 0; } |
830 | 827 |
831 void Generate(MacroAssembler* masm); | 828 void Generate(MacroAssembler* masm); |
832 }; | 829 }; |
833 | 830 |
834 | 831 |
835 } } // namespace v8::internal | 832 } } // namespace v8::internal |
836 | 833 |
837 #endif // V8_IA32_CODEGEN_IA32_H_ | 834 #endif // V8_IA32_CODEGEN_IA32_H_ |
OLD | NEW |