From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9448 invoked by alias); 25 Apr 2006 16:37:55 -0000 Received: (qmail 9398 invoked by uid 22791); 25 Apr 2006 16:37:54 -0000 X-Spam-Check-By: sourceware.org Received: from hq.tensilica.com (HELO mailapp.tensilica.com) (65.205.227.29) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 25 Apr 2006 16:37:53 +0000 Received: from localhost ([127.0.0.1] ident=amavis) by mailapp.tensilica.com with esmtp (Exim 4.34) id 1FYQXu-0008Mo-6l for binutils@sources.redhat.com; Tue, 25 Apr 2006 09:37:50 -0700 Received: from mailapp.tensilica.com ([127.0.0.1]) by localhost (mailapp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 31140-08 for ; Tue, 25 Apr 2006 09:37:50 -0700 (PDT) Received: from heron.hq.tensilica.com ([192.168.11.123]) by mailapp.tensilica.com with esmtp (Exim 4.34) id 1FYQXt-0008Mi-Sg for binutils@sources.redhat.com; Tue, 25 Apr 2006 09:37:49 -0700 Received: from [192.168.11.123] (heron.hq.tensilica.com [192.168.11.123]) by heron.hq.tensilica.com (8.13.6/8.13.6) with ESMTP id k3PGbnsV009608 for ; Tue, 25 Apr 2006 09:37:49 -0700 Message-ID: <444E505D.4030307@tensilica.com> Date: Tue, 25 Apr 2006 17:14:00 -0000 From: Bob Wilson User-Agent: Thunderbird 1.5 (X11/20060313) MIME-Version: 1.0 To: binutils@sources.redhat.com Subject: [Xtensa] avoid extra entries in literal tables Content-Type: multipart/mixed; boundary="------------040507020708010203010202" Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00340.txt.bz2 This is a multi-part message in MIME format. --------------040507020708010203010202 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 581 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 * config/tc-xtensa.c (xtensa_create_literal_symbol, xg_assemble_literal, xg_assemble_literal_space): Do not set the frag's is_literal flag. --------------040507020708010203010202 Content-Type: text/x-patch; name="gas-lit-tab.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gas-lit-tab.diff" Content-length: 1472 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; --------------040507020708010203010202--