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

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

Issue 153923005: A64: Synchronize with r17525. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 months 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/code-stubs-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 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
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) { 1263 } else if (opcode == 0x54) {
1264 // xorps xmm, xmm/m128 1264 // andps xmm, xmm/m128
1265 int mod, regop, rm; 1265 int mod, regop, rm;
1266 get_modrm(*current, &mod, &regop, &rm); 1266 get_modrm(*current, &mod, &regop, &rm);
1267 AppendToBuffer("andps %s,", NameOfXMMRegister(regop)); 1267 AppendToBuffer("andps %s,", NameOfXMMRegister(regop));
1268 current += PrintRightXMMOperand(current); 1268 current += PrintRightXMMOperand(current);
1269 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
1270 } else if (opcode == 0x57) { 1277 } else if (opcode == 0x57) {
1271 // xorps xmm, xmm/m128 1278 // xorps xmm, xmm/m128
1272 int mod, regop, rm; 1279 int mod, regop, rm;
1273 get_modrm(*current, &mod, &regop, &rm); 1280 get_modrm(*current, &mod, &regop, &rm);
1274 AppendToBuffer("xorps %s,", NameOfXMMRegister(regop)); 1281 AppendToBuffer("xorps %s,", NameOfXMMRegister(regop));
1275 current += PrintRightXMMOperand(current); 1282 current += PrintRightXMMOperand(current);
1276 1283
1277 } else if (opcode == 0x50) { 1284 } else if (opcode == 0x50) {
1278 // movmskps reg, xmm 1285 // movmskps reg, xmm
1279 int mod, regop, rm; 1286 int mod, regop, rm;
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1551 data++; 1558 data++;
1552 if (is_byte) { 1559 if (is_byte) {
1553 AppendToBuffer("movb "); 1560 AppendToBuffer("movb ");
1554 data += PrintRightByteOperand(data); 1561 data += PrintRightByteOperand(data);
1555 int32_t imm = *data; 1562 int32_t imm = *data;
1556 AppendToBuffer(",0x%x", imm); 1563 AppendToBuffer(",0x%x", imm);
1557 data++; 1564 data++;
1558 } else { 1565 } else {
1559 AppendToBuffer("mov%c ", operand_size_code()); 1566 AppendToBuffer("mov%c ", operand_size_code());
1560 data += PrintRightOperand(data); 1567 data += PrintRightOperand(data);
1561 int32_t imm = *reinterpret_cast<int32_t*>(data); 1568 if (operand_size() == OPERAND_WORD_SIZE) {
1562 AppendToBuffer(",0x%x", imm); 1569 int16_t imm = *reinterpret_cast<int16_t*>(data);
1563 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 }
1564 } 1577 }
1565 } 1578 }
1566 break; 1579 break;
1567 1580
1568 case 0x80: { 1581 case 0x80: {
1569 data++; 1582 data++;
1570 AppendToBuffer("cmpb "); 1583 AppendToBuffer("cmpb ");
1571 data += PrintRightByteOperand(data); 1584 data += PrintRightByteOperand(data);
1572 int32_t imm = *data; 1585 int32_t imm = *data;
1573 AppendToBuffer(",0x%x", imm); 1586 AppendToBuffer(",0x%x", imm);
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 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--) {
1893 fprintf(f, " "); 1906 fprintf(f, " ");
1894 } 1907 }
1895 fprintf(f, " %s\n", buffer.start()); 1908 fprintf(f, " %s\n", buffer.start());
1896 } 1909 }
1897 } 1910 }
1898 1911
1899 } // namespace disasm 1912 } // namespace disasm
1900 1913
1901 #endif // V8_TARGET_ARCH_X64 1914 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698