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 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 void fnclex(); | 1012 void fnclex(); |
1013 | 1013 |
1014 void frndint(); | 1014 void frndint(); |
1015 | 1015 |
1016 void sahf(); | 1016 void sahf(); |
1017 void setcc(Condition cc, Register reg); | 1017 void setcc(Condition cc, Register reg); |
1018 | 1018 |
1019 void cpuid(); | 1019 void cpuid(); |
1020 | 1020 |
1021 // SSE instructions | 1021 // SSE instructions |
1022 void andps(XMMRegister dst, XMMRegister src); | 1022 void movaps(XMMRegister dst, XMMRegister src); |
1023 void xorps(XMMRegister dst, XMMRegister src); | 1023 void shufps(XMMRegister dst, XMMRegister src, byte imm8); |
1024 void orps(XMMRegister dst, XMMRegister src); | 1024 |
| 1025 void andps(XMMRegister dst, const Operand& src); |
| 1026 void andps(XMMRegister dst, XMMRegister src) { andps(dst, Operand(src)); } |
| 1027 void xorps(XMMRegister dst, const Operand& src); |
| 1028 void xorps(XMMRegister dst, XMMRegister src) { xorps(dst, Operand(src)); } |
| 1029 void orps(XMMRegister dst, const Operand& src); |
| 1030 void orps(XMMRegister dst, XMMRegister src) { orps(dst, Operand(src)); } |
| 1031 |
| 1032 void addps(XMMRegister dst, const Operand& src); |
| 1033 void addps(XMMRegister dst, XMMRegister src) { addps(dst, Operand(src)); } |
| 1034 void subps(XMMRegister dst, const Operand& src); |
| 1035 void subps(XMMRegister dst, XMMRegister src) { subps(dst, Operand(src)); } |
| 1036 void mulps(XMMRegister dst, const Operand& src); |
| 1037 void mulps(XMMRegister dst, XMMRegister src) { mulps(dst, Operand(src)); } |
| 1038 void divps(XMMRegister dst, const Operand& src); |
| 1039 void divps(XMMRegister dst, XMMRegister src) { divps(dst, Operand(src)); } |
1025 | 1040 |
1026 // SSE2 instructions | 1041 // SSE2 instructions |
1027 void cvttss2si(Register dst, const Operand& src); | 1042 void cvttss2si(Register dst, const Operand& src); |
| 1043 void cvttss2si(Register dst, XMMRegister src) { |
| 1044 cvttss2si(dst, Operand(src)); |
| 1045 } |
1028 void cvttsd2si(Register dst, const Operand& src); | 1046 void cvttsd2si(Register dst, const Operand& src); |
1029 void cvtsd2si(Register dst, XMMRegister src); | 1047 void cvtsd2si(Register dst, XMMRegister src); |
1030 | 1048 |
1031 void cvtsi2sd(XMMRegister dst, Register src) { cvtsi2sd(dst, Operand(src)); } | 1049 void cvtsi2sd(XMMRegister dst, Register src) { cvtsi2sd(dst, Operand(src)); } |
1032 void cvtsi2sd(XMMRegister dst, const Operand& src); | 1050 void cvtsi2sd(XMMRegister dst, const Operand& src); |
1033 void cvtss2sd(XMMRegister dst, XMMRegister src); | 1051 void cvtss2sd(XMMRegister dst, XMMRegister src); |
1034 void cvtsd2ss(XMMRegister dst, XMMRegister src); | 1052 void cvtsd2ss(XMMRegister dst, XMMRegister src); |
1035 | 1053 |
1036 void addsd(XMMRegister dst, XMMRegister src); | 1054 void addsd(XMMRegister dst, XMMRegister src); |
1037 void addsd(XMMRegister dst, const Operand& src); | 1055 void addsd(XMMRegister dst, const Operand& src); |
1038 void subsd(XMMRegister dst, XMMRegister src); | 1056 void subsd(XMMRegister dst, XMMRegister src); |
1039 void mulsd(XMMRegister dst, XMMRegister src); | 1057 void mulsd(XMMRegister dst, XMMRegister src); |
1040 void mulsd(XMMRegister dst, const Operand& src); | 1058 void mulsd(XMMRegister dst, const Operand& src); |
1041 void divsd(XMMRegister dst, XMMRegister src); | 1059 void divsd(XMMRegister dst, XMMRegister src); |
1042 void xorpd(XMMRegister dst, XMMRegister src); | 1060 void xorpd(XMMRegister dst, XMMRegister src); |
1043 void sqrtsd(XMMRegister dst, XMMRegister src); | 1061 void sqrtsd(XMMRegister dst, XMMRegister src); |
1044 | 1062 |
1045 void andpd(XMMRegister dst, XMMRegister src); | 1063 void andpd(XMMRegister dst, XMMRegister src); |
1046 void orpd(XMMRegister dst, XMMRegister src); | 1064 void orpd(XMMRegister dst, XMMRegister src); |
1047 | 1065 |
1048 void ucomisd(XMMRegister dst, XMMRegister src); | 1066 void ucomisd(XMMRegister dst, XMMRegister src) { ucomisd(dst, Operand(src)); } |
1049 void ucomisd(XMMRegister dst, const Operand& src); | 1067 void ucomisd(XMMRegister dst, const Operand& src); |
1050 | 1068 |
1051 enum RoundingMode { | 1069 enum RoundingMode { |
1052 kRoundToNearest = 0x0, | 1070 kRoundToNearest = 0x0, |
1053 kRoundDown = 0x1, | 1071 kRoundDown = 0x1, |
1054 kRoundUp = 0x2, | 1072 kRoundUp = 0x2, |
1055 kRoundToZero = 0x3 | 1073 kRoundToZero = 0x3 |
1056 }; | 1074 }; |
1057 | 1075 |
1058 void roundsd(XMMRegister dst, XMMRegister src, RoundingMode mode); | 1076 void roundsd(XMMRegister dst, XMMRegister src, RoundingMode mode); |
1059 | 1077 |
1060 void movmskpd(Register dst, XMMRegister src); | 1078 void movmskpd(Register dst, XMMRegister src); |
1061 void movmskps(Register dst, XMMRegister src); | 1079 void movmskps(Register dst, XMMRegister src); |
1062 | 1080 |
1063 void cmpltsd(XMMRegister dst, XMMRegister src); | 1081 void cmpltsd(XMMRegister dst, XMMRegister src); |
1064 void pcmpeqd(XMMRegister dst, XMMRegister src); | 1082 void pcmpeqd(XMMRegister dst, XMMRegister src); |
1065 | 1083 |
1066 void movaps(XMMRegister dst, XMMRegister src); | |
1067 | |
1068 void movdqa(XMMRegister dst, const Operand& src); | 1084 void movdqa(XMMRegister dst, const Operand& src); |
1069 void movdqa(const Operand& dst, XMMRegister src); | 1085 void movdqa(const Operand& dst, XMMRegister src); |
1070 void movdqu(XMMRegister dst, const Operand& src); | 1086 void movdqu(XMMRegister dst, const Operand& src); |
1071 void movdqu(const Operand& dst, XMMRegister src); | 1087 void movdqu(const Operand& dst, XMMRegister src); |
1072 void movdq(bool aligned, XMMRegister dst, const Operand& src) { | 1088 void movdq(bool aligned, XMMRegister dst, const Operand& src) { |
1073 if (aligned) { | 1089 if (aligned) { |
1074 movdqa(dst, src); | 1090 movdqa(dst, src); |
1075 } else { | 1091 } else { |
1076 movdqu(dst, src); | 1092 movdqu(dst, src); |
1077 } | 1093 } |
1078 } | 1094 } |
1079 | 1095 |
1080 void movd(XMMRegister dst, Register src) { movd(dst, Operand(src)); } | 1096 void movd(XMMRegister dst, Register src) { movd(dst, Operand(src)); } |
1081 void movd(XMMRegister dst, const Operand& src); | 1097 void movd(XMMRegister dst, const Operand& src); |
1082 void movd(Register dst, XMMRegister src) { movd(Operand(dst), src); } | 1098 void movd(Register dst, XMMRegister src) { movd(Operand(dst), src); } |
1083 void movd(const Operand& dst, XMMRegister src); | 1099 void movd(const Operand& dst, XMMRegister src); |
1084 void movsd(XMMRegister dst, XMMRegister src); | 1100 void movsd(XMMRegister dst, XMMRegister src) { movsd(dst, Operand(src)); } |
1085 void movsd(XMMRegister dst, const Operand& src); | 1101 void movsd(XMMRegister dst, const Operand& src); |
1086 void movsd(const Operand& dst, XMMRegister src); | 1102 void movsd(const Operand& dst, XMMRegister src); |
1087 | 1103 |
1088 | 1104 |
1089 void movss(XMMRegister dst, const Operand& src); | 1105 void movss(XMMRegister dst, const Operand& src); |
1090 void movss(const Operand& dst, XMMRegister src); | 1106 void movss(const Operand& dst, XMMRegister src); |
1091 void movss(XMMRegister dst, XMMRegister src); | 1107 void movss(XMMRegister dst, XMMRegister src) { movss(dst, Operand(src)); } |
1092 void extractps(Register dst, XMMRegister src, byte imm8); | 1108 void extractps(Register dst, XMMRegister src, byte imm8); |
1093 | 1109 |
1094 void pand(XMMRegister dst, XMMRegister src); | 1110 void pand(XMMRegister dst, XMMRegister src); |
1095 void pxor(XMMRegister dst, XMMRegister src); | 1111 void pxor(XMMRegister dst, XMMRegister src); |
1096 void por(XMMRegister dst, XMMRegister src); | 1112 void por(XMMRegister dst, XMMRegister src); |
1097 void ptest(XMMRegister dst, XMMRegister src); | 1113 void ptest(XMMRegister dst, XMMRegister src); |
1098 | 1114 |
1099 void psllq(XMMRegister reg, int8_t shift); | 1115 void psllq(XMMRegister reg, int8_t shift); |
1100 void psllq(XMMRegister dst, XMMRegister src); | 1116 void psllq(XMMRegister dst, XMMRegister src); |
1101 void psrlq(XMMRegister reg, int8_t shift); | 1117 void psrlq(XMMRegister reg, int8_t shift); |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 private: | 1274 private: |
1259 Assembler* assembler_; | 1275 Assembler* assembler_; |
1260 #ifdef DEBUG | 1276 #ifdef DEBUG |
1261 int space_before_; | 1277 int space_before_; |
1262 #endif | 1278 #endif |
1263 }; | 1279 }; |
1264 | 1280 |
1265 } } // namespace v8::internal | 1281 } } // namespace v8::internal |
1266 | 1282 |
1267 #endif // V8_IA32_ASSEMBLER_IA32_H_ | 1283 #endif // V8_IA32_ASSEMBLER_IA32_H_ |
OLD | NEW |