From: Paul Koning Date: Tue, 9 Nov 2010 01:07:14 +0000 (-0500) Subject: pdp11.c (pdp11_assemble_integer): Mask byte values to 8 bits. X-Git-Tag: releases/gcc-4.6.0~2810 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e285a2c6b4710c4a141fc18b7151457e4ae7f290;p=thirdparty%2Fgcc.git pdp11.c (pdp11_assemble_integer): Mask byte values to 8 bits. * config/pdp11/pdp11.c (pdp11_assemble_integer): Mask byte values to 8 bits. From-SVN: r166466 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 49378ae057dc..8bd5348c97cb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-11-08 Paul Koning + + * config/pdp11/pdp11.c (pdp11_assemble_integer): Mask byte values + to 8 bits. + 2010-11-08 Michael Meissner PR target/46378 diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c index 31e85c7e6f83..a9c758b45486 100644 --- a/gcc/config/pdp11/pdp11.c +++ b/gcc/config/pdp11/pdp11.c @@ -1002,7 +1002,10 @@ pdp11_assemble_integer (rtx x, unsigned int size, int aligned_p) { case 1: fprintf (asm_out_file, "\t.byte\t"); - output_addr_const_pdp11 (asm_out_file, x); + output_addr_const_pdp11 (asm_out_file, + GEN_INT (trunc_int_for_mode (INTVAL (x), + QImode) & 0xff)); +; fprintf (asm_out_file, " /* char */\n"); return true; @@ -1739,9 +1742,7 @@ output_addr_const_pdp11 (FILE *file, rtx x) break; case CONST_INT: - /* Should we check for constants which are too big? Maybe cutting - them off to 16 bits is OK? */ - fprintf (file, "%#ho", (unsigned short) INTVAL (x)); + fprintf (file, "%#o", (int) trunc_int_for_mode (INTVAL (x), HImode) & 0xffff); break; case CONST: