Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling predication in gcc/g++

Tags:

gcc

I was wondering if there's a way to disable predication in gcc/g++. When I get the object dump of my code, I don't want there to be any CMOV, CCMP, etc instructions in it.

I have gone through the gcc man page without any success. So far the only way ahead seems to be hacking into gcc itself. Using gcc 4.3 on RHEL x86_64 machine. Any ideas?

Thanks in advance.

like image 450
antitalented Avatar asked Mar 07 '11 22:03

antitalented


1 Answers

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

-fno-if-conversion -fno-if-conversion2 
like image 113
user569115 Avatar answered Sep 22 '22 05:09

user569115