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

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

Issue 2747103002: [ia32] Add minps/maxps and AVX v_ps/v_pd for add/sub/mul/div/min/max (Closed)
Patch Set: Created 3 years, 9 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 961 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 972
973 void addps(XMMRegister dst, const Operand& src); 973 void addps(XMMRegister dst, const Operand& src);
974 void addps(XMMRegister dst, XMMRegister src) { addps(dst, Operand(src)); } 974 void addps(XMMRegister dst, XMMRegister src) { addps(dst, Operand(src)); }
975 void subps(XMMRegister dst, const Operand& src); 975 void subps(XMMRegister dst, const Operand& src);
976 void subps(XMMRegister dst, XMMRegister src) { subps(dst, Operand(src)); } 976 void subps(XMMRegister dst, XMMRegister src) { subps(dst, Operand(src)); }
977 void mulps(XMMRegister dst, const Operand& src); 977 void mulps(XMMRegister dst, const Operand& src);
978 void mulps(XMMRegister dst, XMMRegister src) { mulps(dst, Operand(src)); } 978 void mulps(XMMRegister dst, XMMRegister src) { mulps(dst, Operand(src)); }
979 void divps(XMMRegister dst, const Operand& src); 979 void divps(XMMRegister dst, const Operand& src);
980 void divps(XMMRegister dst, XMMRegister src) { divps(dst, Operand(src)); } 980 void divps(XMMRegister dst, XMMRegister src) { divps(dst, Operand(src)); }
981 981
982 void minps(XMMRegister dst, const Operand& src);
983 void minps(XMMRegister dst, XMMRegister src) { minps(dst, Operand(src)); }
984 void maxps(XMMRegister dst, const Operand& src);
985 void maxps(XMMRegister dst, XMMRegister src) { maxps(dst, Operand(src)); }
986
982 // SSE2 instructions 987 // SSE2 instructions
983 void cvttss2si(Register dst, const Operand& src); 988 void cvttss2si(Register dst, const Operand& src);
984 void cvttss2si(Register dst, XMMRegister src) { 989 void cvttss2si(Register dst, XMMRegister src) {
985 cvttss2si(dst, Operand(src)); 990 cvttss2si(dst, Operand(src));
986 } 991 }
987 void cvttsd2si(Register dst, const Operand& src); 992 void cvttsd2si(Register dst, const Operand& src);
988 void cvttsd2si(Register dst, XMMRegister src) { 993 void cvttsd2si(Register dst, XMMRegister src) {
989 cvttsd2si(dst, Operand(src)); 994 cvttsd2si(dst, Operand(src));
990 } 995 }
991 void cvtsd2si(Register dst, XMMRegister src); 996 void cvtsd2si(Register dst, XMMRegister src);
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 void shrx(Register dst, const Operand& src1, Register src2) { 1401 void shrx(Register dst, const Operand& src1, Register src2) {
1397 bmi2(kF2, 0xf7, dst, src2, src1); 1402 bmi2(kF2, 0xf7, dst, src2, src1);
1398 } 1403 }
1399 void rorx(Register dst, Register src, byte imm8) { 1404 void rorx(Register dst, Register src, byte imm8) {
1400 rorx(dst, Operand(src), imm8); 1405 rorx(dst, Operand(src), imm8);
1401 } 1406 }
1402 void rorx(Register dst, const Operand& src, byte imm8); 1407 void rorx(Register dst, const Operand& src, byte imm8);
1403 1408
1404 #define PACKED_OP_LIST(V) \ 1409 #define PACKED_OP_LIST(V) \
1405 V(and, 0x54) \ 1410 V(and, 0x54) \
1406 V(xor, 0x57) 1411 V(xor, 0x57) \
1412 V(add, 0x58) \
1413 V(mul, 0x59) \
1414 V(sub, 0x5c) \
1415 V(min, 0x5d) \
1416 V(div, 0x5e) \
1417 V(max, 0x5f)
1407 1418
1408 #define AVX_PACKED_OP_DECLARE(name, opcode) \ 1419 #define AVX_PACKED_OP_DECLARE(name, opcode) \
1409 void v##name##ps(XMMRegister dst, XMMRegister src1, XMMRegister src2) { \ 1420 void v##name##ps(XMMRegister dst, XMMRegister src1, XMMRegister src2) { \
1410 vps(opcode, dst, src1, Operand(src2)); \ 1421 vps(opcode, dst, src1, Operand(src2)); \
1411 } \ 1422 } \
1412 void v##name##ps(XMMRegister dst, XMMRegister src1, const Operand& src2) { \ 1423 void v##name##ps(XMMRegister dst, XMMRegister src1, const Operand& src2) { \
1413 vps(opcode, dst, src1, src2); \ 1424 vps(opcode, dst, src1, src2); \
1414 } \ 1425 } \
1415 void v##name##pd(XMMRegister dst, XMMRegister src1, XMMRegister src2) { \ 1426 void v##name##pd(XMMRegister dst, XMMRegister src1, XMMRegister src2) { \
1416 vpd(opcode, dst, src1, Operand(src2)); \ 1427 vpd(opcode, dst, src1, Operand(src2)); \
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1655 Assembler* assembler_; 1666 Assembler* assembler_;
1656 #ifdef DEBUG 1667 #ifdef DEBUG
1657 int space_before_; 1668 int space_before_;
1658 #endif 1669 #endif
1659 }; 1670 };
1660 1671
1661 } // namespace internal 1672 } // namespace internal
1662 } // namespace v8 1673 } // namespace v8
1663 1674
1664 #endif // V8_IA32_ASSEMBLER_IA32_H_ 1675 #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