OLD | NEW |
---|---|
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 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1165 void insertps(XMMRegister dst, XMMRegister src, byte imm8); | 1165 void insertps(XMMRegister dst, XMMRegister src, byte imm8); |
1166 void extractps(Register dst, XMMRegister src, byte imm8); | 1166 void extractps(Register dst, XMMRegister src, byte imm8); |
1167 void pextrd(Register dst, XMMRegister src, int8_t imm8); | 1167 void pextrd(Register dst, XMMRegister src, int8_t imm8); |
1168 void pinsrd(XMMRegister dst, Register src, int8_t imm8); | 1168 void pinsrd(XMMRegister dst, Register src, int8_t imm8); |
1169 void pinsrd(XMMRegister dst, const Operand& src, int8_t imm8); | 1169 void pinsrd(XMMRegister dst, const Operand& src, int8_t imm8); |
1170 | 1170 |
1171 void roundss(XMMRegister dst, XMMRegister src, RoundingMode mode); | 1171 void roundss(XMMRegister dst, XMMRegister src, RoundingMode mode); |
1172 void roundsd(XMMRegister dst, XMMRegister src, RoundingMode mode); | 1172 void roundsd(XMMRegister dst, XMMRegister src, RoundingMode mode); |
1173 | 1173 |
1174 void cmpps(XMMRegister dst, XMMRegister src, int8_t cmp); | 1174 void cmpps(XMMRegister dst, XMMRegister src, int8_t cmp); |
1175 void cmpeqps(XMMRegister dst, XMMRegister src); | 1175 void cmpps(XMMRegister dst, const Operand& src, int8_t cmp); |
1176 void cmpltps(XMMRegister dst, XMMRegister src); | 1176 void cmppd(XMMRegister dst, XMMRegister src, int8_t cmp); |
1177 void cmpleps(XMMRegister dst, XMMRegister src); | 1177 void cmppd(XMMRegister dst, const Operand& src, int8_t cmp); |
bbudge
2016/07/22 12:18:24
The SIMD.js spec doesn't include the float64x2 typ
| |
1178 void cmpneqps(XMMRegister dst, XMMRegister src); | 1178 |
1179 void cmpnltps(XMMRegister dst, XMMRegister src); | 1179 #define SSE_CMP_P(instr, imm8) \ |
1180 void cmpnleps(XMMRegister dst, XMMRegister src); | 1180 void instr##ps(XMMRegister dst, XMMRegister src) { cmpps(dst, src, imm8); } \ |
1181 void instr##ps(XMMRegister dst, const Operand& src) { \ | |
1182 cmpps(dst, src, imm8); \ | |
1183 } \ | |
1184 void instr##pd(XMMRegister dst, XMMRegister src) { cmppd(dst, src, imm8); } \ | |
1185 void instr##pd(XMMRegister dst, const Operand& src) { cmppd(dst, src, imm8); } | |
1186 | |
1187 SSE_CMP_P(cmpeq, 0x0); | |
1188 SSE_CMP_P(cmplt, 0x1); | |
1189 SSE_CMP_P(cmple, 0x2); | |
1190 SSE_CMP_P(cmpneq, 0x4); | |
1191 SSE_CMP_P(cmpnlt, 0x5); | |
1192 SSE_CMP_P(cmpnle, 0x6); | |
1193 | |
1194 #undef SSE_CMP_P | |
1181 | 1195 |
1182 void minps(XMMRegister dst, XMMRegister src); | 1196 void minps(XMMRegister dst, XMMRegister src); |
1183 void minps(XMMRegister dst, const Operand& src); | 1197 void minps(XMMRegister dst, const Operand& src); |
1184 void maxps(XMMRegister dst, XMMRegister src); | 1198 void maxps(XMMRegister dst, XMMRegister src); |
1185 void maxps(XMMRegister dst, const Operand& src); | 1199 void maxps(XMMRegister dst, const Operand& src); |
1186 void rcpps(XMMRegister dst, XMMRegister src); | 1200 void rcpps(XMMRegister dst, XMMRegister src); |
1187 void rcpps(XMMRegister dst, const Operand& src); | 1201 void rcpps(XMMRegister dst, const Operand& src); |
1188 void rsqrtps(XMMRegister dst, XMMRegister src); | 1202 void rsqrtps(XMMRegister dst, XMMRegister src); |
1189 void rsqrtps(XMMRegister dst, const Operand& src); | 1203 void rsqrtps(XMMRegister dst, const Operand& src); |
1190 void sqrtps(XMMRegister dst, XMMRegister src); | 1204 void sqrtps(XMMRegister dst, XMMRegister src); |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1547 void vmovupd(XMMRegister dst, const Operand& src) { | 1561 void vmovupd(XMMRegister dst, const Operand& src) { |
1548 vpd(0x10, dst, xmm0, src); | 1562 vpd(0x10, dst, xmm0, src); |
1549 } | 1563 } |
1550 void vmovupd(const Operand& dst, XMMRegister src) { | 1564 void vmovupd(const Operand& dst, XMMRegister src) { |
1551 vpd(0x11, src, xmm0, dst); | 1565 vpd(0x11, src, xmm0, dst); |
1552 } | 1566 } |
1553 void vmovmskpd(Register dst, XMMRegister src) { | 1567 void vmovmskpd(Register dst, XMMRegister src) { |
1554 XMMRegister idst = {dst.code()}; | 1568 XMMRegister idst = {dst.code()}; |
1555 vpd(0x50, idst, xmm0, src); | 1569 vpd(0x50, idst, xmm0, src); |
1556 } | 1570 } |
1571 void vcmpps(XMMRegister dst, XMMRegister src1, XMMRegister src2, int8_t cmp) { | |
1572 vps(0xC2, dst, src1, src2); | |
1573 emit(cmp); | |
1574 } | |
1575 void vcmpps(XMMRegister dst, XMMRegister src1, const Operand& src2, | |
1576 int8_t cmp) { | |
1577 vps(0xC2, dst, src1, src2); | |
1578 emit(cmp); | |
1579 } | |
1580 void vcmppd(XMMRegister dst, XMMRegister src1, XMMRegister src2, int8_t cmp) { | |
1581 vpd(0xC2, dst, src1, src2); | |
1582 emit(cmp); | |
1583 } | |
1584 void vcmppd(XMMRegister dst, XMMRegister src1, const Operand& src2, | |
1585 int8_t cmp) { | |
1586 vpd(0xC2, dst, src1, src2); | |
1587 emit(cmp); | |
1588 } | |
1589 | |
1590 #define AVX_CMP_P(instr, imm8) \ | |
1591 void instr##ps(XMMRegister dst, XMMRegister src1, XMMRegister src2) { \ | |
1592 vcmpps(dst, src1, src2, imm8); \ | |
1593 } \ | |
1594 void instr##ps(XMMRegister dst, XMMRegister src1, const Operand& src2) { \ | |
1595 vcmpps(dst, src1, src2, imm8); \ | |
1596 } \ | |
1597 void instr##pd(XMMRegister dst, XMMRegister src1, XMMRegister src2) { \ | |
1598 vcmppd(dst, src1, src2, imm8); \ | |
1599 } \ | |
1600 void instr##pd(XMMRegister dst, XMMRegister src1, const Operand& src2) { \ | |
1601 vcmppd(dst, src1, src2, imm8); \ | |
1602 } | |
1603 | |
1604 AVX_CMP_P(vcmpeq, 0x0); | |
1605 AVX_CMP_P(vcmplt, 0x1); | |
1606 AVX_CMP_P(vcmple, 0x2); | |
1607 AVX_CMP_P(vcmpneq, 0x4); | |
1608 AVX_CMP_P(vcmpnlt, 0x5); | |
1609 AVX_CMP_P(vcmpnle, 0x6); | |
1610 | |
1611 #undef AVX_CMP_P | |
1557 | 1612 |
1558 void vps(byte op, XMMRegister dst, XMMRegister src1, XMMRegister src2); | 1613 void vps(byte op, XMMRegister dst, XMMRegister src1, XMMRegister src2); |
1559 void vps(byte op, XMMRegister dst, XMMRegister src1, const Operand& src2); | 1614 void vps(byte op, XMMRegister dst, XMMRegister src1, const Operand& src2); |
1560 void vpd(byte op, XMMRegister dst, XMMRegister src1, XMMRegister src2); | 1615 void vpd(byte op, XMMRegister dst, XMMRegister src1, XMMRegister src2); |
1561 void vpd(byte op, XMMRegister dst, XMMRegister src1, const Operand& src2); | 1616 void vpd(byte op, XMMRegister dst, XMMRegister src1, const Operand& src2); |
1562 | 1617 |
1563 // BMI instruction | 1618 // BMI instruction |
1564 void andnq(Register dst, Register src1, Register src2) { | 1619 void andnq(Register dst, Register src1, Register src2) { |
1565 bmi1q(0xf2, dst, src1, src2); | 1620 bmi1q(0xf2, dst, src1, src2); |
1566 } | 1621 } |
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2289 Assembler* assembler_; | 2344 Assembler* assembler_; |
2290 #ifdef DEBUG | 2345 #ifdef DEBUG |
2291 int space_before_; | 2346 int space_before_; |
2292 #endif | 2347 #endif |
2293 }; | 2348 }; |
2294 | 2349 |
2295 } // namespace internal | 2350 } // namespace internal |
2296 } // namespace v8 | 2351 } // namespace v8 |
2297 | 2352 |
2298 #endif // V8_X64_ASSEMBLER_X64_H_ | 2353 #endif // V8_X64_ASSEMBLER_X64_H_ |
OLD | NEW |