Add support for intel SERIALIZE instruction
[deliverable/binutils-gdb.git] / gas / config / tc-avr.c
index edf60f4abef0a8e533bbdcb4b6aa8b29bae6121d..3e0b3102c9fecab0820817d922dba5d2dc036d18 100644 (file)
@@ -1,6 +1,6 @@
 /* tc-avr.c -- Assembler code for the ATMEL AVR
 
-   Copyright (C) 1999-2018 Free Software Foundation, Inc.
+   Copyright (C) 1999-2020 Free Software Foundation, Inc.
    Contributed by Denis Chertykov <denisc@overta.ru>
 
    This file is part of GAS, the GNU Assembler.
@@ -23,7 +23,6 @@
 #include "as.h"
 #include "safe-ctype.h"
 #include "subsegs.h"
-#include "struc-symbol.h"
 #include "dwarf2dbg.h"
 #include "dw2gencfi.h"
 #include "elf/avr.h"
@@ -481,13 +480,11 @@ const char EXP_CHARS[] = "eE";
 const char FLT_CHARS[] = "dD";
 
 static void avr_set_arch (int);
-static void avr_set_section (int);
 
 /* The target specific pseudo-ops which we support.  */
 const pseudo_typeS md_pseudo_table[] =
 {
   {"arch", avr_set_arch,       0},
-  {"section", avr_set_section,  0},
   { NULL,      NULL,           0}
 };
 
@@ -704,23 +701,6 @@ avr_set_arch (int dummy ATTRIBUTE_UNUSED)
   bfd_set_arch_mach (stdoutput, TARGET_ARCH, avr_mcu->mach);
 }
 
-static void
-avr_set_section (int push)
-{
-  obj_elf_section (push);
-
-  /* PR 23570.  The .noinit section needs to be explicitly
-     set to the NOBITS type.  */
-  if (seg_info (now_seg)->bss == 0
-      && strcmp (bfd_get_section_name (stdoutput, now_seg), ".noinit") == 0)
-    {
-      bfd_set_section_flags (stdoutput, now_seg, SEC_ALLOC | SEC_RELOC);
-      seg_info (now_seg)->bss = 1;
-      elf_section_type (now_seg) = SHT_NOBITS;
-      elf_section_flags (now_seg) = SHF_ALLOC | SHF_WRITE;
-    }
-}
-
 int
 md_parse_option (int c, const char *arg)
 {
@@ -1449,7 +1429,7 @@ avr_operands (struct avr_opcodes_s *opcode, char **line)
 valueT
 md_section_align (asection *seg, valueT addr)
 {
-  int align = bfd_get_section_alignment (stdoutput, seg);
+  int align = bfd_section_alignment (seg);
   return ((addr + (1 << align) - 1) & (-1UL << align));
 }
 
@@ -2249,7 +2229,7 @@ avr_create_property_section (void)
   sec = bfd_make_section (stdoutput, section_name);
   if (sec == NULL)
     as_fatal (_("Failed to create property section `%s'\n"), section_name);
-  bfd_set_section_flags (stdoutput, sec, flags);
+  bfd_set_section_flags (sec, flags);
   sec->output_section = sec;
   return sec;
 }
@@ -2424,7 +2404,7 @@ avr_create_and_fill_property_section (void)
     return;
 
   prop_sec = avr_create_property_section ();
-  bfd_set_section_size (stdoutput, prop_sec, sec_size);
+  bfd_set_section_size (prop_sec, sec_size);
 
   subseg_set (prop_sec, 0);
   frag_base = frag_more (sec_size);
@@ -2647,8 +2627,7 @@ avr_patch_gccisr_frag (fragS *fr, int reg)
       symbolS *sy = avr_isr.sym_n_pushed;
       /* Turn magic `__gcc_isr.n_pushed' into its now known value.  */
 
-      sy->sy_value.X_op = O_constant;
-      sy->sy_value.X_add_number = n_pushed;
+      S_SET_VALUE (sy, n_pushed);
       S_SET_SEGMENT (sy, expr_section);
       avr_isr.sym_n_pushed = NULL;
     }
@@ -2656,8 +2635,8 @@ avr_patch_gccisr_frag (fragS *fr, int reg)
   /* Turn frag into ordinary code frag of now known size.  */
 
   fr->fr_var = 0;
-  fr->fr_fix = (offsetT) (where - fr->fr_literal);
-  gas_assert (fr->fr_fix <= fr->fr_offset);
+  fr->fr_fix = where - fr->fr_literal;
+  gas_assert (fr->fr_fix <= (valueT) fr->fr_offset);
   fr->fr_offset = 0;
   fr->fr_type = rs_fill;
   fr->fr_subtype = 0;
This page took 0.02698 seconds and 4 git commands to generate.