Questions tagged [compiler-optimization]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer

What was the original math operation after optimizing compiler?

I'm pretty sure that original code was much simpler: (((x + 16) >> 31) ^ abs(x + 16) & 3) + 4 * ((y + 16) % 4) - ((x + 16) >> 31) Looks like division with remainder... Any ideas what ...
mastermind's user avatar
1 vote
0 answers

Philosophical and procedural question - Process for using x64 inline assembly in recovering source code

I am assuming this should place be appropriate for what I want to ask. I want to ask more of a philosophical and procedural question because I don't want to try things that have been tried and spend ...
LUser's user avatar
  • 773
1 vote
1 answer

Decompilation of CIL code into some high level code - do I need to introduce new variables during data flow analysis?

I'm writing a compiler from .NET CIL code to some high level language. Process is similar to decompilation. I have done some control flow analysis - detecting loops, ifs, and so on. In terms of data ...
Zmirlacz's user avatar
2 votes
1 answer

ARM multiply compiler optimization

I need help interpreting this compiler optimization: ;R12 = 0x88888889; UMULL LR, R2, R12, R3 ; R3 * 0x88888889; MOV R2, R2,LSR#3 ; ((R3 * 0x88888889 << 32) >&...
Koi's user avatar
  • 21
0 votes
1 answer

Why do those useless instruction are in Rust final binary?

I am currently reversing RUST binaries, and I often come across this block of instruction : .text:000055F4BFB943F2 db 2Eh .text:000055F4BFB943F2 nop word ptr [rax+rax+00000000h] .text:...
Qwark's user avatar
  • 72
2 votes
1 answer

Way to check if two assembly programs (one possibly compiled with optimizations) come from the same C source code?

Let's suppose I have two programs in assembly code. And I want to check if they both came from the same source code, but one was compiled with optimizations. Is there a tool that can do this? Or some ...
JBraha's user avatar
  • 133
4 votes
1 answer

Can somebody explain this weird alignment/optimisation done when zeroing out a buffer?

I have the following disassembly which looks like a buffer being populated with zeros in a loop, however, I'm confused at why the alignment is needed here (if a jump will always be 4-bytes, why does ...
Felipe Warrener-Iglesias's user avatar
2 votes
1 answer

There is something else than a "DllMain" in a module for its initialization?

All right, Actually I am manually mapping a module into a process, actually my mapper calls DllEntryPoint from standard struct IMAGE_NT_HEADERS thus IMAGE_NT_HEADERS::OptionalHeader::...
MindLerp's user avatar
  • 197
2 votes
1 answer

What does this magic number do? [duplicate]

I've opened a 64 bit DLL file in IDA. One function has this pseudocode: unsigned __int64 output; ULONG input; output = (unsigned __int64)(input * (unsigned __int128)0xE38E38E38E38E38Fui64 >> 64)...
Biswapriyo's user avatar
  • 1,549
0 votes
3 answers

Explain struct access in assembly?

I am having trouble understanding working with structs in assembly from disassembly. can you please explain the code below. Disassembly below: Source code:
ReverserT's user avatar