- fixed: String comparisons with constants did not work.
This commit is contained in:
parent
fb2a843c03
commit
5151547df0
2 changed files with 7 additions and 0 deletions
|
|
@ -3251,10 +3251,15 @@ ExpEmit FxCompareEq::Emit(VMFunctionBuilder *build)
|
|||
int a = Operator == TK_Eq ? CMP_EQ :
|
||||
Operator == TK_Neq ? CMP_EQ | CMP_CHECK : CMP_EQ | CMP_APPROX;
|
||||
|
||||
if (op1.Konst) a|= CMP_BK;
|
||||
if (op2.Konst) a |= CMP_CK;
|
||||
|
||||
build->Emit(OP_LI, to.RegNum, 0, 0);
|
||||
build->Emit(OP_CMPS, a, op1.RegNum, op2.RegNum);
|
||||
build->Emit(OP_JMP, 1);
|
||||
build->Emit(OP_LI, to.RegNum, 1);
|
||||
op1.Free(build);
|
||||
op2.Free(build);
|
||||
return to;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue