YJIT: add jb (unsigned less-than) instruction to backend (#8168)
This commit is contained in:
parent
98b4256aa7
commit
4f99240b2e
Notes:
git
2023-08-03 20:15:03 +00:00
Merged-By: maximecb <maximecb@ruby-lang.org>
@ -1085,6 +1085,9 @@ impl Assembler
|
|||||||
Insn::Jbe(target) => {
|
Insn::Jbe(target) => {
|
||||||
emit_conditional_jump::<{Condition::LS}>(cb, compile_side_exit(*target, self, ocb));
|
emit_conditional_jump::<{Condition::LS}>(cb, compile_side_exit(*target, self, ocb));
|
||||||
},
|
},
|
||||||
|
Insn::Jb(target) => {
|
||||||
|
emit_conditional_jump::<{Condition::CC}>(cb, compile_side_exit(*target, self, ocb));
|
||||||
|
},
|
||||||
Insn::Jo(target) => {
|
Insn::Jo(target) => {
|
||||||
emit_conditional_jump::<{Condition::VS}>(cb, compile_side_exit(*target, self, ocb));
|
emit_conditional_jump::<{Condition::VS}>(cb, compile_side_exit(*target, self, ocb));
|
||||||
},
|
},
|
||||||
|
@ -423,9 +423,12 @@ pub enum Insn {
|
|||||||
// Produces no output
|
// Produces no output
|
||||||
IncrCounter { mem: Opnd, value: Opnd },
|
IncrCounter { mem: Opnd, value: Opnd },
|
||||||
|
|
||||||
/// Jump if below or equal
|
/// Jump if below or equal (unsigned)
|
||||||
Jbe(Target),
|
Jbe(Target),
|
||||||
|
|
||||||
|
/// Jump if below (unsigned)
|
||||||
|
Jb(Target),
|
||||||
|
|
||||||
/// Jump if equal
|
/// Jump if equal
|
||||||
Je(Target),
|
Je(Target),
|
||||||
|
|
||||||
@ -579,6 +582,7 @@ impl Insn {
|
|||||||
Insn::FrameTeardown => "FrameTeardown",
|
Insn::FrameTeardown => "FrameTeardown",
|
||||||
Insn::IncrCounter { .. } => "IncrCounter",
|
Insn::IncrCounter { .. } => "IncrCounter",
|
||||||
Insn::Jbe(_) => "Jbe",
|
Insn::Jbe(_) => "Jbe",
|
||||||
|
Insn::Jb(_) => "Jb",
|
||||||
Insn::Je(_) => "Je",
|
Insn::Je(_) => "Je",
|
||||||
Insn::Jl(_) => "Jl",
|
Insn::Jl(_) => "Jl",
|
||||||
Insn::Jg(_) => "Jg",
|
Insn::Jg(_) => "Jg",
|
||||||
@ -727,6 +731,7 @@ impl<'a> Iterator for InsnOpndIterator<'a> {
|
|||||||
Insn::FrameSetup |
|
Insn::FrameSetup |
|
||||||
Insn::FrameTeardown |
|
Insn::FrameTeardown |
|
||||||
Insn::Jbe(_) |
|
Insn::Jbe(_) |
|
||||||
|
Insn::Jb(_) |
|
||||||
Insn::Je(_) |
|
Insn::Je(_) |
|
||||||
Insn::Jl(_) |
|
Insn::Jl(_) |
|
||||||
Insn::Jg(_) |
|
Insn::Jg(_) |
|
||||||
@ -825,6 +830,7 @@ impl<'a> InsnOpndMutIterator<'a> {
|
|||||||
Insn::FrameSetup |
|
Insn::FrameSetup |
|
||||||
Insn::FrameTeardown |
|
Insn::FrameTeardown |
|
||||||
Insn::Jbe(_) |
|
Insn::Jbe(_) |
|
||||||
|
Insn::Jb(_) |
|
||||||
Insn::Je(_) |
|
Insn::Je(_) |
|
||||||
Insn::Jl(_) |
|
Insn::Jl(_) |
|
||||||
Insn::Jg(_) |
|
Insn::Jg(_) |
|
||||||
|
@ -709,6 +709,14 @@ impl Assembler
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Insn::Jb(target) => {
|
||||||
|
match compile_side_exit(*target, self, ocb) {
|
||||||
|
Target::CodePtr(code_ptr) | Target::SideExitPtr(code_ptr) => jb_ptr(cb, code_ptr),
|
||||||
|
Target::Label(label_idx) => jb_label(cb, label_idx),
|
||||||
|
Target::SideExit { .. } => unreachable!("Target::SideExit should have been compiled by compile_side_exit"),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
Insn::Jz(target) => {
|
Insn::Jz(target) => {
|
||||||
match compile_side_exit(*target, self, ocb) {
|
match compile_side_exit(*target, self, ocb) {
|
||||||
Target::CodePtr(code_ptr) | Target::SideExitPtr(code_ptr) => jz_ptr(cb, code_ptr),
|
Target::CodePtr(code_ptr) | Target::SideExitPtr(code_ptr) => jz_ptr(cb, code_ptr),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user