Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Randolph Chung <randolph@tausq.org>
To: John David Anglin <dave@hiauly1.hia.nrc.ca>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
	parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] gcc (3.3.5) causing problems in our latest kernel.
Date: Sun, 3 Apr 2005 17:43:47 -0700	[thread overview]
Message-ID: <20050404004347.GG8921@tausq.org> (raw)
In-Reply-To: <200504032343.j33NhqX2019108@hiauly1.hia.nrc.ca>

> > static inline void __test_width(char *var, int size) {
> > 	switch (size) {	
> > 	case 1:
> > 	case 2:
> > 	case 4:
> > 	case 8:
> > 		*var++ = 0;
> > 		break;
> > 	default:
> > 		bad_function();
> > 	}
> > }
> 
> I think the optimization of switch statements is far from optimal.
> I suspect that the optimization of if statements is better.  A similar
> issue causes warning from __put_user in a 32-bit build.  Probably,
> this should be a GCC PR.

Try changing that function to
static inline void __test_width(char *var, const int size) {

willy says it worked for him :)

randolph
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

      reply	other threads:[~2005-04-04  0:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1112564457.5858.7.camel@mulgrave>
2005-04-03 22:13 ` [parisc-linux] gcc (3.3.5) causing problems in our latest kernel Matthew Wilcox
2005-04-03 23:56   ` James Bottomley
2005-04-04  0:07     ` Matthew Wilcox
2005-04-03 23:43 ` John David Anglin
2005-04-04  0:43   ` Randolph Chung [this message]

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=20050404004347.GG8921@tausq.org \
    --to=randolph@tausq.org \
    --cc=James.Bottomley@SteelEye.com \
    --cc=dave@hiauly1.hia.nrc.ca \
    --cc=parisc-linux@lists.parisc-linux.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