From patchwork Fri May 13 13:57:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: ARM fixed-point support [2/6]: assembler format for fixed-point constants Date: Fri, 13 May 2011 03:57:34 -0000 From: Julian Brown X-Patchwork-Id: 95479 Message-Id: <20110513145734.0a9f4277@rex.config> To: gcc-patches@gcc.gnu.org This patch changes the format used to print fixed-point constants from hex to decimal. For instance a negative "short fract" fixed-point constant may be represented as a signed HOST_WIDE_INT from -1 to -128, which would currently be printed as e.g. 0xfff....ffxx, resulting in a "bignum truncated to fit" warning from the assembler. This trouble is avoided if we just print using integers instead, similarly to the way signed character-constants are emitted elsewhere in the compiler. Tested along with the rest of the patch series. OK to apply? Julian ChangeLog * final.c (output_addr_const): Print fixed-point constants as decimal not hex (avoiding an assembler overflow warning for negative byte constants). commit 7c169485b6e5b153af02c83e8b858b8613ed7664 Author: Julian Brown Date: Fri May 13 05:44:19 2011 -0700 Tweak fixed-point constant format. diff --git a/gcc/final.c b/gcc/final.c index 7e1ae90..b147ddf 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -3633,8 +3633,7 @@ output_addr_const (FILE *file, rtx x) break; case CONST_FIXED: - fprintf (file, HOST_WIDE_INT_PRINT_HEX, - (unsigned HOST_WIDE_INT) CONST_FIXED_VALUE_LOW (x)); + fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_FIXED_VALUE_LOW (x)); break; case PLUS: