mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:37:36 +00:00
LibJS/JIT: Use the x86_64 setcc instruction to remove a branch
This commit is contained in:
parent
1d76738dde
commit
d3b3e49e19
3 changed files with 17 additions and 16 deletions
|
@ -569,6 +569,14 @@ struct X86_64Assembler {
|
|||
jump_if(condition, label);
|
||||
}
|
||||
|
||||
void set_if(Condition condition, Operand dst)
|
||||
{
|
||||
emit_rex_for_slash(dst, REX_W::No);
|
||||
emit8(0x0f);
|
||||
emit8(0x90 | to_underlying(condition));
|
||||
emit_modrm_slash(0, dst);
|
||||
}
|
||||
|
||||
void sign_extend_32_to_64_bits(Reg reg)
|
||||
{
|
||||
mov32(Operand::Register(reg), Operand::Register(reg), Extension::SignExtend);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue