fix Xtensa literal sections for absolute-mode literals

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

fix Xtensa literal sections for absolute-mode literals

Bob Wilson
For an Xtensa processor with the "absolute literals" configuration option, the
use_literal_section flag in the assembler is only supposed to affect the
behavior when the absolute literal mode is disabled.  This patch fixes a bug
where that flag was used incorrectly.  The ".begin literal_prefix" directive
pushes a new set of literal section names onto a stack, and the corresponding
".end literal_prefix" directive needs to pop that stack, regardless of
use_literal_section.  I verified that this patch does not cause any GAS
testsuite regressions for an xtensa-elf target.  Committed on the mainline.

2005-10-18  Bob Wilson  <[hidden email]>

        * config/tc-xtensa.c (xtensa_end_directive): Restore
        default_lit_sections regardless of use_literal_section.

Index: config/tc-xtensa.c
RCS file: /cvs/src/src/gas/config/tc-xtensa.c,v
retrieving revision 1.47
diff -u -p -r1.47 tc-xtensa.c
--- config/tc-xtensa.c 17 Oct 2005 18:17:08 -0000 1.47
+++ config/tc-xtensa.c 18 Oct 2005 22:59:08 -0000
@@ -1361,8 +1361,7 @@ xtensa_end_directive (int ignore ATTRIBU
       s = (lit_state *) state;
       assert (s);
-      if (use_literal_section)
- default_lit_sections = *s;
+      default_lit_sections = *s;
       /* free the state storage */
       free (s);