diff mbox

[AVR] : ASM_SPEC: Add -mno-skip-bug

Message ID 4F4CAFD1.4090305@gjlay.de
State New
Headers show

Commit Message

Georg-Johann Lay Feb. 28, 2012, 10:43 a.m. UTC
This patch is addendum to support skip of 2-word instructions as of PR49939 and
the extension made in

http://gcc.gnu.org/viewcvs?view=revision&revision=177049

gas emits a warning if it sees a skip of 2-word instruction for cores that
might have the skip bug. However, only specific devices are affected by this
silicon bug, namely ATmega103 and AT90S8515.

The patch adds -mno-skip-bug option to gas's command line except for the cases
where the core might have the bug, i.e.

o  no -mmcu specified at all
o  -mmcu=atmega103
o  -mmcu=at90s8515
o  -mmcu=avr31
o  -mmcu=avr2

Ok for the trunk?

Johann

	* config/avr/avr.h (ASM_SPEC): Add -mno-skip-bug if we know that
	the device does not have the skip-bug.

Comments

Denis Chertykov Feb. 28, 2012, 2:12 p.m. UTC | #1
2012/2/28 Georg-Johann Lay <avr@gjlay.de>:
> This patch is addendum to support skip of 2-word instructions as of PR49939 and
> the extension made in
>
> http://gcc.gnu.org/viewcvs?view=revision&revision=177049
>
> gas emits a warning if it sees a skip of 2-word instruction for cores that
> might have the skip bug. However, only specific devices are affected by this
> silicon bug, namely ATmega103 and AT90S8515.
>
> The patch adds -mno-skip-bug option to gas's command line except for the cases
> where the core might have the bug, i.e.
>
> o  no -mmcu specified at all
> o  -mmcu=atmega103
> o  -mmcu=at90s8515
> o  -mmcu=avr31
> o  -mmcu=avr2
>
> Ok for the trunk?
>
> Johann
>
>        * config/avr/avr.h (ASM_SPEC): Add -mno-skip-bug if we know that
>        the device does not have the skip-bug.

Ok.

Denis.
diff mbox

Patch

Index: config/avr/avr.h
===================================================================
--- config/avr/avr.h	(revision 184618)
+++ config/avr/avr.h	(working copy)
@@ -595,7 +595,9 @@  extern const char *avr_device_to_devicel
    pass to `cc1plus'.  */
 
 #define ASM_SPEC "%{mmcu=avr25:-mmcu=avr2;mmcu=avr35:-mmcu=avr3;mmcu=avr31:-mmcu=avr3;mmcu=avr51:-mmcu=avr5;\
-mmcu=*:-mmcu=%*}"
+mmcu=*:-mmcu=%*} \
+%{mmcu=*:%{!mmcu=avr2:%{!mmcu=at90s8515:%{!mmcu=avr31:%{!mmcu=atmega103:\
+-mno-skip-bug}}}}}"
 
 #define LINK_SPEC "\
 %{mrelax:--relax\