stage2: Manually lower softfloat ops when needed

Updates stage2 to manually lower softfloat operations for all unary
floating point operations and arithmetic.

Softfloat support still needs to be added for conversion operators
(float<->float and int<->float)
This commit is contained in:
Cody Tapscott
2022-04-26 15:19:55 -07:00
committed by Andrew Kelley
parent 0e8242b905
commit 7d6a6ce87f
4 changed files with 286 additions and 142 deletions

View File

@@ -541,6 +541,10 @@ LLVMValueRef ZigLLVMBuildUShlSat(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRe
return wrap(call_inst);
}
LLVMValueRef LLVMBuildVectorSplat(LLVMBuilderRef B, unsigned elem_count, LLVMValueRef V, const char *Name) {
return wrap(unwrap(B)->CreateVectorSplat(elem_count, unwrap(V), Name));
}
void ZigLLVMFnSetSubprogram(LLVMValueRef fn, ZigLLVMDISubprogram *subprogram) {
assert( isa<Function>(unwrap(fn)) );
Function *unwrapped_function = reinterpret_cast<Function*>(unwrap(fn));