Dear all,
I wrote a small c program (attached also).
#include "stdio.h"
int main()
{
unsigned short a = 12343, b = 234, c = 345, d = 456, e = 567, f = 678, g = 789, h = 890;
f = g + h;
e = f + g;
d = e + f;
c = d + e;
b = c + d;
a = b + c;
}
1) Using gcc, i compiled the code and generated object file.
gcc -c
2) and then used objdump to check the assembly code and got output
objdumpASM.txt
3) To check the assembly code being run by sniper, i modified the
InstructionModeling::handleInstruction in instruction_modeling.cc
std::cout << instruction->getDisassembly() << std::endl;
From this step, i got the assembly code being run by sniper as output sniperASM.txt
4) Then i compared the outputs from step 2 & 3 i.e. objdumpASM.txt sniperASM.txt
5) I found a lot of extra assembly code in sniperASM.txt which is not part of objdumpASM.txt.
Please, can anybody tell me the reason of this extra code.