On 06/01/14 12:42, rajkrishna wrote:
We are using powerpc-motorola-elf-as.exe to generate assembly file from a
"*cpp*" file. If there is an if condition for eg *if(x==0)* , and when we
generate the assembly code for the condition ,"*bne*" and "*beq*" are
generated whereas only *beq *(branch equal) is the only code what we are
expecting as per the source code. Is there are any gcc switches which can be
used to customize the assembly code generation?
You should provide a bigger example. Make a toy program with the if,
show the
original code, the generated assembly (only relevant lines needed, of
course)
and the expected one.
What optimization level (-O<n>) are you using? That's the most important
switch
changing the code generation (there are also switches to enable/disable
individual
optimizations, but -On works with groups of them). Please provide the
command
you are using to generate the assembly.