Support Intel FRED LKGS
[binutils-gdb.git] / gas / config / tc-xtensa.c
index 3e3deb5dd3654b67d916fec4ea3e26c38f839489..550c8256e3f01df420276f70940aa3f59e25ce7d 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-xtensa.c -- Assemble Xtensa instructions.
-   Copyright (C) 2003-2022 Free Software Foundation, Inc.
+   Copyright (C) 2003-2023 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
 #include "xtensa-relax.h"
 #include "dwarf2dbg.h"
 #include "xtensa-istack.h"
-#include "xtensa-config.h"
+#include "xtensa-dynconfig.h"
 #include "elf/xtensa.h"
 
-/* Provide default values for new configuration settings.  */
-#ifndef XTHAL_ABI_WINDOWED
-#define XTHAL_ABI_WINDOWED 0
-#endif
-
-#ifndef XTHAL_ABI_CALL0
-#define XTHAL_ABI_CALL0 1
-#endif
-
-#ifndef XTENSA_MARCH_EARLIEST
-#define XTENSA_MARCH_EARLIEST 0
-#endif
-
 #ifndef uint32
 #define uint32 unsigned int
 #endif
@@ -94,7 +81,7 @@ static enum debug_info_type xt_saved_debug_type = DEBUG_NONE;
 /* Some functions are only valid in the front end.  This variable
    allows us to assert that we haven't crossed over into the
    back end.  */
-static bool past_xtensa_end = false;
+static bool past_xtensa_md_finish = false;
 
 /* Flags for properties of the last instruction in a segment.  */
 #define FLAG_IS_A0_WRITER      0x1
@@ -1189,9 +1176,9 @@ const pseudo_typeS md_pseudo_table[] =
 static bool
 use_transform (void)
 {
-  /* After md_end, you should be checking frag by frag, rather
+  /* After md_finish, you should be checking frag by frag, rather
      than state directives.  */
-  gas_assert (!past_xtensa_end);
+  gas_assert (!past_xtensa_md_finish);
   return directive_state[directive_transform];
 }
 
@@ -1199,10 +1186,10 @@ use_transform (void)
 static bool
 do_align_targets (void)
 {
-  /* Do not use this function after md_end; just look at align_targets
+  /* Do not use this function after md_finish; just look at align_targets
      instead.  There is no target-align directive, so alignment is either
      enabled for all frags or not done at all.  */
-  gas_assert (!past_xtensa_end);
+  gas_assert (!past_xtensa_md_finish);
   return align_targets && use_transform ();
 }
 
@@ -4980,7 +4967,7 @@ xtensa_set_frag_assembly_state (fragS *fragP)
     fragP->tc_frag_data.is_no_density = true;
 
   /* This function is called from subsegs_finish, which is called
-     after xtensa_end, so we can't use "use_transform" or
+     after xtensa_md_finish, so we can't use "use_transform" or
      "use_schedule" here.  */
   if (!directive_state[directive_transform])
     fragP->tc_frag_data.is_no_transform = true;
@@ -6600,7 +6587,7 @@ find_vinsn_conflicts (vliw_insn *vinsn)
   int branches = 0;
   xtensa_isa isa = xtensa_default_isa;
 
-  gas_assert (!past_xtensa_end);
+  gas_assert (!past_xtensa_md_finish);
 
   for (i = 0 ; i < vinsn->num_slots; i++)
     {
@@ -7369,7 +7356,7 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn)
 }
 
 \f
-/* xtensa_end and helper functions.  */
+/* xtensa_md_finish and helper functions.  */
 
 static void xtensa_cleanup_align_frags (void);
 static void xtensa_fix_target_frags (void);
@@ -7384,12 +7371,12 @@ static void xtensa_sanity_check (void);
 static void xtensa_add_config_info (void);
 
 void
-xtensa_end (void)
+xtensa_md_finish (void)
 {
   directive_balance ();
   xtensa_flush_pending_output ();
 
-  past_xtensa_end = true;
+  past_xtensa_md_finish = true;
 
   xtensa_move_literals ();
 
@@ -7927,7 +7914,7 @@ xtensa_maybe_create_literal_pool_frag (bool create, bool only_if_needed)
     {
       if (only_if_needed)
        {
-         if (past_xtensa_end || !use_transform() ||
+         if (past_xtensa_md_finish || !use_transform() ||
              frag_now->tc_frag_data.is_no_transform)
            {
              return;
@@ -8616,6 +8603,7 @@ unrelaxed_frag_max_size (fragS *fragP)
     case rs_leb128:
     case rs_cfa:
     case rs_dwarf2dbg:
+    case rs_sframe:
       /* No further adjustments needed.  */
       break;
     case rs_machine_dependent: