Bug 35073 - illegal opcode movw for mcu avr3
Summary: illegal opcode movw for mcu avr3
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 35128 35506 36845 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-02-04 09:14 UTC by Ralf Corsepius
Modified: 2014-02-16 13:14 UTC (History)
8 users (show)

See Also:
Host:
Target: avr-*-*
Build:
Known to work: 4.7.0
Known to fail: 4.2.3, 4.3.0
Last reconfirmed: 2008-02-11 16:44:30


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Corsepius 2008-02-04 09:14:24 UTC
Building/bootstrapping today's gcc-trunk (rev. 132088/2008-02-04) for avr-rtems4.9 fails
with:
...
/users/rtems/src/toolchains/BUILD/avr-rtems4.9/./gcc/xgcc -B/users/rtems/src/toolchains/BUILD/avr-rtems4.9/./gcc/ -nostdinc -B/users/rtems/src/toolchains/BUILD/avr-rtems4.9/avr-rtems4.9/newlib/ -isystem /users/rtems/src/toolchains/BUILD/avr-rtems4.9/avr-rtems4.9/newlib/targ-include -isystem /users/rtems/src/toolchains/gcc-trunk/newlib/libc/include -B/opt/rtems-4.9/avr-rtems4.9/bin/ -B/opt/rtems-4.9/avr-rtems4.9/lib/ -isystem /opt/rtems-4.9/avr-rtems4.9/include -isystem /opt/rtems-4.9/avr-rtems4.9/sys-include -O2 -g -g -O2 -mmcu=avr35 -O2 -I../../../gcc-trunk/gcc/../newlib/libc/sys/rtems/include -O2 -g -g -O2   -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -DDF=SF -Dinhibit_libc -mcall-prologues -Os -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc  -I. -I. -I../../.././gcc -I../../../../../gcc-trunk/libgcc -I../../../../../gcc-trunk/libgcc/. -I../../../../../gcc-trunk/libgcc/../gcc -I../../../../../gcc-trunk/libgcc/../include   -o _mulsi3.o -MT _mulsi3.o -MD -MP -MF _mulsi3.dep -DL_mulsi3 -xassembler-with-cpp \
          -c ../../../../../gcc-trunk/libgcc/../gcc/config/avr/libgcc.S
../../../../../gcc-trunk/libgcc/../gcc/config/avr/libgcc.S: Assembler messages:
../../../../../gcc-trunk/libgcc/../gcc/config/avr/libgcc.S:281: Error: illegal opcode movw for mcu avr3
../../../../../gcc-trunk/libgcc/../gcc/config/avr/libgcc.S:283: Error: illegal opcode movw for mcu avr3
make[4]: *** [_mulsi3.o] Error 1
make[4]: Leaving directory `/users/rtems/src/toolchains/BUILD/avr-rtems4.9/avr-rtems4.9/avr35/libgcc'
Comment 1 Richard Biener 2008-02-08 11:26:26 UTC
*** Bug 35128 has been marked as a duplicate of this bug. ***
Comment 2 Joel Sherrill 2008-02-11 14:49:25 UTC
Sent privately... wanted to log this .. untested at this point.

Please excuse me, I could not reply earlier.

Use patch for binutils:
http://sourceware.org/ml/binutils/2008-01/msg00037.html

Anatoly.

Comment 3 Manuel López-Ibáñez 2008-02-11 16:44:30 UTC
This seems confirmed
Comment 4 Ralf Corsepius 2008-02-11 17:17:42 UTC
The binutils patch mentioned in comment#2 seems to fix this issue.

Today's gcc-trunk using binutils-2.18 with the patch applied doesn't expose this breakdown anymore.

=> The cause for this breakdown was using insufficient binutils.
   Bootstrapping/building gcc-4.3 for the avr requires binutils > 2.18.
Comment 5 Rudolf Leitgeb 2008-02-11 17:48:52 UTC
Subject: Re:  illegal opcode movw for mcu avr3

Please note, that this bug is also apparent in the production
version of gcc 4.2.3. This is the specific reason why I posted
a supposed copy of the original bug report: the original bug
report mentioned version 4.3, and I was unable to add version 4.2.3
to the list of affected gcc releases.

Hopefully I can get around to try out the patch tonight. Please
note that while it's perfectly acceptable for a snapshot release
like gcc 4.3 to require patched binutils, this should not happen
for a standard release version of gcc IMHO. AFAIK there is no
binutils production release newer than 2.18 at the moment.

Cheers,

Rudi

Am 11.02.2008 um 18:17 schrieb corsepiu at gcc dot gnu dot org:

>
>
> ------- Comment #4 from corsepiu at gcc dot gnu dot org  2008-02-11  
> 17:17 -------
> The binutils patch mentioned in comment#2 seems to fix this issue.
>
> Today's gcc-trunk using binutils-2.18 with the patch applied  
> doesn't expose
> this breakdown anymore.
>
> => The cause for this breakdown was using insufficient binutils.
>    Bootstrapping/building gcc-4.3 for the avr requires binutils >  
> 2.18.
>
>
> -- 
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35073
>
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.

Comment 6 Rudolf Leitgeb 2008-02-11 19:25:36 UTC
I just tried the suggested patch against binutils 2.18, gcc 4.2.3 still does not compile. Also, the suggested patch does not apply cleanly against 2.18, although this only affects a .texi file which is not needed for compilation. It does indicate, though, that the patch wa snot meant for binutils 2.18 but some preversion of binutils 2.19 instead.

I hope this new version comes of binutils out soon, since 2.18 doesn't know of a platform avr35 :-( Hence gcc 4.2.3 uses avr3 which causes touble.

Note: I don't fully understand why the patch doesn't work. I clearly see a line which defines the AVR3 platform to support MOVW, I did a make clean && make && make install of the manually patched binutils before trying gcc again (also with make clean && configure --target=avr && make)

Maybe I have to wait for binutils 2.19 before this gets cleared up ...
Comment 7 Eric Weddington 2008-02-11 22:50:08 UTC
You can also try the patch set for binutils 2.18 at the WinAVR project's CVS: <http://winavr.cvs.sourceforge.net/winavr/>. Under the "patches" module.
Comment 8 Eric Weddington 2008-03-09 05:43:26 UTC
*** Bug 35506 has been marked as a duplicate of this bug. ***
Comment 9 Eric Weddington 2008-07-19 13:05:43 UTC
*** Bug 36845 has been marked as a duplicate of this bug. ***
Comment 10 Georg-Johann Lay 2011-04-21 10:29:55 UTC
Closed as resolved+fixed.

avr-gcc builds fine as of 4.7.0 snapshot from 2011-04-16.

Both avr-binutils 2.20 and 2.21 work.
Comment 11 Jackie Rosen 2014-02-16 13:14:50 UTC Comment hidden (spam)