Index: src/x64/disasm-x64.cc |
diff --git a/src/x64/disasm-x64.cc b/src/x64/disasm-x64.cc |
index d8d6dbb23bca454cb7716b60c51b32df4d6f5ff8..19bcf663823caacc108deabcc921cf3a437dd0db 100644 |
--- a/src/x64/disasm-x64.cc |
+++ b/src/x64/disasm-x64.cc |
@@ -860,12 +860,22 @@ int DisassemblerX64::FPUInstruction(byte* data) { |
return count + 1; |
} |
} else if (b1 == 0xDD) { |
- if ((b2 & 0xF8) == 0xC0) { |
- AppendToBuffer("ffree st%d", b2 & 0x7); |
+ int mod, regop, rm; |
+ get_modrm(*(data + 1), &mod, ®op, &rm); |
+ if (mod == 3) { |
+ switch (regop) { |
+ case 0: |
+ AppendToBuffer("ffree st%d", rm & 7); |
+ break; |
+ case 2: |
+ AppendToBuffer("fstp st%d", rm & 7); |
+ break; |
+ default: |
+ UnimplementedInstruction(); |
+ break; |
+ } |
return 2; |
} else { |
- int mod, regop, rm; |
- get_modrm(*(data + 1), &mod, ®op, &rm); |
const char* mnem = "?"; |
switch (regop) { |
case 0: |