From c217bac5d48b595182601eb08c92cae177a3bef2 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Wed, 25 Nov 2015 19:12:51 +0100 Subject: [PATCH] varasm.c (default_elf_asm_output_limited_string, [...]): Replace fprintf by putc. * varasm.c (default_elf_asm_output_limited_string, default_elf_asm_output_ascii): Replace fprintf by putc. From-SVN: r230895 --- gcc/ChangeLog | 5 +++++ gcc/varasm.c | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 48f96a0707d..9ee04518fcb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-11-25 Jan Hubicka + + * varasm.c (default_elf_asm_output_limited_string, + default_elf_asm_output_ascii): Replace fprintf by putc. + 2015-11-25 Vladimir Makarov PR rtl-optimization/67954 diff --git a/gcc/varasm.c b/gcc/varasm.c index 31411101267..a2adcdba092 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -7599,8 +7599,10 @@ default_elf_asm_output_limited_string (FILE *f, const char *s) putc (c, f); break; case 1: - /* TODO: Print in hex with fast function, important for -flto. */ - fprintf (f, "\\%03o", c); + putc ('\\', f); + putc ('0'+((c>>6)&7), f); + putc ('0'+((c>>3)&7), f); + putc ('0'+(c&7), f); break; default: putc ('\\', f); @@ -7670,8 +7672,10 @@ default_elf_asm_output_ascii (FILE *f, const char *s, unsigned int len) bytes_in_chunk++; break; case 1: - /* TODO: Print in hex with fast function, important for -flto. */ - fprintf (f, "\\%03o", c); + putc ('\\', f); + putc ('0'+((c>>6)&7), f); + putc ('0'+((c>>3)&7), f); + putc ('0'+(c&7), f); bytes_in_chunk += 4; break; default: -- 2.30.2