Mercurial > projects > ldc
comparison gen/runtime.cpp @ 445:cc40db549aea
Changed the handling of variadic intrinsics a bit.
Removed the -fp80 option and made real be 80bit floats on X86, this is what the D spec really says it should be and fixes a bunch of issues.
Changed the handling of parameter attributes to a bit more generalized approach.
Added sext/zext attributes for byte/short/ubyte/ushort parameters, fixes #60 .
Parameter attribs now properly set for intrinsic calls if necessary.
Made the tango.math.Math patch less intrusive.
Fixed/added some mini tests.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Fri, 01 Aug 2008 17:59:58 +0200 |
parents | 351c0077d0b3 |
children | d30c40f1128d |
comparison
equal
deleted
inserted
replaced
444:f2b5f86348ef | 445:cc40db549aea |
---|---|
163 const LLType* shortTy = LLType::Int16Ty; | 163 const LLType* shortTy = LLType::Int16Ty; |
164 const LLType* intTy = LLType::Int32Ty; | 164 const LLType* intTy = LLType::Int32Ty; |
165 const LLType* longTy = LLType::Int64Ty; | 165 const LLType* longTy = LLType::Int64Ty; |
166 const LLType* floatTy = LLType::FloatTy; | 166 const LLType* floatTy = LLType::FloatTy; |
167 const LLType* doubleTy = LLType::DoubleTy; | 167 const LLType* doubleTy = LLType::DoubleTy; |
168 const LLType* realTy = (global.params.useFP80) ? LLType::X86_FP80Ty : LLType::DoubleTy; | 168 const LLType* realTy; |
169 if (global.params.cpu == ARCHx86) | |
170 realTy = LLType::X86_FP80Ty; | |
171 else | |
172 realTy = LLType::DoubleTy; | |
169 const LLType* sizeTy = DtoSize_t(); | 173 const LLType* sizeTy = DtoSize_t(); |
170 const LLType* voidPtrTy = rt_ptr(byteTy); | 174 const LLType* voidPtrTy = rt_ptr(byteTy); |
171 const LLType* stringTy = rt_array(byteTy); | 175 const LLType* stringTy = rt_array(byteTy); |
172 const LLType* wstringTy = rt_array(shortTy); | 176 const LLType* wstringTy = rt_array(shortTy); |
173 const LLType* dstringTy = rt_array(intTy); | 177 const LLType* dstringTy = rt_array(intTy); |