Index: src/ia32/disasm-ia32.cc |
=================================================================== |
--- src/ia32/disasm-ia32.cc (revision 4104) |
+++ src/ia32/disasm-ia32.cc (working copy) |
@@ -1069,12 +1069,26 @@ |
} else { |
UnimplementedInstruction(); |
} |
- } else if (*data == 0x2F) { |
+ } else if (*data == 0x2E || *data == 0x2F) { |
+ const char* mnem = (*data == 0x2E) ? "ucomisd" : "comisd"; |
data++; |
int mod, regop, rm; |
get_modrm(*data, &mod, ®op, &rm); |
- AppendToBuffer("comisd %s,%s", |
- NameOfXMMRegister(regop), |
+ if (mod == 0x3) { |
+ AppendToBuffer("%s %s,%s", mnem, |
+ NameOfXMMRegister(regop), |
+ NameOfXMMRegister(rm)); |
+ data++; |
+ } else { |
+ AppendToBuffer("%s %s,", mnem, NameOfXMMRegister(regop)); |
+ data += PrintRightOperand(data); |
+ } |
+ } else if (*data == 0x50) { |
+ data++; |
+ int mod, regop, rm; |
+ get_modrm(*data, &mod, ®op, &rm); |
+ AppendToBuffer("movmskpd %s,%s", |
+ NameOfCPURegister(regop), |
NameOfXMMRegister(rm)); |
data++; |
} else if (*data == 0x57) { |
@@ -1198,6 +1212,7 @@ |
const char* mnem = "?"; |
switch (b2) { |
case 0x2A: mnem = "cvtsi2sd"; break; |
+ case 0x2C: mnem = "cvttsd2si"; break; |
case 0x51: mnem = "sqrtsd"; break; |
case 0x58: mnem = "addsd"; break; |
case 0x59: mnem = "mulsd"; break; |
@@ -1208,14 +1223,38 @@ |
int mod, regop, rm; |
get_modrm(*data, &mod, ®op, &rm); |
if (b2 == 0x2A) { |
- AppendToBuffer("%s %s,", mnem, NameOfXMMRegister(regop)); |
- data += PrintRightOperand(data); |
+ if (mod != 0x3) { |
+ AppendToBuffer("%s %s,", mnem, NameOfXMMRegister(regop)); |
+ data += PrintRightOperand(data); |
+ } else { |
+ AppendToBuffer("%s %s,%s", |
+ mnem, |
+ NameOfXMMRegister(regop), |
+ NameOfCPURegister(rm)); |
+ data++; |
+ } |
+ } else if (b2 == 0x2C) { |
+ if (mod != 0x3) { |
+ AppendToBuffer("%s %s,", mnem, NameOfCPURegister(regop)); |
+ data += PrintRightOperand(data); |
+ } else { |
+ AppendToBuffer("%s %s,%s", |
+ mnem, |
+ NameOfCPURegister(regop), |
+ NameOfXMMRegister(rm)); |
+ data++; |
+ } |
} else { |
- AppendToBuffer("%s %s,%s", |
- mnem, |
- NameOfXMMRegister(regop), |
- NameOfXMMRegister(rm)); |
- data++; |
+ if (mod != 0x3) { |
+ AppendToBuffer("%s %s,", mnem, NameOfXMMRegister(regop)); |
+ data += PrintRightOperand(data); |
+ } else { |
+ AppendToBuffer("%s %s,%s", |
+ mnem, |
+ NameOfXMMRegister(regop), |
+ NameOfXMMRegister(rm)); |
+ data++; |
+ } |
ricowindcs_gmail.com
2010/03/11 18:20:04
The conditionals above could potentially be made m
|
} |
} |
} else { |