提交 12da4d92 编写于 作者: Z Zihao Yu

cpu,relop: fix signed comparasion for ISA64

上级 c88cfbdc
......@@ -7,10 +7,10 @@ bool interpret_relop(uint32_t relop, const rtlreg_t src1, const rtlreg_t src2) {
case RELOP_TRUE: return true;
case RELOP_EQ: return src1 == src2;
case RELOP_NE: return src1 != src2;
case RELOP_LT: return (int32_t)src1 < (int32_t)src2;
case RELOP_LE: return (int32_t)src1 <= (int32_t)src2;
case RELOP_GT: return (int32_t)src1 > (int32_t)src2;
case RELOP_GE: return (int32_t)src1 >= (int32_t)src2;
case RELOP_LT: return (sword_t)src1 < (sword_t)src2;
case RELOP_LE: return (sword_t)src1 <= (sword_t)src2;
case RELOP_GT: return (sword_t)src1 > (sword_t)src2;
case RELOP_GE: return (sword_t)src1 >= (sword_t)src2;
case RELOP_LTU: return src1 < src2;
case RELOP_LEU: return src1 <= src2;
case RELOP_GTU: return src1 > src2;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册