diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-10-02 01:06:47 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-25 14:36:46 +0200 |
commit | fa03e7d230f2625c384ca9a7c314b6d05ab44e70 (patch) | |
tree | 3304f6b7b6bd2953e4b4da75bf0387650a9eaa90 /executor/x86_64 | |
parent | b124548bcee1ab6d034d4499fe695073566ae37d (diff) |
Switch signed<->unsigned asm instructions for logical op
Diffstat (limited to 'executor/x86_64')
-rw-r--r-- | executor/x86_64/executor.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/executor/x86_64/executor.c b/executor/x86_64/executor.c index 7591dcf..65f8baa 100644 --- a/executor/x86_64/executor.c +++ b/executor/x86_64/executor.c @@ -505,7 +505,7 @@ int amal_exec_ilt(amal_executor *self, AmalReg dst_reg, AmalReg src_reg1, AmalRe asm_xor_rm64(&impl->asm, rcx_op.value.reg, rcx_op.value.reg); asm_mov(&impl->asm, &rax_op, &src_op1); asm_cmp(&impl->asm, &rax_op, &src_op2); - asm_setb_r(&impl->asm, rcx_op.value.reg); + asm_setl_r(&impl->asm, rcx_op.value.reg); asm_mov(&impl->asm, &dst_op, &rcx_op); return 0; } @@ -522,7 +522,7 @@ int amal_exec_ile(amal_executor *self, AmalReg dst_reg, AmalReg src_reg1, AmalRe asm_xor_rm64(&impl->asm, rcx_op.value.reg, rcx_op.value.reg); asm_mov(&impl->asm, &rax_op, &src_op1); asm_cmp(&impl->asm, &rax_op, &src_op2); - asm_setbe_r(&impl->asm, rcx_op.value.reg); + asm_setle_r(&impl->asm, rcx_op.value.reg); asm_mov(&impl->asm, &dst_op, &rcx_op); return 0; } @@ -539,7 +539,7 @@ int amal_exec_igt(amal_executor *self, AmalReg dst_reg, AmalReg src_reg1, AmalRe asm_xor_rm64(&impl->asm, rcx_op.value.reg, rcx_op.value.reg); asm_mov(&impl->asm, &rax_op, &src_op1); asm_cmp(&impl->asm, &rax_op, &src_op2); - asm_seta_r(&impl->asm, rcx_op.value.reg); + asm_setg_r(&impl->asm, rcx_op.value.reg); asm_mov(&impl->asm, &dst_op, &rcx_op); return 0; } @@ -556,7 +556,7 @@ int amal_exec_ige(amal_executor *self, AmalReg dst_reg, AmalReg src_reg1, AmalRe asm_xor_rm64(&impl->asm, rcx_op.value.reg, rcx_op.value.reg); asm_mov(&impl->asm, &rax_op, &src_op1); asm_cmp(&impl->asm, &rax_op, &src_op2); - asm_setae_r(&impl->asm, rcx_op.value.reg); + asm_setge_r(&impl->asm, rcx_op.value.reg); asm_mov(&impl->asm, &dst_op, &rcx_op); return 0; } @@ -573,7 +573,7 @@ int amal_exec_lt(amal_executor *self, AmalReg dst_reg, AmalReg src_reg1, AmalReg asm_xor_rm64(&impl->asm, rcx_op.value.reg, rcx_op.value.reg); asm_mov(&impl->asm, &rax_op, &src_op1); asm_cmp(&impl->asm, &rax_op, &src_op2); - asm_setl_r(&impl->asm, rcx_op.value.reg); + asm_setb_r(&impl->asm, rcx_op.value.reg); asm_mov(&impl->asm, &dst_op, &rcx_op); return 0; } @@ -590,7 +590,7 @@ int amal_exec_le(amal_executor *self, AmalReg dst_reg, AmalReg src_reg1, AmalReg asm_xor_rm64(&impl->asm, rcx_op.value.reg, rcx_op.value.reg); asm_mov(&impl->asm, &rax_op, &src_op1); asm_cmp(&impl->asm, &rax_op, &src_op2); - asm_setle_r(&impl->asm, rcx_op.value.reg); + asm_setbe_r(&impl->asm, rcx_op.value.reg); asm_mov(&impl->asm, &dst_op, &rcx_op); return 0; } @@ -607,7 +607,7 @@ int amal_exec_gt(amal_executor *self, AmalReg dst_reg, AmalReg src_reg1, AmalReg asm_xor_rm64(&impl->asm, rcx_op.value.reg, rcx_op.value.reg); asm_mov(&impl->asm, &rax_op, &src_op1); asm_cmp(&impl->asm, &rax_op, &src_op2); - asm_setg_r(&impl->asm, rcx_op.value.reg); + asm_seta_r(&impl->asm, rcx_op.value.reg); asm_mov(&impl->asm, &dst_op, &rcx_op); return 0; } @@ -624,7 +624,7 @@ int amal_exec_ge(amal_executor *self, AmalReg dst_reg, AmalReg src_reg1, AmalReg asm_xor_rm64(&impl->asm, rcx_op.value.reg, rcx_op.value.reg); asm_mov(&impl->asm, &rax_op, &src_op1); asm_cmp(&impl->asm, &rax_op, &src_op2); - asm_setge_r(&impl->asm, rcx_op.value.reg); + asm_setae_r(&impl->asm, rcx_op.value.reg); asm_mov(&impl->asm, &dst_op, &rcx_op); return 0; } |