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

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

Issue 391073: Changes to Intel shift functions... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 1 month 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
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 shift(dst, shift_amount, 0x7); 835 shift(dst, shift_amount, 0x7);
836 } 836 }
837 837
838 // Shifts dst right, duplicating sign bit, by shift_amount bits. 838 // Shifts dst right, duplicating sign bit, by shift_amount bits.
839 // Shifting by 1 is handled efficiently. 839 // Shifting by 1 is handled efficiently.
840 void sarl(Register dst, Immediate shift_amount) { 840 void sarl(Register dst, Immediate shift_amount) {
841 shift_32(dst, shift_amount, 0x7); 841 shift_32(dst, shift_amount, 0x7);
842 } 842 }
843 843
844 // Shifts dst right, duplicating sign bit, by cl % 64 bits. 844 // Shifts dst right, duplicating sign bit, by cl % 64 bits.
845 void sar(Register dst) { 845 void sar_cl(Register dst) {
846 shift(dst, 0x7); 846 shift(dst, 0x7);
847 } 847 }
848 848
849 // Shifts dst right, duplicating sign bit, by cl % 64 bits. 849 // Shifts dst right, duplicating sign bit, by cl % 64 bits.
850 void sarl(Register dst) { 850 void sarl_cl(Register dst) {
851 shift_32(dst, 0x7); 851 shift_32(dst, 0x7);
852 } 852 }
853 853
854 void shl(Register dst, Immediate shift_amount) { 854 void shl(Register dst, Immediate shift_amount) {
855 shift(dst, shift_amount, 0x4); 855 shift(dst, shift_amount, 0x4);
856 } 856 }
857 857
858 void shl(Register dst) { 858 void shl_cl(Register dst) {
859 shift(dst, 0x4); 859 shift(dst, 0x4);
860 } 860 }
861 861
862 void shll(Register dst) { 862 void shll_cl(Register dst) {
863 shift_32(dst, 0x4); 863 shift_32(dst, 0x4);
864 } 864 }
865 865
866 void shll(Register dst, Immediate shift_amount) { 866 void shll(Register dst, Immediate shift_amount) {
867 shift_32(dst, shift_amount, 0x4); 867 shift_32(dst, shift_amount, 0x4);
868 } 868 }
869 869
870 void shr(Register dst, Immediate shift_amount) { 870 void shr(Register dst, Immediate shift_amount) {
871 shift(dst, shift_amount, 0x5); 871 shift(dst, shift_amount, 0x5);
872 } 872 }
873 873
874 void shr(Register dst) { 874 void shr_cl(Register dst) {
875 shift(dst, 0x5); 875 shift(dst, 0x5);
876 } 876 }
877 877
878 void shrl(Register dst) { 878 void shrl_cl(Register dst) {
879 shift_32(dst, 0x5); 879 shift_32(dst, 0x5);
880 } 880 }
881 881
882 void shrl(Register dst, Immediate shift_amount) { 882 void shrl(Register dst, Immediate shift_amount) {
883 shift_32(dst, shift_amount, 0x5); 883 shift_32(dst, shift_amount, 0x5);
884 } 884 }
885 885
886 void store_rax(void* dst, RelocInfo::Mode mode); 886 void store_rax(void* dst, RelocInfo::Mode mode);
887 void store_rax(ExternalReference ref); 887 void store_rax(ExternalReference ref);
888 888
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 private: 1384 private:
1385 Assembler* assembler_; 1385 Assembler* assembler_;
1386 #ifdef DEBUG 1386 #ifdef DEBUG
1387 int space_before_; 1387 int space_before_;
1388 #endif 1388 #endif
1389 }; 1389 };
1390 1390
1391 } } // namespace v8::internal 1391 } } // namespace v8::internal
1392 1392
1393 #endif // V8_X64_ASSEMBLER_X64_H_ 1393 #endif // V8_X64_ASSEMBLER_X64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698