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

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

Issue 71163006: Merge bleeding_edge r17376:17693. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Fix all.gyp 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/deoptimizer-x64.cc ('k') | src/x64/full-codegen-x64.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 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 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 // CPUID 1253 // CPUID
1254 AppendToBuffer("%s", mnemonic); 1254 AppendToBuffer("%s", mnemonic);
1255 1255
1256 } else if ((opcode & 0xF0) == 0x40) { 1256 } else if ((opcode & 0xF0) == 0x40) {
1257 // CMOVcc: conditional move. 1257 // CMOVcc: conditional move.
1258 int condition = opcode & 0x0F; 1258 int condition = opcode & 0x0F;
1259 const InstructionDesc& idesc = cmov_instructions[condition]; 1259 const InstructionDesc& idesc = cmov_instructions[condition];
1260 byte_size_operand_ = idesc.byte_size_operation; 1260 byte_size_operand_ = idesc.byte_size_operation;
1261 current += PrintOperands(idesc.mnem, idesc.op_order_, current); 1261 current += PrintOperands(idesc.mnem, idesc.op_order_, current);
1262 1262
1263 } else if (opcode == 0x54) {
1264 // andps xmm, xmm/m128
1265 int mod, regop, rm;
1266 get_modrm(*current, &mod, &regop, &rm);
1267 AppendToBuffer("andps %s,", NameOfXMMRegister(regop));
1268 current += PrintRightXMMOperand(current);
1269
1270 } else if (opcode == 0x56) {
1271 // orps xmm, xmm/m128
1272 int mod, regop, rm;
1273 get_modrm(*current, &mod, &regop, &rm);
1274 AppendToBuffer("orps %s,", NameOfXMMRegister(regop));
1275 current += PrintRightXMMOperand(current);
1276
1263 } else if (opcode == 0x57) { 1277 } else if (opcode == 0x57) {
1264 // xorps xmm, xmm/m128 1278 // xorps xmm, xmm/m128
1265 int mod, regop, rm; 1279 int mod, regop, rm;
1266 get_modrm(*current, &mod, &regop, &rm); 1280 get_modrm(*current, &mod, &regop, &rm);
1267 AppendToBuffer("xorps %s,", NameOfXMMRegister(regop)); 1281 AppendToBuffer("xorps %s,", NameOfXMMRegister(regop));
1268 current += PrintRightXMMOperand(current); 1282 current += PrintRightXMMOperand(current);
1269 1283
1270 } else if (opcode == 0x50) { 1284 } else if (opcode == 0x50) {
1271 // movmskps reg, xmm 1285 // movmskps reg, xmm
1272 int mod, regop, rm; 1286 int mod, regop, rm;
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1544 data++; 1558 data++;
1545 if (is_byte) { 1559 if (is_byte) {
1546 AppendToBuffer("movb "); 1560 AppendToBuffer("movb ");
1547 data += PrintRightByteOperand(data); 1561 data += PrintRightByteOperand(data);
1548 int32_t imm = *data; 1562 int32_t imm = *data;
1549 AppendToBuffer(",0x%x", imm); 1563 AppendToBuffer(",0x%x", imm);
1550 data++; 1564 data++;
1551 } else { 1565 } else {
1552 AppendToBuffer("mov%c ", operand_size_code()); 1566 AppendToBuffer("mov%c ", operand_size_code());
1553 data += PrintRightOperand(data); 1567 data += PrintRightOperand(data);
1554 int32_t imm = *reinterpret_cast<int32_t*>(data); 1568 if (operand_size() == OPERAND_WORD_SIZE) {
1555 AppendToBuffer(",0x%x", imm); 1569 int16_t imm = *reinterpret_cast<int16_t*>(data);
1556 data += 4; 1570 AppendToBuffer(",0x%x", imm);
1571 data += 2;
1572 } else {
1573 int32_t imm = *reinterpret_cast<int32_t*>(data);
1574 AppendToBuffer(",0x%x", imm);
1575 data += 4;
1576 }
1557 } 1577 }
1558 } 1578 }
1559 break; 1579 break;
1560 1580
1561 case 0x80: { 1581 case 0x80: {
1562 data++; 1582 data++;
1563 AppendToBuffer("cmpb "); 1583 AppendToBuffer("cmpb ");
1564 data += PrintRightByteOperand(data); 1584 data += PrintRightByteOperand(data);
1565 int32_t imm = *data; 1585 int32_t imm = *data;
1566 AppendToBuffer(",0x%x", imm); 1586 AppendToBuffer(",0x%x", imm);
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1885 for (int i = 6 - static_cast<int>(pc - prev_pc); i >= 0; i--) { 1905 for (int i = 6 - static_cast<int>(pc - prev_pc); i >= 0; i--) {
1886 fprintf(f, " "); 1906 fprintf(f, " ");
1887 } 1907 }
1888 fprintf(f, " %s\n", buffer.start()); 1908 fprintf(f, " %s\n", buffer.start());
1889 } 1909 }
1890 } 1910 }
1891 1911
1892 } // namespace disasm 1912 } // namespace disasm
1893 1913
1894 #endif // V8_TARGET_ARCH_X64 1914 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/deoptimizer-x64.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698