mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 17:25:21 +00:00
Use simplified ConstantFP::get method, fix a bug handling frem x, 0 with long doubles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49976 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -307,12 +307,11 @@ static const fltSemantics &SemanticsForType(Type *Ty) {
|
||||
LLVMValueRef LLVMConstReal(LLVMTypeRef RealTy, double N) {
|
||||
APFloat APN(N);
|
||||
APN.convert(SemanticsForType(unwrap(RealTy)), APFloat::rmNearestTiesToEven);
|
||||
return wrap(ConstantFP::get(unwrap(RealTy), APN));
|
||||
return wrap(ConstantFP::get(APN));
|
||||
}
|
||||
|
||||
LLVMValueRef LLVMConstRealOfString(LLVMTypeRef RealTy, const char *Text) {
|
||||
return wrap(ConstantFP::get(unwrap(RealTy),
|
||||
APFloat(SemanticsForType(unwrap(RealTy)), Text)));
|
||||
return wrap(ConstantFP::get(APFloat(SemanticsForType(unwrap(RealTy)), Text)));
|
||||
}
|
||||
|
||||
/*--.. Operations on composite constants ...................................--*/
|
||||
|
Reference in New Issue
Block a user