[llvm-dev] Upper 32bits from 64bit value
Sandeep Kumar Singh via llvm-dev
llvm-dev at lists.llvm.org
Tue Oct 6 22:51:29 PDT 2015
Is this possible to generate LLVM IR from any static/dynamic link library?
I have some static and dynamic link library and I want to generate LLVM IR
as I want to obfuscate these libraries.
Is there any way to do the same.
Please give me some pointers on this.
On Mon, Sep 28, 2015 at 9:04 AM, Sandeep Kumar Singh <deepdondo007 at gmail.com
> Hi Tim,
> Thank you for reply.
> > llvm::Value *intermediateValue = LLVMIRBuilder->CreateLShr(x64BitValue,
> Now I am using below to calculate upper 32bits, I think this is OK,
> llvm::Value *intermediateValue = LLVMIRBuilder->CreateAnd(x64BitValue,
> intermediateValue = LLVMIRBuilder->CreateLShr(intermediateValue, 32);
> //cast value to 32 bit
> intermediateValue = castValueByOpSize(intermediateValue, 32);
> On Fri, Sep 25, 2015 at 7:12 PM, Tim Northover <t.p.northover at gmail.com>
>> On 24 September 2015 at 22:12, Sandeep Kumar Singh via llvm-dev
>> <llvm-dev at lists.llvm.org> wrote:
>> > I need to fetch lower and higher 32bits from 64bit value. I found
>> > "CreateLShr" function to fetch lower 32bits,
>> > llvm::Value *intermediateValue = LLVMIRBuilder->CreateLShr(x64BitValue,
>> That would give you the upper bits, I think.
>> > What function I need to use for fetching upper 32bits from 64bit value.
>> There's multiple ways to get the other half: "x & 0xffffffff" is the
>> canonical one (LLVM's optimisers will convert the others into that if
>> they can).
> Thanks and Regards,
> Sandeep Kumar Singh
Thanks and Regards,
Sandeep Kumar Singh
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev