public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Ángel González" <keisial@gmail.com>
To: rajkrishna <krishnakumar.vengadasamy@utas.utc.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Generating Assembly Files Using GCC
Date: Wed, 08 Jan 2014 23:18:00 -0000	[thread overview]
Message-ID: <52CDDCBD.5020802@gmail.com> (raw)
In-Reply-To: <1389008529517-1000051.post@n5.nabble.com>

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.

  reply	other threads:[~2014-01-08 23:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-06 11:42 rajkrishna
2014-01-08 23:18 ` Ángel González [this message]
2014-01-09 14:31   ` rajkrishna
2014-01-10 22:19     ` Ángel González

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52CDDCBD.5020802@gmail.com \
    --to=keisial@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=krishnakumar.vengadasamy@utas.utc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).