Weddington, Eric wrote: >> -----Original Message----- >> From: Georg-Johann Lay [mailto:a...@gjlay.de] >> Sent: Monday, August 01, 2011 8:38 AM >> To: gcc-patches@gcc.gnu.org >> Cc: Anatoly Sokolov; Denis Chertykov; Weddington, Eric >> Subject: [Patch,AVR]: Supply and use information on skip core bug >> >> Some AVR devices have the skip bug, i.e. they must not use any skip >> instruction to bypass a 2-word instruction. >> >> Affected devices are AT90S8515 (core avr2) and ATmega103 (core avr31). >> >> For information see the new file errata.txt. >> >> This patch supplies new built-in macros so that a user can test if that >> erratum might be active. Moreover, libgcc.S uses the new built-in macros >> because they allow for more exact test for the bug. >> >> struct mcu_type_s has a new field "errata_bug" which is set to one for the >> following devices: >> >> * avr2 and none (as avr2 is default if no -mmcu is given) >> * avr31 >> * at90s8515 >> * atmega103 >> >> avr-tables.opt does not change and needs not to be regenerated. >> >> Ok to install? > > > Hi Johann, > > It all looks fine to me, except that I don't think we really need to have a > separate errata.txt file, do we? The information in errata.txt could be > condensed (we don't need the full email response back from Atmel, just the > information that it is the 2 devices that have this errata) and put it in a > comment in avr-devices.c or avr-mcus.def. Approved with that small change. > > Thanks for doing this. > > Eric Weddington
Ok, I removed the separate file. Luckily AVRs have very little core bugs and I hope we will never need such a file... The original mail was much longer, I now added the relevant parts at the place where I would expect them: the structure definition in avr.h. I added parts from the mail header, too, in particular the subject so that someone else can refer to it. Applied with that change: http://gcc.gnu.org/viewcvs?view=revision&revision=177049 Johann * config/avr/avr.h (mcu_type_s): Add errata_skip field. * config/avr/avr-devices.c (avr_mcu_types): Use it. * config/avr/avr-mcus.def (AVR_MCU): Use it. * config/avr/avr-c.c (avr_cpu_cpp_builtins): Use it to builtin define __AVR_ERRATA_SKIP__ and __AVR_ERRATA_SKIP_JMP_CALL__. * config/avr/libgcc.S (__mulshisi3, __ffshi2, __fmulsu_exit): Use __AVR_ERRATA_SKIP_JMP_CALL__ instead of __AVR_HAVE_JMP_CALL__ to detect if XJMP must not be skipped.