This is sources Bugzilla
Bugzilla Version 2.17.5
Bugzilla Bug 2626
  Problems with LPM on attiny26 Last modified: 2008-02-14 13:04:50
     Query page      Enter new bug
Bug#: 2626   Hardware:   Reporter: Hakan Ardo <hakan@debian.org>
Host: Target: Build:
Product:     Add CC:
Component:   Version:   CC:
Remove selected CCs
Status: RESOLVED   Priority:  
Resolution: FIXED   Severity:  
Assigned To: unassigned@sources.redhat.com   Target Milestone:  
Summary:
Keywords:

Attachment Description Type Created Actions
970-binutils-20060817-avr-attiny26-lpm.patch The FIX. Patch is against GNU assembler 2.17.50 20060817 Debian GNU/Linux + coff-avr-patch (20050630) patch 2008-02-06 20:42 Edit | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 2626 depends on: Show dependency tree
Show dependency graph
Bug 2626 blocks:

Additional Comments:


Leave as RESOLVED FIXED
Reopen bug
Mark bug as VERIFIED

View Bug Activity   |   Format For Printing


Description:   Last confirmed: 0000-00-00 00:00 Opened: 2006-05-01 09:07
Forwarding debian bug #362270 from Terran Melconian <terran@consistent.org>:

The attiny26 supports some forms of the LPM (load program memory)
instruction, but under certain circumstances GAS produces an incorrect
error claiming that it does not.

There are three forms of the LPM instruction.  They are:

    i.	    LPM			(r0 is implied destination)
    ii.	    LPM destreg, Z
    iii.    LPM	destreg, Z+

(reference: Atmel AVR instruction set reference, revision 06/99, page
79)

Of these, the attiny26 supports forms i and ii but not iii.
(reference:  Atmel attiny26 datasheet, revision 1477G 03/05, page 170)

avr-as will assemble form i, but refuses to assemble forms ii or iii.
Since the datasheet states that form ii *is* supported on this part, I
believe this to be a bug.

Of course it is possible that it is an error in the manufacturer's
datasheet, and that as' behavior is in fact correct, but barring
explicit information to the contrary I must assume that the
manufacturer's datasheet is authoritative.

------- Additional Comment #1 From Joachim Falk 2008-02-06 20:42 -------
Created an attachment (id=2236)
The FIX. Patch is against GNU assembler 2.17.50 20060817 Debian GNU/Linux +
coff-avr-patch (20050630)

The bugfix has been tested with attiny26 and attiny2313.
Where gas now allows lpm r,z for attiny26 but generates
"xxx.S:Nr: Error: postincrement not supported" errors
for lpm r,z+. As before attiny2313 allow both forms of
the lpm instruction.

Cheers,
Joachim Falk

------- Additional Comment #2 From Nick Clifton 2008-02-14 13:04 -------
Hi Hakan,

  Thanks for submitting this fix.  I have applied it along with these changelog
entries.

Cheers
  Nick

include/opcode/ChangeLog
2008-02-14  Hakan Ardo  <hakan@debian.org>

	PR gas/2626
	* avr.h (AVR_ISA_2xxe): Define.

gas/ChangeLog
2008-02-14  Hakan Ardo  <hakan@debian.org>

	PR gas/2626
	* config/tc-avr.c (mcu_types): Change the ISA tyoe of the attiny26
	to AVR_ISA_2xxe.
	(avr_operand): Disallow post-increment addressing in the lpm
	instruction for the attiny26.

------- Additional Comment #3 From Hakan Ardo 2008-02-14 15:10 -------
Subject: Re:  Problems with LPM on attiny26

Hi,
I only forwarded this bugrepport from the debian bts, the fix was done
(as far as I can tell) by joachim dot falk at gmx dot de, and you
should probably contribute it to him and not to me.

On 14 Feb 2008 13:04:51 -0000, nickc at redhat dot com
<sourceware-bugzilla@sourceware.org> wrote:
>
>  ------- Additional Comments From nickc at redhat dot com  2008-02-14 13:04 -------
>  Hi Hakan,
>
>   Thanks for submitting this fix.  I have applied it along with these changelog
>  entries.
>
>  Cheers
>   Nick
>
>  include/opcode/ChangeLog
>  2008-02-14  Hakan Ardo  <hakan@debian.org>
>
>         PR gas/2626
>         * avr.h (AVR_ISA_2xxe): Define.
>
>  gas/ChangeLog
>  2008-02-14  Hakan Ardo  <hakan@debian.org>
>
>         PR gas/2626
>         * config/tc-avr.c (mcu_types): Change the ISA tyoe of the attiny26
>         to AVR_ISA_2xxe.
>         (avr_operand): Disallow post-increment addressing in the lpm
>         instruction for the attiny26.
>
>
>  --
>            What    |Removed                     |Added
>  ----------------------------------------------------------------------------
>              Status|WAITING                     |RESOLVED
>          Resolution|                            |FIXED
>
>
>
>
>  http://sourceware.org/bugzilla/show_bug.cgi?id=2626
>
>  ------- You are receiving this mail because: -------
>  You reported the bug, or are watching the reporter.
>




     Query page      Enter new bug
Actions: New | Query | bug # | Reports | Requests   New Account | Log In