aboutsummaryrefslogtreecommitdiff
path: root/boehm-gc/blacklst.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2024-07-17 17:30:24 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2024-07-17 17:30:24 +0200
commitd8a75353dded30a7ecdef2807ad101a02743d4a9 (patch)
tree83554ccd5f68d82fbbcaa722b4aaa7e83afe94a2 /boehm-gc/blacklst.c
parent0135a90de5a99b51001b6152d8b548151ebfa1c3 (diff)
downloadgcc-master.zip
gcc-master.tar.gz
gcc-master.tar.bz2
varasm: Shorten assembly of strings with larger zero regionsHEADtrunkmaster
When not using .base64 directive, we emit for long sequences of zeros .string "foobarbaz" .string "" .string "" .string "" .string "" .string "" .string "" .string "" .string "" .string "" .string "" .string "" .string "" The following patch changes that to .string "foobarbaz" .zero 12 It keeps emitting .string "" if there is just one zero or two zeros where the first one is preceded by non-zeros, so we can have .string "foobarbaz" .string "" or .base64 "VG8gYmUgb3Igbm90IHRvIGJlLCB0aGF0IGlzIHRoZSBxdWVzdGlvbg==" .string "" but not 2 .string "" in a row. On a testcase I have with around 310440 0-255 unsigned char character constants mostly derived from cc1plus start but with too long sequences of 0s which broke transformation to STRING_CST adjusted to have at most 126 consecutive 0s, I see: 1504498 bytes long assembly without this patch on i686-linux (without .base64 support in binutils) 1155071 bytes long assembly with this patch on i686-linux (without .base64 support in binutils) 431390 bytes long assembly without this patch on x86_64-linux (with .base64 support in binutils) 427593 bytes long assembly with this patch on x86_64-linux (with .base64 support in binutils) All 4 assemble to identical *.o file when using x86_64-linux .base64 supporting gas, and the former 2 when using older x86_64-linux gas assemble to identical content as well. 2024-07-17 Jakub Jelinek <jakub@redhat.com> * varasm.cc (default_elf_asm_output_ascii): Use ASM_OUTPUT_SKIP instead of 2 or more default_elf_asm_output_limited_string (f, "") calls and adjust base64 heuristics correspondingly.
Diffstat (limited to 'boehm-gc/blacklst.c')
0 files changed, 0 insertions, 0 deletions