Reviewers: Benedikt Meurer,

Description:
Fix disassembly of sar(_, imm8)

Please review this at https://codereview.chromium.org/442003002/

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

Affected files (+2, -2 lines):
  M src/ia32/disasm-ia32.cc
  M src/x87/disasm-x87.cc


Index: src/ia32/disasm-ia32.cc
diff --git a/src/ia32/disasm-ia32.cc b/src/ia32/disasm-ia32.cc
index cb2efd4a97c69c88d1169b56b1389ea82c7c7f13..22c2a55c17b9413c413fd064bbbf2bbf68c3d1ea 100644
--- a/src/ia32/disasm-ia32.cc
+++ b/src/ia32/disasm-ia32.cc
@@ -606,7 +606,7 @@ int DisassemblerIA32::D1D3C1Instruction(byte* data) {
   if (op == 0xD1) {
     imm8 = 1;
   } else if (op == 0xC1) {
-    imm8 = *(data + 2);
+    imm8 = *(data + 1);
     count++;
   } else if (op == 0xD3) {
     // Shift/rotate by cl.
Index: src/x87/disasm-x87.cc
diff --git a/src/x87/disasm-x87.cc b/src/x87/disasm-x87.cc
index 51afa7d10c781d9c92f8eea05acfa85162d5b43c..53a8c2906703668e9622611fabbbce8d5b551426 100644
--- a/src/x87/disasm-x87.cc
+++ b/src/x87/disasm-x87.cc
@@ -606,7 +606,7 @@ int DisassemblerX87::D1D3C1Instruction(byte* data) {
   if (op == 0xD1) {
     imm8 = 1;
   } else if (op == 0xC1) {
-    imm8 = *(data + 2);
+    imm8 = *(data + 1);
     count++;
   } else if (op == 0xD3) {
     // Shift/rotate by cl.


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to