about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-08-11 10:22:51 -0700
committerKartik Agaram <vc@akkartik.com>2018-08-11 10:22:51 -0700
commit99e48220f999ecd8f9535675c2d3432202abf57a (patch)
treeef4dea5cf8d2c26f95c2876d65b443a786614674
parentad1068b3b4ee08654722e52153faf59fe0122561 (diff)
downloadmu-99e48220f999ecd8f9535675c2d3432202abf57a.tar.gz
4501
-rw-r--r--subx/030---operands.cc4
-rw-r--r--subx/031check_operands.cc2
2 files changed, 4 insertions, 2 deletions
diff --git a/subx/030---operands.cc b/subx/030---operands.cc
index 1a4f0f10..0ae76ad5 100644
--- a/subx/030---operands.cc
+++ b/subx/030---operands.cc
@@ -165,10 +165,12 @@ void pack_operands(line& inst) {
 
 void add_opcodes(const line& in, line& out) {
   out.words.push_back(in.words.at(0));
-  if (in.words.at(0).data == "0f" || in.words.at(0).data == "f3")
+  if (in.words.at(0).data == "0f" || in.words.at(0).data == "f2" || in.words.at(0).data == "f3")
     out.words.push_back(in.words.at(1));
   if (in.words.at(0).data == "f3" && in.words.at(1).data == "0f")
     out.words.push_back(in.words.at(2));
+  if (in.words.at(0).data == "f2" && in.words.at(1).data == "0f")
+    out.words.push_back(in.words.at(2));
 }
 
 void add_modrm_byte(const line& in, line& out) {
diff --git a/subx/031check_operands.cc b/subx/031check_operands.cc
index 73a6e3d3..6afab0a6 100644
--- a/subx/031check_operands.cc
+++ b/subx/031check_operands.cc
@@ -266,7 +266,7 @@ bool has_operands(const line& inst) {
 
 int first_operand(const line& inst) {
   if (inst.words.at(0).data == "0f") return 2;
-  if (inst.words.at(0).data == "f3") {
+  if (inst.words.at(0).data == "f2" || inst.words.at(0).data == "f3") {
     if (inst.words.at(1).data == "0f")
       return 3;
     else