about summary refs log tree commit diff stats
path: root/033check_operands.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-09-30 22:50:26 -0700
committerKartik Agaram <vc@akkartik.com>2020-09-30 22:53:14 -0700
commit656b840e7f5ee0eff08729146c4fc797c63968e1 (patch)
treeacea188c1be9794879f10c7e37e28c98061a4e78 /033check_operands.cc
parentd564633b240cfc0e8bfe49098a6ac49abf688a76 (diff)
downloadmu-656b840e7f5ee0eff08729146c4fc797c63968e1.tar.gz
6911 - comparing floats
It turns out floating-point operations set different flags than most instructions.
We have to branch on them using unsigned jumps.

https://stackoverflow.com/questions/7057501/x86-assembler-floating-point-compare/7057771#7057771
Diffstat (limited to '033check_operands.cc')
-rw-r--r--033check_operands.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/033check_operands.cc b/033check_operands.cc
index 66f74e80..7089bbb2 100644
--- a/033check_operands.cc
+++ b/033check_operands.cc
@@ -677,7 +677,8 @@ put_new(Permitted_arguments_0f, "8f", 0x10);
 //// Class M: using ModR/M byte
 //  imm32 imm8  disp32 |disp16  disp8 subop modrm
 //  0     0     0      |0       0     0     1
-put_new(Permitted_arguments_0f, "af", 0x01);
+put_new(Permitted_arguments_0f, "2f", 0x01);  // compare floats
+put_new(Permitted_arguments_0f, "af", 0x01);  // multiply ints
 // setcc
 put_new(Permitted_arguments_0f, "92", 0x01);
 put_new(Permitted_arguments_0f, "93", 0x01);