This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Assembly output optimisations (was: PR 51094 - fprint_w() in output_addr_const() reinstated)
- From: Dimitrios Apostolou <jimis at gmx dot net>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Andrey Belevantsev <abel at ispras dot ru>, jason at gcc dot gnu dot org, Hans-Peter Nilsson <hp at bitrange dot com>, Mike Stump <mikestump at comcast dot net>, Andreas Schwab <schwab at linux-m68k dot org>
- Date: Wed, 8 Aug 2012 00:24:38 +0300 (EEST)
- Subject: Re: Assembly output optimisations (was: PR 51094 - fprint_w() in output_addr_const() reinstated)
- References: <alpine.LNX.2.02.1208070228080.20463@localhost.localdomain>
I should mention that with my patch .ascii is used more aggresively than
before, so if a string is longer than ELF_STRING_LIMIT it will be written
as .ascii all of it, while in the past it would use .string for the
string's tail. Example diff to original behaviour:
.LASF15458:
- .ascii "SSA_VAR_P(DECL) (TREE_CODE (DECL) == VA"
- .string "R_DECL || TREE_CODE (DECL) == PARM_DECL || TREE_CODE (DECL) == RESULT_DECL || (TREE_CODE (DECL) == SSA_NAME && (TREE_CODE (SSA_NAME_VAR (DECL)) == VAR_DECL || TREE_CODE (SSA_NAME_VAR (DECL)) == PARM_DECL || TREE_CODE (SSA_NAME_VAR (DECL)) == RESULT_DECL)))"
+ .ascii "SSA_VAR_P(DECL) (TREE_CODE (DECL) == VAR_DECL || TREE_CODE (D"
+ .ascii "ECL) == PARM_DECL || TREE_CODE (DECL) == RESULT_DECL || (TREE"
+ .ascii "_CODE (DECL) == SSA_NAME && (TREE_CODE (SSA_NAME_VAR (DECL)) "
+ .ascii "== VAR_DECL || TREE_CODE (SSA_NAME_VAR (DECL)) == PARM_DECL |"
+ .ascii "| TREE_CODE (SSA_NAME_VAR (DECL)) == RESULT_DECL)))\000"
BTW I can't find why ELF_STRING_LIMIT is only 256, it seems GAS supports
arbitrary lengths. I'd have to change my code if we ever set it too high
(or even unlimited) since I allocate the buffer on the stack.
Dimitris