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

Side by Side Diff: src/ia32/disasm-ia32.cc

Issue 60093005: Introduce addps/subps/mulps/divps for IA32/X64 (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Put all SSE1 instruction after SSE2 flag Created 7 years, 1 month 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 | « src/ia32/assembler-ia32.cc ('k') | src/x64/assembler-x64.h » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 AppendToBuffer("%s", f0mnem); 1035 AppendToBuffer("%s", f0mnem);
1036 data += 2; 1036 data += 2;
1037 } else if (f0byte == 0x28) { 1037 } else if (f0byte == 0x28) {
1038 data += 2; 1038 data += 2;
1039 int mod, regop, rm; 1039 int mod, regop, rm;
1040 get_modrm(*data, &mod, &regop, &rm); 1040 get_modrm(*data, &mod, &regop, &rm);
1041 AppendToBuffer("movaps %s,%s", 1041 AppendToBuffer("movaps %s,%s",
1042 NameOfXMMRegister(regop), 1042 NameOfXMMRegister(regop),
1043 NameOfXMMRegister(rm)); 1043 NameOfXMMRegister(rm));
1044 data++; 1044 data++;
1045 } else if (f0byte == 0x54) { 1045 } else if (f0byte >= 0x53 && f0byte <= 0x5F) {
1046 const char* const pseudo_op[] = {
1047 "rcpps",
1048 "andps",
1049 "andnps",
1050 "orps",
1051 "xorps",
1052 "addps",
1053 "mulps",
1054 "cvtps2pd",
1055 "cvtdq2ps",
1056 "subps",
1057 "minps",
1058 "divps",
1059 "maxps",
1060 };
1061
1046 data += 2; 1062 data += 2;
1047 int mod, regop, rm; 1063 int mod, regop, rm;
1048 get_modrm(*data, &mod, &regop, &rm); 1064 get_modrm(*data, &mod, &regop, &rm);
1049 AppendToBuffer("andps %s,%s", 1065 AppendToBuffer("%s %s,",
1050 NameOfXMMRegister(regop), 1066 pseudo_op[f0byte - 0x53],
1051 NameOfXMMRegister(rm)); 1067 NameOfXMMRegister(regop));
1052 data++; 1068 data += PrintRightXMMOperand(data);
1053 } else if (f0byte == 0x56) {
1054 data += 2;
1055 int mod, regop, rm;
1056 get_modrm(*data, &mod, &regop, &rm);
1057 AppendToBuffer("orps %s,%s",
1058 NameOfXMMRegister(regop),
1059 NameOfXMMRegister(rm));
1060 data++;
1061 } else if (f0byte == 0x57) {
1062 data += 2;
1063 int mod, regop, rm;
1064 get_modrm(*data, &mod, &regop, &rm);
1065 AppendToBuffer("xorps %s,%s",
1066 NameOfXMMRegister(regop),
1067 NameOfXMMRegister(rm));
1068 data++;
1069 } else if (f0byte == 0x50) { 1069 } else if (f0byte == 0x50) {
1070 data += 2; 1070 data += 2;
1071 int mod, regop, rm; 1071 int mod, regop, rm;
1072 get_modrm(*data, &mod, &regop, &rm); 1072 get_modrm(*data, &mod, &regop, &rm);
1073 AppendToBuffer("movmskps %s,%s", 1073 AppendToBuffer("movmskps %s,%s",
1074 NameOfCPURegister(regop), 1074 NameOfCPURegister(regop),
1075 NameOfXMMRegister(rm)); 1075 NameOfXMMRegister(rm));
1076 data++; 1076 data++;
1077 } else if (f0byte== 0xC6) {
1078 // shufps xmm, xmm/m128, imm8
1079 data += 2;
1080 int mod, regop, rm;
1081 get_modrm(*data, &mod, &regop, &rm);
1082 int8_t imm8 = static_cast<int8_t>(data[1]);
1083 AppendToBuffer("shufps %s,%s,%d",
1084 NameOfXMMRegister(rm),
1085 NameOfXMMRegister(regop),
1086 static_cast<int>(imm8));
1087 data += 2;
1077 } else if ((f0byte & 0xF0) == 0x80) { 1088 } else if ((f0byte & 0xF0) == 0x80) {
1078 data += JumpConditional(data, branch_hint); 1089 data += JumpConditional(data, branch_hint);
1079 } else if (f0byte == 0xBE || f0byte == 0xBF || f0byte == 0xB6 || 1090 } else if (f0byte == 0xBE || f0byte == 0xBF || f0byte == 0xB6 ||
1080 f0byte == 0xB7 || f0byte == 0xAF) { 1091 f0byte == 0xB7 || f0byte == 0xAF) {
1081 data += 2; 1092 data += 2;
1082 data += PrintOperands(f0mnem, REG_OPER_OP_ORDER, data); 1093 data += PrintOperands(f0mnem, REG_OPER_OP_ORDER, data);
1083 } else if ((f0byte & 0xF0) == 0x90) { 1094 } else if ((f0byte & 0xF0) == 0x90) {
1084 data += SetCC(data); 1095 data += SetCC(data);
1085 } else if ((f0byte & 0xF0) == 0x40) { 1096 } else if ((f0byte & 0xF0) == 0x40) {
1086 data += CMov(data); 1097 data += CMov(data);
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1751 fprintf(f, " "); 1762 fprintf(f, " ");
1752 } 1763 }
1753 fprintf(f, " %s\n", buffer.start()); 1764 fprintf(f, " %s\n", buffer.start());
1754 } 1765 }
1755 } 1766 }
1756 1767
1757 1768
1758 } // namespace disasm 1769 } // namespace disasm
1759 1770
1760 #endif // V8_TARGET_ARCH_IA32 1771 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.cc ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698