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

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

Issue 2847683002: [ia32] Add cmpps/vcmpps for eq/lt/le/neq (Closed)
Patch Set: Created 3 years, 7 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 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 void mulps(XMMRegister dst, const Operand& src); 979 void mulps(XMMRegister dst, const Operand& src);
980 void mulps(XMMRegister dst, XMMRegister src) { mulps(dst, Operand(src)); } 980 void mulps(XMMRegister dst, XMMRegister src) { mulps(dst, Operand(src)); }
981 void divps(XMMRegister dst, const Operand& src); 981 void divps(XMMRegister dst, const Operand& src);
982 void divps(XMMRegister dst, XMMRegister src) { divps(dst, Operand(src)); } 982 void divps(XMMRegister dst, XMMRegister src) { divps(dst, Operand(src)); }
983 983
984 void minps(XMMRegister dst, const Operand& src); 984 void minps(XMMRegister dst, const Operand& src);
985 void minps(XMMRegister dst, XMMRegister src) { minps(dst, Operand(src)); } 985 void minps(XMMRegister dst, XMMRegister src) { minps(dst, Operand(src)); }
986 void maxps(XMMRegister dst, const Operand& src); 986 void maxps(XMMRegister dst, const Operand& src);
987 void maxps(XMMRegister dst, XMMRegister src) { maxps(dst, Operand(src)); } 987 void maxps(XMMRegister dst, XMMRegister src) { maxps(dst, Operand(src)); }
988 988
989 void cmpps(XMMRegister dst, const Operand& src, int8_t cmp);
990 #define SSE_CMP_P(instr, imm8) \
991 void instr##ps(XMMRegister dst, XMMRegister src) { \
992 cmpps(dst, Operand(src), imm8); \
993 } \
994 void instr##ps(XMMRegister dst, const Operand& src) { cmpps(dst, src, imm8); }
995
996 SSE_CMP_P(cmpeq, 0x0);
997 SSE_CMP_P(cmplt, 0x1);
998 SSE_CMP_P(cmple, 0x2);
999 SSE_CMP_P(cmpneq, 0x4);
1000
1001 #undef SSE_CMP_P
1002
989 // SSE2 instructions 1003 // SSE2 instructions
990 void cvttss2si(Register dst, const Operand& src); 1004 void cvttss2si(Register dst, const Operand& src);
991 void cvttss2si(Register dst, XMMRegister src) { 1005 void cvttss2si(Register dst, XMMRegister src) {
992 cvttss2si(dst, Operand(src)); 1006 cvttss2si(dst, Operand(src));
993 } 1007 }
994 void cvttsd2si(Register dst, const Operand& src); 1008 void cvttsd2si(Register dst, const Operand& src);
995 void cvttsd2si(Register dst, XMMRegister src) { 1009 void cvttsd2si(Register dst, XMMRegister src) {
996 cvttsd2si(dst, Operand(src)); 1010 cvttsd2si(dst, Operand(src));
997 } 1011 }
998 void cvtsd2si(Register dst, XMMRegister src); 1012 void cvtsd2si(Register dst, XMMRegister src);
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 void v##name##pd(XMMRegister dst, XMMRegister src1, const Operand& src2) { \ 1445 void v##name##pd(XMMRegister dst, XMMRegister src1, const Operand& src2) { \
1432 vpd(opcode, dst, src1, src2); \ 1446 vpd(opcode, dst, src1, src2); \
1433 } 1447 }
1434 1448
1435 PACKED_OP_LIST(AVX_PACKED_OP_DECLARE); 1449 PACKED_OP_LIST(AVX_PACKED_OP_DECLARE);
1436 void vps(byte op, XMMRegister dst, XMMRegister src1, XMMRegister src2); 1450 void vps(byte op, XMMRegister dst, XMMRegister src1, XMMRegister src2);
1437 void vps(byte op, XMMRegister dst, XMMRegister src1, const Operand& src2); 1451 void vps(byte op, XMMRegister dst, XMMRegister src1, const Operand& src2);
1438 void vpd(byte op, XMMRegister dst, XMMRegister src1, XMMRegister src2); 1452 void vpd(byte op, XMMRegister dst, XMMRegister src1, XMMRegister src2);
1439 void vpd(byte op, XMMRegister dst, XMMRegister src1, const Operand& src2); 1453 void vpd(byte op, XMMRegister dst, XMMRegister src1, const Operand& src2);
1440 1454
1455 void vcmpps(XMMRegister dst, XMMRegister src1, const Operand& src2,
1456 int8_t cmp);
1457 #define AVX_CMP_P(instr, imm8) \
1458 void instr##ps(XMMRegister dst, XMMRegister src1, XMMRegister src2) { \
1459 vcmpps(dst, src1, Operand(src2), imm8); \
1460 } \
1461 void instr##ps(XMMRegister dst, XMMRegister src1, const Operand& src2) { \
1462 vcmpps(dst, src1, src2, imm8); \
1463 }
1464
1465 AVX_CMP_P(vcmpeq, 0x0);
1466 AVX_CMP_P(vcmplt, 0x1);
1467 AVX_CMP_P(vcmple, 0x2);
1468 AVX_CMP_P(vcmpneq, 0x4);
1469
1470 #undef AVX_CMP_P
1471
1441 // Other SSE and AVX instructions 1472 // Other SSE and AVX instructions
1442 #define DECLARE_SSE2_INSTRUCTION(instruction, prefix, escape, opcode) \ 1473 #define DECLARE_SSE2_INSTRUCTION(instruction, prefix, escape, opcode) \
1443 void instruction(XMMRegister dst, XMMRegister src) { \ 1474 void instruction(XMMRegister dst, XMMRegister src) { \
1444 instruction(dst, Operand(src)); \ 1475 instruction(dst, Operand(src)); \
1445 } \ 1476 } \
1446 void instruction(XMMRegister dst, const Operand& src) { \ 1477 void instruction(XMMRegister dst, const Operand& src) { \
1447 sse2_instr(dst, src, 0x##prefix, 0x##escape, 0x##opcode); \ 1478 sse2_instr(dst, src, 0x##prefix, 0x##escape, 0x##opcode); \
1448 } 1479 }
1449 1480
1450 SSE2_INSTRUCTION_LIST(DECLARE_SSE2_INSTRUCTION) 1481 SSE2_INSTRUCTION_LIST(DECLARE_SSE2_INSTRUCTION)
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1668 Assembler* assembler_; 1699 Assembler* assembler_;
1669 #ifdef DEBUG 1700 #ifdef DEBUG
1670 int space_before_; 1701 int space_before_;
1671 #endif 1702 #endif
1672 }; 1703 };
1673 1704
1674 } // namespace internal 1705 } // namespace internal
1675 } // namespace v8 1706 } // namespace v8
1676 1707
1677 #endif // V8_IA32_ASSEMBLER_IA32_H_ 1708 #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