public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kkojima at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/49468] SH Target: inefficient integer abs code
Date: Mon, 27 Jun 2011 06:40:00 -0000	[thread overview]
Message-ID: <bug-49468-4-r0wLluUohK@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-49468-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49468

--- Comment #5 from Kazumoto Kojima <kkojima at gcc dot gnu.org> 2011-06-27 06:39:40 UTC ---
Argh, I also missed clobbers.  Looks fine to me now, except
that insn_and_split "*negdi2" forgot to set constraints and
some minor coding style issues below.

The first comment should be started with a capital letter and
ended with a period.  Also please follow GCC C coding style
even for C program segments in .md file.  C lines in the patch
are started with a tab instead of 2 spaces.  A long conditional
should be broken like as

  (cond
   ? value0
   : value1)

instead of

  (cond ?
         value0 :
         value1)

Please use braces

"
{
  int low_word = ...
  ...

  emit_insn (...
  DONE;
}")

instead of

"
  int low_word = ...
  ...

  emit_insn (...
  DONE;
")

especially when new variables are used, though those braces
aren't required with the current gen* tools.

> +	emit_insn (gen_negsi_cond (operands[0], operands[1], operands[1], 
> +								GEN_INT (1)));

The first line has an extra space after the last comma and
the indentation of the 2nd line doesn't match with GCC coding
standard.  BTW, you could use const[01]_rtx for GEN_INT ([01]):

  emit_insn (gen_negsi_cond (operands[0], operands[1], operands[1],
                 const1_rtx));

There are similar extra white space + broken indentation issues:

> +(define_insn_and_split "negsi_cond"
> +  [(set (match_operand:SI 0 "arith_reg_dest" "=r,r")
> +	(if_then_else:SI (eq:SI (reg:SI T_REG) 
> +							(match_operand:SI 3 "const_int_operand" "M,N"))
...
> +	  emit_label_after (skip_neg_label, 
> +						emit_insn (gen_negsi2 (operands[0], operands[1])));
...

Perhaps mail or editor problem?


  parent reply	other threads:[~2011-06-27  6:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-19 15:15 [Bug target/49468] New: " oleg.endo@t-online.de
2011-06-19 15:30 ` [Bug target/49468] " oleg.endo@t-online.de
2011-06-19 15:49 ` oleg.endo@t-online.de
2011-06-22 22:38 ` kkojima at gcc dot gnu.org
2011-06-26 20:49 ` oleg.endo@t-online.de
2011-06-27  6:40 ` kkojima at gcc dot gnu.org [this message]
2011-06-29  1:37 ` oleg.endo@t-online.de
2011-09-25 12:53 ` oleg.endo@t-online.de
2012-02-26 23:38 ` olegendo at gcc dot gnu.org
2012-02-28  8:44 ` olegendo at gcc dot gnu.org
2012-02-29 23:23 ` kkojima at gcc dot gnu.org
2012-03-14 23:10 ` olegendo at gcc dot gnu.org
2013-12-05 19:26 ` olegendo at gcc dot gnu.org

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=bug-49468-4-r0wLluUohK@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).