mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibJIT: Support unordered double comparison
This commit is contained in:
parent
a698c51a5b
commit
578912aa6c
Notes:
sideshowbarker
2024-07-17 01:53:23 +09:00
Author: https://github.com/skyrising Commit: https://github.com/SerenityOS/serenity/commit/578912aa6c Pull-request: https://github.com/SerenityOS/serenity/pull/21855
1 changed files with 12 additions and 0 deletions
|
@ -135,10 +135,15 @@ struct X86_64Assembler {
|
|||
UnsignedGreaterThanOrEqualTo = 0x3,
|
||||
UnsignedLessThan = 0x2,
|
||||
UnsignedLessThanOrEqualTo = 0x6,
|
||||
ParityEven = 0xA,
|
||||
ParityOdd = 0xB,
|
||||
SignedGreaterThan = 0xF,
|
||||
SignedGreaterThanOrEqualTo = 0xD,
|
||||
SignedLessThan = 0xC,
|
||||
SignedLessThanOrEqualTo = 0xE,
|
||||
|
||||
Unordered = ParityEven,
|
||||
NotUnordered = ParityOdd,
|
||||
};
|
||||
|
||||
static constexpr u8 encode_reg(Reg reg)
|
||||
|
@ -521,6 +526,13 @@ struct X86_64Assembler {
|
|||
emit8(0x81);
|
||||
emit_modrm_slash(7, lhs);
|
||||
emit32(rhs.offset_or_immediate);
|
||||
} else if (lhs.type == Operand::Type::FReg && (rhs.type == Operand::Type::FReg || rhs.type == Operand::Type::Mem64BaseAndOffset)) {
|
||||
// ucomisd lhs, rhs
|
||||
emit8(0x66);
|
||||
emit_rex_for_mr(lhs, rhs, REX_W::No);
|
||||
emit8(0x0f);
|
||||
emit8(0x2e);
|
||||
emit_modrm_mr(lhs, rhs);
|
||||
} else {
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue