objdump disassemble "lpm rX, Z" as "lpm rX, Z+". avr% cat bug-lpm.c void try_asm(void) { __asm__ __volatile__( "lpm r18, Z+\n\t" "lpm r18, Z\n\t" ::); } avr% avr-gcc -Wall -mmcu=atmega8515 -O3 -Os -c bug-lpm.c avr% avr-objdump -d bug-lpm.o bug-lpm.o: file format elf32-avr Disassembly of section .text: 00000000 <try_asm>: 0: 25 91 lpm r18, Z+ 2: 24 91 lpm r18, Z+ 4: 08 95 ret Note the different opcodes (25 91 and 24 91). Please fix the disassembly.
Hi Elrond, I think that you must be using an old version of the binutils. With the latest release (2.20) the disassembly works: % avr-objdump -d bug-lpm.o Disassembly of section .text: 00000000 <try_asm>: 0: 25 91 lpm r18, Z+ 2: 24 91 lpm r18, Z 4: 08 95 ret Cheers Nick
Hi Nick, I just redownloaded and reinstalled the binutils-avr 2.20-2 package for Debian/testing on i386. avr% avr-objdump -d bug-lpm.o 00000000 <try_asm>: 0: 25 91 lpm r18, Z+ 2: 24 91 lpm r18, Z+ 4: 08 95 ret avr% avr-objdump --version GNU objdump (GNU Binutils) 2.20 So you suggest, that this is a bug in the debian packaging?
Hi Elrond, > So you suggest, that this is a bug in the debian packaging? I would have to say yes, although it does seem rather strange. Perhaps you could try downloading a snapshot of the current development sources from here: ftp://sourceware.org/pub/binutils/snapshots/ See if an objdump built from these sources shows the same problem. Cheers Nick
I currently don't have the time to build complex packages straight from source. For the time being, I've filed a bug with debian: http://bugs.debian.org/558335 I hope, the debian maintainer can put some light on this.