Skip to main content

Questions tagged [compiler-optimization]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4 votes
1 answer
513 views

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 ...
fwr nr's user avatar
  • 163
2 votes
1 answer
123 views

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
2 votes
1 answer
306 views

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
1k views

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,569
2 votes
1 answer
174 views

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
1 vote
1 answer
205 views

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
1 vote
1 answer
84 views

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
87 views

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
  • 793
0 votes
3 answers
922 views

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
0 votes
1 answer
108 views

Tool to analyze .obj files (not COFF) created with /LTCG

This Microsoft article states that: When building with LTCG, the compiler front end doesn't invoke the back end. Instead, it emits an OBJ file with IL in it. It bears repeating: this IL is not the ...
langlauf.io's user avatar
  • 1,560
0 votes
1 answer
518 views

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