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 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
947 void mulps(XMMRegister dst, const Operand& src); | 947 void mulps(XMMRegister dst, const Operand& src); |
948 void mulps(XMMRegister dst, XMMRegister src) { mulps(dst, Operand(src)); } | 948 void mulps(XMMRegister dst, XMMRegister src) { mulps(dst, Operand(src)); } |
949 void divps(XMMRegister dst, const Operand& src); | 949 void divps(XMMRegister dst, const Operand& src); |
950 void divps(XMMRegister dst, XMMRegister src) { divps(dst, Operand(src)); } | 950 void divps(XMMRegister dst, XMMRegister src) { divps(dst, Operand(src)); } |
951 | 951 |
952 // SSE2 instructions | 952 // SSE2 instructions |
953 void cvttss2si(Register dst, const Operand& src); | 953 void cvttss2si(Register dst, const Operand& src); |
954 void cvttss2si(Register dst, XMMRegister src) { | 954 void cvttss2si(Register dst, XMMRegister src) { |
955 cvttss2si(dst, Operand(src)); | 955 cvttss2si(dst, Operand(src)); |
956 } | 956 } |
| 957 void cvtss2si(Register dst, const Operand& src); |
| 958 void cvtss2si(Register dst, XMMRegister src) { cvtss2si(dst, Operand(src)); } |
957 void cvttsd2si(Register dst, const Operand& src); | 959 void cvttsd2si(Register dst, const Operand& src); |
958 void cvttsd2si(Register dst, XMMRegister src) { | 960 void cvttsd2si(Register dst, XMMRegister src) { |
959 cvttsd2si(dst, Operand(src)); | 961 cvttsd2si(dst, Operand(src)); |
960 } | 962 } |
| 963 void cvtsd2si(Register dst, const Operand& src); |
961 void cvtsd2si(Register dst, XMMRegister src); | 964 void cvtsd2si(Register dst, XMMRegister src); |
962 | 965 |
963 void cvtsi2sd(XMMRegister dst, Register src) { cvtsi2sd(dst, Operand(src)); } | 966 void cvtsi2sd(XMMRegister dst, Register src) { cvtsi2sd(dst, Operand(src)); } |
964 void cvtsi2sd(XMMRegister dst, const Operand& src); | 967 void cvtsi2sd(XMMRegister dst, const Operand& src); |
| 968 void cvtsi2ss(XMMRegister dst, Register src) { cvtsi2ss(dst, Operand(src)); } |
| 969 void cvtsi2ss(XMMRegister dst, const Operand& src); |
965 void cvtss2sd(XMMRegister dst, const Operand& src); | 970 void cvtss2sd(XMMRegister dst, const Operand& src); |
966 void cvtss2sd(XMMRegister dst, XMMRegister src) { | 971 void cvtss2sd(XMMRegister dst, XMMRegister src) { |
967 cvtss2sd(dst, Operand(src)); | 972 cvtss2sd(dst, Operand(src)); |
968 } | 973 } |
969 void cvtsd2ss(XMMRegister dst, const Operand& src); | 974 void cvtsd2ss(XMMRegister dst, const Operand& src); |
970 void cvtsd2ss(XMMRegister dst, XMMRegister src) { | 975 void cvtsd2ss(XMMRegister dst, XMMRegister src) { |
971 cvtsd2ss(dst, Operand(src)); | 976 cvtsd2ss(dst, Operand(src)); |
972 } | 977 } |
973 void addsd(XMMRegister dst, XMMRegister src) { addsd(dst, Operand(src)); } | 978 void addsd(XMMRegister dst, XMMRegister src) { addsd(dst, Operand(src)); } |
974 void addsd(XMMRegister dst, const Operand& src); | 979 void addsd(XMMRegister dst, const Operand& src); |
975 void subsd(XMMRegister dst, XMMRegister src) { subsd(dst, Operand(src)); } | 980 void subsd(XMMRegister dst, XMMRegister src) { subsd(dst, Operand(src)); } |
976 void subsd(XMMRegister dst, const Operand& src); | 981 void subsd(XMMRegister dst, const Operand& src); |
977 void mulsd(XMMRegister dst, XMMRegister src) { mulsd(dst, Operand(src)); } | 982 void mulsd(XMMRegister dst, XMMRegister src) { mulsd(dst, Operand(src)); } |
978 void mulsd(XMMRegister dst, const Operand& src); | 983 void mulsd(XMMRegister dst, const Operand& src); |
979 void divsd(XMMRegister dst, XMMRegister src) { divsd(dst, Operand(src)); } | 984 void divsd(XMMRegister dst, XMMRegister src) { divsd(dst, Operand(src)); } |
980 void divsd(XMMRegister dst, const Operand& src); | 985 void divsd(XMMRegister dst, const Operand& src); |
981 void xorpd(XMMRegister dst, XMMRegister src); | 986 void xorpd(XMMRegister dst, XMMRegister src); |
982 void sqrtsd(XMMRegister dst, XMMRegister src) { sqrtsd(dst, Operand(src)); } | 987 void sqrtsd(XMMRegister dst, XMMRegister src) { sqrtsd(dst, Operand(src)); } |
983 void sqrtsd(XMMRegister dst, const Operand& src); | 988 void sqrtsd(XMMRegister dst, const Operand& src); |
984 | 989 |
985 void andpd(XMMRegister dst, XMMRegister src); | 990 void andpd(XMMRegister dst, XMMRegister src); |
986 void orpd(XMMRegister dst, XMMRegister src); | 991 void orpd(XMMRegister dst, XMMRegister src); |
987 | 992 |
988 void ucomisd(XMMRegister dst, XMMRegister src) { ucomisd(dst, Operand(src)); } | 993 void ucomisd(XMMRegister dst, XMMRegister src) { ucomisd(dst, Operand(src)); } |
989 void ucomisd(XMMRegister dst, const Operand& src); | 994 void ucomisd(XMMRegister dst, const Operand& src); |
990 | 995 |
991 void roundss(XMMRegister dst, XMMRegister src, RoundingMode mode); | 996 void roundss(XMMRegister dst, XMMRegister src, RoundingMode mode); |
992 void roundsd(XMMRegister dst, XMMRegister src, RoundingMode mode); | 997 void roundsd(XMMRegister dst, XMMRegister src, RoundingMode mode); |
993 | 998 |
| 999 void ldmxcsr(const Operand& dst); |
| 1000 void stmxcsr(const Operand& dst); |
| 1001 |
994 void movmskpd(Register dst, XMMRegister src); | 1002 void movmskpd(Register dst, XMMRegister src); |
995 void movmskps(Register dst, XMMRegister src); | 1003 void movmskps(Register dst, XMMRegister src); |
996 | 1004 |
997 void cmpltsd(XMMRegister dst, XMMRegister src); | 1005 void cmpltsd(XMMRegister dst, XMMRegister src); |
998 void pcmpeqd(XMMRegister dst, XMMRegister src); | 1006 void pcmpeqd(XMMRegister dst, XMMRegister src); |
999 | 1007 |
1000 void punpckldq(XMMRegister dst, XMMRegister src); | 1008 void punpckldq(XMMRegister dst, XMMRegister src); |
1001 void punpckhdq(XMMRegister dst, XMMRegister src); | 1009 void punpckhdq(XMMRegister dst, XMMRegister src); |
1002 | 1010 |
1003 void maxsd(XMMRegister dst, XMMRegister src) { maxsd(dst, Operand(src)); } | 1011 void maxsd(XMMRegister dst, XMMRegister src) { maxsd(dst, Operand(src)); } |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1486 // instruction generation | 1494 // instruction generation |
1487 void emit_arith_b(int op1, int op2, Register dst, int imm8); | 1495 void emit_arith_b(int op1, int op2, Register dst, int imm8); |
1488 | 1496 |
1489 // Emit a basic arithmetic instruction (i.e. first byte of the family is 0x81) | 1497 // Emit a basic arithmetic instruction (i.e. first byte of the family is 0x81) |
1490 // with a given destination expression and an immediate operand. It attempts | 1498 // with a given destination expression and an immediate operand. It attempts |
1491 // to use the shortest encoding possible. | 1499 // to use the shortest encoding possible. |
1492 // sel specifies the /n in the modrm byte (see the Intel PRM). | 1500 // sel specifies the /n in the modrm byte (see the Intel PRM). |
1493 void emit_arith(int sel, Operand dst, const Immediate& x); | 1501 void emit_arith(int sel, Operand dst, const Immediate& x); |
1494 | 1502 |
1495 void emit_operand(Register reg, const Operand& adr); | 1503 void emit_operand(Register reg, const Operand& adr); |
| 1504 void emit_operand(int code, const Operand& adr); |
1496 | 1505 |
1497 void emit_label(Label* label); | 1506 void emit_label(Label* label); |
1498 | 1507 |
1499 void emit_farith(int b1, int b2, int i); | 1508 void emit_farith(int b1, int b2, int i); |
1500 | 1509 |
1501 // Emit vex prefix | 1510 // Emit vex prefix |
1502 enum SIMDPrefix { kNone = 0x0, k66 = 0x1, kF3 = 0x2, kF2 = 0x3 }; | 1511 enum SIMDPrefix { kNone = 0x0, k66 = 0x1, kF3 = 0x2, kF2 = 0x3 }; |
1503 enum VectorLength { kL128 = 0x0, kL256 = 0x4, kLIG = kL128, kLZ = kL128 }; | 1512 enum VectorLength { kL128 = 0x0, kL256 = 0x4, kLIG = kL128, kLZ = kL128 }; |
1504 enum VexW { kW0 = 0x0, kW1 = 0x80, kWIG = kW0 }; | 1513 enum VexW { kW0 = 0x0, kW1 = 0x80, kWIG = kW0 }; |
1505 enum LeadingOpcode { k0F = 0x1, k0F38 = 0x2, k0F3A = 0x3 }; | 1514 enum LeadingOpcode { k0F = 0x1, k0F38 = 0x2, k0F3A = 0x3 }; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1566 Assembler* assembler_; | 1575 Assembler* assembler_; |
1567 #ifdef DEBUG | 1576 #ifdef DEBUG |
1568 int space_before_; | 1577 int space_before_; |
1569 #endif | 1578 #endif |
1570 }; | 1579 }; |
1571 | 1580 |
1572 } // namespace internal | 1581 } // namespace internal |
1573 } // namespace v8 | 1582 } // namespace v8 |
1574 | 1583 |
1575 #endif // V8_IA32_ASSEMBLER_IA32_H_ | 1584 #endif // V8_IA32_ASSEMBLER_IA32_H_ |
OLD | NEW |