avr.c (avr_asm_only_p): New variable.
authorMarek Michalkiewicz <marekm@amelek.gda.pl>
Sun, 26 May 2002 17:09:55 +0000 (19:09 +0200)
committerMarek Michalkiewicz <marekm@gcc.gnu.org>
Sun, 26 May 2002 17:09:55 +0000 (17:09 +0000)
* config/avr/avr.c (avr_asm_only_p): New variable.
(avr_override_options): Set it here if AVR1.
(asm_file_start): Test it here, report an error if set.

From-SVN: r53899

gcc/ChangeLog
gcc/config/avr/avr.c

index 085dc40f98a140615046c7ed4a7b5b885ce80794..55ffba4030218a9f4a08cc212f41e0593ca2eade 100644 (file)
@@ -1,3 +1,9 @@
+2002-05-26  Marek Michalkiewicz  <marekm@amelek.gda.pl>
+
+       * config/avr/avr.c (avr_asm_only_p): New variable.
+       (avr_override_options): Set it here if AVR1.
+       (asm_file_start): Test it here, report an error if set.
+
 2002-05-26  Kazu Hirata  <kazu@cs.umass.edu>
 
        * alias.c: Fix formatting.
index b254c6ba0273ddd80dd0b112503c479f2ca058ae..5167ee65ada31726e659adeff3244ecb77198061 100644 (file)
@@ -114,6 +114,9 @@ int avr_mega_p = 0;
 /* Enhanced core: use "movw", "mul", ...  */
 int avr_enhanced_p = 0;
 
+/* Assembler only.  */
+static int avr_asm_only_p = 0;
+
 enum avr_arch {
   AVR1 = 1,
   AVR2,
@@ -227,7 +230,7 @@ avr_override_options ()
     {
     case AVR1:
     default:
-      error ("MCU `%s' not supported", avr_mcu_name);
+      avr_asm_only_p = 1;
       /* ... fall through ... */
     case AVR2: avr_enhanced_p = 0; avr_mega_p = 0; break;
     case AVR3: avr_enhanced_p = 0; avr_mega_p = 1; break;
@@ -4792,6 +4795,9 @@ void
 asm_file_start (file)
      FILE *file;
 {
+  if (avr_asm_only_p)
+    error ("MCU `%s' supported for assembler only", avr_mcu_name);
+
   output_file_directive (file, main_input_filename);
   fprintf (file, "\t.arch %s\n", avr_mcu_name);
   fputs ("__SREG__ = 0x3f\n"