OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <assert.h> | 5 #include <assert.h> |
6 #include <stdarg.h> | 6 #include <stdarg.h> |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #if V8_TARGET_ARCH_X64 | 9 #if V8_TARGET_ARCH_X64 |
10 | 10 |
(...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1259 NameOfXMMRegister(vvvv)); | 1259 NameOfXMMRegister(vvvv)); |
1260 current += PrintRightXMMOperand(current); | 1260 current += PrintRightXMMOperand(current); |
1261 break; | 1261 break; |
1262 default: | 1262 default: |
1263 UnimplementedInstruction(); | 1263 UnimplementedInstruction(); |
1264 } | 1264 } |
1265 } else if (vex_66() && vex_0f()) { | 1265 } else if (vex_66() && vex_0f()) { |
1266 int mod, regop, rm, vvvv = vex_vreg(); | 1266 int mod, regop, rm, vvvv = vex_vreg(); |
1267 get_modrm(*current, &mod, ®op, &rm); | 1267 get_modrm(*current, &mod, ®op, &rm); |
1268 switch (opcode) { | 1268 switch (opcode) { |
| 1269 case 0x10: |
| 1270 AppendToBuffer("vmovupd %s,", NameOfXMMRegister(regop)); |
| 1271 current += PrintRightXMMOperand(current); |
| 1272 break; |
| 1273 case 0x11: |
| 1274 AppendToBuffer("vmovupd "); |
| 1275 current += PrintRightXMMOperand(current); |
| 1276 AppendToBuffer(",%s", NameOfXMMRegister(regop)); |
| 1277 break; |
1269 case 0x28: | 1278 case 0x28: |
1270 AppendToBuffer("vmovapd %s,", NameOfXMMRegister(regop)); | 1279 AppendToBuffer("vmovapd %s,", NameOfXMMRegister(regop)); |
1271 current += PrintRightXMMOperand(current); | 1280 current += PrintRightXMMOperand(current); |
1272 break; | 1281 break; |
1273 case 0x29: | 1282 case 0x29: |
1274 AppendToBuffer("vmovapd "); | 1283 AppendToBuffer("vmovapd "); |
1275 current += PrintRightXMMOperand(current); | 1284 current += PrintRightXMMOperand(current); |
1276 AppendToBuffer(",%s", NameOfXMMRegister(regop)); | 1285 AppendToBuffer(",%s", NameOfXMMRegister(regop)); |
1277 break; | 1286 break; |
1278 case 0x2e: | 1287 case 0x2e: |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1582 current++; | 1591 current++; |
1583 if (rm == 4) { // SIB byte present. | 1592 if (rm == 4) { // SIB byte present. |
1584 current++; | 1593 current++; |
1585 } | 1594 } |
1586 if (mod == 1) { // Byte displacement. | 1595 if (mod == 1) { // Byte displacement. |
1587 current += 1; | 1596 current += 1; |
1588 } else if (mod == 2) { // 32-bit displacement. | 1597 } else if (mod == 2) { // 32-bit displacement. |
1589 current += 4; | 1598 current += 4; |
1590 } // else no immediate displacement. | 1599 } // else no immediate displacement. |
1591 AppendToBuffer("nop"); | 1600 AppendToBuffer("nop"); |
| 1601 } else if (opcode == 0x10) { |
| 1602 AppendToBuffer("movupd %s,", NameOfXMMRegister(regop)); |
| 1603 current += PrintRightXMMOperand(current); |
| 1604 } else if (opcode == 0x11) { |
| 1605 AppendToBuffer("movupd "); |
| 1606 current += PrintRightXMMOperand(current); |
| 1607 AppendToBuffer(",%s", NameOfXMMRegister(regop)); |
1592 } else if (opcode == 0x28) { | 1608 } else if (opcode == 0x28) { |
1593 AppendToBuffer("movapd %s,", NameOfXMMRegister(regop)); | 1609 AppendToBuffer("movapd %s,", NameOfXMMRegister(regop)); |
1594 current += PrintRightXMMOperand(current); | 1610 current += PrintRightXMMOperand(current); |
1595 } else if (opcode == 0x29) { | 1611 } else if (opcode == 0x29) { |
1596 AppendToBuffer("movapd "); | 1612 AppendToBuffer("movapd "); |
1597 current += PrintRightXMMOperand(current); | 1613 current += PrintRightXMMOperand(current); |
1598 AppendToBuffer(",%s", NameOfXMMRegister(regop)); | 1614 AppendToBuffer(",%s", NameOfXMMRegister(regop)); |
1599 } else if (opcode == 0x6E) { | 1615 } else if (opcode == 0x6E) { |
1600 AppendToBuffer("mov%c %s,", | 1616 AppendToBuffer("mov%c %s,", |
1601 rex_w() ? 'q' : 'd', | 1617 rex_w() ? 'q' : 'd', |
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2564 for (int i = 6 - static_cast<int>(pc - prev_pc); i >= 0; i--) { | 2580 for (int i = 6 - static_cast<int>(pc - prev_pc); i >= 0; i--) { |
2565 fprintf(f, " "); | 2581 fprintf(f, " "); |
2566 } | 2582 } |
2567 fprintf(f, " %s\n", buffer.start()); | 2583 fprintf(f, " %s\n", buffer.start()); |
2568 } | 2584 } |
2569 } | 2585 } |
2570 | 2586 |
2571 } // namespace disasm | 2587 } // namespace disasm |
2572 | 2588 |
2573 #endif // V8_TARGET_ARCH_X64 | 2589 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |