[LLVMdev] Need help in converting int to double

sarath chandra sarathcse19 at gmail.com
Thu Sep 22 02:36:43 PDT 2011


Hi,

     I'm pursuing M.Tech course. As a part of the project work i'm using
LLVM as back-end. My project area is "Enhancing the performance of V8
javascript engine using LLVM as a back-end".

    Now i'm writing code for shift left(SHL) operator. I had my own Value
Structure .. it's like this

Struct Value
{
void *val  ;
char type;
}

  The "char type" holds DoubleType,DoubleConst,StringType,StringConst...

  when i'm executing the IrBuilder.CreateShl(LHS,RHS) instruction it is
returning an integer value as output.. i'm unable to store the value in my
structure....(because my structure can hold Doubles,Strings).

  Is there any way to store the integer output in my structure( i used
CreateSIToFP() to change int to double)........

Thanks in advance

Regards,

  (¨`·.·´¨)
   `·.¸(¨`·.·´¨)
  (¨`·.·´¨)¸.·´ Sarath!!!
    `·.¸.·´
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110922/8d527324/attachment.html>


More information about the llvm-dev mailing list