Disabling prediction in gcc / g ++

I was wondering if there is a way to turn off prediction in gcc / g ++. When I get a dump of an object of my code, I do not want CMOV, CCMP, etc. instructions in it.

I went through the gcc man page without any success. So far, the only way forward seems to have been hacked by gcc itself. Using gcc 4.3 on a RHEL x86_64 machine. Any ideas?

Thanks in advance.

+3
source share
2 answers

I ran into this problem before and in my case, the solution was to disable if-conversion. You can use compilation flags:

-fno-if-conversion -fno-if-conversion2 
+2
source

Can you try customizing the previous set of x86 instructions that did not have these instructions?

http://gcc.gnu.org/onlinedocs/gcc-3.2.3/gcc/Target-Options.html

gcc -b i386 main.c

(I have not tried this)

+1

All Articles