From 656b840e7f5ee0eff08729146c4fc797c63968e1 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Wed, 30 Sep 2020 22:50:26 -0700 Subject: 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 --- 033check_operands.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '033check_operands.cc') 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); -- cgit 1.4.1-2-gfad0