Improve x86 long multiply and shifts
Generate inline code for long shifts by constants and do long
multiplication inline. Convert multiplication by a constant to a
shift when we can. Fix some x86 assembler problems and add the new
instructions that were needed (64 bit shifts).
Change-Id: I6237a31c36159096e399d40d01eb6bfa22ac2772
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
diff --git a/disassembler/disassembler_x86.cc b/disassembler/disassembler_x86.cc
index 6d82f0a..67b8fa9 100644
--- a/disassembler/disassembler_x86.cc
+++ b/disassembler/disassembler_x86.cc
@@ -485,6 +485,18 @@
has_modrm = true;
store = true;
break;
+ case 0xA4:
+ opcode << "shld";
+ has_modrm = true;
+ load = true;
+ immediate_bytes = 1;
+ break;
+ case 0xAC:
+ opcode << "shrd";
+ has_modrm = true;
+ load = true;
+ immediate_bytes = 1;
+ break;
case 0xAE:
if (prefix[0] == 0xF3) {
prefix[0] = 0; // clear prefix now it's served its purpose as part of the opcode