Fix bug with opt_lt, csel on x86
This commit is contained in:
parent
477c2df3fa
commit
e9f9b8f43b
@ -418,36 +418,36 @@ impl Assembler
|
|||||||
Op::Breakpoint => int3(cb),
|
Op::Breakpoint => int3(cb),
|
||||||
|
|
||||||
Op::CSelZ => {
|
Op::CSelZ => {
|
||||||
mov(cb, insn.out.into(), insn.opnds[1].into());
|
mov(cb, insn.out.into(), insn.opnds[0].into());
|
||||||
cmovz(cb, insn.out.into(), insn.opnds[0].into());
|
cmovnz(cb, insn.out.into(), insn.opnds[1].into());
|
||||||
},
|
},
|
||||||
Op::CSelNZ => {
|
Op::CSelNZ => {
|
||||||
mov(cb, insn.out.into(), insn.opnds[1].into());
|
mov(cb, insn.out.into(), insn.opnds[0].into());
|
||||||
cmovnz(cb, insn.out.into(), insn.opnds[0].into());
|
cmovz(cb, insn.out.into(), insn.opnds[1].into());
|
||||||
},
|
},
|
||||||
Op::CSelE => {
|
Op::CSelE => {
|
||||||
mov(cb, insn.out.into(), insn.opnds[1].into());
|
mov(cb, insn.out.into(), insn.opnds[0].into());
|
||||||
cmove(cb, insn.out.into(), insn.opnds[0].into());
|
cmovne(cb, insn.out.into(), insn.opnds[1].into());
|
||||||
},
|
},
|
||||||
Op::CSelNE => {
|
Op::CSelNE => {
|
||||||
mov(cb, insn.out.into(), insn.opnds[1].into());
|
mov(cb, insn.out.into(), insn.opnds[0].into());
|
||||||
cmovne(cb, insn.out.into(), insn.opnds[0].into());
|
cmove(cb, insn.out.into(), insn.opnds[1].into());
|
||||||
},
|
},
|
||||||
Op::CSelL => {
|
Op::CSelL => {
|
||||||
mov(cb, insn.out.into(), insn.opnds[1].into());
|
mov(cb, insn.out.into(), insn.opnds[0].into());
|
||||||
cmovl(cb, insn.out.into(), insn.opnds[0].into());
|
cmovge(cb, insn.out.into(), insn.opnds[1].into());
|
||||||
},
|
},
|
||||||
Op::CSelLE => {
|
Op::CSelLE => {
|
||||||
mov(cb, insn.out.into(), insn.opnds[1].into());
|
mov(cb, insn.out.into(), insn.opnds[0].into());
|
||||||
cmovle(cb, insn.out.into(), insn.opnds[0].into());
|
cmovg(cb, insn.out.into(), insn.opnds[1].into());
|
||||||
},
|
},
|
||||||
Op::CSelG => {
|
Op::CSelG => {
|
||||||
mov(cb, insn.out.into(), insn.opnds[1].into());
|
mov(cb, insn.out.into(), insn.opnds[0].into());
|
||||||
cmovg(cb, insn.out.into(), insn.opnds[0].into());
|
cmovle(cb, insn.out.into(), insn.opnds[1].into());
|
||||||
},
|
},
|
||||||
Op::CSelGE => {
|
Op::CSelGE => {
|
||||||
mov(cb, insn.out.into(), insn.opnds[1].into());
|
mov(cb, insn.out.into(), insn.opnds[0].into());
|
||||||
cmovge(cb, insn.out.into(), insn.opnds[0].into());
|
cmovl(cb, insn.out.into(), insn.opnds[1].into());
|
||||||
},
|
},
|
||||||
|
|
||||||
// We want to keep the panic here because some instructions that
|
// We want to keep the panic here because some instructions that
|
||||||
|
@ -5990,7 +5990,7 @@ fn get_gen_fn(opcode: VALUE) -> Option<InsnGenFn> {
|
|||||||
YARVINSN_newarray => Some(gen_newarray),
|
YARVINSN_newarray => Some(gen_newarray),
|
||||||
//YARVINSN_duparray => Some(gen_duparray),
|
//YARVINSN_duparray => Some(gen_duparray),
|
||||||
//YARVINSN_checktype => Some(gen_checktype),
|
//YARVINSN_checktype => Some(gen_checktype),
|
||||||
//YARVINSN_opt_lt => Some(gen_opt_lt),
|
YARVINSN_opt_lt => Some(gen_opt_lt),
|
||||||
/*
|
/*
|
||||||
YARVINSN_opt_le => Some(gen_opt_le),
|
YARVINSN_opt_le => Some(gen_opt_le),
|
||||||
YARVINSN_opt_gt => Some(gen_opt_gt),
|
YARVINSN_opt_gt => Some(gen_opt_gt),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user