* Generating Assembly Files Using GCC
@ 2014-01-06 11:42 rajkrishna
2014-01-08 23:18 ` Ángel González
0 siblings, 1 reply; 4+ messages in thread
From: rajkrishna @ 2014-01-06 11:42 UTC (permalink / raw)
To: gcc-help
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?
--
View this message in context: http://gcc.1065356.n5.nabble.com/Generating-Assembly-Files-Using-GCC-tp1000051.html
Sent from the gcc - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Generating Assembly Files Using GCC
2014-01-06 11:42 Generating Assembly Files Using GCC rajkrishna
@ 2014-01-08 23:18 ` Ángel González
2014-01-09 14:31 ` rajkrishna
0 siblings, 1 reply; 4+ messages in thread
From: Ángel González @ 2014-01-08 23:18 UTC (permalink / raw)
To: rajkrishna; +Cc: gcc-help
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-10 22:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-06 11:42 Generating Assembly Files Using GCC rajkrishna
2014-01-08 23:18 ` Ángel González
2014-01-09 14:31 ` rajkrishna
2014-01-10 22:19 ` Ángel González
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).