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

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

Issue 2931333002: [ia32] Add pextrb/pextrw, pinsrb, pshufb/pshuflw and AVX version (Closed)
Patch Set: 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 | « no previous file | src/ia32/assembler-ia32.cc » ('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 (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 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 void pslld(XMMRegister reg, int8_t shift); 1121 void pslld(XMMRegister reg, int8_t shift);
1122 void psrlw(XMMRegister reg, int8_t shift); 1122 void psrlw(XMMRegister reg, int8_t shift);
1123 void psrld(XMMRegister reg, int8_t shift); 1123 void psrld(XMMRegister reg, int8_t shift);
1124 void psraw(XMMRegister reg, int8_t shift); 1124 void psraw(XMMRegister reg, int8_t shift);
1125 void psrad(XMMRegister reg, int8_t shift); 1125 void psrad(XMMRegister reg, int8_t shift);
1126 void psllq(XMMRegister reg, int8_t shift); 1126 void psllq(XMMRegister reg, int8_t shift);
1127 void psllq(XMMRegister dst, XMMRegister src); 1127 void psllq(XMMRegister dst, XMMRegister src);
1128 void psrlq(XMMRegister reg, int8_t shift); 1128 void psrlq(XMMRegister reg, int8_t shift);
1129 void psrlq(XMMRegister dst, XMMRegister src); 1129 void psrlq(XMMRegister dst, XMMRegister src);
1130 1130
1131 // pshufb is SSSE3 instruction
1132 void pshufb(XMMRegister dst, XMMRegister src) { pshufb(dst, Operand(src)); }
1133 void pshufb(XMMRegister dst, const Operand& src);
1134 void pshuflw(XMMRegister dst, XMMRegister src, uint8_t shuffle) {
1135 pshuflw(dst, Operand(src), shuffle);
1136 }
1137 void pshuflw(XMMRegister dst, const Operand& src, uint8_t shuffle);
1131 void pshufd(XMMRegister dst, XMMRegister src, uint8_t shuffle) { 1138 void pshufd(XMMRegister dst, XMMRegister src, uint8_t shuffle) {
1132 pshufd(dst, Operand(src), shuffle); 1139 pshufd(dst, Operand(src), shuffle);
1133 } 1140 }
1134 void pshufd(XMMRegister dst, const Operand& src, uint8_t shuffle); 1141 void pshufd(XMMRegister dst, const Operand& src, uint8_t shuffle);
1142
1143 void pextrb(Register dst, XMMRegister src, int8_t offset) {
1144 pextrb(Operand(dst), src, offset);
1145 }
1146 void pextrb(const Operand& dst, XMMRegister src, int8_t offset);
1147 // Use SSE4_1 encoding for pextrw reg, xmm, imm8 for consistency
1148 void pextrw(Register dst, XMMRegister src, int8_t offset) {
1149 pextrw(Operand(dst), src, offset);
1150 }
1151 void pextrw(const Operand& dst, XMMRegister src, int8_t offset);
1135 void pextrd(Register dst, XMMRegister src, int8_t offset) { 1152 void pextrd(Register dst, XMMRegister src, int8_t offset) {
1136 pextrd(Operand(dst), src, offset); 1153 pextrd(Operand(dst), src, offset);
1137 } 1154 }
1138 void pextrd(const Operand& dst, XMMRegister src, int8_t offset); 1155 void pextrd(const Operand& dst, XMMRegister src, int8_t offset);
1156
1157 void pinsrb(XMMRegister dst, Register src, int8_t offset) {
1158 pinsrb(dst, Operand(src), offset);
1159 }
1160 void pinsrb(XMMRegister dst, const Operand& src, int8_t offset);
1139 void pinsrw(XMMRegister dst, Register src, int8_t offset) { 1161 void pinsrw(XMMRegister dst, Register src, int8_t offset) {
1140 pinsrw(dst, Operand(src), offset); 1162 pinsrw(dst, Operand(src), offset);
1141 } 1163 }
1142 void pinsrw(XMMRegister dst, const Operand& src, int8_t offset); 1164 void pinsrw(XMMRegister dst, const Operand& src, int8_t offset);
1143 void pinsrd(XMMRegister dst, Register src, int8_t offset) { 1165 void pinsrd(XMMRegister dst, Register src, int8_t offset) {
1144 pinsrd(dst, Operand(src), offset); 1166 pinsrd(dst, Operand(src), offset);
1145 } 1167 }
1146 void pinsrd(XMMRegister dst, const Operand& src, int8_t offset); 1168 void pinsrd(XMMRegister dst, const Operand& src, int8_t offset);
1147 1169
1148 // AVX instructions 1170 // AVX instructions
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 vinstr(0x52, dst, xmm0, src, kNone, k0F, kWIG); 1403 vinstr(0x52, dst, xmm0, src, kNone, k0F, kWIG);
1382 } 1404 }
1383 1405
1384 void vpsllw(XMMRegister dst, XMMRegister src, int8_t imm8); 1406 void vpsllw(XMMRegister dst, XMMRegister src, int8_t imm8);
1385 void vpslld(XMMRegister dst, XMMRegister src, int8_t imm8); 1407 void vpslld(XMMRegister dst, XMMRegister src, int8_t imm8);
1386 void vpsrlw(XMMRegister dst, XMMRegister src, int8_t imm8); 1408 void vpsrlw(XMMRegister dst, XMMRegister src, int8_t imm8);
1387 void vpsrld(XMMRegister dst, XMMRegister src, int8_t imm8); 1409 void vpsrld(XMMRegister dst, XMMRegister src, int8_t imm8);
1388 void vpsraw(XMMRegister dst, XMMRegister src, int8_t imm8); 1410 void vpsraw(XMMRegister dst, XMMRegister src, int8_t imm8);
1389 void vpsrad(XMMRegister dst, XMMRegister src, int8_t imm8); 1411 void vpsrad(XMMRegister dst, XMMRegister src, int8_t imm8);
1390 1412
1413 void vpshufb(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
1414 vpshufb(dst, src1, Operand(src2));
1415 }
1416 void vpshufb(XMMRegister dst, XMMRegister src1, const Operand& src2) {
1417 vinstr(0x00, dst, src1, src2, k66, k0F38, kW0);
1418 }
1419 void vpshuflw(XMMRegister dst, XMMRegister src, uint8_t shuffle) {
1420 vpshuflw(dst, Operand(src), shuffle);
1421 }
1422 void vpshuflw(XMMRegister dst, const Operand& src, uint8_t shuffle);
1391 void vpshufd(XMMRegister dst, XMMRegister src, uint8_t shuffle) { 1423 void vpshufd(XMMRegister dst, XMMRegister src, uint8_t shuffle) {
1392 vpshufd(dst, Operand(src), shuffle); 1424 vpshufd(dst, Operand(src), shuffle);
1393 } 1425 }
1394 void vpshufd(XMMRegister dst, const Operand& src, uint8_t shuffle); 1426 void vpshufd(XMMRegister dst, const Operand& src, uint8_t shuffle);
1427
1428 void vpextrb(Register dst, XMMRegister src, int8_t offset) {
1429 vpextrb(Operand(dst), src, offset);
1430 }
1431 void vpextrb(const Operand& dst, XMMRegister src, int8_t offset);
1432 void vpextrw(Register dst, XMMRegister src, int8_t offset) {
1433 vpextrw(Operand(dst), src, offset);
1434 }
1435 void vpextrw(const Operand& dst, XMMRegister src, int8_t offset);
1395 void vpextrd(Register dst, XMMRegister src, int8_t offset) { 1436 void vpextrd(Register dst, XMMRegister src, int8_t offset) {
1396 vpextrd(Operand(dst), src, offset); 1437 vpextrd(Operand(dst), src, offset);
1397 } 1438 }
1398 void vpextrd(const Operand& dst, XMMRegister src, int8_t offset); 1439 void vpextrd(const Operand& dst, XMMRegister src, int8_t offset);
1440
1441 void vpinsrb(XMMRegister dst, XMMRegister src1, Register src2,
1442 int8_t offset) {
1443 vpinsrb(dst, src1, Operand(src2), offset);
1444 }
1445 void vpinsrb(XMMRegister dst, XMMRegister src1, const Operand& src2,
1446 int8_t offset);
1447 void vpinsrw(XMMRegister dst, XMMRegister src1, Register src2,
1448 int8_t offset) {
1449 vpinsrw(dst, src1, Operand(src2), offset);
1450 }
1451 void vpinsrw(XMMRegister dst, XMMRegister src1, const Operand& src2,
1452 int8_t offset);
1399 void vpinsrd(XMMRegister dst, XMMRegister src1, Register src2, 1453 void vpinsrd(XMMRegister dst, XMMRegister src1, Register src2,
1400 int8_t offset) { 1454 int8_t offset) {
1401 vpinsrd(dst, src1, Operand(src2), offset); 1455 vpinsrd(dst, src1, Operand(src2), offset);
1402 } 1456 }
1403 void vpinsrd(XMMRegister dst, XMMRegister src1, const Operand& src2, 1457 void vpinsrd(XMMRegister dst, XMMRegister src1, const Operand& src2,
1404 int8_t offset); 1458 int8_t offset);
1405 1459
1406 void vcvtdq2ps(XMMRegister dst, XMMRegister src) { 1460 void vcvtdq2ps(XMMRegister dst, XMMRegister src) {
1407 vcvtdq2ps(dst, Operand(src)); 1461 vcvtdq2ps(dst, Operand(src));
1408 } 1462 }
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1792 Assembler* assembler_; 1846 Assembler* assembler_;
1793 #ifdef DEBUG 1847 #ifdef DEBUG
1794 int space_before_; 1848 int space_before_;
1795 #endif 1849 #endif
1796 }; 1850 };
1797 1851
1798 } // namespace internal 1852 } // namespace internal
1799 } // namespace v8 1853 } // namespace v8
1800 1854
1801 #endif // V8_IA32_ASSEMBLER_IA32_H_ 1855 #endif // V8_IA32_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « no previous file | src/ia32/assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698