[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Backporting the ATmega256X patch to binutils-2.17?

From: Joerg Wunsch
Subject: Re: [avr-gcc-list] Backporting the ATmega256X patch to binutils-2.17?
Date: Fri, 29 Sep 2006 00:01:32 +0200 (MET DST)

address@hidden (Joerg Wunsch) wrote:

> One small issue: gcc-4.1-new-devices-1.patch contains one chunk that
> is unrelated to the support of new devices:

There's one really serious slip in Björn's patches that is also
present in your version.  Originally, Wang Guohui (the guy behind
AtmanAVR) detected this bug, but I've even missed it with my recent
upgrade of the FreeBSD toolchain.

The issue is that when preparing a function prologue call (for
-mcall-prologues), the low address of the prologue was taken twice, as
a low and a high address.  It's always hard to offer a patch for a
patch, but here it is:

Index: patch-zz-atmega256x
RCS file: /home/ncvs/ports/devel/avr-gcc-devel/files/patch-zz-atmega256x,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -u -r1.1 -r1.2
--- patch-zz-atmega256x 26 Sep 2006 21:52:30 -0000      1.1
+++ patch-zz-atmega256x 28 Sep 2006 21:44:52 -0000      1.2
@@ -107,7 +107,7 @@
 -      fputs ((AS2 (ldi,r30,pm_lo8(1f)) CR_TAB
 -            AS2 (ldi,r31,pm_hi8(1f)) CR_TAB), file);
 +      fputs ((AS2 (ldi,r30,lo8(gs(1f))) CR_TAB
-+            AS2 (ldi,r31,lo8(gs(1f))) CR_TAB), file);
++            AS2 (ldi,r31,hi8(gs(1f))) CR_TAB), file);
        prologue_size += 4;

As libgcc.a itself is compiled with -mcall-prologues, anything in it
that used function prologue calls (namely the floating-point stuff)
was broken by that.

cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]