1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixed EmitNumericCast immediate issue

This commit is contained in:
Brian Fiete 2023-03-14 14:23:45 -07:00
parent dd22fa056f
commit 5e0e399209

View file

@ -1007,6 +1007,13 @@ void CeBuilder::EmitBinaryOp(CeOp iOp, CeOp fOp, const CeOperand& lhs, const CeO
CeOperand CeBuilder::EmitNumericCast(const CeOperand& ceValue, BeType* toType, bool valSigned, bool toSigned)
{
if (ceValue.mKind == CeOperandKind_Immediate)
{
CeOperand newVal = ceValue;
newVal.mType = toType;
return newVal;
}
CeOperand result;
auto fromType = ceValue.mType;