search for: convertfromsignextendedinteger

Displaying 5 results from an estimated 5 matches for "convertfromsignextendedinteger".

2008 Jan 23
4
[LLVMdev] Complex constant expressions?
...nvertToInteger 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 convertFromSignExtendedInteger(const integerPart *, unsigned int, bool, roundingMode); opStatus convertFromZeroExtendedInteger(const integerPart *, unsigned int, bool, roundingMode); APInt convertToAPInt() const; The first three co...
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 integerPart *, > unsigned int, > bool, roundingMode); > APInt convertToAPIn...
2008 Jan 22
0
[LLVMdev] Complex constant expressions?
Talin wrote:- > On the other hand, writing an interpreter means duplicating a lot of > the functionality 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 >
2008 Jan 24
2
[LLVMdev] Complex constant expressions?
...ote:- > >> 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 integerPart *, >> unsigned int, >> bool, roundingMode); >>...
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