Reviewers: Lasse Reichstein,

Description:
X64: Add mov rax,(mem64) to disassembler.

Please review this at http://codereview.chromium.org/159397

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
   M     src/x64/disasm-x64.cc


Index: src/x64/disasm-x64.cc
===================================================================
--- src/x64/disasm-x64.cc       (revision 2535)
+++ src/x64/disasm-x64.cc       (working copy)
@@ -1343,6 +1343,46 @@
          data += 2;
          break;

+      case 0xA1:
+        switch (operand_size()) {
+          case DOUBLEWORD_SIZE:
+            AppendToBuffer("movzxlq rax,(%s)", NameOfAddress(
+                reinterpret_cast<byte*>(
+                    *reinterpret_cast<int32_t*>(data + 1))));
+            data += 5;
+            break;
+          case QUADWORD_SIZE:
+            // New x64 instruction mov rax,(imm_64).
+            AppendToBuffer("movq rax,(%s)",
+                            
NameOfAddress(*reinterpret_cast<byte**>(data+1)));
+            data += 9;
+            break;
+          default:
+            UnimplementedInstruction();
+            data += 2;
+        }
+        break;
+
+      case 0xA3:
+        switch (operand_size()) {
+          case DOUBLEWORD_SIZE:
+            AppendToBuffer("movzxlq (%s),rax", NameOfAddress(
+                reinterpret_cast<byte*>(
+                    *reinterpret_cast<int32_t*>(data + 1))));
+            data += 5;
+            break;
+          case QUADWORD_SIZE:
+            // New x64 instruction mov (imm_64), rax.
+            AppendToBuffer("movq (%s),rax",
+                            
NameOfAddress(*reinterpret_cast<byte**>(data+1)));
+            data += 9;
+            break;
+          default:
+            UnimplementedInstruction();
+            data += 2;
+        }
+        break;
+
        case 0xA8:
          AppendToBuffer("test al,0x%x", *reinterpret_cast<uint8_t*>(data +  
1));
          data += 2;



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to