Is there some kind of "assembly code analyzer"?
Or do i need to learn assembly?
Edited by lride, 06 October 2012 - 06:21 PM.
Posted 06 October 2012 - 06:33 PM
Posted 06 October 2012 - 06:55 PM
Posted 06 October 2012 - 07:01 PM
If you have optimizations turned off, it should be pretty straight forward most of the time.
Posted 06 October 2012 - 07:09 PM
> gcc -g test.c -o test.o > objdump -dS test.o > test.asm
Edited by kuramayoko10, 06 October 2012 - 07:09 PM.
Posted 06 October 2012 - 07:49 PM
I like to use objdump + gcc on Linux to have the assembly code with the C code commented in between.
> gcc -g test.c -o test.o> objdump -dS test.o > test.asm
On Windows, Visual Studio gives you assembly code pretty easily as well: right-click on your code and select "Show Dissasembly"
Edited by lride, 06 October 2012 - 07:59 PM.
Posted 06 October 2012 - 08:00 PM
Posted 06 October 2012 - 08:27 PM
I was wondering if assembly code could show if branch prediction is taking place.
Posted 07 October 2012 - 03:48 AM
I was wondering if assembly code could show if branch prediction is taking place.
No, that doesn't make any sense. Branch prediction is a feature of the CPU, which tries to execute the code as fast as possible, but the assembly is not instrumented in any way to enable it: The CPU will do it automatically everywhere.
Posted 07 October 2012 - 12:46 PM
Posted 07 October 2012 - 05:14 PM
Edited by Heath, 07 October 2012 - 05:15 PM.
Posted 08 October 2012 - 04:16 AM
I need to know how conditional statements, loops and etc translate into assembly.
Where can I learn some assembly?