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

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

Issue 1416663004: [x64] Replace movaps with appropriate vmov* instructions when AVX is enabled. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/compiler/x64/code-generator-x64.cc ('k') | src/x64/assembler-x64.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 990 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 void maxss(XMMRegister dst, const Operand& src); 1001 void maxss(XMMRegister dst, const Operand& src);
1002 void minss(XMMRegister dst, XMMRegister src); 1002 void minss(XMMRegister dst, XMMRegister src);
1003 void minss(XMMRegister dst, const Operand& src); 1003 void minss(XMMRegister dst, const Operand& src);
1004 1004
1005 void sqrtss(XMMRegister dst, XMMRegister src); 1005 void sqrtss(XMMRegister dst, XMMRegister src);
1006 void sqrtss(XMMRegister dst, const Operand& src); 1006 void sqrtss(XMMRegister dst, const Operand& src);
1007 1007
1008 void ucomiss(XMMRegister dst, XMMRegister src); 1008 void ucomiss(XMMRegister dst, XMMRegister src);
1009 void ucomiss(XMMRegister dst, const Operand& src); 1009 void ucomiss(XMMRegister dst, const Operand& src);
1010 void movaps(XMMRegister dst, XMMRegister src); 1010 void movaps(XMMRegister dst, XMMRegister src);
1011
1012 // Don't use this unless it's important to keep the
1013 // top half of the destination register unchanged.
1014 // Use movaps when moving float values and movd for integer
1015 // values in xmm registers.
1016 void movss(XMMRegister dst, XMMRegister src);
1017
1011 void movss(XMMRegister dst, const Operand& src); 1018 void movss(XMMRegister dst, const Operand& src);
1012 void movss(const Operand& dst, XMMRegister src); 1019 void movss(const Operand& dst, XMMRegister src);
1013 void shufps(XMMRegister dst, XMMRegister src, byte imm8); 1020 void shufps(XMMRegister dst, XMMRegister src, byte imm8);
1014 1021
1015 void cvttss2si(Register dst, const Operand& src); 1022 void cvttss2si(Register dst, const Operand& src);
1016 void cvttss2si(Register dst, XMMRegister src); 1023 void cvttss2si(Register dst, XMMRegister src);
1017 void cvtlsi2ss(XMMRegister dst, Register src); 1024 void cvtlsi2ss(XMMRegister dst, Register src);
1018 1025
1019 void andps(XMMRegister dst, XMMRegister src); 1026 void andps(XMMRegister dst, XMMRegister src);
1020 void andps(XMMRegister dst, const Operand& src); 1027 void andps(XMMRegister dst, const Operand& src);
(...skipping 16 matching lines...) Expand all
1037 // SSE2 instructions 1044 // SSE2 instructions
1038 void movd(XMMRegister dst, Register src); 1045 void movd(XMMRegister dst, Register src);
1039 void movd(XMMRegister dst, const Operand& src); 1046 void movd(XMMRegister dst, const Operand& src);
1040 void movd(Register dst, XMMRegister src); 1047 void movd(Register dst, XMMRegister src);
1041 void movq(XMMRegister dst, Register src); 1048 void movq(XMMRegister dst, Register src);
1042 void movq(Register dst, XMMRegister src); 1049 void movq(Register dst, XMMRegister src);
1043 void movq(XMMRegister dst, XMMRegister src); 1050 void movq(XMMRegister dst, XMMRegister src);
1044 1051
1045 // Don't use this unless it's important to keep the 1052 // Don't use this unless it's important to keep the
1046 // top half of the destination register unchanged. 1053 // top half of the destination register unchanged.
1047 // Used movaps when moving double values and movq for integer 1054 // Use movapd when moving double values and movq for integer
1048 // values in xmm registers. 1055 // values in xmm registers.
1049 void movsd(XMMRegister dst, XMMRegister src); 1056 void movsd(XMMRegister dst, XMMRegister src);
1050 1057
1051 void movsd(const Operand& dst, XMMRegister src); 1058 void movsd(const Operand& dst, XMMRegister src);
1052 void movsd(XMMRegister dst, const Operand& src); 1059 void movsd(XMMRegister dst, const Operand& src);
1053 1060
1054 void movdqa(const Operand& dst, XMMRegister src); 1061 void movdqa(const Operand& dst, XMMRegister src);
1055 void movdqa(XMMRegister dst, const Operand& src); 1062 void movdqa(XMMRegister dst, const Operand& src);
1056 1063
1057 void movdqu(const Operand& dst, XMMRegister src); 1064 void movdqu(const Operand& dst, XMMRegister src);
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 void vfmass(byte op, XMMRegister dst, XMMRegister src1, XMMRegister src2); 1281 void vfmass(byte op, XMMRegister dst, XMMRegister src1, XMMRegister src2);
1275 void vfmass(byte op, XMMRegister dst, XMMRegister src1, const Operand& src2); 1282 void vfmass(byte op, XMMRegister dst, XMMRegister src1, const Operand& src2);
1276 1283
1277 void vmovd(XMMRegister dst, Register src); 1284 void vmovd(XMMRegister dst, Register src);
1278 void vmovd(XMMRegister dst, const Operand& src); 1285 void vmovd(XMMRegister dst, const Operand& src);
1279 void vmovd(Register dst, XMMRegister src); 1286 void vmovd(Register dst, XMMRegister src);
1280 void vmovq(XMMRegister dst, Register src); 1287 void vmovq(XMMRegister dst, Register src);
1281 void vmovq(XMMRegister dst, const Operand& src); 1288 void vmovq(XMMRegister dst, const Operand& src);
1282 void vmovq(Register dst, XMMRegister src); 1289 void vmovq(Register dst, XMMRegister src);
1283 1290
1291 void vmovsd(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
1292 vsd(0x10, dst, src1, src2);
1293 }
1284 void vmovsd(XMMRegister dst, const Operand& src) { 1294 void vmovsd(XMMRegister dst, const Operand& src) {
1285 vsd(0x10, dst, xmm0, src); 1295 vsd(0x10, dst, xmm0, src);
1286 } 1296 }
1287 void vmovsd(XMMRegister dst, XMMRegister src) { vsd(0x10, dst, xmm0, src); }
1288 void vmovsd(const Operand& dst, XMMRegister src) { 1297 void vmovsd(const Operand& dst, XMMRegister src) {
1289 vsd(0x11, src, xmm0, dst); 1298 vsd(0x11, src, xmm0, dst);
1290 } 1299 }
1291 void vaddsd(XMMRegister dst, XMMRegister src1, XMMRegister src2) { 1300 void vaddsd(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
1292 vsd(0x58, dst, src1, src2); 1301 vsd(0x58, dst, src1, src2);
1293 } 1302 }
1294 void vaddsd(XMMRegister dst, XMMRegister src1, const Operand& src2) { 1303 void vaddsd(XMMRegister dst, XMMRegister src1, const Operand& src2) {
1295 vsd(0x58, dst, src1, src2); 1304 vsd(0x58, dst, src1, src2);
1296 } 1305 }
1297 void vsubsd(XMMRegister dst, XMMRegister src1, XMMRegister src2) { 1306 void vsubsd(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 } 1415 }
1407 void vmaxss(XMMRegister dst, XMMRegister src1, const Operand& src2) { 1416 void vmaxss(XMMRegister dst, XMMRegister src1, const Operand& src2) {
1408 vss(0x5f, dst, src1, src2); 1417 vss(0x5f, dst, src1, src2);
1409 } 1418 }
1410 void vminss(XMMRegister dst, XMMRegister src1, XMMRegister src2) { 1419 void vminss(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
1411 vss(0x5d, dst, src1, src2); 1420 vss(0x5d, dst, src1, src2);
1412 } 1421 }
1413 void vminss(XMMRegister dst, XMMRegister src1, const Operand& src2) { 1422 void vminss(XMMRegister dst, XMMRegister src1, const Operand& src2) {
1414 vss(0x5d, dst, src1, src2); 1423 vss(0x5d, dst, src1, src2);
1415 } 1424 }
1425 void vmovss(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
1426 vss(0x10, dst, src1, src2);
1427 }
1416 void vmovss(XMMRegister dst, const Operand& src) { 1428 void vmovss(XMMRegister dst, const Operand& src) {
1417 vss(0x10, dst, xmm0, src); 1429 vss(0x10, dst, xmm0, src);
1418 } 1430 }
1419 void vmovss(const Operand& dst, XMMRegister src) { 1431 void vmovss(const Operand& dst, XMMRegister src) {
1420 vss(0x11, src, xmm0, dst); 1432 vss(0x11, src, xmm0, dst);
1421 } 1433 }
1422 void vucomiss(XMMRegister dst, XMMRegister src); 1434 void vucomiss(XMMRegister dst, XMMRegister src);
1423 void vucomiss(XMMRegister dst, const Operand& src); 1435 void vucomiss(XMMRegister dst, const Operand& src);
1424 void vss(byte op, XMMRegister dst, XMMRegister src1, XMMRegister src2); 1436 void vss(byte op, XMMRegister dst, XMMRegister src1, XMMRegister src2);
1425 void vss(byte op, XMMRegister dst, XMMRegister src1, const Operand& src2); 1437 void vss(byte op, XMMRegister dst, XMMRegister src1, const Operand& src2);
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1594 bmi2l(kF2, 0xf7, dst, src2, src1); 1606 bmi2l(kF2, 0xf7, dst, src2, src1);
1595 } 1607 }
1596 void shrxl(Register dst, const Operand& src1, Register src2) { 1608 void shrxl(Register dst, const Operand& src1, Register src2) {
1597 bmi2l(kF2, 0xf7, dst, src2, src1); 1609 bmi2l(kF2, 0xf7, dst, src2, src1);
1598 } 1610 }
1599 void rorxq(Register dst, Register src, byte imm8); 1611 void rorxq(Register dst, Register src, byte imm8);
1600 void rorxq(Register dst, const Operand& src, byte imm8); 1612 void rorxq(Register dst, const Operand& src, byte imm8);
1601 void rorxl(Register dst, Register src, byte imm8); 1613 void rorxl(Register dst, Register src, byte imm8);
1602 void rorxl(Register dst, const Operand& src, byte imm8); 1614 void rorxl(Register dst, const Operand& src, byte imm8);
1603 1615
1616 void vmovaps(XMMRegister dst, XMMRegister src) { vps(0x28, dst, xmm0, src); }
1604 void vmovapd(XMMRegister dst, XMMRegister src) { vpd(0x28, dst, xmm0, src); } 1617 void vmovapd(XMMRegister dst, XMMRegister src) { vpd(0x28, dst, xmm0, src); }
1605 void vmovmskpd(Register dst, XMMRegister src) { 1618 void vmovmskpd(Register dst, XMMRegister src) {
1606 XMMRegister idst = {dst.code()}; 1619 XMMRegister idst = {dst.code()};
1607 vpd(0x50, idst, xmm0, src); 1620 vpd(0x50, idst, xmm0, src);
1608 } 1621 }
1609 1622
1610 #define PACKED_OP_LIST(V) \ 1623 #define PACKED_OP_LIST(V) \
1611 V(and, 0x54) \ 1624 V(and, 0x54) \
1612 V(xor, 0x57) 1625 V(xor, 0x57)
1613 1626
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
2180 Assembler* assembler_; 2193 Assembler* assembler_;
2181 #ifdef DEBUG 2194 #ifdef DEBUG
2182 int space_before_; 2195 int space_before_;
2183 #endif 2196 #endif
2184 }; 2197 };
2185 2198
2186 } // namespace internal 2199 } // namespace internal
2187 } // namespace v8 2200 } // namespace v8
2188 2201
2189 #endif // V8_X64_ASSEMBLER_X64_H_ 2202 #endif // V8_X64_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | src/x64/assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698