diff options
author | Georg-Johann Lay <avr@gjlay.de> | 2013-01-24 13:27:11 +0000 |
---|---|---|
committer | Georg-Johann Lay <gjl@gcc.gnu.org> | 2013-01-24 13:27:11 +0000 |
commit | a861ffa4f3272dd7b87e68d5e2a5876cde3f63c3 (patch) | |
tree | 12152ee76d152c116268af019ae616f8fe397bcc /gcc/config/avr | |
parent | 593c0dddb7f21185d46b6a01ebc0c4c86248c738 (diff) | |
download | gcc-a861ffa4f3272dd7b87e68d5e2a5876cde3f63c3.zip gcc-a861ffa4f3272dd7b87e68d5e2a5876cde3f63c3.tar.gz gcc-a861ffa4f3272dd7b87e68d5e2a5876cde3f63c3.tar.bz2 |
avr.c (avr_out_fract): Make register numbers that might be outside of source operand signed.
* config/avr/avr.c (avr_out_fract): Make register numbers that
might be outside of source operand signed.
From-SVN: r195424
Diffstat (limited to 'gcc/config/avr')
-rw-r--r-- | gcc/config/avr/avr.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 9c7f00a..f0906fa 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -7114,13 +7114,13 @@ avr_out_fract (rtx insn, rtx operands[], bool intsigned, int *plen) unsigned d1 = d0 + step; // Current and next regno of source - unsigned s0 = d0 - offset; - unsigned s1 = s0 + step; + signed s0 = d0 - offset; + signed s1 = s0 + step; // Must current resp. next regno be CLRed? This applies to the low // bytes of the destination that have no associated source bytes. - bool clr0 = s0 < src.regno; - bool clr1 = s1 < src.regno && d1 >= dest.regno; + bool clr0 = s0 < (signed) src.regno; + bool clr1 = s1 < (signed) src.regno && d1 >= dest.regno; // First gather what code to emit (if any) and additional step to // apply if a MOVW is in use. xop[2] is destination rtx and xop[3] @@ -7150,12 +7150,12 @@ avr_out_fract (rtx insn, rtx operands[], bool intsigned, int *plen) } } } - else if (offset && s0 <= src.regno_msb) + else if (offset && s0 <= (signed) src.regno_msb) { int movw = AVR_HAVE_MOVW && offset % 2 == 0 && d0 % 2 == (offset > 0) && d1 <= dest.regno_msb && d1 >= dest.regno - && s1 <= src.regno_msb && s1 >= src.regno; + && s1 <= (signed) src.regno_msb && s1 >= (signed) src.regno; xop[2] = all_regs_rtx[d0 & ~movw]; xop[3] = all_regs_rtx[s0 & ~movw]; |