提交 a9253935 编写于 作者: 3 3dgen

修正二元运算返回值类型错误的问题

上级 89b915a1
......@@ -61,21 +61,27 @@ func EmitBinOp(x, y Value, op wat.OpCode) ([]wat.Inst, ValueType) {
case wat.OpCodeEql:
insts = append(insts, wat.NewInstEq(rtype))
r = I32{}
case wat.OpCodeNe:
insts = append(insts, wat.NewInstNe(rtype))
r = I32{}
case wat.OpCodeLt:
insts = append(insts, wat.NewInstLt(rtype))
r = I32{}
case wat.OpCodeGt:
insts = append(insts, wat.NewInstGt(rtype))
r = I32{}
case wat.OpCodeLe:
insts = append(insts, wat.NewInstLe(rtype))
r = I32{}
case wat.OpCodeGe:
insts = append(insts, wat.NewInstGe(rtype))
r = I32{}
default:
logger.Fatal("Todo")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册