public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [avr,committed] Fix fixed-point conversion
@ 2013-01-24 13:40 Georg-Johann Lay
  2013-01-27 22:21 ` Gerald Pfeifer
  0 siblings, 1 reply; 3+ messages in thread
From: Georg-Johann Lay @ 2013-01-24 13:40 UTC (permalink / raw)
  To: gcc-patches; +Cc: Denis Chertykov, Eric Weddington

Committed the following change:

http://gcc.gnu.org/r195424

	* config/avr/avr.c (avr_out_fract): Make register numbers that
	might be outside of source operand signed.


The problem occurs with fixed-point conversions to a wider mode and where the
input operand is in a small regno like r2:

src:  QQmode in r2
dest: DAmode in r2

avr.c:avr_out_fract loops over the registers and clears dest registers at the
low end that have no associated src register (zero-extension at the low end).

In the sample case the register numbers (variables s0, s1) drop below 0 and
must be signed for that reason.  Otherwise, some dest registers, starting at
2^{-16}, will not be cleared.


Johann

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-28 13:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-24 13:40 [avr,committed] Fix fixed-point conversion Georg-Johann Lay
2013-01-27 22:21 ` Gerald Pfeifer
2013-01-28 13:46   ` Georg-Johann Lay

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).