public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Bob Wilson <bwilson@tensilica.com>
To: binutils@sources.redhat.com
Subject: [Xtensa] avoid extra entries in literal tables
Date: Tue, 25 Apr 2006 17:14:00 -0000	[thread overview]
Message-ID: <444E505D.4030307@tensilica.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 581 bytes --]

The Xtensa literal tables (e.g., .xt.lit sections) are not relevant for 
"absolute-mode" literals (e.g., in .lit4 sections), but in some cases, literal 
table entries were being generated for them anyway.  This patch changes GAS so 
that the "is_literal" flag is only set by the mark_literal_frags() function. 
Tested with an xtensa-elf target and committed on the mainline and 2.17 branch.

2006-04-25  Bob Wilson  <bob.wilson@acm.org>

	* config/tc-xtensa.c (xtensa_create_literal_symbol,
	xg_assemble_literal, xg_assemble_literal_space): Do not set the
	frag's is_literal flag.

[-- Attachment #2: gas-lit-tab.diff --]
[-- Type: text/x-patch, Size: 1472 bytes --]

Index: config/tc-xtensa.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-xtensa.c,v
retrieving revision 1.64
diff -u -p -r1.64 tc-xtensa.c
--- config/tc-xtensa.c	23 Apr 2006 22:12:43 -0000	1.64
+++ config/tc-xtensa.c	25 Apr 2006 15:49:51 -0000
@@ -3980,7 +3980,6 @@ xtensa_create_literal_symbol (segT sec, 
 
   xtensa_add_literal_sym (symbolP);
 
-  frag->tc_frag_data.is_literal = TRUE;
   lit_num++;
   return symbolP;
 }
@@ -4046,7 +4045,6 @@ xg_assemble_literal (/* const */ TInsn *
   frag_now->tc_frag_data.literal_frag = get_literal_pool_location (now_seg);
   frag_now->fr_symbol = xtensa_create_literal_symbol (now_seg, frag_now);
   lit_sym = frag_now->fr_symbol;
-  frag_now->tc_frag_data.is_literal = TRUE;
 
   /* Go back.  */
   xtensa_restore_emit_state (&state);
@@ -4075,7 +4073,6 @@ xg_assemble_literal_space (/* const */ i
 
   lit_saved_frag = frag_now;
   frag_now->tc_frag_data.literal_frag = get_literal_pool_location (now_seg);
-  frag_now->tc_frag_data.is_literal = TRUE;
   frag_now->fr_symbol = xtensa_create_literal_symbol (now_seg, frag_now);
   xg_finish_frag (0, RELAX_LITERAL, 0, size, FALSE);
 
@@ -4230,7 +4227,6 @@ xg_resolve_labels (TInsn *insn, symbolS 
 {
   symbolS *sym = get_special_label_symbol ();
   int i;
-  /* assert (!insn->is_literal); */
   for (i = 0; i < insn->ntok; i++)
     if (insn->tok[i].X_add_symbol == sym)
       insn->tok[i].X_add_symbol = label_sym;

                 reply	other threads:[~2006-04-25 16:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=444E505D.4030307@tensilica.com \
    --to=bwilson@tensilica.com \
    --cc=binutils@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).