search for: converttointeg

Displaying 7 results from an estimated 7 matches for "converttointeg".

Did you mean: converttointeger
2008 Jan 23
4
[LLVMdev] Complex constant expressions?
...just >> the problem of float to int conversions: >> >> char B[ (int)3.0 ]; >> >> Generating code for this is relatively simple; Converting >> arbitrary-sized APFloats to arbitrary-sized APInts isn't quite as >> easy. >> > > APFloat::convertToInteger does just this. Why can't you use it? > Well, I may be using it wrong. But looking at APFloat.h, I see four functions that purport to convert to integer: opStatus convertToInteger(integerPart *, unsigned int, bool, roundingMode) const; opStatus convertFromS...
2008 Jan 23
0
[LLVMdev] Complex constant expressions?
Talin wrote:- > Well, I may be using it wrong. But looking at APFloat.h, I see four > functions that purport to convert to integer: > > opStatus convertToInteger(integerPart *, unsigned int, bool, > roundingMode) const; > opStatus convertFromSignExtendedInteger(const integerPart *, > unsigned int, > bool, roundingMode); > opStatus convertFromZeroExtendedInteger(const int...
2008 Jan 22
0
[LLVMdev] Complex constant expressions?
...that's already in LLVM. For example, consider just > the problem of float to int conversions: > > char B[ (int)3.0 ]; > > Generating code for this is relatively simple; Converting > arbitrary-sized APFloats to arbitrary-sized APInts isn't quite as > easy. APFloat::convertToInteger does just this. Why can't you use it? > Similarly, the mathematical operators directly supported by APFloat > are only a subset of the math operators supported by the LLVM > instructions. Yes, arbitrary math ops are hard if you want to get correctly rounded results for any roundi...
2008 Jan 24
2
[LLVMdev] Complex constant expressions?
Neil Booth wrote: > Talin wrote:- > >> Well, I may be using it wrong. But looking at APFloat.h, I see four >> functions that purport to convert to integer: >> >> opStatus convertToInteger(integerPart *, unsigned int, bool, >> roundingMode) const; >> opStatus convertFromSignExtendedInteger(const integerPart *, >> unsigned int, >> bool, roundingMode); >> opStatus convertFromZeroExten...
2008 Jan 22
5
[LLVMdev] Complex constant expressions?
More questions on the best way to write a compiler using LLVM: Lets say I have a struct definition that looks like this: const int imageSize = 77; struct A { char B[align(imageSize)]; } ...where 'imageSize' is some small inline function that rounds up to a power of two or something. (A common requirement for textures on 3d graphics cards.) Now, clearly the compiler
2008 Jan 24
0
[LLVMdev] Complex constant expressions?
Talin wrote:- > > Only two convert to integer. The convertToAPInt is unfortunately > > named; I'm not sure what it does but suspect it captures bitpatterns > > like you suggest. > > > > convertToInteger is the function I'm responsible for and it does > > float->int conversion according to IEEE754. If you want to place > > it in an APInt, create your APInt with the appropriate size and > > use its buffer as input. APInt has made unfortunate sign choices > > though...
2007 Aug 18
1
[LLVMdev] Soft floating point support
This patch supplies software IEEE floating point support. The comment from the patch reproduced below says all there is to say. This patch contains the prior "cleanup" patch; please don't apply that one. Please let me know of any bugs. It is tested reasonably well, but until I put together random tests it's hard to have 100% confidence. Neil. /* A self-contained host- and