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

Side by Side Diff: src/mips/constants-mips.h

Issue 2801683003: MIPS[64]: Support for some SIMD operations (8) (Closed)
Patch Set: Rebase Created 3 years, 6 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
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_MIPS_CONSTANTS_H_ 5 #ifndef V8_MIPS_CONSTANTS_H_
6 #define V8_MIPS_CONSTANTS_H_ 6 #define V8_MIPS_CONSTANTS_H_
7 #include "src/globals.h" 7 #include "src/globals.h"
8 // UNIMPLEMENTED_ macro for MIPS. 8 // UNIMPLEMENTED_ macro for MIPS.
9 #ifdef DEBUG 9 #ifdef DEBUG
10 #define UNIMPLEMENTED_MIPS() \ 10 #define UNIMPLEMENTED_MIPS() \
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 return eq; 1054 return eq;
1055 case ueq: 1055 case ueq:
1056 return ogl; 1056 return ogl;
1057 case ogl: 1057 case ogl:
1058 return ueq; 1058 return ueq;
1059 default: 1059 default:
1060 return cc; 1060 return cc;
1061 } 1061 }
1062 } 1062 }
1063 1063
1064 enum MSABranchCondition {
1065 all_not_zero = 0, // Branch If All Elements Are Not Zero
1066 one_elem_not_zero, // Branch If At Least One Element of Any Format Is Not
1067 // Zero
1068 one_elem_zero, // Branch If At Least One Element Is Zero
1069 all_zero // Branch If All Elements of Any Format Are Zero
1070 };
1071
1072 inline MSABranchCondition NegateMSABranchCondition(MSABranchCondition cond) {
1073 switch (cond) {
1074 case all_not_zero:
1075 return one_elem_zero;
1076 case one_elem_not_zero:
1077 return all_zero;
1078 case one_elem_zero:
1079 return all_not_zero;
1080 case all_zero:
1081 return one_elem_not_zero;
1082 default:
1083 return cond;
1084 }
1085 }
1086
1087 enum MSABranchDF {
1088 MSA_BRANCH_B = 0,
1089 MSA_BRANCH_H,
1090 MSA_BRANCH_W,
1091 MSA_BRANCH_D,
1092 MSA_BRANCH_V
1093 };
1064 1094
1065 // Commute a condition such that {a cond b == b cond' a}. 1095 // Commute a condition such that {a cond b == b cond' a}.
1066 inline Condition CommuteCondition(Condition cc) { 1096 inline Condition CommuteCondition(Condition cc) {
1067 switch (cc) { 1097 switch (cc) {
1068 case Uless: 1098 case Uless:
1069 return Ugreater; 1099 return Ugreater;
1070 case Ugreater: 1100 case Ugreater:
1071 return Uless; 1101 return Uless;
1072 case Ugreater_equal: 1102 case Ugreater_equal:
1073 return Uless_equal; 1103 return Uless_equal;
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
1833 return true; 1863 return true;
1834 default: 1864 default:
1835 return false; 1865 return false;
1836 } 1866 }
1837 break; 1867 break;
1838 case COP1: 1868 case COP1:
1839 switch (instr & kRsFieldMask) { 1869 switch (instr & kRsFieldMask) {
1840 case BC1: 1870 case BC1:
1841 case BC1EQZ: 1871 case BC1EQZ:
1842 case BC1NEZ: 1872 case BC1NEZ:
1873 case BZ_V:
1874 case BZ_B:
1875 case BZ_H:
1876 case BZ_W:
1877 case BZ_D:
1878 case BNZ_V:
1879 case BNZ_B:
1880 case BNZ_H:
1881 case BNZ_W:
1882 case BNZ_D:
1843 return true; 1883 return true;
1844 break; 1884 break;
1845 default: 1885 default:
1846 return false; 1886 return false;
1847 } 1887 }
1848 break; 1888 break;
1849 default: 1889 default:
1850 return false; 1890 return false;
1851 } 1891 }
1852 } 1892 }
1853 } // namespace internal 1893 } // namespace internal
1854 } // namespace v8 1894 } // namespace v8
1855 1895
1856 #endif // #ifndef V8_MIPS_CONSTANTS_H_ 1896 #endif // #ifndef V8_MIPS_CONSTANTS_H_
OLDNEW
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698