1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 19:17:44 +00:00

LibJS/JIT: Add helper for generating combined i32 & double fastpaths

Co-authored-by: Stephan Vedder <vedder@mbits.info>
This commit is contained in:
Simon Wanner 2023-11-10 09:03:15 +01:00 committed by Andreas Kling
parent 578912aa6c
commit d91b376393
3 changed files with 115 additions and 0 deletions

View file

@ -954,6 +954,17 @@ struct X86_64Assembler {
}
}
void convert_i32_to_double(Operand dst, Operand src)
{
VERIFY(dst.type == Operand::Type::FReg);
VERIFY(src.is_register_or_memory());
emit8(0xf2);
emit8(0x0f);
emit8(0x2a);
emit_modrm_rm(dst, src);
}
void native_call(
u64 callee,
Vector<Operand> const& preserved_registers = {},