From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/7 v6] serial: add S3C64XX serial driver
Date: Mon, 11 Aug 2008 14:12:37 +0200 [thread overview]
Message-ID: <20080811121237.31711248BF@gemini.denx.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0808111238420.30591@axis700.grange>
Dear Guennadi,
In message <Pine.LNX.4.64.0808111238420.30591@axis700.grange> you wrote:
>
> Ok, would this be better
>
> u32 reg;
> u32 pclk = get_PCLK();
> u32 baudrate = gd->baudrate;
> int i;
>
> reg = pclk / baudrate / 16 - 1;
> i = (pclk / baudrate) % 16;
Is "reg" still used anywhere else?
> This way the compiler does optimize it to only one division, and the
> operations say what they do, and there doesn't seem to be any need for
> comment left. Still, the code produced by this is 1 asm instruction longer
> than my original code:-)
Is the generated code equivalent? This smells like a subtle bug...
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The games have always strengthened us. Death becomes a familiar
pattern. We don't fear it as you do.
-- Proconsul Marcus Claudius, "Bread and Circuses",
stardate 4041.2
next prev parent reply other threads:[~2008-08-11 12:12 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-06 19:41 [U-Boot-Users] [PATCH 0/7 v6] SMDK6400 support Guennadi Liakhovetski
2008-08-06 19:42 ` [U-Boot-Users] [PATCH 2/7 v6] nand_spl: Support page-aligned read in nand_load, use chipselect Guennadi Liakhovetski
2008-08-06 22:54 ` Scott Wood
2008-08-07 6:36 ` Guennadi Liakhovetski
2008-08-06 19:42 ` [U-Boot-Users] [PATCH 3/7 v6] ARM: Add arm1176 core with S3C6400 SoC Guennadi Liakhovetski
2008-08-07 6:28 ` Andreas Engel
2008-08-07 6:55 ` Guennadi Liakhovetski
2008-08-07 9:33 ` Jens Gehrlein
2008-08-07 9:51 ` Wolfgang Denk
2008-08-07 10:03 ` Jens Gehrlein
2008-08-07 10:17 ` Wolfgang Denk
2008-08-07 11:03 ` Jens Gehrlein
2008-08-07 11:07 ` Jean-Christophe PLAGNIOL-VILLARD
2008-08-07 10:00 ` Jens Gehrlein
2008-08-07 10:12 ` Guennadi Liakhovetski
2008-08-07 11:12 ` Jens Gehrlein
2008-08-09 9:11 ` Jean-Christophe PLAGNIOL-VILLARD
2008-08-09 9:58 ` [U-Boot] " Wolfgang Denk
2008-08-09 10:07 ` Jean-Christophe PLAGNIOL-VILLARD
2008-08-11 8:17 ` [U-Boot-Users] " Guennadi Liakhovetski
2008-08-06 19:42 ` [U-Boot-Users] [PATCH 4/7 v6] USB: Add support for OHCI controller on S3C6400 Guennadi Liakhovetski
2008-08-07 15:56 ` Markus Klotzbücher
2008-08-07 15:53 ` Jean-Christophe PLAGNIOL-VILLARD
2008-08-08 9:16 ` Markus Klotzbücher
2008-08-06 19:42 ` [U-Boot-Users] [PATCH 5/7 v6] serial: add S3C64XX serial driver Guennadi Liakhovetski
2008-08-09 9:13 ` Jean-Christophe PLAGNIOL-VILLARD
2008-08-11 8:44 ` Guennadi Liakhovetski
2008-08-11 10:06 ` [U-Boot] " Wolfgang Denk
2008-08-11 10:53 ` Guennadi Liakhovetski
2008-08-11 12:12 ` Wolfgang Denk [this message]
2008-08-11 12:43 ` Guennadi Liakhovetski
2008-08-06 19:42 ` [U-Boot-Users] [PATCH 6/7 v6] NAND: add NAND driver for S3C64XX Guennadi Liakhovetski
2008-08-07 22:15 ` Scott Wood
2008-08-06 19:42 ` [U-Boot-Users] [PATCH 7/7 v6] ARM: Add support for S3C6400 based SMDK6400 board Guennadi Liakhovetski
2008-08-09 9:32 ` Jean-Christophe PLAGNIOL-VILLARD
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=20080811121237.31711248BF@gemini.denx.de \
--to=wd@denx.de \
--cc=u-boot@lists.denx.de \
/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