| 433 | } |
| 434 | |
| 435 | Value* ConvertFirstForSecond(Value *V, TypeInfo *firstType, TypeInfo *secondType) |
| 436 | { |
| 437 | asmDataType fDT = firstType->dataType, sDT = secondType->dataType; |
| 438 | asmStackType first = stackTypeForDataType(fDT), second = stackTypeForDataType(sDT); |
| 439 | if(first == STYPE_INT && second == STYPE_DOUBLE) |
| 440 | return Builder.CreateSIToFP(V, Type::getDoubleTy(getGlobalContext()), "tmp_itod"); |
| 441 | if(first == STYPE_LONG && second == STYPE_DOUBLE) |
| 442 | return Builder.CreateSIToFP(V, Type::getDoubleTy(getGlobalContext()), "tmp_ltod"); |
| 443 | if(first == STYPE_INT && second == STYPE_LONG) |
| 444 | return Builder.CreateIntCast(V, Type::getInt64Ty(getGlobalContext()), true, "tmp_itol"); |
| 445 | |
| 446 | return V; |
| 447 | } |
| 448 | |
| 449 | TypeInfo* GetStackType(TypeInfo* type) |
| 450 | { |
no test coverage detected