/* 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
/* 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
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];
}
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 ();
}
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;
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++)
{
}
\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);
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 ();
{
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;
case rs_leb128:
case rs_cfa:
case rs_dwarf2dbg:
+ case rs_sframe:
/* No further adjustments needed. */
break;
case rs_machine_dependent: