1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:27:35 +00:00

LibJS/JIT: Expand Mul fast path to double & i32 combinations

Co-authored-by: Stephan Vedder <vedder@mbits.info>
This commit is contained in:
Simon Wanner 2023-11-10 09:06:43 +01:00 committed by Andreas Kling
parent 867b8146cf
commit a3399fa13a
2 changed files with 35 additions and 30 deletions

View file

@ -639,6 +639,18 @@ struct X86_64Assembler {
}
}
void mul(Operand dest, Operand src)
{
if (dest.type == Operand::Type::FReg && src.type == Operand::Type::FReg) {
emit8(0xf2);
emit8(0x0f);
emit8(0x59);
emit_modrm_rm(dest, src);
} else {
VERIFY_NOT_REACHED();
}
}
void mul32(Operand dest, Operand src, Optional<Label&> overflow_label)
{
// imul32 dest, src (32-bit signed)