search for: eax2

Displaying 4 results from an estimated 4 matches for "eax2".

Did you mean: eax
2013 Jun 28
3
[LLVMdev] Question regarding the x86 SBB instruction.
...// If the Carry flag is set, jump to jump_destination1 How do I represent this correctly in LLVM IR? In the above case, the carry flag should be set by the SBB because: %eax + carry == 0x100000000 (33 bits) or 0x0 (32 bits) %edx - (%eax + carry) == %edx with Carry set. If I use LLVM IR: %eax2 = ADD i32 %eax1, %carry (%eax2 == 0) [%edx2,%carry] = llvm.ssub.with.overflow.i32 %edx1, %eax2 (carry == 0, but I want it to be 1) So, the problem only occurs with the edge case of %eax == 0xffffffff and carry == 1 Any ideas how I could make this work accurately in LLVM IR ? I could put an...
2013 Jun 28
0
[LLVMdev] Question regarding the x86 SBB instruction.
...ump_destination1 > > How do I represent this correctly in LLVM IR? > In the above case, the carry flag should be set by the SBB because: > %eax + carry == 0x100000000 (33 bits) or 0x0 (32 bits) > %edx - (%eax + carry) == %edx with Carry set. > > If I use LLVM IR: > %eax2 = ADD i32 %eax1, %carry (%eax2 == 0) > [%edx2,%carry] = llvm.ssub.with.overflow.i32 %edx1, %eax2 (carry == > 0, but I want it to be 1) > > So, the problem only occurs with the edge case of %eax == 0xffffffff > and carry == 1 > > Any ideas how I could make this work accu...
2013 Mar 12
0
[LLVMdev] help decompiling x86 ASM to LLVM IR
...assembly language into IR, it is best to treat the CFLAGS register as just another register which is manipulated as a side effect of instructions and letting a dead-code elimination pass eliminate extraneous uses. A rough equivalent for llvm IR in this could would be %cf = icmp lt i32 1, %edi %eax2 = sub i32 %eax, %eax %1 = zext i1 %cf to i32 %eax3 = sub i32 %eax2, %1 %eax4 = and i32 0xffffffdf, %eax3 %eax5 = add i32 0x61, %eax4 > The aim is to be able to then recompile it to maybe a different target. > The aim is to go from binary -> LLVM IR -> binary for cases where the > C...
2013 Mar 12
6
[LLVMdev] help decompiling x86 ASM to LLVM IR
Hi, I am looking to decompile x86 ASM to LLVM IR. The original C is this: int test61 ( unsigned value ) { int ret; if (value < 1) ret = 0x40; else ret = 0x61; return ret; } It compiles with GCC -O2 to (rather cleverly removing any branches): 0000000000000000 <test61>: 0: 83 ff 01 cmp $0x1,%edi 3: